Problem setting serial configuration of emontx V3.2 CM

I have been trying to update the firmware on my emontx V3.2 to the emonTx32_CM V2.4.0 but once the firmware is uploaded to my emontx I cant get past the factory test output on the serial monitor.
My attempts to access the setup via the Arduino serial monitor have all failed so far.

I’ve read that I need to send +++ 10- 15 secs after reboot of the emontx but not sure if this is still the way to access the setup with the latest firmware and also not sure how to reboot the emontx. Do I press the reset button on the back to reboot the emontx or remove power or something else?
Any help to solve this would be much appreciated.

Both removing power and pressing the reset button will restart the emonTx.
You need to send ‘+++’ immediately it suggests you do so.

Which RF Module do you have on your emonTx V3.2?
And which radio message format are you trying to use?

It doesn’t get past the info shown in the previous screen shot, the arduino serial monitor shows exactly the same ie. It doesn’t mention the+++command.
I’ve been running the emontx for the past year on the emonTxV34_ max sketch which I modified with, amongst other things, #include <RFu_JeeLib.h> to run on the emontx3.2.
The reason for me upgrading is so that I can use the emonesp to connect the emontx to emoncms running in a docker container.
I’ve got everything else in place but can’t get access to the configuration setup of the emontx for some reason.

As you’ve modified the sketch, can you post the version you’re using, please? And confirm that you’re using the emonESP for Wi-Fi access to wherever?

I’m using the sketch from github without mods. I did briefly try and modify it, changing node and turning on JSON etc manually but am back with the untouched version from here…

The emonesp is working and communicating through mqtt to a local emoncms server but not yet sending any data from the emontx3.2. as I can’t get the configuration to run to set it up.

OK, I’ll have a look.


This is going to take longer than I thought. That sketch cannot have been tested at all thoroughly. I’ve already encountered two major problems.

I can do one of two things - I can rectify the sketch, which would be the “proper” solution because then it would be good for everybody, or I can take out all the code that you won’t need for use with the ESP8266 (i.e. the radio department which is where it’s hanging and where the two problems I’ve already identified are), and this should be quicker and simpler. I’ll go down this second route until you come back to me.

I wont have access to the emontx until next weekend anyway, due to work commitments, so I’m ok with whatever suits you. Just glad you have found a potential cause for the hanging.

I’ve also found why you couldn’t calibrate it - the code had been commented out. Why I don’t know, by who I can only guess, when would presumably be when the LPL radio option was added.

I won’t rush - it’s running and I am working on the calibration.

It appears that the calibration had been changed in many places and I don’t think it would ever have worked in the way you expected. I replaced the entire “_config.ino” file with a version known to be good for use with the ESP8266.

The main part (current and voltage) appears to be working, but it needs to be fully checked.

Thanks, Robert. I’ll load it up on Friday when I get back and give it a try

All appears to be working. If you’d like to tell me your settings, I can set those as the defaults, and your calibration, if you’ve calibrated it (as this sketch will be unique to you).

The settings I’ve been using in the earlier CM sketch are as follows:

standard single phase uk settings plus:-

nodeID = 10;
networkGroup = 210;
nodename = emontx1

typedef struct {int power1, power2, power3, power4, Vrms; } PayloadTX;

EmonLibCM_SetADC_VChannel(0, 275.3);
EmonLibCM_SetADC_IChannel(1, 92.0, 4.2);
EmonLibCM_SetADC_IChannel(2, 92.0, 4.2);
EmonLibCM_SetADC_IChannel(3, 92.0, 4.2);
EmonLibCM_SetADC_IChannel(4, 17.6, 1.0);

Pulse counting off, … I won’t be using pulse counting

temp sensors off, … I will probably add 2 or 3 later to replace emonTH sensors

You get by default with the “latest” emonTx V3.2 sketch:
message count, Vrms, 4 powers, 4 accumulated energies, and 3 temperatures, and pulse count.

You don’t have to use the ‘extra’ values, so I won’t take them out.

I’ll set up the calibration values as the defaults.

Thanks Robert, that sounds great, I wasn’t sure how the new sketch would be set up.
Thanks for spending the time on this.

I’ve just finished doing that - it’s sent data to my emonPi by Wi-Fi, so I am going to put some documentation together and I’ll attach it to a PM to you. There’s no point in putting it on the forum because it’s special to you.

When you get it, you must check it because although I think everything is OK, it’s worth a few minutes making sure I haven’t missed something or assumed something that’s not what you wanted.

Thanks, I’ll give it a good check over for anything obvious, but my understanding of the CM sketches is basic and very rusty at best.

All seems to be working great now with the updated sketch, thanks Robert.
I’ve got it sending to my original local 433mhz emoncms pi4 through wifi to the api using the read/ write key and its also sending to the new local docker emoncms pi5 through Mqtt.
I’ve backed up and restored the pi4 emoncms data to the docker pi5 and I’ll leave both running for now.

1 Like