MQTT controller - ping but Connection timeout on MQTT clients
-
I'm pretty far from my computer today and tomorrow,but I'll check.
I have the latest IDE at least.Meanwhile perhaps @ntruchsess himself can help? :)
-
Last night I downloaded whole https://github.com/ntruchsess/MySensors/tree/mqttclient branch and tried to compile it - I got errors that ntruchsess supposed to fix in this branch (https://github.com/knolleary/pubsubclient/pull/47). Which is weird, I suspect some problems with my IDE... I will look into this today.
-
I use the latest 1.0.6 IDE on Win7 and loaded the latest MySensor libraries
https://github.com/mysensors/Arduino/
Added the attached libraries and they compiled just fine for me...MyMQTTGateway.zip
Note1: Included is MyMQTTGateway and Pubsubclient.Note2: This will make the gateway act as a MQTT client so you need Mosquitto (or similar) where you publish the topics from the gateway.
Note3: Remember to change the IP and Mac.
-
@gadu - thank you very much!
In the meanwhile I managed to compile on @ntruchsess code. I got past compiler error and also I noticed that my baund rater for serial monitor was incorrect (so I couldn't see anything usefull). Anyway I got this:
0;0;3;0;9;check wires
On all controllers: MQTTGateway, Ethernet gateway, Serial... I checked those wires many times, even I switched the radio. No luck. Then I noticed that I bought NRF24L01 - the verison withot + at the and. It should be NRF24L01+
Does it matter? I found that NRF24L01+ it differs only slightly from NRF24L01 version but I think that might be the casue. Anyone had such experience? It's hard to search for it on the forum since everyone is writing about NRF24L01+ only...
-
@gadu - thank you very much!
In the meanwhile I managed to compile on @ntruchsess code. I got past compiler error and also I noticed that my baund rater for serial monitor was incorrect (so I couldn't see anything usefull). Anyway I got this:
0;0;3;0;9;check wires
On all controllers: MQTTGateway, Ethernet gateway, Serial... I checked those wires many times, even I switched the radio. No luck. Then I noticed that I bought NRF24L01 - the verison withot + at the and. It should be NRF24L01+
Does it matter? I found that NRF24L01+ it differs only slightly from NRF24L01 version but I think that might be the casue. Anyone had such experience? It's hard to search for it on the forum since everyone is writing about NRF24L01+ only...
@cayco
Yes, the non-plus variant is pretty useless. You can make it work (select 1MBPS instead of 250 kbps), but the price you have to pay is the distance you can maintain between sensor nodes, repeater(s) and gateway.
I personally invested many hours to get it working, but was very disappointed with the distance.
I bought new radio's (nrf24l01+) and found out that I wasted my time 😔Succes!
Boozz
-
I also managed to get it working! Besides non '+' radio I did not have SoftSPI enabled. I thought that I do not need it since I have a Ethernet Shield version. After enabling MQTT Gateway and MQTT ClientGateway started.
Now it's time for some soldering to make a client :)
-
When I try your files I get this error when compiling...
Any ideas? I'm using the Arduino 1.6.3 application.
In file included from C:\Users\Tommy\Documents\Arduino\libraries\MyMQTTClient/MyMQTTClient.h:16:0,
from MyMQTTClient.ino:46:
C:\Users\Tommy\Documents\Arduino\libraries\MyMQTTClient/PubSubClient.h:72:46: error: section attribute not allowed for '<anonymous>'
boolean publish_P(char *, uint8_t PROGMEM *, unsigned int, boolean); -
@TommySharp
Hmm dont really remember, but I think this was the solution
https://github.com/knolleary/pubsubclient/issues/46