Here’s what I’ve tried:
- tried putting my old microSD card in. No good - same issue, null on emonpi feeds.
- tried connecting using mqtt.fx and mqtt explorer. Couldn’t connect using pi/emonsd, emoncms login (same as web login) or a mqtt user I set up as per this post. I keep getting “connection refused: not authorized”.
My only thought is that I’ve damaged something physically taking the case off to change the SD card, but it works on a fresh SD card image.
I just realised my one-wire temp sensor has stopped working too. But it’s still logging ESPEasy data coming in from other devices over wifi.
Edit: OK, I found the mqtt user/pass in /etc/emonhub/emonhub.conf. I was able to connect using MQTT Explorer, and while I can’ see anything I understand, it does keep getting more messages every few seconds, so I assume that’s working.
I then had a look at emonhub.conf, as I thought the /dev/ttyAMA0 vs ACM0 was an issue. I tried swapping from ACM0 to AMA0 (as running “dmesg | grep tty” suggested I need ttyAMA0), and variously tried swapping baud 9600 for 38400 and vice versa, but saw no change. I think this file is my problem. Here is my emonhub.conf file, and below is the log:
2024-10-29 22:19:40,974 DEBUG MainThread Signal 15 received.
2024-10-29 22:19:41,054 INFO MainThread Exiting hub...
2024-10-29 22:19:41,303 INFO MainThread Exit completed
2024-10-29 22:19:42,744 INFO MainThread EmonHub v2.6.15
2024-10-29 22:19:42,745 INFO MainThread Opening hub...
2024-10-29 22:19:42,746 INFO MainThread Running as user: pi
2024-10-29 22:19:42,746 INFO MainThread Logging level set to DEBUG
2024-10-29 22:19:42,749 INFO MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2024-10-29 22:19:42,752 ERROR MainThread Could not open serial port: /dev/ttyACM0 @ 9600 bits/s (retry every 10s)
2024-10-29 22:19:42,753 DEBUG MainThread Setting SerialDirect nodeoffset: 6
2024-10-29 22:19:42,754 DEBUG MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2024-10-29 22:19:42,756 INFO MainThread Creating EmonHubJeeInterfacer 'RFM2Pi'
2024-10-29 22:19:42,758 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2024-10-29 22:19:44,759 WARNING MainThread Device communication error - check settings
2024-10-29 22:19:44,760 INFO MainThread Setting RFM2Pi baseid: 5 (5i)
2024-10-29 22:19:45,761 INFO MainThread Setting RFM2Pi frequency: 433 (4b)
2024-10-29 22:19:46,762 INFO MainThread Setting RFM2Pi group: 210 (210g)
2024-10-29 22:19:47,764 INFO MainThread Setting RFM2Pi quiet: 1 (1q)
2024-10-29 22:19:48,765 INFO MainThread Setting RFM2Pi calibration: 230V (1p)
2024-10-29 22:19:49,765 DEBUG MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2024-10-29 22:19:49,766 DEBUG MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2024-10-29 22:19:49,767 INFO MainThread Creating EmonHubMqttInterfacer 'MQTT'
2024-10-29 22:19:49,769 DEBUG MainThread Setting MQTT pubchannels: ['ToRFM12']
2024-10-29 22:19:49,769 DEBUG MainThread Setting MQTT subchannels: ['ToEmonCMS']
2024-10-29 22:19:49,770 INFO MainThread Setting MQTT node_format_enable: 1
2024-10-29 22:19:49,770 INFO MainThread Setting MQTT nodevar_format_enable: 1
2024-10-29 22:19:49,771 INFO MainThread Setting MQTT nodevar_format_basetopic: emon/
2024-10-29 22:19:49,772 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2024-10-29 22:19:49,773 DEBUG MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2024-10-29 22:19:49,774 DEBUG MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2024-10-29 22:19:49,774 WARNING MainThread Setting emoncmsorg apikey: obscured
2024-10-29 22:19:49,775 INFO MainThread Setting emoncmsorg url: https://emoncms.org
2024-10-29 22:19:49,775 INFO MainThread Setting emoncmsorg senddata: 1
2024-10-29 22:19:49,776 INFO MainThread Setting emoncmsorg sendstatus: 1
2024-10-29 22:19:49,776 INFO MainThread Setting emoncmsorg sendnames: 0
2024-10-29 22:19:49,776 INFO MainThread Setting emoncmsorg compress: 0
2024-10-29 22:19:49,778 DEBUG MainThread Automatic configuration of nodes disabled
Edit 2: I’ve tried numerous emonhub.conf versions, and I can’t crack it. I also tried “sudo mosquitto_passwd /etc/mosquitto/passwd emonpi” and set the password as per the emonhub.conf, but it didn’t change anything.
The data is there, it’s just not writing. From system information page:
feedwriter Active Running - sleep 300s 117 feed points pending write