iomax / homebridge-mqttgaragedoor

Homebridge accessory plugin that create an HomeKit Garage Door Opener mapped on MQTT topics
Apache License 2.0
8 stars 9 forks source link

Can‘t get MQTT to work on Homebridge #18

Closed ScharV closed 4 years ago

ScharV commented 4 years ago

Hey folks i am trying to get this Plugin to work on Homebridge but the Plugin doesn‘t publish mqtt commands to the Broker. Hope somebody could help me. Here is my config: { "accessory" : "mqttgaragedoor", "caption" : "Garage", "topics" : { "closedGet" : "shellies/shelly1-xxxxx/input/0", "statusSet" : "shellies/shelly1-xxxxx/relay/0/command", "closedValue" : "1" }, "url" : "http://IP:Port", "doorRunInSeconds" : "22", "name" : "Garage" }

iomax commented 4 years ago

I'd try to check the "url" field ( "url": "mqtt://" )

ScharV commented 4 years ago

@iomax thanks for your fast reply tried ist before but also doesn’t work.🤷🏻‍♂️

iomax commented 4 years ago

Let me to better understand ... You said that "plugin doesn‘t publish any mqtt command to the broker" so I'm assuming that no message showed on topic "shellies/shelly1-xxxxx/relay/0/command" whatever mqtt client ( e.g. mosquitto_sub ) and not just by "shelly" ? And what if you "simulate" a shelly msg to the topic "shellies/shelly1-xxxxx/input/0", payload "1" and/or "0" ? Any "reaction" in Home apps too ?

ScharV commented 4 years ago

Yes I use an mqtt App to read topics and publish on the topics to the Plugin....the Plugin doesn’t send messages and doesn‘t read the topic messages

iomax commented 4 years ago

So seems that plugin didn't "find" the broker ... what about the "homebridge" log ? The plugin mqtt client in case of error should log "[ Garage ] Error event on MQTT" instead of the more usual "[Garage] Subscribing to topics".

Please could you try to add even the "username": "", "password": "" fields to your config and share something more about your setup ( platform, other plugins working on mqtt if any, broker info and so on )

ScharV commented 4 years ago

I‘ve got running mosquitto on an Raspberry Pi 4 and iam using mqttthing with my shellies. I always got error Event on Mqtt in the logs....i had the Subscribing to topics to but there was also no function

ScharV commented 4 years ago

@iomax any ideas?

ScharV commented 4 years ago

Solved the Problem....however de Broker didn‘t accept the password although it‘s the same for the client and there ist works