Skip to content
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

Cannot connect to MQTT #65

Closed
Malarcy opened this issue Nov 28, 2016 · 2 comments
Closed

Cannot connect to MQTT #65

Malarcy opened this issue Nov 28, 2016 · 2 comments

Comments

@Malarcy
Copy link

Malarcy commented Nov 28, 2016

Hi - having issues with connection to MQTT - setup is

Homebridge with Homebridge-edomoticz running on same host as Domoticz with MQTT enabled and mosquitto.

Domoticz talking to MQTT (proved via a mosquitto_pub on the same host setting a value in domotocz - can also see domoticz/out messages via MQTT spy)

config.json has config for MQTT

(snippet from file - not complete file - has passed JSON validation)

"platform": "eDomoticz",
"name": "eDomoticz",
"server": "127.0.0.1",
"port": "8990",
"ssl": 0,
"roomid": 9,
"mqttenable": 1,
"mqttserver": "127.0.0.1",
"mqttport": "1883",
"mqttauth": 0,
"mqttuser": "",
"mqttpass": ""

homebridge starts, but then repeats this message every second.....

[eDomoticz] Retrying connection to MQTT broker...

I have also tried the actual IP of the host in the config file.

Host is Ubuntu 14.04 LTS (64bit) - all available updates for homebridge, homebridge-edomoticz, mosquitto applied.

Tried running homebridge with DEBUG - no additional info on screen - and I cannot find the homebridge/log and .err files in the location suggested by the homebridge wiki. Have also tried running homebridge under sudo - again - same issue.

Any pointers or ways of getting some more debug output appreciated.

@rswilem
Copy link
Collaborator

rswilem commented Nov 28, 2016

Please see the latest commit, could you check out the latest version and try again?

Also note the new README.md.

@Malarcy
Copy link
Author

Malarcy commented Nov 28, 2016

Fixed my original problem before I saw your response.... details below - but summary - old version of mosquitto broker, had to force latest by adding the appropriate repository. (Old version of Ubuntu 14.04 LTS - and I guess its time to upgrade.

My issue fixed - version of mosquitto was the issue (although working for other mqtt libraries - I suspect the mqtt.js library expected version 4 protocol support but not proven).

Host running mosquitto is Ubuntu 14.04 - repositories for that does not have the latest version of mosquitto - updated manually using info linked here:

https://esp8266hints.wordpress.com/2015/02/06/mosquitto-invalid-protocol-mqtt-in-connect-errors-and-esp8266-continuously-trying-to-reconnect-to-broker-service-without-success/

Now working as expected.

Thanks

@Malarcy Malarcy closed this as completed Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants