Community
OpenEnergyMonitor

Community

Latest data showing blanks/blocks


(Orrberg Matti) #1

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!


EmonTX Three-phase with EmonESP
(Robert Wall) #2

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.)


(Orrberg Matti) #3

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!


(Robert Wall) #4

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.


(Orrberg Matti) #5

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: https://github.com/openenergymonitor/EmonESP/blob/master/readme.md#b-upload-data-folder-to-the-file-system-html-css-etc-spiffs


(Robert Wall) #6

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


(Elias) #7

Hi @matti, Robert is right, it should be this line: https://github.com/openenergymonitor/EmonESP/blob/b4cdde3fa247aecc24f1995f07a922b072cbf809/src/src.ino#L41

Because the data is received via TX/RX line named “Serial”: https://github.com/openenergymonitor/EmonESP/blob/b4cdde3fa247aecc24f1995f07a922b072cbf809/src/input.cpp#L43

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?


(Robert Wall) #8

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.


(Orrberg Matti) #9

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.


(Orrberg Matti) #10

Found out the problem: old firmware or somehow wrong firmware was fetched with
$ git clone https://github.com/openenergymonitor/EmonESP
when I followed the guide from https://github.com/openenergymonitor/EmonESP/blob/master/readme.md#b-upload-data-folder-to-the-file-system-html-css-etc-spiffs

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!


(Robert Wall) #11

Excellent!

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


Huzzah dead after flashing new firmware
(Orrberg Matti) #12

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: https://guide.openenergymonitor.org/setup/esp8266-adapter-emontx/


(Robert Wall) #13

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?


(Orrberg Matti) #14

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.


(Robert Wall) #15

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”.)