Ok, so I am finally installing my 6 CT expansion board today. I have done the hardware part, soldered the header, very carefully connected CT7 before refitting the faceplate and put the EmonTX4 back on the wall.
I have been using it over serial to the EmonPi, so the instruction from the shop to use a specific build that would spit out valid serial strings that EmonHub would recognise, its the same instructions as the forum here:Trystan’s post on 12CT over serial
So following this guide in the manual:
https://docs.openenergymonitor.org/emontx4/6ct_expansion_board.html#firmware-guide
Alongside the firmware manual page:
https://docs.openenergymonitor.org/emontx4/firmware.html#how-to-compile-and-upload-firmware
I set the 12 CT values and followed the steps, compiled the firmware, loaded with avrdude (again using the manual guidance):
avrdude -C/opt/openenergymonitor/EmonScripts/update/avrdude.conf -v -pavr128db48 -carduino -D -P/dev/ttyUSB0 -b115200 -Uflash:w:EmonTx4_DB_12CT_WiFi.ino.hex
All went OK and I started to see values again over serial, but lost some values that I had before like temperature and pulse (not using pulse, plan to use temp) but I was seeing 12 values over serial for power.
I then went to configure EmonHub for Radio on node 28/29 as I want to move the EmonPi now physically (to clear down the wall near the main CU which is in the WC).
It seems that the minimal firmware I was pointed to:
https://github.com/openenergymonitor/emontx4/tree/main/firmware/EmonTx4_DB_12CT_WiFi
Is minimal and has no RF enabled?
Went back to the manual and used the example file, changed the CT values to match my setup and compiled again as I did before (board/chip/port all set as per manual and before).
Copied over to EmonPi, ran avrdude as before, but flash just stopped at 51%…
pi@emonpi:~/12ct_wireless $ avrdude -C/opt/openenergymonitor/EmonScripts/update/avrdude.conf -v -pavr128db48 -carduino -D -P/dev/ttyUSB0 -b115200 -Uflash:w:EmonTx4DB_rf_copy_PW_April24.ino.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 "/opt/openenergymonitor/EmonScripts/update/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude-original: Using autoreset DTR on GPIO Pin 7
AVR Part : AVR128DB48
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 125 125 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 16 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 4 1 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
flash 0 0 0 0 no 131072 512 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 512 32 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 25.1
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.01s
avrdude-original: Device signature = 0x1e970c (probably avr128db48)
avrdude-original: reading input file "EmonTx4DB_rf_copy_PW_April24.ino.hex"
avrdude-original: input file EmonTx4DB_rf_copy_PW_April24.ino.hex auto detected as Intel Hex
avrdude-original: writing flash (17188 bytes):
Writing | ########################## | 51% 1.26sstrace: |autoreset: Broken pipe
Which was worrying… I left it alone but nothing changed, something has gone wrong.
Can’t see any errors in the process, and the steps I followed from the manual are identical to the ones I followed the first time with the serial sketch just using the File > Examples > emonLibDB > Examples > EmonTx4DB_rf
as the starting point.
I CTRL-C this in the end as it didn’t move. Tried to re-load the default firmware to get back to a starting position as per the manual guide for pre-complied fw loading:
pi@emonpi:~/12ct_wireless $ avrdude -C/opt/openenergymonitor/EmonScripts/update/avrdude.conf -v -pavr128db48 -carduino -D -P/dev/ttyUSB0 -b115200 -Uflash:w:EmonTxV4_LPL.hex:i
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 "/opt/openenergymonitor/EmonScripts/update/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude-original: Using autoreset DTR on GPIO Pin 7
AVR Part : AVR128DB48
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 125 125 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 16 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 4 1 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
flash 0 0 0 0 no 131072 512 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 512 32 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Currently I am here - is there a way to reset the EmonTX or recover from a failed flash?
Not sure where I went wrong, as it all went OK the first time (serial only) I assume it’s a problem with the second time I complied from the example but now a bit stuck - any tips how to recover appreciated!