Thanks both.
I ran the three commands @borpin described above on my emonTx / PiZ #2, and something wasn’t right …
pi@emonpi:~ $ sudo systemctl stop emonhub.service
pi@emonpi:~ $ wget https://github.com/openenergymonitor/EmonTxV3CM/releases/download/2.0.0/firmware.hex
--2020-10-16 17:17:00-- https://github.com/openenergymonitor/EmonTxV3CM/releases/download/2.0.0/firmware.hex
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/195186265/f65d4980-e155-11ea-9cbb-743aa1ea70da?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201016%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201016T161701Z&X-Amz-Expires=300&X-Amz-Signature=38706b3374a36681ff1e5b69102ad0b6b408e8d9facf91dbbd459d476e3d29a3&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=195186265&response-content-disposition=attachment%3B%20filename%3Dfirmware.hex&response-content-type=application%2Foctet-stream [following]
--2020-10-16 17:17:01-- https://github-production-release-asset-2e65be.s3.amazonaws.com/195186265/f65d4980-e155-11ea-9cbb-743aa1ea70da?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201016%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201016T161701Z&X-Amz-Expires=300&X-Amz-Signature=38706b3374a36681ff1e5b69102ad0b6b408e8d9facf91dbbd459d476e3d29a3&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=195186265&response-content-disposition=attachment%3B%20filename%3Dfirmware.hex&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.138.35
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.138.35|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 79173 (77K) [application/octet-stream]
Saving to: ‘firmware.hex.1’
firmware.hex.1 100%[==========================================================>] 77.32K 317KB/s in 0.2s
2020-10-16 17:17:02 (317 KB/s) - ‘firmware.hex.1’ saved [79173/79173]
pi@emonpi:~ $ avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:firmware.hex
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 "/etc/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
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude-original: stk500_recv(): programmer is not responding
avrdude-original: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude-original done. Thank you.
strace: |autoreset: Broken pipe
pi@emonpi:~ $
If I try to stop emonhub again and re-run tty it also comes back with a broken pipe.
pi@emonpi:~ $ miniterm /dev/ttyAMA0 115200
--- Miniterm on /dev/ttyAMA0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
packet_write_wait: Connection to 192.168.2.53 port 22: Broken pipe
Julians-42-iMac:~ jjb$
And for reasons that are probably related, data from this PiZ #2 is no longer arriving within emonCMS on the main emonPi. I must have broken something