Latest data showing blanks/blocks

Total newbie here, please be patient and ask for more/different information if needed.

Installed EmonTX 3.4 with emontx 3phase -firmware via PlatformIO. Edited src.ino to use EMONESP, not RF. Serial monitor without EmonESP shows readings from ct1, ct2… etc. Readings seem to be valid. See attached picture.

Using Huzzah EmonESP module from openenergymonitor. Straight out the box. No firmware updates since March '18, suppose it should be newest firmware?

EmonESP shows latest data only blanks/blocks. See attachment.

EmonCMS doesn’t either receive any data.

Any ideas? I suggest there’s something off with EmonESP, but can’t figure it out after trying and searching for days. Please help!

In “4. Latest Data”, are those square boxes that indicate invalid characters?

Have you set the serial data baud rate of your emonESP to match the sketch?
You cannot set the baud rate in the sketch higher than it is, because the processor is very busy, you must set the baud rate of the ESP module to 9600.

(I see there’s no documentation for how to do that - @Simsala should be able to help here, as the sketch was written for him and he uses the ESP module, and needed to make that change.)

Are you asking me if those “4. Latest Data” square boxes indicate invalid characters or if I mean those square boxes? I do mean those square boxes…

I have not set the baud rate of my emonESP. I will look in to this, but any guidance is welcome. I had one Huzzah module, that I tried to update with newest EmonESP but somehow update made it unusable. The Wifi connection was no longer establishing.

Can I somehow import the firmware from the Huzzah module to PlatformIO and then edit the baud rate? I figured this would be much more safer way to do this…

Thank you so far!

I do not have an ESP module (nor can I use platformio - when I tried and installed it, it destroyed my system), so I have no knowledge of either. I was asking if the square boxes indicated invalid characters - this is one of the ways of showing that. A mis-match in baud rates is the most likely explanation for that.

The emonESP data is at Github. There is a baud rate setting in the file src.ino, but I can’t confirm that is the correct thing to change. It is at line 41.

Tried to update EmonESP firmware with the 9600 baud rate changed on the lines you pointed out from src.ino:
Serial.begin(9600);
#ifdef DEBUG_SERIAL1
Serial1.begin(9600)

No success, now the Latest data shows Undefined.

Also several more problems have appeared with Huzzah/EmonESP module:

  • Failed to save Wifi config -error popup.
  • And after this unable to access the device/AP. Some times shows “loading” front page. The device seems to go in reboot loop.
  • After 10 seconds of pressing GPIO pins (resetting Wifi config) the device loads the main page once again… and the problem persists.

I have tried to erase the flash. I have followed this guide when updating and erasing firmware: EmonESP/readme.md at master · openenergymonitor/EmonESP · GitHub

We must wait for @Simsala. I know he has done this, so I expect he will be be able to help.

Hi @matti, Robert is right, it should be this line: EmonESP/src.ino at b4cdde3fa247aecc24f1995f07a922b072cbf809 · openenergymonitor/EmonESP · GitHub

Because the data is received via TX/RX line named “Serial”: EmonESP/input.cpp at b4cdde3fa247aecc24f1995f07a922b072cbf809 · openenergymonitor/EmonESP · GitHub

Unfortunately I’m on the road and don’t have an ESP for testing at the moment. I believe that I adjusted the baud rate in two places, but when I look at the code it doesn’t seem to be necessary (anymore?).

How did you compile the new firmware? With platformio or Arduino?
I can’t really imagine that the errors are caused by changing the serial baud rate. Does the emonESP work correctly if you flash the current firmware without any changes?

1 Like

For information, I can find only two “Serial.begin(…)” in the entire EmonESP directory hierarchy:

…EmonESP/esp-test/CheckFlashConfig/src/src.ino:10: Serial.begin(115200);
…EmonESP/src/src.ino:41: Serial.begin(115200);

So it looks as if there IS only the one place to change.

I compiled with Platformio.

I have uploaded the newest ESP firmware without any changes. Also then there is similar problems with setting up Wifi, bootloop etc… So original firmware in the Huzzah module seems to work best, but no data.

Would be nice to be able to read the original firmware, change the baud rate and the upload… but it seems this is not possible.

Found out the problem: old firmware or somehow wrong firmware was fetched with
$ git clone GitHub - openenergymonitor/EmonESP: ESP8266 WIFI serial to emoncms link
when I followed the guide from EmonESP/readme.md at master · openenergymonitor/EmonESP · GitHub

I downloaded the ESP 2.3.0 source from Github, put it on my home folder, edited src\src.ino file as stated on earlier messages (Serialbegin 115200 → 9600). And then uploaded it as in the instructions in the guide.

Now I receive data from EmonTX to EmonESP login page “Latest Data”.

Thanks Robert and Simsala for your kind help!

2 Likes

Excellent!

I’ll put a note in the 3-phase sketch documentation to say that the baud rate in the ESP8266 must be changed.

Actually there is stated in the src.ino on EmonTX 3 phase that EmonESP must be edited to suit 9600 baud rate . Maybe small guide for this would be appropriate, maybe added in this guide: Using the emonTx v3 with the ESP8266 Huzzah WIFI module - Guide | OpenEnergyMonitor

I know - I wrote it. :grin:
But I think any note belongs in the 3-phase PLL sketch documentation, not in the general emonESP document, because the need to run at 9600 baud is limited to the sketch. All the other sketches, including emonLibCM, are capable of running at the higher speed.

Have you seen the note in the replacement documentation - and is it enough?

Sorry I’m not following: replacement documentation?

I did see this in src.ino. There is no mention of this in emontx-3-phase-userguide.pdf.

This:

On Page 3, under RFM69CW, there are now two notes, the second is:

2. The baud rate for serial communications must not be set to a value greater than 9600.
 (For the ESP8266 module, change Line 41 or thereabouts in the ESP8266 file “src.ino”.)