Page 1 of 1

[Solved] Unable to update Mosquitto server :(

Posted: 26 Jun 2017, 07:19
by vincen
Hi

I have a Mosquitto MQTT server running on my Raspberry Pi. I try to get my ESP board with ESP Easy to post to that MQTT server but it doesn't work :( I tried the different MQTT options offered in ESP Easy without much success :(

My Mosquitto server is used by my Home Automation system and has no problem working with it.

Thanks

Vincèn

Re: Unable to update Mosquitto server :(

Posted: 26 Jun 2017, 08:09
by grovkillen
What does the log say?

Re: Unable to update Mosquitto server :(

Posted: 26 Jun 2017, 09:02
by vincen
grovkillen wrote: 26 Jun 2017, 08:09 What does the log say?
on ESP board:
Image
and Mosquitto logs:
Jun 26 08:55:13 raspberrypi mosquitto[1530]: 1498460113: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
Jun 26 08:57:12 raspberrypi mosquitto[1530]: 1498460232: New connection from 192.168.1.60 on port 1883.
Jun 26 08:57:12 raspberrypi mosquitto[1530]: 1498460232: New client connected from 192.168.1.60 as ESPClient1 (c1, k15, u'vincen').
Not sure how to debug that further or is there a way to subscribe at all messages of a Mosquitto server to be sure it receives well messages of my ESP ?? and to know if problem is between ESP and Mosquitto or between Mosquitto and my Home Automation system :(

Re: Unable to update Mosquitto server :(

Posted: 26 Jun 2017, 09:28
by grovkillen
I seems to me that the connection between ESP Easy and Mosquitto is working correct. You could always download an app for the phone to sniff all messages. I use MQTT Snooper for Android.

But the mqtt/out subscription tells me that you are not using a generic controller, more likely the Domoticz one? I always use the OpenHAB controller but remove the first / of the subscribe/publish topic string. I don't know what HA system you are using so it is hard to give more advice than this.

Your HA system probably listen to something else than what your ESP Easy unit is broadcasting.

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 08:03
by vincen
grovkillen wrote: 26 Jun 2017, 09:28I seems to me that the connection between ESP Easy and Mosquitto is working correct. You could always download an app for the phone to sniff all messages. I use MQTT Snooper for Android.
thanks a lot for the Android app and oce installed and configured, I see no message popups in In or Out in the app so it looks like unless ESP told me it succeeds to post updates but it looks it doesn't :(
grovkillen wrote: 26 Jun 2017, 09:28But the mqtt/out subscription tells me that you are not using a generic controller, more likely the Domoticz one? I always use the OpenHAB controller but remove the first / of the subscribe/publish topic string. I don't know what HA system you are using so it is hard to give more advice than this.
Your HA system probably listen to something else than what your ESP Easy unit is broadcasting.
As quoted in my previous message I use Home Assistant and you are right for that but first I wanted to debug the problem between ESP and my MQTT broker first ! Right now it looks like ESP connects successfully at my Mosquitto server and confirms it succeed to post correctly to it but no message pops-up in the broker :(

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 08:37
by grovkillen
Might be too obvious, but are the tasks/devices enabled in the settings menu?

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 08:49
by vincen
grovkillen wrote: 27 Jun 2017, 08:37 Might be too obvious, but are the tasks/devices enabled in the settings menu?
Confused here about what you are talking about ? in ESP -> Controllers my MQTT server entry is well Enabled, and same in Devices ! In the Android app I don't see such settings :roll:

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 08:58
by grovkillen
If you run latest 2.0.0-dev... you need to check "enabled" and "send to controller X" in order for the unit to send.

Please refer to this example:
Image

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 09:39
by vincen
grovkillen wrote: 27 Jun 2017, 08:58If you run latest 2.0.0-dev... you need to check "enabled" and "send to controller X" in order for the unit to send.
Unhappy already done :(
Image

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 09:54
by grovkillen
Ok, sorry.

Do any messages appear in the app when subscribing to # ? (Found under "Topic")

PS. you don't need to add %value% to the formula if you are not doing anything with the value... leave it blank in that case.

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 10:02
by vincen
grovkillen wrote: 27 Jun 2017, 09:54Do any messages appear in the app when subscribing to # ? (Found under "Topic")
ah oki that was the mistake I was doing :( using * instead of # for subscription :D Now I see my ESP status pops up :D
grovkillen wrote: 27 Jun 2017, 09:54PS. you don't need to add %value% to the formula if you are not doing anything with the value... leave it blank in that case.
Thanks I removed it and now it works in Mosquitto, just need to update my Home Automation configuration and it should be all good :)

Thanks a lof for help ;)

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 10:50
by grovkillen
Ah, nice to hear!

Re: Unable to update Mosquitto server :(

Posted: 27 Jun 2017, 12:32
by vincen
grovkillen wrote: 27 Jun 2017, 10:50 Ah, nice to hear!
yep and thanks for your help ;)

Re: [Solved] Unable to update Mosquitto server :(

Posted: 06 Jul 2017, 00:15
by billymac
Mosquitto stopped working for me in Node Red
I verified Mosquitto itself was working using MQTT Spy
After a few hrs it turned out I killed it when I added some nodes to Mode Red for testing a connection to a database and it must have been misconfigured
When I deleted those nodes it started working again