Emonhub stops sending data to emoncms.org take 2

Dear folks,
Since a couple of days my emonhub daemon stopped to show feeds on emoncms dot org, log files are looking normal by showing (in DEBUG mode)

==> /var/log/emonhub/emonhub.log <==
2020-11-28 15:27:03,444 INFO emoncmsorg sending: https://emoncms.org/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y

But no news in feeds section on emoncms.org
Please, any help will be really appreciated.
Regards,
Hernan

I think this is @TrystanLea’s area of expertise.

Have you restarted the machine? Please post a larger section of the log?

I was trying to upload entire emonhub.log file but some policy forbids it.
This is the log brief after rebooting my raspberrypi:

2020-11-28 15:44:51,746 INFO     MainThread EmonHub emonHub emon-pi variant v2.0.0
2020-11-28 15:44:51,758 INFO     MainThread Opening hub...
2020-11-28 15:44:51,766 INFO     MainThread Logging level set to DEBUG
2020-11-28 15:44:51,772 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-11-28 15:44:51,785 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2020-11-28 15:44:53,797 WARNING  MainThread Device communication error - check settings
2020-11-28 15:44:53,804 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-11-28 15:44:54,811 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-11-28 15:44:55,822 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2020-11-28 15:44:56,832 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-11-28 15:44:57,852 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-11-28 15:44:58,863 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-11-28 15:44:58,872 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-11-28 15:44:58,883 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-11-28 15:44:58,895 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2020-11-28 15:44:58,911 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-11-28 15:44:59,020 INFO     MQTT       Connecting to MQTT Server
2020-11-28 15:44:59,044 INFO     MQTT       connection status: Connection successful
2020-11-28 15:44:59,055 DEBUG    MQTT       CONACK => Return code: 0
2020-11-28 15:44:59,164 INFO     MQTT       on_subscribe
2020-11-28 15:45:30,899 INFO     emoncmsorg sending: https://emoncms.org/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y

Formatted text - BT, Moderator

Thanks (a lot) for your quick answer!
In the other hand:

I bumped your user level up a notch. You should be able to upload without any problems now.

When you post a log (or part of one) put three backticks (the ` character, commonly found
in the upper left corner of a keyboard, just below the escape key) on a line above,
and three more on a line below, the log text. That makes the text much easier to read.
Thanks!

Check that your RFM69Pi board is seated correctly on the Pi header.
If it’s OK, try a different baud rate. The old RFM12Pi used 9600 baud, and I have seen 57600 baud, and I think 19200.
That error means no data will be reaching the Pi from the emon part, so it has nothing to send to emoncms.org.

@hpetitti, was this working fine and then it stopped? Did you make any changes? Has there been a power cut or was the power ‘just switched off’ to the device?

Can you confirm what hardware you are using, please?

[I split the topic - MOD]

Hi @borpin, it was working fine until it stopped. I thought it was due to unpaid feed subscription, but not. It suddenly stopped sending data to emoncms.org.
I’m using a raspberry pi zero w with a RPICT3, running raspbian.
I’ve just updated the system (apt-get update, then apt-get upgrade), with no issues. This update was made after the failure.
Regards,
Hernan

I’ve just checked the wired connections (RPICT3, clamps, etc), changed baud rate, rebooted and same results:

```2020-11-29 13:17:28,850 INFO     MainThread Opening hub...
```2020-11-29 13:17:28,857 INFO     MainThread Logging level set to DEBUG
```2020-11-29 13:17:28,864 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
```2020-11-29 13:17:28,877 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 19200 bits/s
```2020-11-29 13:17:30,894 WARNING  MainThread Device communication error - check settings
```2020-11-29 13:17:30,903 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
```2020-11-29 13:17:31,909 INFO     MainThread Setting RFM2Pi group: 210 (210g)
```2020-11-29 13:17:32,919 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
```2020-11-29 13:17:33,930 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
```2020-11-29 13:17:34,941 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
```2020-11-29 13:17:35,947 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
```2020-11-29 13:17:35,956 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
```2020-11-29 13:17:35,967 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
```2020-11-29 13:17:35,984 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
```2020-11-29 13:17:36,001 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
```2020-11-29 13:17:36,110 INFO     MQTT       Connecting to MQTT Server
```2020-11-29 13:17:36,133 INFO     MQTT       connection status: Connection successful
```2020-11-29 13:17:36,143 DEBUG    MQTT       CONACK => Return code: 0
```2020-11-29 13:17:36,260 INFO     MQTT       on_subscribe
```2020-11-29 13:20:00,673 INFO     emoncmsorg sending: https://emoncms.org/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y

This is my emonhub.conf settings:
emonhub-conf.txt (7.2 KB)

For how long?

I’m not clear what that is - RPICT3. Could you post a photo please (just drag and drop or copy & paste onto a post).

Did you use the EmonSD card or just install emonhub?

Have you restarted the Pi?

It was working like a charm for more than 2 years.image

http://lechacal.com/wiki/index.php/RPICT3

I’m using raspbian and installed emonhub.

Try stopping the emonhub service and use miniterm to see if your device is outputting anything and if so what.

The logs you have posted show no activity on the serial port (assuming the logs are complete and there are no further entries after the myIP api call) so you need to confirm the device is ok and working.

Set the baud in emonhub back to whatever it was originally, it’s unlikely that would have changed unaided and that is also the baud you should use with miniterm first.

1 Like

I agree with @pb66 - check the raw serial data, I note there is a test script following that link you posted.

One other thing, check syslog (via sudo journalctl -u emonhub -f as you restart the emonhub service). This will detect any python issues & exceptions.

Note, python is deprecated and python3 has replaced it. The most recent version of emonhub has moved to that. Updating the repo is not enough, you need to run the installer again.

Dear folks,
After running:
stty -F /dev/ttyAMA0 raw speed 38400
and later
cat /dev/ttyAMA0
sudo /etc/init.d/emonhub restart
it began to work again!

2020-11-29 21:02:07,088 INFO     MainThread Opening hub...
2020-11-29 21:02:07,095 INFO     MainThread Logging level set to DEBUG
2020-11-29 21:02:07,103 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-11-29 21:02:07,117 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s



2020-11-29 21:02:09,128 WARNING  MainThread Device communication error - check settings
2020-11-29 21:02:09,139 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-11-29 21:02:10,150 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-11-29 21:02:11,162 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2020-11-29 21:02:12,175 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-11-29 21:02:13,209 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-11-29 21:02:14,221 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-11-29 21:02:14,232 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-11-29 21:02:14,245 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-11-29 21:02:14,265 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2020-11-29 21:02:14,268 DEBUG    RFM2Pi     1 NEW FRAME : 11 11 0 7 0 28 0
2020-11-29 21:02:14,284 DEBUG    RFM2Pi     1 Timestamp : 1606694534.27
2020-11-29 21:02:14,306 DEBUG    RFM2Pi     1 From Node : 11
2020-11-29 21:02:14,312 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-11-29 21:02:14,323 DEBUG    RFM2Pi     1    Values : [11, 7, 28]
2020-11-29 21:02:14,339 DEBUG    RFM2Pi     1 Sent to channel(start)' : ToEmonCMS
2020-11-29 21:02:14,351 DEBUG    RFM2Pi     1 Sent to channel(end)' : ToEmonCMS
2020-11-29 21:02:14,412 INFO     MQTT       Connecting to MQTT Server
2020-11-29 21:02:14,431 INFO     MQTT       connection status: Connection successful
2020-11-29 21:02:14,443 DEBUG    MQTT       CONACK => Return code: 0
2020-11-29 21:02:14,567 DEBUG    MQTT       Publishing: emon/11/1 11
2020-11-29 21:02:14,578 DEBUG    MQTT       Publishing: emon/11/2 7
2020-11-29 21:02:14,587 DEBUG    MQTT       Publishing: emon/11/3 28
2020-11-29 21:02:14,597 INFO     MQTT       Publishing: emon/11/rssi 0
2020-11-29 21:02:14,607 INFO     MQTT       Publishing: emonhub/rx/11/values 11,7,28
2020-11-29 21:02:14,616 INFO     MQTT       Publishing: emonhub/rx/11/rssi 0
2020-11-29 21:02:14,627 INFO     MQTT       on_subscribe
2020-11-29 21:02:16,695 DEBUG    RFM2Pi     2 NEW FRAME : 11 9 0 3 0 27 0
2020-11-29 21:02:16,715 DEBUG    RFM2Pi     2 Timestamp : 1606694536.69
2020-11-29 21:02:16,731 DEBUG    RFM2Pi     2 From Node : 11
2020-11-29 21:02:16,739 DEBUG    RFM2Pi     2    Values : [9, 3, 27]
2020-11-29 21:02:16,746 DEBUG    RFM2Pi     2 Sent to channel(start)' : ToEmonCMS
2020-11-29 21:02:16,753 DEBUG    RFM2Pi     2 Sent to channel(end)' : ToEmonCMS
2020-11-29 21:02:16,980 DEBUG    MQTT       Publishing: emon/RPICT3/P1 9
2020-11-29 21:02:16,991 DEBUG    MQTT       Publishing: emon/RPICT3/P2 3
2020-11-29 21:02:17,000 DEBUG    MQTT       Publishing: emon/RPICT3/P3 27
2020-11-29 21:02:17,010 INFO     MQTT       Publishing: emon/RPICT3/rssi 0
2020-11-29 21:02:17,019 INFO     MQTT       Publishing: emonhub/rx/11/values 9,3,27
2020-11-29 21:02:17,031 INFO     MQTT       Publishing: emonhub/rx/11/rssi 0
2020-11-29 21:02:21,601 DEBUG    RFM2Pi     3 NEW FRAME : 11 7 0 5 0 30 0
2020-11-29 21:02:21,612 DEBUG    RFM2Pi     3 Timestamp : 1606694541.6
2020-11-29 21:02:21,619 DEBUG    RFM2Pi     3 From Node : 11
2020-11-29 21:02:21,627 DEBUG    RFM2Pi     3    Values : [7, 5, 30]
2020-11-29 21:02:21,634 DEBUG    RFM2Pi     3 Sent to channel(start)' : ToEmonCMS
2020-11-29 21:02:21,641 DEBUG    RFM2Pi     3 Sent to channel(end)' : ToEmonCMS
2020-11-29 21:02:21,911 DEBUG    MQTT       Publishing: emon/RPICT3/P1 7
2020-11-29 21:02:21,923 DEBUG    MQTT       Publishing: emon/RPICT3/P2 5
2020-11-29 21:02:21,936 DEBUG    MQTT       Publishing: emon/RPICT3/P3 30
2020-11-29 21:02:21,950 INFO     MQTT       Publishing: emon/RPICT3/rssi 0
2020-11-29 21:02:21,965 INFO     MQTT       Publishing: emonhub/rx/11/values 7,5,30
2020-11-29 21:02:21,979 INFO     MQTT       Publishing: emonhub/rx/11/rssi 0
2020-11-29 21:02:26,390 DEBUG    RFM2Pi     4 NEW FRAME : 11 5 0 4 0 28 0
2020-11-29 21:02:26,405 DEBUG    RFM2Pi     4 Timestamp : 1606694546.39
2020-11-29 21:02:26,415 DEBUG    RFM2Pi     4 From Node : 11
2020-11-29 21:02:26,426 DEBUG    RFM2Pi     4    Values : [5, 4, 28]
2020-11-29 21:02:26,436 DEBUG    RFM2Pi     4 Sent to channel(start)' : ToEmonCMS
2020-11-29 21:02:26,446 DEBUG    RFM2Pi     4 Sent to channel(end)' : ToEmonCMS
2020-11-29 21:02:26,566 DEBUG    MQTT       Publishing: emon/RPICT3/P1 5
2020-11-29 21:02:26,576 DEBUG    MQTT       Publishing: emon/RPICT3/P2 4
2020-11-29 21:02:26,586 DEBUG    MQTT       Publishing: emon/RPICT3/P3 28
2020-11-29 21:02:26,596 INFO     MQTT       Publishing: emon/RPICT3/rssi 0
2020-11-29 21:02:26,614 INFO     MQTT       Publishing: emonhub/rx/11/values 5,4,28
2020-11-29 21:02:26,624 INFO     MQTT       Publishing: emonhub/rx/11/rss```
2020-11-29 21:04:14,506 INFO     emoncmsorg sending: https://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1606694629.000059,11,6,8,30],[1606694633.892249,11,22,7,30],[1606694638.731333,11,22,6,30],[1606694643.518722,11,8,27,30],[1606694648.409494,11,6,13,30],[1606694653.25639,11,11,4,28]]&sentat=1606694654
2020-11-29 21:04:15,562 DEBUG    emoncmsorg acknowledged receipt with 'ok' from https://emoncms.org
2020-11-29 21:04:15,570 DEBUG    emoncmsorg Sending bulkdata, success: True
2020-11-29 21:04:15,577 DEBUG    emoncmsorg Current queue length: 0