Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more than 8 switches in Sonoff RF Bridge #1133

Closed
vaidyasr opened this issue Aug 14, 2018 · 10 comments
Closed

Add more than 8 switches in Sonoff RF Bridge #1133

vaidyasr opened this issue Aug 14, 2018 · 10 comments
Milestone

Comments

@vaidyasr
Copy link

I would like to add more than 8 switches from the default prebuilt binary. I have modified the arduino.h and hardware.h to accommodate 16 switches and successfully uploaded to the RF Bridge. After the web page loads, the page is randomly not loaded properly and the RF switch capturing page is not capturing full codes of RF. What am I missing?

@xoseperez
Copy link
Owner

Apparently, increasing the number of switches have a big impact on available memory. I'm trying to find the reason.

@xoseperez
Copy link
Owner

OK, api module was the culprit here, it was taking a lot of memory for each extra relay. You can checkout dev branch and update the hardware.h file to support 16 relays without issue. From them on other memory issues arise with the web support.

@champikasam
Copy link

I was looking for this feature. Any idea when this will be available in builds? Thanks!

@xoseperez
Copy link
Owner

With next release. By the end of August, I guess.

@vaidyasr
Copy link
Author

vaidyasr commented Aug 24, 2018

The new firmware can be upgraded via web page of existing firmware?.
And will there be an option to change the no. of switches in admin page?

@xoseperez
Copy link
Owner

Yes, it can be upgraded from the web UI and yes, there will be (not yet but soon) the option to change the number of switches from the web UI.

@peterhoeg
Copy link
Contributor

While changing DUMMY_RELAY_COUNT in custom.h makes additional 8 relays available in the UI, only the first 8 are submitted to home assistant for auto-discovery.

I also noticed, that the newly added additional 8 relays would have a garbage 1DE200F002E41C45E8 entry pre-populated in the "Switch OFF" fields for relays 8 to 15.

@peterhoeg
Copy link
Contributor

Should I open new issues for these 2 and reference back to this?

@mcspr
Copy link
Collaborator

mcspr commented Nov 14, 2018

@peterhoeg For rfbridge see #1308.
Hass issue is different, but close. One theory is it might lose the data in transport (network stack drops it), requiring some delay for it to go through.

@ghost
Copy link

ghost commented Nov 14, 2018

Yeah, #1308 is the same issue behind peterhoeg's problem, but it seems like in his case the data comes from uninitialized memory (hence why it is "garbage" in his case). Possibly an index programming error somewhere, in some loop where the logic wraps around the hardcoded old limit or some such. Not sure why the issue is closed. @xoseperez could you take a look? Since this will likely manifest in potentially destructive ways (whenever a write operation occurs it's going to be out of bounds too, thrashing whatever is there most likely).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants