RPi losing connection with myDevices

I have three pi’s that I use to monitor temperatures in three buildings using DS18B20 sensors. Two of the installations are completely trouble free and the third keeps dropping the connection to myDevices. Usually a simple power cycle of the pi restores the connection. Sometimes it may go a week, other times only an hour or two. All are wifi connected to the internet, the troublesome one likely has the weakest connection. The troublesome one is also a pi2 whereas the other two are pi3’s. Today, the situation is a little different. The troublesome pi shows that it is on line in both the web interface and in the Cayenne App but the widgets show 0% and the temperature is stuck at 62.04F. If I try rebooting remotely nothing happens. It is like the pi is offline but indications are that it is on line.

Does anyone have any idea regarding trouble shooting this problem? Thanks in advance.

A good first troubleshooting step is to reset your dashboard. You won’t lose your widgets, but they will revert to their original position an setting (so you may need to turn a graph widget back into a gauge, or vice versa, that sort of thing.

If that doesn’t do it, when you say rebooting remotely doesn’t have an effect, did you mean through the Cayenne commands menu, or wholly outside of Cayenne via SSH. It would be a good test to see if you can establish an SSH connection ignoring Cayenne for a moment, if your Pi is set up to do that.

I have reset the dashboard with no effect. That particular unit, i don’t have remote access into so can’t reboot via ssh. I can click the reboot button on the web interface, then confirm in the box that pops up, but there is no sign that it is rebooting. Again, all indications in the web interace are that the pi is on line but there appears to be no communication with it. Still says that the room temp is 62.04F.

I’d say that it’s lost communication with Cayenne, despite the dashboard not showing the yellow “last seen” banner that it typically shows for an offline device. If the gauges aren’t updating and the remote commands aren’t working either, we’ve effectively lost communication with it.

Next time you have physical access to it, I’d give it a reboot, and keep an eye on the CPU/RAM consumption over time, it’s possible this could be related to the memory leak that we’re working on in the Pi agent.

I’m not sure if it’s feasible in your situation, but you could, even temporarily, try a wired ethernet connection since you’ve mentioned weak signal here, just to see if the problem still occurs at all. If it does, you can probably rule out the connection.

You will have to get some form of remote access to do some troubleshooting. Is it running Jessie with Pixel? If not you can make a vnc connection from the Cayenne dashboard (click the remote access link).

The first thing I would do is check to see if the SD card is full with the command “df -h” Interestingly enough I also have a Pi 2 that just randomly decides to drop off the dashboard. If the SD card is not full then next would be to flash a new SD card to see if the old one is corrupted. Yanking the power is not good for the OS and can lead to corruption.

It appears that the problem lies in the weak wifi connection. I retrieved the unit, brought it home and plugged it in. The Cayenne web interface and the app both started updating again right away when it connected to the home wifi. yes, it was running Jessie.

1 Like