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 support for manual mode state reporting #104

Closed
TD22057 opened this issue Feb 3, 2019 · 6 comments
Closed

Add support for manual mode state reporting #104

TD22057 opened this issue Feb 3, 2019 · 6 comments

Comments

@TD22057
Copy link
Owner

TD22057 commented Feb 3, 2019

@NickWaterton

Currently manual up/down is not being reported. Commands are handled correctly, but only the final state is send when it's achieved. Add an optional manual_state output template to Dimmer, KeypadLinc, and Remote with template arguments 'mode_str' = 'up', 'down', 'stop' as well as 'mode' = +1, -1, 0. See PR #103 for details.

@NickWaterton
Copy link

NickWaterton commented Feb 3, 2019 via email

@TD22057
Copy link
Owner Author

TD22057 commented Feb 3, 2019

OK.
Devices: Dimmer, KeypadLinc, Remote, Switch

Template parameters:

  • mode: -1 (down), 0 (stop), 1 (up)
  • openhab_mode: 0 (down), 1 (stop), 2 (up)

Optional config inputs for devices:

  • manual_state_topic
  • manual_state_payload

I'll fold in what you did into this system after merging in the fast on/off changes.

@NickWaterton
Copy link

NickWaterton commented Feb 3, 2019 via email

@TD22057
Copy link
Owner Author

TD22057 commented Feb 4, 2019

I haven't had time to update docs and tests yet, but you can find the code on the branch manual if you want to test it. As usual, it was more complicated than originally expected. I was able to test it for all the devices. Some behavior differences:

  • Dimmer: holding up down changes the dimming level so the device does a refresh when it gets a stop to find the final value.
  • Switch: the device changes state when pressed so that message is also emitted (holding up is a manual up + a turn on)
  • Keypadlinc group1: acts like a switch or dimmer depending on the model
  • Keypadlinc non-group 1: These buttons emit the manual up/down/stop message but do NOT change state when pressed. They alternate up/down when held repeatedly
  • Remote: same as keypadlinc non-group 1 buttons

@TD22057
Copy link
Owner Author

TD22057 commented Feb 5, 2019

manual branch has been merged to the dev branch in commit 3dc6079. Final API changed a little bit to make it more consistent with the other template values. See the config.yaml file for examples.

@TD22057 TD22057 closed this as completed Feb 5, 2019
@TD22057
Copy link
Owner Author

TD22057 commented Feb 16, 2019

Note: In 0.6.5, I changed the manual mode topics to force retain=False when sending. This stops the broker from saving a manual mode on/off message which isn't a persistent state like normal state updates.

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

2 participants