[Solved] Unable to update Mosquitto server :(

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

[Solved] Unable to update Mosquitto server :(

#1 Post by vincen » 26 Jun 2017, 07:19

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
Last edited by vincen on 27 Jun 2017, 12:32, edited 1 time in total.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Unable to update Mosquitto server :(

#2 Post by grovkillen » 26 Jun 2017, 08:09

What does the log say?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Unable to update Mosquitto server :(

#3 Post by vincen » 26 Jun 2017, 09:02

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 :(

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Unable to update Mosquitto server :(

#4 Post by grovkillen » 26 Jun 2017, 09:28

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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Unable to update Mosquitto server :(

#5 Post by vincen » 27 Jun 2017, 08:03

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 :(

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Unable to update Mosquitto server :(

#6 Post by grovkillen » 27 Jun 2017, 08:37

Might be too obvious, but are the tasks/devices enabled in the settings menu?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Unable to update Mosquitto server :(

#7 Post by vincen » 27 Jun 2017, 08:49

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:

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Unable to update Mosquitto server :(

#8 Post by grovkillen » 27 Jun 2017, 08:58

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
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Unable to update Mosquitto server :(

#9 Post by vincen » 27 Jun 2017, 09:39

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Unable to update Mosquitto server :(

#10 Post by grovkillen » 27 Jun 2017, 09:54

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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Unable to update Mosquitto server :(

#11 Post by vincen » 27 Jun 2017, 10:02

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 ;)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Unable to update Mosquitto server :(

#12 Post by grovkillen » 27 Jun 2017, 10:50

Ah, nice to hear!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Unable to update Mosquitto server :(

#13 Post by vincen » 27 Jun 2017, 12:32

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

billymac
Normal user
Posts: 11
Joined: 16 Mar 2017, 16:11

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

#14 Post by billymac » 06 Jul 2017, 00:15

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

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests