Can't +++ into EmonTH V2 March 2018 batch

I have one of the latest batch of EmonTH boards although mine was supplied without an RF board because I have to use 868MHz to match my existing system. The board is dark blue. I have added an 868 RFM69CW module and when I connect a serial board to program it I get the following. Note that it says waiting 5 sec not 10, so what else has changed? However long or short I wait (0, 2, 5, 7 sec), it ignores any attempt to type +++ and after 5 seconds, starts outputting data. The output looks like this:-

----------------------------------
OpenEnergyMonitor.org
emonTH FW: V323
No EEPROM config
Int RFM...
RFM Started
Node: 23 Freq: 433Mhz Network: 210
Int SI7201..
SI7021 Started, ID: 21
SI7021 t: 22.44
SI7021 h: 40.58
No DS18B20

'+++' then [Enter] for RF config mode
waiting 5s...
temp:224,humidity:406,batt:26
---------------------------------------------

I need to change the frequency (to 868) and the network number to make it work with my system. Am I missing something or do I have a faulty board? I have double checked the soldering of the RF board and there are no shorts or open circuit connections and tried two different oem serial boards.

What programmer / terminal SW are you using? The serial needs a new line character after +++.

I am using the Open Energy Monitor USB to serial programmer and
Putty and I hit return after typing +++. I have also tried
minicom instead of Putty with the same result.

Geoff

Do you own any other emonTH emonTx units? Are you able to access the config on these units?

I’m not able to replicate the issue. Is anyone else having this issue?

Maybe this thread could help, have you checked the Tx, Rx pins are in good shape and making contact ?

I have an emonTx and another emonTH bought in March 2016 so I guess they do not support config via the serial and they are pretty inaccessible anyway (one under the floor and one wired up in the top of a cupboard in the bathroom. I also have an emonTx bought in 2013 and the serial programmer was used to upload the firmware then.

I have checked the connection between the serial programmer and the emonTH board with a meter and all the pins are connected. If I do a loopback with a paper clip I get an echo as expected.

The instructions I have read in the blogs are not very clear: do you wait until after the delay or do you have to type +++ before the delay has ended? Either way it does not work with mine and anyway something has changed because mine has a 5 second delay, not 10 seconds and it starts printing data 5 seconds after the prompt.

That’s correct the interval is 5secs on an emonTH

https://github.com/openenergymonitor/emonth2/blob/master/firmware/src/src.ino#L311

The setup pauses for 5secs to give you a chance to enter the “+++” and if it doesn’t detect that has happened it continues with the setup when the 5secs has elapsed, you do not need to wait before entering the “+++”, in fact I would try and do it immediately after the “waiting 5s…” print because any delay in printing that line will eat into your 5secs, Maybe that’s how the emonTx came to have 10s? There is also a lot more going on in the emonTx code between telling the user the 10s has started and the 10sec timer actually starting so that will give the user more time too.

https://github.com/openenergymonitor/emontx3/blob/master/firmware/src/src.ino#L213

Having said all that, I have just tried it on one of my recently purchased emonTH v2’s and I couldn’t get in the first couple of times, until I noticed the line endings weren’t set, after setting that I got in first time.

I was using the Arduino IDE

If you are using something else, try sending all 7 characters “+++\r\n” to include the line endings.

however I do agree it should be consistent (5 or 10 secs)

I have just tried sending +++ Ctrl-M Ctrl-J and +++ Ctrl-J Ctrl-M and neither work. I had echo on and could see they had both been sent. I also tried with automatic NL after CR and auto CR after LF and again both were echoed with no result.

It also seems to make no difference even if you manage to type everything within one second of the prompt or wait for two seconds, but I do think that 5 seconds is a bit quick if you are not sure what you are doing.

But have you tried sending the text string “+++\r\n”?

    if ( Serial.readString() == "+++\r\n"){

The FW is looking to match those 7 characters, so regardless of what OS you are on, console you are using or any settings, newlines returns etc that might get tagged on the end. That should work, it wants to see those 7 characters in that sequence without any spaces. If that doesn’t work it would suggest the RX line to the MCU on the emonTH is no good, that’s a HW fault. You can try and confirm this by attempting to re-install the FW, it won’t even attempt it if it doesn’t get the response it expects to the codes sent to initiate the upload.

But have you tried sending the text string “+++\r\n”?

That doesn’t make any sense. “\” is the escape for special character so “\r” means <return> and “\n” means <newline>. I tried it anyway but it does not work.

I am thinking the most likely cause is a hardware one but that is a pain as I have soldered on my 868MHz Rf module.

Are you able to load the Arduino IDE in the device you’re running PuTTY on, edit and upload the sketch and change the frequency that way? If you can do as @pb66 suggests in post 8, then change the frequency at the same time.

I am going to have to reinstall the Arduino software on my computer as I lost it when I had to reinstall all my software after a crash. I was trying to avoid that if I could. Thanks for all the help so far.

I am able to trigger config mode on my emonTH via the Arduino IDE no problem, but I have just tried Putty and cannot in any way trigger config mode, I have tried all the tricks and setting I can find with no joy.

I think you are going to have to try another console eg Arduino, alternatively if you have an emonPi/emonSD that has both the emonUpload and PlatfomIO cli you can use with the emonTH connected to the Pi with the USB programmer. there is also avrdude that can test the serial connection and rule out a HW fault.

1 Like

I have (sort of) solved the problem by using the terminal in the Arduino IDE which does work and I was able to program my emonTH, but it leaves the question why does other terminal software not work? Since it is supposed to have a standard serial port what information is missing about the configuration or what does the Arduino IDE do to make it work?

Thanks for the help with this but it should come with a health warning as i have been tearing my hair out for the last couple of days.

Geoff