Emoncms local stopped working

Hi all,

My local emoncms has been working for 2 months without an issue. Then on Sunday it stopped working, until I carried out a restart. It has now stopped working again, but restarting either emoncms or the Pi has no effect.

The emonhub log shows this;

2017-04-18 19:53:19,536 DEBUG emoncmsorg acknowledged receipt with ‘ok’ from https://emoncms.org
2017-04-18 19:53:19,538 INFO emoncmsorg sending: https://emoncms.org/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2017-04-18 19:53:44,802 DEBUG RFM2Pi RFM2Pi broadcasting time: 19:53
2017-04-18 19:53:49,329 INFO emoncmsorg sending: https://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1492545229

This is the log around the time the last problem occurred;

2017-04-18 17:54:55.764|WARN|phpmqtt_input.php|Starting MQTT Input script
2017-04-18 17:54:58.956|WARN|phpmqtt_input.php|Subscribing to: emon/#
2017-04-18 17:54:58.982|WARN|phpmqtt_input.php|Not connected, retrying connection
2017-04-18 17:54:58.983|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2017-04-18 17:54:58.985|WARN|phpmqtt_input.php|Subscribed to topic: emon/#

I have recently made some changes to the config file, but all looks in order to me. Is there a way of checking for errors?

Chris

There isn’t really enough emonhub.log there to determine anything, it doesn’t show any data coming in or going out, can you post a larger snippet?

2017-04-18 17:54:00,764 INFO     MainThread EmonHub emonHub 'emon-pi' variant v1.2
2017-04-18 17:54:00,777 INFO     MainThread Opening hub...
2017-04-18 17:54:00,780 INFO     MainThread Logging level set to DEBUG
2017-04-18 17:54:00,783 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2017-04-18 17:54:00,812 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2017-04-18 17:54:02,817 WARNING  MainThread Device communication error - check settings
2017-04-18 17:54:02,820 INFO     MainThread Setting RFM2Pi frequency: 868 (8b)
2017-04-18 17:54:03,827 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2017-04-18 17:54:04,832 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2017-04-18 17:54:05,836 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2017-04-18 17:54:06,841 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2017-04-18 17:54:07,846 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2017-04-18 17:54:07,849 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-04-18 17:54:07,852 DEBUG    MainThread Setting RFM2Pi interval: 10
2017-04-18 17:54:07,855 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-04-18 17:54:07,957 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2017-04-18 17:54:07,960 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-04-18 17:54:08,031 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2017-04-18 17:54:08,035 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2017-04-18 17:54:08,104 DEBUG    MainThread MQTT Subscribed to channel' : ToEmonCMS
2017-04-18 17:54:08,198 DEBUG    RFM2Pi     RFM2Pi broadcasting time: 17:54
2017-04-18 17:54:08,257 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2017-04-18 17:54:08,275 DEBUG    MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2017-04-18 17:54:08,450 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:08,602 INFO     MQTT       Could not connect...
2017-04-18 17:54:09,761 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:09,854 INFO     MQTT       Could not connect...
2017-04-18 17:54:10,972 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:11,070 INFO     MQTT       Could not connect...
2017-04-18 17:54:12,188 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:12,208 INFO     MQTT       Could not connect...
2017-04-18 17:54:13,331 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:13,358 INFO     MQTT       Could not connect...
2017-04-18 17:54:21,419 DEBUG    RFM2Pi     RFM2Pi broadcasting time: 17:54
2017-04-18 17:54:22,053 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:22,059 INFO     MQTT       Could not connect...
2017-04-18 17:54:23,163 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:23,169 INFO     MQTT       Could not connect...
2017-04-18 17:54:24,288 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:24,306 INFO     MQTT       Could not connect...
2017-04-18 17:54:25,441 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:25,465 INFO     MQTT       Could not connect...
2017-04-18 17:54:26,569 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:26,585 INFO     MQTT       Could not connect...
2017-04-18 17:54:27,689 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:27,741 INFO     MQTT       Could not connect...
2017-04-18 17:54:28,872 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:28,959 INFO     MQTT       Could not connect...
2017-04-18 17:54:30,125 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:30,229 INFO     MQTT       Could not connect...
2017-04-18 17:54:31,381 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:31,439 INFO     MQTT       Could not connect...
2017-04-18 17:54:31,519 DEBUG    RFM2Pi     RFM2Pi broadcasting time: 17:54
2017-04-18 17:54:32,555 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:32,611 INFO     MQTT       Could not connect...
2017-04-18 17:54:33,759 INFO     MQTT       Connecting to MQTT Server
2017-04-18 17:54:33,840 INFO     MQTT       connection status: Connection successful
2017-04-18 17:54:33,844 DEBUG    MQTT       CONACK => Return code: 0
2017-04-18 17:54:34,030 INFO     MQTT       on_subscribe
2017-04-18 17:54:38,340 INFO     emoncmsorg sending: https://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1492538078
2017-04-18 17:54:38,924 DEBUG    emoncmsorg acknowledged receipt with 'ok' from https://emoncms.org
2017-04-18 17:54:38,927 INFO     emoncmsorg sending: https://emoncms.org/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2017-04-18 17:54:41,521 DEBUG    RFM2Pi     RFM2Pi broadcasting time: 17:54
2017-04-18 17:54:51,589 DEBUG    RFM2Pi     RFM2Pi broadcasting time: 17:54
2017-04-18 17:55:01,654 DEBUG    RFM2Pi     RFM2Pi broadcasting time: 17:55

Sorry, didn’t realise you could go back further. This was the log when the issue started tonight.

The notable thing in that log is it seems the RFM2Pi is not communicating. Possible bad connection again perhaps or have you by any chance used the update RFM69Pi button in emoncms again ?


2017-04-18 17:54:00,783 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2017-04-18 17:54:00,812 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2017-04-18 17:54:02,817 WARNING  MainThread Device communication error - check settings

Yep! The fact that restarting it last time seemed to fix it threw me though. Does seem like dodgy connections on the header.