I had a mains power outage at the weekend. Since the power returned, I’ve had no data from my EmonHub to my EmonCMS - despite there being zero configuration changes. This has worked for years, and now it’s just stopped, and I’m losing my mind trying to work out why.
- I have two
emonTX
in different parts of the house. - I have a Raspberry Pi with a
RFM69
receiver, this runs EmonHub. - I have a separate atom PC running EmonCMS.
- I have yet another Raspberry Pi, sending temperatures to EmonCMS.
On the PC (3) EmonCMS is running fine, and it’s receiving the temperatures every minute from pi (4) - apache access.log:
172.29.181.242 - - [19/Feb/2024:21:06:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.750%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:07:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.750%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:08:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.750%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:09:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:10:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:11:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:12:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:13:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:14:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
172.29.181.242 - - [19/Feb/2024:21:15:02 +0000] "GET /emoncms/input/post.json?node=1&json=%7B%22Tbed%22:17.687%7D&apikey=<key> HTTP/1.1" 200
However, we’re getting absolutely nothing from EmonHub (2). Nothing in apache error.log either.
Checking EmonHub on (2) with the debug logging enabled. EmonHub is running, and it’s receiving data from both EmonTX (1):
2024-02-19 21:18:48,447 DEBUG RFM2Pi 2523 NEW FRAME : OK 8 239 0 0 0 0 0 0 0 103 96 180 0 184 11 184 11 184 11 184 11 184 11 1 0 0 0 (-48)
2024-02-19 21:18:48,451 DEBUG RFM2Pi 2523 Timestamp : 1708377528.447455
2024-02-19 21:18:48,452 DEBUG RFM2Pi 2523 From Node : 8
2024-02-19 21:18:48,454 DEBUG RFM2Pi 2523 Values : [239, 0, 0, 0, 246.79, 18, 300, 300, 300, 300, 300, 1]
2024-02-19 21:18:48,455 DEBUG RFM2Pi 2523 RSSI : -48
2024-02-19 21:18:48,456 DEBUG RFM2Pi 2523 Sent to channel(start)' : ToEmonCMS
2024-02-19 21:18:48,457 DEBUG RFM2Pi 2523 Sent to channel(end)' : ToEmonCMS
2024-02-19 21:18:57,405 DEBUG RFM2Pi 2524 NEW FRAME : OK 15 117 92 85 85 117 55 82 85 85 85 85 85 85 85 84 84 85 85 70 85 85 85 85 85 85 85 85 85 85 85 67 90 101 32 101 32 84 85 85 85 (-70)
2024-02-19 21:18:57,409 DEBUG RFM2Pi 2524 Timestamp : 1708377537.405045
2024-02-19 21:18:57,411 DEBUG RFM2Pi 2524 From Node : 15
2024-02-19 21:18:57,412 DEBUG RFM2Pi 2524 Values : [2336, 251.20000000000002, 7, 0, 0, 0, 257, 19, 0, 0, 38.62, 300, 300, 1, 50, 3.849114703618168]
2024-02-19 21:18:57,413 DEBUG RFM2Pi 2524 RSSI : -70
2024-02-19 21:18:57,414 DEBUG RFM2Pi 2524 Sent to channel(start)' : ToEmonCMS
2024-02-19 21:18:57,415 DEBUG RFM2Pi 2524 Sent to channel(end)' : ToEmonCMS
2024-02-19 21:19:07,365 DEBUG RFM2Pi 2525 NEW FRAME : OK 15 116 92 85 85 116 55 82 85 85 85 85 85 85 85 84 84 85 85 70 85 85 85 85 85 85 85 85 85 85 85 67 90 101 32 101 32 84 85 85 85 (-71)
2024-02-19 21:19:07,370 DEBUG RFM2Pi 2525 Timestamp : 1708377547.365289
2024-02-19 21:19:07,371 DEBUG RFM2Pi 2525 From Node : 15
2024-02-19 21:19:07,372 DEBUG RFM2Pi 2525 Values : [2337, 251.21, 7, 0, 0, 0, 257, 19, 0, 0, 38.62, 300, 300, 1, 50, 3.8461538461538463]
2024-02-19 21:19:07,373 DEBUG RFM2Pi 2525 RSSI : -71
2024-02-19 21:19:07,374 DEBUG RFM2Pi 2525 Sent to channel(start)' : ToEmonCMS
2024-02-19 21:19:07,376 DEBUG RFM2Pi 2525 Sent to channel(end)' : ToEmonCMS
2024-02-19 21:19:08,291 DEBUG RFM2Pi 2526 NEW FRAME : OK 8 235 0 0 0 0 0 0 0 82 96 180 0 184 11 184 11 184 11 184 11 184 11 1 0 0 0 (-48)
2024-02-19 21:19:08,295 DEBUG RFM2Pi 2526 Timestamp : 1708377548.291056
2024-02-19 21:19:08,296 DEBUG RFM2Pi 2526 From Node : 8
2024-02-19 21:19:08,297 DEBUG RFM2Pi 2526 Values : [235, 0, 0, 0, 246.58, 18, 300, 300, 300, 300, 300, 1]
2024-02-19 21:19:08,299 DEBUG RFM2Pi 2526 RSSI : -48
2024-02-19 21:19:08,300 DEBUG RFM2Pi 2526 Sent to channel(start)' : ToEmonCMS
2024-02-19 21:19:08,301 DEBUG RFM2Pi 2526 Sent to channel(end)' : ToEmonCMS
Creating a firewall rule, and leaving it to run for 10 mins on (2), confirms that no packets are being sent by EmonHub:
sudo nft add rule filter OUTPUT ip daddr 172.29.181.222 tcp dport 80 counter accept
#wait 10 mins
sudo nft list chain filter OUTPUT
table ip filter {
chain OUTPUT {
type filter hook output priority filter; policy accept;
ip daddr 172.29.181.222 tcp dport 80 counter packets 0 bytes 0 accept
}
}
ping 172.29.181.222
PING 172.29.181.222 (172.29.181.222) 56(84) bytes of data.
64 bytes from 172.29.181.222: icmp_seq=1 ttl=64 time=1.12 ms
64 bytes from 172.29.181.222: icmp_seq=2 ttl=64 time=0.695 ms
^C
EmonHub config is unchanged, and I’m at a loss as to why it’s suddenly just stopped sending packets to EmonCMS. EmonHub config:
[interfacers]
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
[[RFM2Pi]]
Type = EmonHubJeeInterfacer
[[[init_settings]]]
com_port = /dev/ttyAMA0
com_baud = 38400 # 9600 for old RFM12Pi
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
subchannels = ToRFM12,
group = 210
frequency = 433
baseid = 5 # emonPi / emonBase nodeID
calibration = 230V # (UK/EU: 230V, US: 110V)
[[emoncmsorg]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
pubchannels = ToRFM12,
subchannels = ToEmonCMS,
url = http://172.29.181.222/emoncms
apikey = xxxx my Api is correct xxxx
senddata = 1 # Enable sending data to Emoncms.org
sendstatus = 1 # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
sendinterval= 30 # Bulk send interval to Emoncms.org in seconds
sendnames = 1
(cut the [nodes] stanza for brevity) none of this config has changed. This is driving me crazy! Why aren’t I seeing any traffic from EmonHub to EmonCMS?