Anyone seeing MySensors plattform not behaving?

I’m using the serial gateway connected to a rpi. I have not yet tested with a minimal setup, no. I’ll try to as soon as I find some free time.

I have, and with multiple gateways but I have no logs, I need to repeat the tests.

So, for running state I have Ethernet gateway with Arduino Uno, in Dev i use a RPI (Ethernet as well - Planning to move to RPI in production eventually).

I’ve tested basic setup ( arduino, network and a simple relay). What i found was lot of NACK responses in the log.

I might have some time this next days so I’ll try to provide some longs as soon as possible.

Hey there,

I just had a moment to test this a little.

Env: Arduino UNO with Ethernet Gateway code.

I set an empty environment without any node connected and I get this errors on the HA side:

17-04-16 16:50:56 ERROR (Thread-12) [mysensors.gateway_tcp] Receive from server failed.
17-04-16 16:50:56 ERROR (Thread-12) [mysensors.gateway_tcp] Failed to shutdown socket at ('192.168.1.7', 5003).
17-04-16 16:51:16 ERROR (Thread-12) [mysensors.gateway_tcp] Receive from server failed.
17-04-16 16:51:16 ERROR (Thread-12) [mysensors.gateway_tcp] Failed to shutdown socket at ('192.168.1.7', 5003).

and this in the GW:

0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.1.7
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.1.7 

hope this helps.

Looks like your gateway reboots when home assistant connects. Possibly power issue. I’ve seen the same behavior when testing and using Arduino Nano/Uno powered via USB.

Watch both logs at the same time to confirm. It’s probably when home assistant requests version from gateway, and the gateway tries to send a message with version, that the gateway reboots. The radio sending is more power hungry than the radio only receiving.

It could also be a problem with arduino avr core version that is used for compiling the sketch. I had a problem with avr core 1.6.17. I think it’s fixed in 1.6.18 but that wasn’t released for platformio when I tested, so I used an old version of Arduino IDE instead that I had installed.

Check what version you are using for your build tool.

uhmmm … to be honest, at this point I’ve done so many testings with different configurations that I think I lost the line and I’m messing things up on this thread. :blush: my apologies.

On the Arduino GW, the power might be an issue, while I’m powering it up with an USB connector directly to my PC (and I’d expect that not happening) it might be.

So, this is what I’ve done. I’ve updated HA to 0.42.4 where I see your PR (7057) has been integrated and I’m going to build a basic relay node and try to repro the issue. With the ones I have already deployed at home I can still see that I have to click several times on the switch on / off to have the relay switching and I see messages like the below in the GW Debug:

mysgw: Client 0: 153;1;1;0;2;0
mysgw: !TSF:MSG:SEND,0-0-153-153,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:0
mysgw: Client 0: 153;1;1;0;2;0
mysgw: !TSF:MSG:SEND,0-0-153-153,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:0
mysgw: Client 0: 153;1;1;0;2;0
mysgw: !TSF:MSG:SEND,0-0-153-153,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:0
mysgw: Client 0: 153;1;1;0;2;0
mysgw: TSF:MSG:SEND,0-0-153-153,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
mysgw: Client 0: 153;1;1;0;2;0
mysgw: !TSF:MSG:SEND,0-0-153-153,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:0

But at this point, after all the changes / tests done I really don’t trust the relay nodes anymore.

For Sensor nodes I don’t experiment any issue. Motion detection, temp, etc. looks like is working without issue.

Thanks for your support Martin.

Since your sensor nodes are working fine, I think this also points to the gateway doesn’t have enough power on the radio to transmit properly every time, which it has to do when controlling the switches.

I would try adding a larger capacitor, maybe 100 uF, as close as possible to the radio. If this doesn’t help, then try also to change powersource. The best clean power is from batteries, so I understand. You could try to power the gateway temporarily from batteries during some tests to see if problems go away.