Emonpi inputs N/A

Hi,

I started having an issue with emonpi inputs today.

I’ve looked into emonPi Inputs not working. The symptoms are identical, the root cause is probably not. I did not change the MQTT password or any other settings.

I have tried restarting emonhub, rebooting the entire emonpi and unplugging power from the emonpi. None of these actions seems to fix the issue.

Checking the emonhub,log shows a “warning” about communication. But other than that, no pointers to what could be the cause of emonpi Inputs not updating.

2022-11-11 16:51:34,666 INFO MainThread EmonHub emonHub emon-pi variant v2.1.2
2022-11-11 16:51:34,667 INFO MainThread Opening hub…
2022-11-11 16:51:34,669 INFO MainThread Logging level set to DEBUG
2022-11-11 16:51:34,670 INFO MainThread Creating EmonHubJeeInterfacer ‘RFM2Pi’
2022-11-11 16:51:34,674 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2022-11-11 17:04:02,340 WARNING MainThread Device communication error - check settings
2022-11-11 17:04:02,342 INFO MainThread Setting RFM2Pi frequency: 433 (4b)
2022-11-11 17:04:03,344 INFO MainThread Setting RFM2Pi group: 210 (210g)
2022-11-11 17:04:04,346 INFO MainThread Setting RFM2Pi quiet: 0 (0q)
2022-11-11 17:04:05,349 INFO MainThread Setting RFM2Pi baseid: 5 (5i)
2022-11-11 17:04:06,351 INFO MainThread Setting RFM2Pi calibration: 230V (1p)
2022-11-11 17:04:07,354 DEBUG MainThread Setting RFM2Pi subchannels: [‘ToRFM12’]
2022-11-11 17:04:07,355 DEBUG MainThread Setting RFM2Pi pubchannels: [‘ToEmonCMS’]
2022-11-11 17:04:07,356 INFO MainThread Creating EmonHubMqttInterfacer ‘MQTT’
2022-11-11 17:04:07,363 DEBUG MainThread Setting MQTT subchannels: [‘ToEmonCMS’]
2022-11-11 17:04:07,364 DEBUG MainThread Setting MQTT pubchannels: [‘ToRFM12’]
2022-11-11 17:04:07,365 INFO MainThread Setting MQTT nodevar_format_enable: 1
2022-11-11 17:04:07,366 INFO MainThread Setting MQTT node_format_enable: 1
2022-11-11 17:04:07,367 INFO MainThread Setting MQTT nodevar_format_basetopic: emon/
2022-11-11 17:04:07,368 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer ‘emoncmsorg’
2022-11-11 17:04:07,370 DEBUG MainThread Setting emoncmsorg subchannels: [‘ToEmonCMS’]
2022-11-11 17:04:07,371 DEBUG MainThread Setting emoncmsorg pubchannels: [‘ToRFM12’]
2022-11-11 17:04:07,372 INFO MainThread Setting emoncmsorg url: https://emoncms.org
2022-11-11 17:04:07,373 INFO MainThread Setting emoncmsorg senddata: 1
2022-11-11 17:04:07,374 WARNING MainThread Setting emoncmsorg apikey: obscured
2022-11-11 17:04:07,375 INFO MainThread Setting emoncmsorg sendstatus: 1

As you can see, it has been working until a couple of hours ago.

Where to look next?

Hello @dedinext could you try updating the firmware on the emonpi to see if that brings it back into action? It’s on the Admin > Update page

It’s strange that emonPiLCD is down as well, can you see anything on your emonpi LCD?

This morning, when diving into the issue again I noticed that my SSH session from yesterday was closed. When re-opening the session, it’s clear that the emonpi had rebooted.

[email protected](ro):~$ uptime
 07:21:44 up 46 min,  1 user,  load average: 0.31, 0.28, 0.22

And lo and behold, the inputs are alive again.

On the LCD it displays “Ethernet: YES” followed by the local IP address. Despite the emonPiLCD service being in stopped state.

[email protected](ro):~$ sudo service emonPiLCD status
● emonPiLCD.service - LSB: emonPi LCD controller
   Loaded: loaded (/etc/init.d/emonPiLCD)
   Active: active (exited) since Sat 2022-11-12 06:17:47 UTC; 1h 8min ago
  Process: 1761 ExecStop=/etc/init.d/emonPiLCD stop (code=exited, status=0/SUCCESS)
  Process: 1768 ExecStart=/etc/init.d/emonPiLCD start (code=exited, status=0/SUCCESS)

Nov 12 06:17:47 emonpi emonPiLCD[1768]: Starting system emonPiLCD daemon:.
Nov 12 06:17:47 emonpi systemd[1]: Started LSB: emonPi LCD controller.
[email protected](ro):~$ date -u
Sat Nov 12 07:27:05 UTC 2022
[email protected](ro):~$ date
Sat Nov 12 07:27:21 UTC 2022

For the record, I think /var/log/emonhub.log holds the root cause for this “failure”.
The last log does not contain the warning regarding the communication error.

2022-11-12 07:17:04,691 DEBUG    RFM2Pi     715 NEW FRAME : OK 5 33 1 9 1 42 2 157 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
2022-11-12 07:17:04,695 DEBUG    RFM2Pi     715 Timestamp : 1668237424.69
2022-11-12 07:17:04,695 DEBUG    RFM2Pi     715 From Node : 5
2022-11-12 07:17:04,696 DEBUG    RFM2Pi     715    Values : [289, 265, 554, 244.77, 16.2, 0, 0, 0, 0, 0, 0]
2022-11-12 07:17:04,696 DEBUG    RFM2Pi     715 Sent to channel(start)' : ToEmonCMS
2022-11-12 07:17:04,697 DEBUG    RFM2Pi     715 Sent to channel(end)' : ToEmonCMS
2022-11-12 07:17:04,822 DEBUG    MQTT       Publishing: emon/emonpi/power1 289
2022-11-12 07:17:04,823 DEBUG    MQTT       Publishing: emon/emonpi/power2 265
2022-11-12 07:17:04,825 DEBUG    MQTT       Publishing: emon/emonpi/power1pluspower2 554

So the question is, why did the serial port connection fail? I don’t know. When I connect minicom to the serial port /dev/ttyAMA0 38400 8N1, I do get some output. Not familiar with the protocol but I guess this does not contain any errors (any longer).

OPTIONS: I18n                                                                
Compiled on May  7 2017, 05:18:49.                                           
Port /dev/ttyAMA0, 06:36:09                                                  
                                                                             
Press CTRL-A Z for help on special keys                                      
                                                                             
OK 5 215 255 190 7 149 7 54 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)        
OK 5 200 255 192 7 136 7 67 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)        
OK 8 12 0 0 0 1 0 0 0 167 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 194 255 202 7 140 7 37 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)        
OK 5 176 255 198 7 118 7 31 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)        
OK 8 13 0 1 0 0 0 0 0 93 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 156 255 192 7 92 7 51 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 231 255 158 7 133 7 97 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 11 0 1 0 1 0 0 0 155 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 138 255 190 7 72 7 35 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 142 255 206 7 92 7 59 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 11 0 0 0 1 0 0 0 116 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 199 255 209 7 152 7 74 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 156 255 212 7 112 7 103 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 12 0 2 0 0 0 0 0 165 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 176 255 194 7 114 7 94 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 143 255 221 7 108 7 52 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 12 0 1 0 1 0 0 0 135 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 168 255 234 7 146 7 83 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 187 255 222 7 153 7 102 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 13 0 1 0 1 0 0 0 169 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 179 255 228 7 151 7 100 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 182 255 217 7 143 7 93 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 12 0 0 0 1 0 0 0 128 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-27)
OK 5 163 255 230 7 137 7 55 95 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 200 255 222 7 166 7 99 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 8 11 0 1 0 0 0 0 0 150 103 88 0 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-28)
OK 5 193 255 237 7 174 7 107 95 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)

Should this happen again, I will try to connect directly to the serial port to see if I can see something coming in.

Not seen that for a while - is this an old base image?

emonSD version: emonSD-26Oct17

That is a very old version of Linux. I’d suggest a new SD Card and a new image (when Trystan releases the new one) and transfer the data via the USB script. Update & Upgrade - Guide | OpenEnergyMonitor