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

New relay sync mode where all additional switches follow the first one #1609

Merged
merged 1 commit into from Mar 25, 2019

Conversation

foxel
Copy link
Contributor

@foxel foxel commented Mar 6, 2019

The new sync mode (named "Switch #0 controls other switches" in UI) means that if switch #0 changes other switches will sync to it but not vice-versa

This scheme come to my mind as a solution to a case when I want to have a switch turning all the relays ON and OFF in one click, but be able to control the secondary switches independently.

My UCs:

  1. I have a set of high-power and low-power lights for my desk, the low-power one is controlled by motion detection thru home-assistant, and i have a button which controls the high-power one. With this sync mode when i press this button I get all the lights on or off, and motion detection controls only one light.
  2. Over the dinner table I have a chandelier with two groups of bulbs, the chendelier is controlled thru 433 MHz RF remote on the wall and most common use of this is to turn the whole chendelier on/off, I could connect all the bulbs into one group but i still want to be able to set the lights to some dimmer state from my phone. This is also acheived with the synck mode suggested.

Do you think this is a valuable addition to the firmware?

@mcspr
Copy link
Collaborator

mcspr commented Mar 13, 2019

I think this matches nicely with other logic here.

And maybe one could describe several of such groups on one device?
e.g. 8 switch board, switch#1 controls first 3 switches, switch#4 controls last 3 in a similar manner.
idk though how this can be described in the config yet. only rough idea:
relayMode reuse relay mode from this option
relaySyncMap<relayID> bitmap of switches that are synchronized with the main one when it changes, but independent otherwise. e.g. relaySyncMap0 => 01110000, relaySyncMap4 => 00000111 for my example.

@xoseperez
Copy link
Owner

Nice one.

This could be the answer for #1062. Still, I'd prefer to merge this as is and the look for a more general solution.

@xoseperez xoseperez self-requested a review March 17, 2019 20:24
@xoseperez xoseperez merged commit bf705b2 into xoseperez:dev Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants