cflurin / homebridge-mqtt

Homebridge-mqtt is a Plugin for Homebridge.
Apache License 2.0
229 stars 38 forks source link

Motion detection #32

Closed sergejey closed 7 years ago

sergejey commented 7 years ago

Hello,

Could you please help me with payload for motion detection event? I'm trying to send following to homebridge/to/set topic: {"name":"MotionSensor1","service_name":"Motion 1","service":"MotionSensor","characteristic":"MotionDetected","value":true}

but it does not work for some reason

cflurin commented 7 years ago

@sergejey It should work.

How did you add the accessory? this way?

topic: homebridge/to/add
payload: {"name":"MotionSensor1","service_name":"Motion 1","service":"MotionSensor"}

btw. you don't need the service by homebridge/to/set:

{"name":"MotionSensor1","service_name":"Motion 1","characteristic":"MotionDetected","value":true}
sergejey commented 7 years ago

@cflurin , it works but it works strange for some reason -- it does not update the status on the phone in real-time (like it does for the switch for example). So I can set MotionDetected status but it takes a while when I got it updated on the phone. Did you see anything like that? Thanks anyway!

cflurin commented 7 years ago

Strange! It updates immediately on my iPhone.

Are you using a public mqtt-broker? iOS device? homebridge hardware, Raspberry PI?

My Layout: