rogeremon
(Roger Hefford)
21 October 2025 00:41
1
I just bought a emonPI2 to replace an old emonPI unit I’ve being using for years.
The old emonPI had no problem with the three emonTH sensors I have.
The new emonPI2 can detect the oldest emonTH but doesn’t get updated data from it.
The newer emonTH v2 units are not detected at all.
All these items were bought directly from openenergymonitor
The rf node ids are 23 (old one), 25 and 26 (new ones)
I put new batteries in all and the light came on in each unit.
I’m not sure what to do next
awjlogan
(Angus Logan)
21 October 2025 04:17
2
Hi @rogeremon - do you know which version of the emonTH firmware you are using? Your probably need to upgrade to the latest emonTH firmware as the RF link protocol has changed to LPL from JeeLibs, which you likely have.
rogeremon
(Roger Hefford)
21 October 2025 04:35
3
The newest was bought in 2020.
Do I need this thing to update it
awjlogan
(Angus Logan)
21 October 2025 04:44
4
Yes, you’ll need something like that. Given you are in NZ, it’s probably easier to source it locally - USB to serial converters are widely available.
I think this will be suitable – you might like to check with The Shop first
rogeremon
(Roger Hefford)
30 October 2025 01:42
6
I updated the firmware but the emonTH2 is not detected.
There are lots of error messages in the log
-------------------------------------------------------------<br />
Firmware selected: emonTH2_jeelib_classic<br />
-------------------------------------------------------------<br />
Downloading firmware from: <br />
https://github.com/openenergymonitor/emonth2/releases/download/4.1.7/emonth2_jeelib_classic.hex<br />
<br />
Downloaded file: <br />
-rw-r--r-- 1 pi pi 52K Mar 5 2024 /opt/openenergymonitor/data/firmware/emonTH2_jeelib_classic.hex<br />
<br />
EmonHub is running, stopping EmonHub<br />
<br />
Uploading emonTH2_jeelib_classic on serial port ttyUSB0<br />
Attempt 1...<br />
<br />
avrdude -Cavrdude.conf -v -pATMEGA328P -carduino -D -P/dev/ttyUSB0 -b115200 -Uflash:w:/opt/openenergymonitor/data/firmware/emonTH2_jeelib_classic.hex:i <br />
<br />
avrdude-original: Version 7.1<br />
Copyright the AVRDUDE authors;<br />
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS<br />
<br />
System wide configuration file is /opt/openenergymonitor/EmonScripts/update/avrdude.conf<br />
avrdude-original yywarning() warning: ATmega329's flash writepage misses a necessary address bit a13 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:5932]<br />
avrdude-original yywarning() warning: ATmega649's flash writepage misses a necessary address bit a14 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:6158]<br />
avrdude-original yywarning() warning: AT90PWM2's eeprom writepage misses a necessary address bit a8 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:9348]<br />
avrdude-original yywarning() warning: ATtiny44's eeprom writepage misses a necessary address bit a7 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11206]<br />
avrdude-original yywarning() warning: ATtiny84's eeprom writepage misses a necessary address bit a8 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11390]<br />
avrdude-original yywarning() warning: a4 would normally be expected to be a5 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11675]<br />
avrdude-original yywarning() warning: a3 would normally be expected to be a4 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11675]<br />
avrdude-original yywarning() warning: a2 would normally be expected to be a3 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11675]<br />
avrdude-original yywarning() warning: a1 would normally be expected to be a2 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11675]<br />
avrdude-original yywarning() warning: a0 would normally be expected to be a1 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11675]<br />
avrdude-original yywarning() warning: too few opcode bits in instruction [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11675]<br />
avrdude-original yywarning() warning: ATtiny43u's eeprom read misses a necessary address bit a5 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11694]<br />
avrdude-original yywarning() warning: ATmega32U4's eeprom writepage misses a necessary address bit a2 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:11880]<br />
avrdude-original yywarning() warning: AT90USB1286's eeprom writepage misses a necessary address bit a11 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:12275]<br />
avrdude-original yywarning() warning: ATtiny1634's flash writepage misses a necessary address bit a5 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:15031]<br />
avrdude-original yywarning() warning: mcuid -1 for ATtiny402w is out of range [0..2039], use a free number >= 372 [/opt/openenergymonitor/EmonScripts/update/avrdude.conf:15497]<br />
User configuration file is /root/.avrduderc<br />
User configuration file does not exist or is not a regular file, skipping<br />
<br />
Using Port : /dev/ttyUSB0<br />
Using Programmer : arduino<br />
Overriding Baud Rate : 115200<br />
avrdude-original: Using autoreset DTR on GPIO Pin 7<br />
Traceback (most recent call last):<br />
File "/usr/bin/autoreset", line 40, in <br />
main()<br />
File "/usr/bin/autoreset", line 36, in main<br />
process()<br />
File "/usr/bin/autoreset", line 30, in process<br />
reset()<br />
File "/usr/bin/autoreset", line 18, in reset<br />
GPIO.setup(PIN, GPIO.OUT)<br />
File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 704, in setup<br />
initial = _check(lgpio.gpio_read(_chip, gpio))<br />
^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br />
File "/usr/lib/python3/dist-packages/lgpio.py", line 903, in gpio_read<br />
return _u2i(_lgpio._gpio_read(handle&0xffff, gpio))<br />
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br />
File "/usr/lib/python3/dist-packages/lgpio.py", line 458, in _u2i<br />
raise error(error_text(v))<br />
lgpio.error: 'GPIO not allocated'<br />
strace: |autoreset: Broken pipe<br />
strace: |autoreset: Broken pipe<br />
AVR Part : ATmega328P<br />
Chip Erase delay : 9000 us<br />
PAGEL : PD7<br />
BS2 : PC2<br />
RESET disposition : dedicated<br />
RETRY pulse : SCK<br />
Serial program mode : yes<br />
Parallel program mode : yes<br />
Timeout : 200<br />
StabDelay : 100<br />
CmdexeDelay : 25<br />
SyncLoops : 32<br />
PollIndex : 3<br />
PollValue : 0x53<br />
Memory Detail :<br />
<br />
Block Poll Page Polled<br />
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack<br />
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------<br />
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff<br />
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff<br />
lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00<br />
hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00<br />
efuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00<br />
lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00<br />
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00<br />
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00<br />
<br />
Programmer Type : Arduino<br />
Description : Arduino<br />
Hardware Version: 3<br />
Firmware Version: 4.4<br />
<br />
avrdude-original: AVR device initialized and ready to accept instructions<br />
avrdude-original: device signature = 0x1e950f (probably m328p)<br />
avrdude-original: reading input file /opt/openenergymonitor/data/firmware/emonTH2_jeelib_classic.hex for flash<br />
with 18800 bytes in 1 section within [0, 0x496f]<br />
using 147 pages and 16 pad bytes<br />
avrdude-original: writing 18800 bytes flash ...<br />
<br />
Writing | ################################################## | 100% 7.09s<br />
<br />
avrdude-original: 18800 bytes of flash written<br />
avrdude-original: verifying flash memory against /opt/openenergymonitor/data/firmware/emonTH2_jeelib_classic.hex<br />
<br />
Reading | ################################################## | 100% 6.32s<br />
<br />
avrdude-original: 18800 bytes of flash verified<br />
strace: |autoreset: Broken pipe<br />
strace: |autoreset: Broken pipe<br />
strace: |autoreset: Broken pipe<br />
strace: |autoreset: Broken pipe<br />
strace: |autoreset: Broken pipe<br />
<br />
avrdude-original done. Thank you.<br />
<br />
strace: |autoreset: Broken pipe<br />
SUCCESS: flash verified<br />
<br />
Restarting EmonHub</details><br />```
Hello @rogeremon could you share your emonhub.conf?
It should look like this: emonhub/conf/emonpi2.default.emonhub.conf at master · openenergymonitor/emonhub · GitHub
With an entry for the SPI (EmonHubRFM69LPLInterfacer) interfacer:
[[SPI]]
Type = EmonHubRFM69LPLInterfacer
[[[init_settings]]]
nodeid = 5
networkID = 210
resetPin = 24 # remove line if hardware is emonBase RFM69 SPI
selPin = 16 # remove line or change to selPin = 26 if hardware is emonBase RFM69 SPI
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
Aha, you want to select emonTH2_LPL as that uses the newer LowPowerLabs format which the emonPi2 uses. The emonPi2 does not support the older jeelib classic format
1 Like
rogeremon
(Roger Hefford)
30 October 2025 20:54
9
Thanks! All three units are working perfectly now.
1 Like