Connecting emonTH to emonHP (emonpi 2 - rasp4)

I’m returning to the OEM world after an absence, with the excellent emonHP (supplied fully set up), so forgive me if I’m missing something obvious. I have two emonTH units, that I’d like to connect to show room temperature. I’ve put in new batteries and the LEDs light dimly and then go out as expected, but nothing shows up in my inputs list (on the local emoncms).

  • Hardware: emonTH V2.0.2
  • both units are 433mhz
  • batteries are new and 1.5v
  • nodes are 24 & 26

Is there anything obvious I’m missing or any tips to try? Many thanks

Hi @Durruti - how old are your emonTHs? The emonHP will use a more recent version of the wireless driver, and it is not compatible with the older emonTH firmware. You can upgrade the firmware, so no need to get new THs :slight_smile:

1 Like

Further to Angus’s post above …
I don’t have an emonHP, but you might want to look at parts of the following post/topic for some background information about emonTHs, wireless, and firmware upgrades …

1 Like

Thanks for the response Angus!
So I dusted down my old emon programmer and went through the update instructions - connecting directly to the emonpi2 usb and running setup → admin → update.
There seemed to be some issue with the update with a few errors which may be down to it being an older programmer. Is there a mechanism to update the firmware on the controller or does it look broken and should be replaced?

<details><summary>LAST ENTRIES ON THE LOG FILE</summary><br />
-------------------------------------------------------------<br />
Firmware selected: emonTH2_LPL<br />
-------------------------------------------------------------<br />
Downloading firmware from: <br />
https://github.com/openenergymonitor/emonth2/releases/download/4.1.7/emonth2_lpl.hex<br />
<br />
Downloaded file: <br />
-rw-r--r-- 1 pi pi 59K Mar  5  2024 /opt/openenergymonitor/data/firmware/emonTH2_LPL.hex<br />
<br />
EmonHub is running, stopping EmonHub<br />
<br />
Uploading emonTH2_LPL 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_LPL.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 />
                  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_LPL.hex for flash<br />
                  with 21254 bytes in 1 section within [0, 0x5305]<br />
                  using 167 pages and 122 pad bytes<br />
avrdude-original: writing 21254 bytes flash ...<br />
<br />
Writing | ################################################## | 100% 2.95s<br />
<br />
avrdude-original: 21254 bytes of flash written<br />
avrdude-original: verifying flash memory against /opt/openenergymonitor/data/firmware/emonTH2_LPL.hex<br />
<br />
Reading | ################################################## | 100% 2.26s<br />
<br />
avrdude-original: 21254 bytes of flash verified<br />
<br />
avrdude-original done.  Thank you.<br />
<br />
avrdude-original: Using autoreset DTR on GPIO Pin 7<br />
avrdude-original: Using autoreset DTR on GPIO Pin 7<br />
avrdude-original: Using autoreset DTR on GPIO Pin 7<br />
lsof: WARNING: can't stat() overlay file system /var/lib/docker/overlay2/ee1b688d28952285c5d60fea596ea30c146fc375c495bb24fa87f34fc47cfe12/merged<br />
      Output information may be incomplete.<br />
lsof: WARNING: can't stat() nsfs file system /run/docker/netns/default<br />
      Output information may be incomplete.<br />
SUCCESS: flash verified<br />
<br />
Restarting EmonHub</details><br />

Thanks for the background Rupert!

Hi Matt - I’m not an expert in the AVR world but looking at it that looks like it’s worked (SUCCESS: flash verified). Is it showing up now? Check the configuration for node ID 23 (default for the emonTH3) in emonCMS Setup → emonHub then Edit config.

Doh! That’s great, thanks again Angus. I’ve got upstairs and downstairs TH’s added and the downstairs one is now showing as Room on my dashboard. Success!

1 Like

Good news Matt :slight_smile: