Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Uploading the latest EmonTxV3CM Firmware to an EmonTx using a emonPi/emonBase

With the latest stable release of Emoncms core v10.2.4 its now possible to upload the latest EmonTxV3CM firmware to an EmonTx straight from an emonPi/emonBase via the Update Firmware tool on the Emoncms Admin page.

1. Connect the EmonTx to the emonPi using a USB to UART cable:

2. Navigate to Admin > Updates > UPDATE FIRMWARE ONLY, select the second item in the drop down menu for the serial port, it should be ttyUSB0. Select EmonTxV3CM from the firmware drop down menu. Click ‘Upload Firmware’:

3. You should now see the firmware upload progress in the Update Log window.

2 Likes

I think this is a great addition. However, I think it needs to be broken out of the ‘Full Update’ as there is a distinct possibility of using it incorrectly.

I’d also suggest the ability to select a custom hex or one of the different sketches (e.g. 3Ph).

1 Like

As a first step I was thinking it could be extended to cover a wider range of firmwares, E.g discreet EmonTX, 3ph, emonPiCM, EmonTH etc. I agree that it could be broken out.

1 Like

The 3-phase sketch has so many possible permutations - about 3.5 million on the #defines alone - that it’s not practical to publish a pre-compiled version.

1 Like

Thanks @TrystanLea very useful tool. Can I ask what is probably a stupid question. If I updated my EmonTX with this tool, do I need to do anything to the optional wifi module in order to get it to work? I just get a constant flashing light on the ESP8266 board.

I want to repeat this @TrystanLea - a recent thread seems to imply the wrong firmware was updated.

I think this is a very dangerous tool to be included in the full update unless there is something to confirm the base device.

The default is for no firmware to be updated when doing a full update, so it should be safe.

You have to manually select a firmware first before running full update for the firmware to be updated.

Shouldn’t need to do anything. A mostly on, constant flashing light on the ESP board indicates that it is trying to connect to a WiFi network. If you click the boot button it should go back into access point mode I think and you can reconfigure…

Does the update log, log the firmware update parameters used?

I still feel it is a high risk option that should be split out and not hidden under ‘update all’.

The log will print the type of firmware being uploaded e.g: https://github.com/openenergymonitor/EmonScripts/blob/master/update/rfm69pi.sh#L5

You are probably right. Reworking that whole update section has been on the todo list for a while.

But what about other types of firmware? Could the parameters passed to the update script, be included in the log to ease future debugging?

It depends on what you updated your emonTx from. The3-phase sketch must communicate at 9600 baud or slower. That might mean the ESP8266 needs its speed changing to match. It’s all in the documentation.

1 Like

Yes sure, that would be good to add.

1 Like

Yes, just reset the ESP8266 board and reconnected :slight_smile: cheers