No inputs after emonpi new SD card and CM firmware update

OK I confess to committing the cardinal sin - updating 2 things at once :frowning_face:

Previously running without problems:

  • 2017 emonpi with emonSD-24Jul20
  • emoncms version, probably last updated 6-12months ago? (11.3)
  • 2 x emontx3 running CM firmware
  • 2 x emonth

After making and downloading a backup, I fitted a just-purchased preloaded industrial SD card, which appeared to install ok, then immediately updated the emonpi firmware to the Feb 2023 CM version (before checking anything, woops), and finally restored from the old SD card. Result: no inputs (but graphs of old data, for example, are there, so the import appears to have worked ok).

So I swapped back to the old SD card. Same result, no inputs.

Firmware update log:

-------------------------------------------------------------
emonPi_CM_LPL Firmware Upload
-------------------------------------------------------------
Downloading firmware from: 
https://github.com/openenergymonitor/emonpi/releases/download/20-04-23/emonPi_CM_LPL_1_1_4.hex

Downloaded file: 
-rw-r--r-- 1 pi pi 88K Apr 20  2023 /opt/openenergymonitor/data/firmware/emonPi_CM_LPL.hex

EmonHub is running, stopping EmonHub

Uploading emonPi_CM_LPL on serial port ttyAMA0
Attempt 1...


avrdude-original: Version 6.3-20171130
                  Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                  Copyright (c) 2007-2014 Joerg Wunsch

                  System wide configuration file is "avrdude.conf"
                  User configuration file is "/root/.avrduderc"
                  User configuration file does not exist or is not a regular file, skipping

                  Using Port                    : /dev/ttyAMA0
                  Using Programmer              : arduino
                  Overriding Baud Rate          : 115200
                  AVR Part                      : ATmega328P
                  Chip Erase delay              : 9000 us
                  PAGEL                         : PD7
                  BS2                           : PC2
                  RESET disposition             : dedicated
                  RETRY pulse                   : SCK
                  serial program mode           : yes
                  parallel program mode         : yes
                  Timeout                       : 200
                  StabDelay                     : 100
                  CmdexeDelay                   : 25
                  SyncLoops                     : 32
                  ByteDelay                     : 0
                  PollIndex                     : 3
                  PollValue                     : 0x53
                  Memory Detail                 :

                                           Block Poll               Page                       Polled
                    Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                    eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                    flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                    lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                    signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

                  Programmer Type : Arduino
                  Description     : Arduino
                  Hardware Version: 3
                  Firmware Version: 4.4
                  Vtarget         : 0.3 V
                  Varef           : 0.3 V
                  Oscillator      : 28.800 kHz
                  SCK period      : 3.3 us

avrdude-original: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude-original: Device signature = 0x1e950f (probably m328p)
avrdude-original: reading input file "/opt/openenergymonitor/data/firmware/emonPi_CM_LPL.hex"
avrdude-original: writing flash (31868 bytes):

Writing | ################################################## | 100% 4.63s

avrdude-original: 31868 bytes of flash written
avrdude-original: verifying flash memory against /opt/openenergymonitor/data/firmware/emonPi_CM_LPL.hex:
avrdude-original: load data flash data from input file /opt/openenergymonitor/data/firmware/emonPi_CM_LPL.hex:
avrdude-original: input file /opt/openenergymonitor/data/firmware/emonPi_CM_LPL.hex contains 31868 bytes
avrdude-original: reading on-chip flash data:

Reading | ################################################## | 100% 3.42s

avrdude-original: verifying ...
avrdude-original: 31868 bytes of flash verified

avrdude-original done.  Thank you.

avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
SUCCESS: flash verifed

Restarting EmonHub

Emonhub startup log:

2023-10-24 17:17:04,200 INFO     MainThread Exiting hub...
2023-10-24 17:17:04,373 INFO     MainThread Exit completed
2023-10-24 17:17:05,827 INFO     MainThread EmonHub v2.5.2
2023-10-24 17:17:05,828 INFO     MainThread Opening hub...
2023-10-24 17:17:05,828 INFO     MainThread Running as user: pi
2023-10-24 17:17:05,829 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi'
2023-10-24 17:17:07,833 WARNING  MainThread Device communication error - check settings
2023-10-24 17:17:07,834 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2023-10-24 17:17:08,836 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2023-10-24 17:17:09,838 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2023-10-24 17:17:10,841 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2023-10-24 17:17:11,843 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2023-10-24 17:17:12,846 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2023-10-24 17:17:12,851 INFO     MainThread Setting MQTT node_format_enable: 1
2023-10-24 17:17:12,852 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2023-10-24 17:17:12,852 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2023-10-24 17:17:12,854 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2023-10-24 17:17:12,857 WARNING  MainThread Setting emoncmsorg apikey: obscured
2023-10-24 17:17:12,859 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2023-10-24 17:17:12,859 INFO     MainThread Setting emoncmsorg senddata: 1
2023-10-24 17:17:12,860 INFO     MainThread Setting emoncmsorg sendstatus: 1
2023-10-24 17:17:12,860 INFO     MainThread Setting emoncmsorg sendnames: 0
2023-10-24 17:17:12,861 INFO     MainThread Setting emoncmsorg compress: 0

Given the warning ‘Device communication error - check settings’, here is emonhub config:

#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]
### loglevel must be one of INFO, INFO, WARNING, ERROR, and CRITICAL
loglevel = INFO
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
#######################       Interfacers       #######################
#######################################################################

[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)
        quiet = true                            # Disable quite mode (default enabled) to enable RF packet debugging, show packets which fail crc
        # interval =  0                         # Interval to transmit time to emonGLCD (seconds)
        

[[MQTT]]

    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
        mqtt_host = 127.0.0.1
        mqtt_port = 1883
        mqtt_user = emonpi
        mqtt_passwd = emonpimqtt2016

    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,

        # emonhub/rx/10/values format
        # Use with emoncms Nodes module
        node_format_enable = 1
        node_format_basetopic = emonhub/

        # emon/emontx/power1 format - use with Emoncms MQTT input
        # http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
        nodevar_format_enable = 1
        nodevar_format_basetopic = emon/

[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://emoncms.org
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        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

#######################################################################
#######################          Nodes          #######################
#######################################################################

[nodes]

## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf

[[5]]
    nodename = emonpi
    [[[rx]]]
        names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount
        datacodes = h, h, h, h, h, h, h, h, h, h, L
        scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
        units = W,W,W,V,C,C,C,C,C,C,p

[[6]]
    nodename = emontxshield
    [[[rx]]]
       names = power1, power2, power3, power4, vrms
       datacode = h
       scales = 1,1,1,1,0.01
       units =W,W,W,W,V

[[7]]
   nodename = emontx4
   [[[rx]]]
      names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
      datacodes = h,h,h,h,h,h,h,h,h,h,h,L
      scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
      units =W,W,W,W,V,C,C,C,C,C,C,p

[[8]]
    nodename = emontx3
    [[[rx]]]
       names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p

[[9]]
   nodename = emontx2
   [[[rx]]]
      names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
      datacode = h
      scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
      units =W,W,W,W,V,C,C,C,C,C,C,p

[[10]]
    nodename = emontx1
    [[[rx]]]
       names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacode = h
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p

[[11]]
    nodename = 3phase
    [[[rx]]]
       names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p
       
[[12]]
    nodename = 3phase2
    [[[rx]]]
       names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p

[[13]]
    nodename = 3phase3
    [[[rx]]]
       names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p

[[14]]
    nodename = 3phase4
    [[[rx]]]
       names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p

[[19]]
   nodename = emonth1
   [[[rx]]]
      names = temperature, external temperature, humidity, battery
      datacode = h
      scales = 0.1,0.1,0.1,0.1
      units = C,C,%,V

[[20]]
   nodename = emonth2
   [[[rx]]]
      names = temperature, external temperature, humidity, battery
      datacode = h
      scales = 0.1,0.1,0.1,0.1
      units = C,C,%,V

[[21]]
   nodename = emonth3
   [[[rx]]]
      names = temperature, external temperature, humidity, battery
      datacode = h
      scales = 0.1,0.1,0.1,0.1
      units = C,C,%,V

[[22]]
   nodename = emonth4
   [[[rx]]]
      names = temperature, external temperature, humidity, battery
      datacode = h
      scales = 0.1,0.1,0.1,0.1
      units = C,C,%,V

[[23]]
    nodename = emonth5
    [[[rx]]]
       names = temperature, external temperature, humidity, battery, pulsecount
       datacodes = h,h,h,h,L
       scales = 0.1,0.1,0.1,0.1,1
       units = C,C,%,V,p

[[24]]
    nodename = emonth6
    [[[rx]]]
       names = temperature, external temperature, humidity, battery, pulsecount
       datacodes = h,h,h,h,L
       scales = 0.1,0.1,0.1,0.1,1
       units = C,C,%,V,p

[[25]]
    nodename = emonth7
    [[[rx]]]
       names = temperature, external temperature, humidity, battery, pulsecount
       datacodes = h,h,h,h,L
       scales = 0.1,0.1,0.1,0.1,1
       units = C,C,%,V,p

[[26]]
    nodename = emonth8
    [[[rx]]]
       names = temperature, external temperature, humidity, battery, pulsecount
       datacodes = h,h,h,h,L
       scales = 0.1,0.1,0.1,0.1,1
       units = C,C,%,V,p

[[15]]
    nodename = emontx3cm15
    [[[rx]]]
        names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
        datacodes = L,h,h,h,h,h,L,L,L,L,h,h,h,L
        scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
        units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
        whitening = 1

[[16]]
    nodename = emontx3cm16
    [[[rx]]]
        names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
        datacodes = L,h,h,h,h,h,L,L,L,L,h,h,h,L
        scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
        units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
        whitening = 1

I guess I’ve done something silly somewhere… any ideas?

Noting that your emonCMS on your emonPi is now using the LPL radio format, you also need to update the emonTxs to use the LPL radio format too.

It’s also possible that the RPi is expecting the RFM69 to have the new SPI interface, whereas you’ll be using the old RFM12Pi (albeit with a RFM69CW module) with the serial interface.

My problem is all these changes were done while I was fully occupied with emonLibDB, and I haven’t caught up with all the changes yet.

Seeing @rupert has posted while I was typing, you can keep emonLibCM on the emonPi if you use my RFM69nTxLib (JeeLib Native format) in both the emonPi and your emonTx’s. It’s all documented in The emonPiCM

Hi @PeteF

Been there, done that (almost)!

see:

https://docs.openenergymonitor.org/emontx4/technical.html

Sorry for a lot of reading!

Briefly, from your log, you have updated the atmega328 processor firmware on the emonPi data collection/RF comms board to emonPi_CM_LPL_1_1_4.hex .

This has the following effects:

  1. It updates the power measurement method from discrete sampling to continuous measurement.
  2. it updates the 433MHz Radio communication format from JeeLib Classic to LPL (Low Power Labs).
  3. it changes the serial data format between the emonPi data collection/RF comms board and the Raspberry Pi over the ttyAMA0 serial interface.

meaning from above

  1. this is perhaps what you wanted.

  2. your emonTx3s and, If they are not recent, emonTHs will be using the JeeLib Classic radio format and will no longer be able to talk wirelessly to the emonPi, unless they too are upgraded to LPL radio format, or the emonPi is downgraded to JeeLib Classic.

  3. The data format and speed of the ttyAMA0 serial interface will have changed so that both the emonHub interfacer and node definitions will need to be edited.

I think one way way to get back to where you were, might be to do a firmware upgrade on the emonPi to: (I haven’t tried this)

select port: ttyAMA0
Hardware: emonPi
Radio Format: RFM69 JeeLib Claasic
Firmware: emonPi Discrete Sampling Firmware, JeeLib Classic, V2.03

I am assuming that the ‘emonPi Discrete Sampling Firmware, JeeLib Classic, V2.03’ doesn’t include the LPL changes to the data format and speed of the ttyAMA0 serial interface.

Hopefully this will (may?) get you up and running again while you decide what you want to do!

To help your choices - I don’t think that you can get Continuous Monitoring on the emonPi if you use the JeeLib Classic radio format.

Just to add - updates are available for the emonTx3 and emonTH to the LPL radio format:

https://docs.openenergymonitor.org/emontx3/firmware.html

https://docs.openenergymonitor.org/emonth2/firmware.html

Thanks @Robert.Wall, I could update the TX’s, but I still have the issue with the emonpi and the emonth’s I think.

Thanks also @rupert, I haven’t done the background reading yet (!) but I did try to get back to a working system with the firmware ‘crossgrade’ as you suggested. Unfortunately this didn’t work:

Firmware not found: emonPi_DS_jeelib_classic

I think I saw an old posting somewhere that showed how to do a manual firmware ‘downgrade’ for the emonpi. Maybe that’s the way out of this.

I’m probably OK with updating the TXs and THs as I’ve done the TXs before, but the main issue is with the pi I think.

Note to self: don’t try these upgrades in future without following the threads in their development/reading all the READMES/praying to whichever God you believe in (or not)!

Sorry @Robert I didn’t explore properly your suggestion about keeping emonLibCM, thank you for that link but a job for tomorrow I think.

Hmm. I assume that you used the upgrade firmware section of the emonPi Admin/upgrade page and got the ‘Firmware not found: emonPi_DS_jeelib_classic’ error message.

The only thing I can suggest is that you try updating:
Admin > Components > EmonScripts > Update
and try again.

@TrystanLea - is there something wrong here?

This is correct, you absolutely cannot have CM on the emonPi with JeeLib Classic, and this is exactly the reason why I developed emonLibCM and the ‘Native’ format, because it unloads a lot of the radio processing to the RFM68CW, which the RFM12B (for which JeeLib Classic was made), can’t do.

Yes, exactly that.

It shows I’m already on the latest stable version 1.5.14 with no local changes.

OK, I will try and read all the background info you have kindly pointed to tomorrow, but I think I may have entered a cul-de-sac and effectively bricked my system. A nightmare of dependencies, eh?

Hopefully you (pl.) will be able to retrieve my emonpi, because I love it :slight_smile:

As long as you’re able to write a SD card, I don’t think you can ‘brick’ your emonPi - just download a new image and start again.

And according to the emonPi Docs:

https://docs.openenergymonitor.org/emonpi/firmware.html

emonPi_DS_jeelib_classic

should be a valid update choice, so I guess that something is misconfigured somewhere?

Yes of course you are reassuringly correct, I’m hoping to recover the situation in amore graceful way though, if I can :slight_smile:

I am guessing that the reason why your emonPi can’t find the emonPi_DS_jeelib_classic firmware is that it’s missing at the OEM end, which is presumeably where the emonPi downloads it from.

OK I did try again (on the original SD card emonSD-24Jul20 and emoncms 11.3.0) and got the same issue:

So I put in the new SD card and this time it was successful. I set emonhub log level to debug:

2023-10-25 10:32:50,188 INFO     MainThread EmonHub v2.5.8
2023-10-25 10:32:50,189 INFO     MainThread Opening hub...
2023-10-25 10:32:50,189 INFO     MainThread Running as user: pi
2023-10-25 10:32:50,189 INFO     MainThread Logging level set to DEBUG
2023-10-25 10:32:50,190 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi'
2023-10-25 10:32:50,191 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2023-10-25 10:32:52,194 WARNING  MainThread Device communication error - check settings
2023-10-25 10:32:52,195 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2023-10-25 10:32:53,197 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2023-10-25 10:32:54,200 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2023-10-25 10:32:55,202 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2023-10-25 10:32:56,204 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2023-10-25 10:32:57,206 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2023-10-25 10:32:57,207 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']

So it seems that it’s a problem opening the serial port? I don’t know the hardware well enough, but here is the top section of config:

[interfacers]
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
[[RFM2Pi]]
    Type = EmonHubJeeInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 9600                        # 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)
        quiet = true                            # Disable quite mode (default enabled) to enable RF packet debugging, show packets which fail crc
        # interval =  0                         # Interval to transmit time to emonGLCD (seconds)

Is there something obviously wrong? I checked the emnhub docs and it seems ok to me… Should I try other baud rates?

Yes, this is the first step. They have changed over time - but I don’t know when the changes were made. Start at 9600 (I don’t think it’s ever been slower) and work your way up.

My note says: " RFM69Pi - Serial baud rate default is 38400, old versions can be 9600 or 57600, CM is 115200" so try those first. You don’t need to restart everything, only emonHub.

That’s good. So I was wrong and the firmware was at the OEM end, but the old SD card didn’t know where to find it.
I think the baud rate should be 38400 … hopefully

If you are interested in even more reading (!), the docs for emonhub are at:

https://docs.openenergymonitor.org/emonhub/index.html

That figures - everything tended to get renamed and shuffled about when LPL became standard.

Tried 19200 and 38400…

2023-10-25 11:08:52,167 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2023-10-25 11:08:54,170 WARNING  MainThread Device communication error - check settings

I’m just going to check the hardware…

The baud rate for the emonPi atmega328 LPL firmware was changed to 115200 for reasons to do with the LPL format. As well, the data format was changed to allow for a second pulse measurement and cumulative energy measurements.

I don’t know if either of these changes were made to the emonPi_DS_jeelib_classic firmware.

Also, clutching at straws here - to reset the atmega328, the emonPi needs to be shutdown using the button next to the display, and then powered off and back on.

OK! Some progress, 115200 worked but now frame decoding error:

2023-10-25 11:30:02,820 DEBUG    RFM2Pi     1 NEW FRAME : OK 5 16 0 0 0 17 6 125 255 142 5 237 95 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 179 27 0 0 158 8 0 0 (-0)
2023-10-25 11:30:02,822 WARNING  RFM2Pi     1 RX data length: 40 is not valid for datacodes ['h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'L']