jimpastos / wink-relay-manager

Manage Wink Relay's native sensors and publish to MQTT
46 stars 24 forks source link

Expose sensor value and screen state to MQTT #3

Closed laboye3148 closed 6 years ago

laboye3148 commented 6 years ago

Could the proximity sensor's value be sent to an MQTT topic? Or perhaps a binary 'tripped/not tripped' value from the ini's configured threshold?

Also, although the screen can be controlled via topic, can its status also be published?

jimpastos commented 6 years ago

The sensor value can be sent, but it will be very noisy and triggered very often. Unless some sort of fixed timer only sends it at fixed intervals if a diff is large enough Sending Triggered/non triggered should be straight forward. Same goes for screen state.

laboye3148 commented 6 years ago

I think the triggered/non-triggered and/or screen state should suffice, since that's based on the configured threshold. Basically trying to leverage the sensor for other HA tasks.

jimpastos commented 6 years ago

Added new topics and config values to enable. I haven't tested it so feel free to experiment and report back :) I just realized that the topics might be too noisy, as the proximity will trigger for any value over the threshold and the screen state will get a bunch of updates too

jimpastos commented 6 years ago

K added another update to only send screen updates if state has changed. Please test and report :)

jimpastos commented 6 years ago

Closing