cflurin / homebridge-mqtt

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

Diff. between <set value (to homebridge)> and <set value (from homebridge)> #86

Closed IoTPlay closed 4 years ago

IoTPlay commented 4 years ago

I am not sure I undersrtand the diff between:

1) set value (to homebridge)

topic: homebridge/to/set
payload: {"name": "flex_lamp", "service_name": "light", "characteristic": "On", "value": true}

and 2) set value (from homebridge)

topic: homebridge/from/set
payload: {"name": "flex_lamp", "service_name": "light", "characteristic": "On", "value": true}

Could you explain please>?

emes commented 4 years ago
  1. set value (to homebridge): you telling HomeKit...

maybe you've detected a change outside of HomeKit. you get a message or some trigger that tells you that a door is open, a shade has moved, and these happen to be controlled outside of HomeKit but you want HomeKit to know.

or you want to trigger something that is directly controlled by HomeKit so you turn on a switch that you created because it's linked to a HomeKit scene or automation.

  1. set value (from homebridge): HomeKit telling you...

that something changed with an accessory that you previously created. someone turned on a switch using Home app, asked Siri to make a room warmer, etc., and you need to pass that info on to whoever actually controls the device.