pi gateway just stops communicating
-
I read that the irq thing may not be necessary. I haven't setup the irq on mine. I don't have that much traffic for the irq to be needed yet.
anyone else using the irq on the pi gateway?
-
@CrankyCoder IRQ made no difference when I tried it. But that was over a year ago now.
-
So I have a new development. I noticed something strange. The mysgw stopped again today. I went digging through the syslog around the same time. Didn't see anything just before it went offline, but i did notice that shortly after it went offline it said that the carrier dropped for the nic.
Apr 2 15:50:55 raspberrypi mysgw: TSF:MSG:READ,200-200-0,s=2,c=2,t=25,pt=0,l=0,sg=0: Apr 2 15:50:55 raspberrypi mysgw: GWT:TPS:TOPIC=mygateway1-out/200/2/2/0/25,MSG SENT Apr 2 15:51:07 raspberrypi mysgw: TSF:MSG:READ,200-200-0,s=2,c=1,t=23,pt=2,l=2,sg=0:25 Apr 2 15:51:07 raspberrypi mysgw: GWT:TPS:TOPIC=mygateway1-out/200/2/1/0/23,MSG SENT Apr 2 15:52:27 raspberrypi dhcpcd[377]: eth0: carrier lost Apr 2 15:52:27 raspberrypi kernel: [ 461.474897] smsc95xx 1-1.1:1.0 eth0: link down Apr 2 15:52:28 raspberrypi dhcpcd[377]: eth0: deleting address fe80::669:d81d:83fb:3aaa Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Withdrawing address record for fe80::669:d81d:83fb:3aaa on eth0. Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::669:d81d:83fb:3aaa. Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Interface eth0.IPv6 no longer relevant for mDNS. Apr 2 15:52:28 raspberrypi dhcpcd[377]: eth0: deleting default route via 192.168.2.1 Apr 2 15:52:28 raspberrypi dhcpcd[377]: eth0: deleting route to 192.168.2.0/24 Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Withdrawing address record for 192.168.2.71 on eth0. Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.2.71.So i decided to check a few other times in the last 48 hours and sure enough. Same thing. It seems that something is causing the nic to think it lost it's connection to the switch. The mysgw seems to go in to a weird state. Not sure what error checking is in it or what i could do to log more since i am already on debug for the logging of mysgw.
Next step i guess will be instead of dhcp reservation ill static assign it. See if that changes anything, and see swap network cable. Maybe hard set some things like the speed/duplex on the switch.
Just figured i would throw out my latest finding.
-
So I have a new development. I noticed something strange. The mysgw stopped again today. I went digging through the syslog around the same time. Didn't see anything just before it went offline, but i did notice that shortly after it went offline it said that the carrier dropped for the nic.
Apr 2 15:50:55 raspberrypi mysgw: TSF:MSG:READ,200-200-0,s=2,c=2,t=25,pt=0,l=0,sg=0: Apr 2 15:50:55 raspberrypi mysgw: GWT:TPS:TOPIC=mygateway1-out/200/2/2/0/25,MSG SENT Apr 2 15:51:07 raspberrypi mysgw: TSF:MSG:READ,200-200-0,s=2,c=1,t=23,pt=2,l=2,sg=0:25 Apr 2 15:51:07 raspberrypi mysgw: GWT:TPS:TOPIC=mygateway1-out/200/2/1/0/23,MSG SENT Apr 2 15:52:27 raspberrypi dhcpcd[377]: eth0: carrier lost Apr 2 15:52:27 raspberrypi kernel: [ 461.474897] smsc95xx 1-1.1:1.0 eth0: link down Apr 2 15:52:28 raspberrypi dhcpcd[377]: eth0: deleting address fe80::669:d81d:83fb:3aaa Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Withdrawing address record for fe80::669:d81d:83fb:3aaa on eth0. Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::669:d81d:83fb:3aaa. Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Interface eth0.IPv6 no longer relevant for mDNS. Apr 2 15:52:28 raspberrypi dhcpcd[377]: eth0: deleting default route via 192.168.2.1 Apr 2 15:52:28 raspberrypi dhcpcd[377]: eth0: deleting route to 192.168.2.0/24 Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Withdrawing address record for 192.168.2.71 on eth0. Apr 2 15:52:28 raspberrypi avahi-daemon[226]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.2.71.So i decided to check a few other times in the last 48 hours and sure enough. Same thing. It seems that something is causing the nic to think it lost it's connection to the switch. The mysgw seems to go in to a weird state. Not sure what error checking is in it or what i could do to log more since i am already on debug for the logging of mysgw.
Next step i guess will be instead of dhcp reservation ill static assign it. See if that changes anything, and see swap network cable. Maybe hard set some things like the speed/duplex on the switch.
Just figured i would throw out my latest finding.
-
my pi3b does this as well. it's far and few in between. I even made a watchdog in openhab to "ping" the msgw (requesting an ack) and mysgw responds but it doesn't send out new sensor readings. i thought about expanding the watchdog to watch for all sensor readings and throw up a restart to the gw if it receives no readings in a 10 minute period but mine doesn't fail nearly as consistently as yours so I haven't worried about it too much...
would still like to see a resolution to this as I've moved most of my PIRs and temp sensors to mysgw so when it goes down it can be a bit of a problem.
-
@crankycoder maybe adding MY_DEBUG_VERBOSE_GATEWAY and MY_DEBUG_VERBOSE_RF24 can give a clue to what is happening.
@mfalkvidd do i need to modify the pi code and add that in and recompile? or can i add those in to the config file in /etc/mysensors.conf?
-
@mfalkvidd do i need to modify the pi code and add that in and recompile? or can i add those in to the config file in /etc/mysensors.conf?
@crankycoder I think you can add them in MySensors.conf but I would add them to the ./configure command. See the section called ”Advanced” at https://www.mysensors.org/build/raspberry
-
@crankycoder I think you can add them in MySensors.conf but I would add them to the ./configure command. See the section called ”Advanced” at https://www.mysensors.org/build/raspberry
@mfalkvidd compiling now. side question, can the ip address be put in the config later? i hate that i have to hard code it in at compile time.
-
compiled with new (very noisy) options lol
Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17 Apr 03 13:50:48 DEBUG RF24:RBR:REG=23,VAL=17No idea what that means, but it seems if i am seeing that, it's working lol.
-
@mfalkvidd compiling now. side question, can the ip address be put in the config later? i hate that i have to hard code it in at compile time.
@crankycoder it doesn't seem to be possible to change the IP without recompiling. I checked https://www.mysensors.org/build/raspberry#configuration-file and the source code and couldn't find anything about IP.
I have not thought about changing IP before, since I only use my-gateway=serial. It would make sense to have the IP in the config file, so if someone wants to implement it it would be great.
A workaround might be to use --my-controller-url-address and a host name, which can then be added to /etc/hosts on the Raspberry Pi.
Something like this should work:
--my-controller-url-address=controllerThen add the following to /etc/hosts:
192.168.1.235 controller(assuming your controller has IP address 192.168.1.235). If you need to change the IP later, just change the IP in /etc/hosts and restart the gateway.
-
So here's the latest.
I checked and the PI was already set to static ip and not dhcp reservation. However, I made 2 changes and have been ok for 3 days now.
- i changed ports on the switch. Not sure if it mattered, but i have plenty.
- this is the one I think may have more impact. Since it seemed the carrier was dropping, but coming back, I started wondering if maybe something was triggering an auto renegotiation for nic speed. So I went in to the switch and have it hard set to 100 FULL instead of auto.
I still have the debug running and gonna let this run for quite some time just to make sure im feeling it's ok.