-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Send mqtt message when motion is detected #3152
Send mqtt message when motion is detected #3152
Conversation
Currently seeing an issue where the publish never goes through, wondering if passing the mqtt_client through the process to another thread could be what is causing the issue? Will have to keep digging. |
You can't pass the mqtt client to a separate process like this. It would need to be handled in object_processing.py along with the other mqtt sensors. |
Awesome, ended up being a lot cleaner as well! |
What do you think about adding an optional config option under the Edit: on second thought, it may not be necessary... There's lots of traffic already from HA sensors that can't easily be mitigated... |
I think it would need to be added to a |
Right. I think it should be good then. |
…to mqtt-motion-detector
Don't the other sensors publish ON and OFF? |
That's for the switches / toggles though, I don't believe we have any other sensors that publish a state so I was thinking "motion/detected = ON" wasn't as intuitive, but I don't feel strongly so if the consistency is better, then |
@blakeblackshear after thinking about it a bit more I can think of 3 good options:
let me know what you think 👍 |
If it will translate to an mqtt binary sensor in home assistant, I would prefer to stick the default expected payloads. That's why ON/OFF have been used historically. https://www.home-assistant.io/integrations/binary_sensor.mqtt/ |
…rigate into mqtt-motion-detector
Adds a motion topic that can be used as a generic motion detector.