cflurin / homebridge-mqtt

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

New user question #60

Closed aptonline closed 6 years ago

aptonline commented 6 years ago

I've just added the relevant code in config.json to connect to my mqtt broker but I'm not sure where the accessory code for the actual devices should go. I know you mention NodeRED (which I'm not using) so is there a way to use this plugin without using NodeRED?

Where should I be putting code such as this:

topic: homebridge/to/add
payload: {"name": "flex_lamp", "service_name": "light", "service": "Switch"}

I'm assuming its within the config.json file but its location is unclear from the docs.

Thanks

EDIT: Ok I came across this ( https://github.com/cflurin/homebridge-mqtt/issues/17 ) where you its clear the only code that need to go into config.jsonis for the connection itself, so all payloads needs to go via mqtt.

Still not 100% sure how this works however.

cflurin commented 6 years ago

Hi, Homebridge-mqtt is intended to be used in connection with devices supporting a mqtt API. Generally smart devices doesn't support mqtt. So I propose to use node-RED - which offer many option to connect a device and to send/receive the data to homebridge-mqtt using the build-in mqtt-node. You also can use Sonoff or ESP8266 devices (e.g. with the ESPeasy firmware).

aptonline commented 6 years ago

thanks for the reply. I'll look into setting up Node-Red on my Synology.