Skip to content

Lock relay status on boot - #1705

Merged
mcspr merged 11 commits into
xoseperez:devfrom
mcspr:relay/lock
Aug 12, 2019
Merged

Lock relay status on boot#1705
mcspr merged 11 commits into
xoseperez:devfrom
mcspr:relay/lock

Conversation

@mcspr

@mcspr mcspr commented Apr 26, 2019

Copy link
Copy Markdown
Collaborator

resolves #1697

  • relay_t::lock flag to control which target status we want. after relay changes to that status, we can no longer change it
  • boot mode setting to lock relay in either OFF or ON state

cc @goatchurchprime @xoseperez
this might interfere with planned motor changes from #1510 ?

@mcspr

mcspr commented May 11, 2019

Copy link
Copy Markdown
Collaborator Author

cc @lancelon
this will lock the relay instead of disabling the button. meaning, you can still receive button events if you want that
edit: PR adds the underlying api. meaning, we can also add something else (MQTT, HTTP API calls) to set lock. it is not only for boot modes

and plugging #1680 again, where you can modify hardware preset and just remove button gpio in config. also, see #1505 (instead of #1322 proposal).

@xoseperez

Copy link
Copy Markdown
Owner

I would add some visual notification to the web UI when the switch linked to the button is locked. Like disabling the toggle in the UI...

@mcspr

mcspr commented May 24, 2019

Copy link
Copy Markdown
Collaborator Author

"input[disabled]" does just that.
However, if lock becomes togglable, message should go with relayStatus instead. Maybe even nested within new relayState: {status: [...], lock:[...]}, since processData can encounter lock before any UI is initialized (can't depend on proper key ordering)

@mcspr
mcspr merged commit d431121 into xoseperez:dev Aug 12, 2019
@mcspr
mcspr deleted the relay/lock branch August 12, 2019 21:33
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.

Disable the switch option

2 participants