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

MQTT: handle custom relay status payloads #1889

Merged
merged 3 commits into from
Sep 3, 2019

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Sep 3, 2019

  • customize TOGGLE payload
  • match payload string when receiving data
  • reference enum values instead of raw integers, spell out intended status
  • remove dead code

amend #1885, capitalize relayPayload... suffix instead of using uppercase
add relayPayloadToggle

@mcspr mcspr changed the title Relays: handle custom mqtt payloads when receiving messages MQTT: handle custom relay status payloads Sep 3, 2019
@mcspr mcspr merged commit beff73e into xoseperez:dev Sep 3, 2019
@mcspr mcspr deleted the relay/accept-custom-payload branch September 3, 2019 06:13
@mcspr
Copy link
Collaborator Author

mcspr commented Sep 3, 2019

cc @induprakash from #1085
General idea is configure both incoming and outgoing on/off/toggle payload strings from runtime. Outgoing is strictly from the setting, incoming is lax parsing matching old 0/1/2 first, then custom payloads and then "off"/"on"/"toggle" (case insensitive)

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

1 participant