Help getting started with MQTT gateway
-
Ah.. you're running mixed library versions on node/gateway.. Yes, then you'd need to call gw.begin() on the node.
But will this overwrite any config/settings like sleep or anything? What does the NULL mean at the start of gw.begin?
-
I'm sorry, i got confused about which version i was running. I thought it was the development humidity sketch and therefor i didn't look for the API of it. Makes sense now. Thank you.
-
I now have my controller, broker and gateway setup working fine. I then created a temp and humidity sensor, works fine. I then made a motion node, works fine. Then a light switch node that all work perfectly fine together. Now, i come to configure my relay module (which im struggling with getting it to receive the messages) so i open my serial monitor for the gateway and see that even though its got a solid connection, it keeps trying to make another MQTT connection. Over and over again....
0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connected 0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connected 0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connected 0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connected 0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connectedThere is nothing in the loop section of the sketch, so all i can assume is that it keeps dropping its connection to mosquitto broker thats wired over ethernet?
-
This post is deleted!
-
send: 4-4-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=fail:1.5.1 send: 4-4-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0 repeater started, id=4, parent=0, distance=1 send: 4-4-0-0 s=255,c=3,t=11,pt=0,l=5,sg=0,st=fail:Relay send: 4-4-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=fail:1.0 send: 4-4-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=fail: -
Just to let you know (Not sure if it tells you that i have edited a post), i have removed what i said about the gateway not working, that is back online now, however its back to doing exactly what it was doing earlier and keep trying to connect. But literally its spamming at a rate of like 10/20 per second...
0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connected 0;0;3;0;9;Attempting MQTT connection... 0;0;3;0;9;MQTT connectedI have a weird feeling that there may be a power issue or a connection issue somewhere on this gateway. (Its in a cupboard since i got it working this morning so its a little hard for me to believe it).
I have tried a restart on the MQTT broker btw, still nothing.
-
I now feel like a very big silly idiot. Let this be a lesson to anyone thats developing any sort of project. Document everything in some way, pen and paper or in a file.
I had refreshed the sketch and used the same clientID as the raspberrypi was using when i had my old automation server running there.