I have reconnected it again and it did just starte to work as it should from the start. I changed nothing. Strange...
cayco
Posts
-
Strange value being sent from controller using mixed temp/relay node -
Strange value being sent from controller using mixed temp/relay nodeI still have it. I need to check how this is (not)working in single sensor environment. I will laso try not to set IT manually. Only if I get some tim to do it...
-
st=fail on gatewayAnyone? RTFM is also accepted answer :)
-
st=fail on gatewayHi,
Why am I getting these:
Started! 0;0;3;0;9;read: 21-21-0 s=12,c=1,t=38,pt=4,l=4:5001 0;0;3;0;9;send: 0-0-21-21 s=11,c=1,t=0,pt=0,l=0,st=fail: 0;0;3;0;9;send: 0-0-20-20 s=0,c=1,t=0,pt=0,l=0,st=fail: 0;0;3;0;9;send: 0-0-21-21 s=10,c=1,t=1,pt=0,l=0,st=fail: 0;0;3;0;9;send: 0-0-21-21 s=12,c=1,t=38,pt=0,l=0,st=fail: 0;0;3;0;9;send: 0-0-20-20 s=1,c=1,t=38,pt=0,l=0,st=fail: 0;0;3;0;9;send: 0-0-21-21 s=13,c=1,t=23,pt=0,l=0,st=fail:It can read from sensors:
0;0;3;0;9;read: 21-21-0 s=12,c=1,t=38,pt=4,l=4:4979 MyMQTT/21/12/V_VOLTAGE 0;0;3;0;9;read: 21-21-0 s=12,c=1,t=38,pt=4,l=4:5001I switched radios but the result's the same. I also experience some problems with sending commands by hand: http://forum.mysensors.org/topic/921/strange-value-being-sent-from-controller-using-mixed-temp-relay-node/33
Do you have any clue what could be wrong?
-
Strange value being sent from controller using mixed temp/relay nodeHi! I'm starting to play with relay and I experiencing somethings similar. I have 3 sensors (two of them works great, just temperature, volt, light and humidity) one is relay sensor. First of all it just doesn't react to my commands:
mosquitto_pub -p 1883 -h 10.0.0.11 -t MyMQTT/22/1/V_LIGHT -m "1"serial shows just this:
connecting at 115200 repeater started, id 22 send: 22-22-0-0 s=255,c=0,t=18,pt=0,l=3,st=ok:1.4 send: 22-22-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0 send: 22-22-0-0 s=255,c=3,t=11,pt=0,l=12,st=ok:Relay sketch send: 22-22-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0 send: 22-22-0-0 s=1,c=0,t=3,pt=0,l=3,st=ok:1.4I'm using stock http://www.mysensors.org/build/relay code, just setting node_id manually to 22.
On the controller I have:
0;0;3;0;9;read: 21-21-0 s=11,c=1,t=0,pt=7,l=5:23.0 publish: MyMQTT/21/11/V_TEMP 23.0 0;0;3;0;9;send: 0-0-21-21 s=11,c=1,t=0,pt=0,l=7,st=fail:23.0001 0;0;3;0;9;send: 0-0-22-22 s=1,c=1,t=2,pt=0,l=7,st=fail:13.0001It looks like it tries to send '1' with garbage from last sensor read.
It does this with my humidity sensor:
publish: MyMQTT/21/12/V_VOLTAGE 5001 0;0;3;0;9;send: 0-0-21-21 s=12,c=1,t=38,pt=0,l=4,st=ok:5001 0;0;3;0;9;read: 21-21-0 s=10,c=1,t=1,pt=7,l=5:52.0 publish: MyMQTT/21/10/V_HUM 52.0 0;0;3;0;9;send: 0-0-21-21 s=10,c=1,t=1,pt=0,l=8,st=fail:52.05001I am also using MQTT client gateway which @gadu recommended me.
I did not understood how does this workaround @Gambituk mention work. Do you know what is going on above? What am I doing wrong?
P.S. Using standart EthernetGateway code also scrambles messages (please note strange sing after '1'):
0;0;3;0;9;read: 22-22-0 s=255,c=3,t=11,pt=0,l=12:Relay sketch 0;0;3;0;9;read: 22-22-0 s=255,c=3,t=12,pt=0,l=3:1.0 0;0;3;0;9;read: 22-22-0 s=1,c=0,t=3,pt=0,l=3:1.4 0;0;3;0;9;send: 0-0-22-22 s=1,c=1,t=2,pt=0,l=2,st=ok:1à 0;0;3;0;9;read: 0-1-22 s=1,c=1,t=2,pt=0,l=2:1à 0;0;3;0;9;read: 21-21-0 s=12,c=1,t=38,pt=4,l=4:5023 MyMQTT/21/12/V_VOLTAGE 0;0;3;0;9;send: 0-0-22-22 s=1,c=1,t=2,pt=0,l=2,st=fail:1àafter this relay node does not accept any message (you can see st=fail on the last line - that was me retrying mosquitto_pub -p 1883 -h 10.0.0.34 -t MyMQTT/22/1/V_LIGHT -m "1").
-
MQTT Gateway - works, pings but no messages while listening to brokerOK, I've probably fixed it :)
It was bad connection on Dallas sensor so sensor node did not send any data and that was why I did not receive any :)
But what is this garbage on the serial?
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0
0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,st=ok:M
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0
0;0;3;0;9;read: 20-20-0 s=0,c=0,t=6,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=0,pt=7,l=5:24.6
MyMQTT/20/0/V_TEMP
>>30 18 00 12 4D 79 4D 51 54 54 2F 32 30 2F 30 2F 56 5F 54 45 4D 50 32 34 2E 36
<<C0 00
>>D0 00 -
MQTT Gateway - works, pings but no messages while listening to brokerHi!
I'm having hard time setting up MQTT ethernet gateway. My gateway is set up on 10.0.35:
magdalena@magdalena-laptop:~$ ping 10.0.0.35 PING 10.0.0.35 (10.0.0.35) 56(84) bytes of data. 64 bytes from 10.0.0.35: icmp_seq=1 ttl=128 time=0.236 ms ^C --- 10.0.0.35 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.236/0.236/0.236/0.000 msI can connect with mosquitto_sub:
magdalena@magdalena-laptop:~$ mosquitto_sub -h 10.0.0.35 -d -t 'MyMQTT/#' Received CONNACK Received SUBACK Subscribed (mid: 1): 0 Sending PINGREQ Received PINGRESPOn the serial console on gateway I have:
Started! 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0 0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1^^^ this is my temperature sensor showing
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0^^^ I restarted the sensor node.
<<10 24 00 06 4D 51 49 73 64 70 03 02 00 3C 00 16 6D 6F 73 71 5F 73 75 62 5F 35 38 37 37 5F 6D 61 67 64 61 6C 65 6E >>20 02 00 00 <<82 06 00 01 00 01 23 00 >>90 03 00 01 00^^^ sometimes I get something like this (what is it?)
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0 0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,st=ok:M 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0 <<C0 00 >>D0 00 <<C0 00 >>D0 00 <<C0 00 >>D0 00^^^ some more garbage.
I'm using:
Arduino Uno (GW)
Ethernet Shield on W5100Arduino Pro mini 3,3V
NRF24L01 Radios. SoftSPI enabled.
So the problem is that I do not get anything with mosquittp_sub. What is wrong?
PS. I did not connect decoupling capacitor. Gateway and sensor are laying 5cm besides each other.
-
MQTT controller - ping but Connection timeout on MQTT clientsI 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 :)
-
MQTT controller - ping but Connection timeout on MQTT clients@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...
-
MQTT controller - ping but Connection timeout on MQTT clientsLast 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.
-
MQTT controller - ping but Connection timeout on MQTT clientsI can't compile this... After applying the patch I got some new error. @gadu Could you possibly share source files and version of your Arduino IDE?
This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. Arduino: 1.0.6 (Mac OS X), Board: "Arduino Uno" MyMQTTClient.cpp.o: In function `MyMQTTClient::SendMQTT(MyMessage&)': MyMQTTClient.cpp:275: undefined reference to `MySensor::loadState(unsigned char)' MyMQTTClient.cpp:280: undefined reference to `MySensor::saveState(unsigned char, unsigned char)' MyMQTTClient.cpp:294: undefined reference to `MySensor::loadState(unsigned char)' MyMQTTClient.cpp:300: undefined reference to `MySensor::sendRoute(MyMessage&)' MyMQTTClient.cpp.o: In function `MyMQTTClient::processMQTTMessage(char*, unsigned char*, unsigned int)': MyMQTTClient.cpp:246: undefined reference to `MySensor::sendRoute(MyMessage&)' MyMQTTClient.cpp.o: In function `MyMQTTClient::processRadioMessage()': MyMQTTClient.cpp:176: undefined reference to `MySensor::process()' MyMQTTClient.cpp:179: undefined reference to `MySensor::getLastMessage()' MyMQTTClient.cpp.o: In function `MyMQTTClient::begin(rf24_pa_dbm_e, unsigned char, rf24_datarate_e, unsigned char, unsigned char, unsigned char)': MyMQTTClient.cpp:147: undefined reference to `MySensor::setupRepeaterMode()' MyMQTTClient.cpp:153: undefined reference to `MySensor::setupRadio(rf24_pa_dbm_e, unsigned char, rf24_datarate_e)' MyMQTTClient.cpp.o: In function `MyMQTTClient': MyMQTTClient.cpp:107: undefined reference to `MySensor::MySensor(unsigned char, unsigned char)' -
MQTT controller - ping but Connection timeout on MQTT clientsThanks for the answer but it's not the point - mosquitto_sub doesn't even connect to the server (Connection timed out).
How can I send you more data? I tried to println to serial:
int main(void) { init(); Ethernet.begin(TCP_MAC, TCP_IP); Serial.println("Ether initialized"); delay(1000); // Wait for Ethernet to get configured. gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN); Serial.println("GW started");but it does not print anything besides some machine characters (ÿûï). If I add Serial.begin(9600); just after init I got "Ether initialized" but no GW started message.
Putting Serial.println in MyMQTT.cp after first line in this procedure doesn't print anything:
void MyMQTT::begin(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate, void (*inDataCallback) (const char *, uint8_t *), uint8_t _rx, uint8_t _tx, uint8_t _er) { Serial.begin(BAUD_RATE); Serial.println("Beginning GW begin"); repeaterMode = true; isGateway = true; MQTTClientConnected = false;I got:
Ether initialized \Ú -
MQTT controller - ping but Connection timeout on MQTT clientsHi!
I am having problems with setting MQTTEthernet Controller (using stock MQTTGateway.ino). I have Arduino Uno with Ethernet shield (I've also attached radion but I'm not using it now). I changed MAC, IP addresss and uploaded to the board. It starts and I am able to ping it:
pi@raspberrypi ~ $ ping 10.0.0.150
PING 10.0.0.150 (10.0.0.150) 56(84) bytes of data.
64 bytes from 10.0.0.150: icmp_req=1 ttl=128 time=0.515 ms
64 bytes from 10.0.0.150: icmp_req=2 ttl=128 time=0.508 ms
^C
--- 10.0.0.150 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.508/0.511/0.515/0.022 msbut clients are having trouble communicating:
pi@raspberrypi ~ $ mosquitto_sub -h 10.0.0.150 -t '#'
Error: Connection timed out
pi@raspberrypi ~ $ mosquitto_pub -h 10.0.0.150 -p 1883 -m "test" -t "/MyMQTT/20/1"
Error: Connection timed outScanning on port 1883 reveals nothing (port closed).
What could be the cause? How can I debug this?
P.S. Debugging on serial shows that is stopps on
gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN);commenting this line and also additionaly
gw.processRadioMessage();doesn't make it respond to mqtt clients...