I think this should be sending data. It also send all the “Hello…” stuff (version, calibration settings etc associated with the Serial.print(...)
statements in setup( )
, but you ignore those.
I’m not very familiar with the ESP8266, and I haven’t found time to get mine working again yet, so there’s not a lot I can do with that end. However, that might be OK. I can’t remember the baud rate the ESP8266 expects, I’ve a feeling it’s not 9600, so this should be changed in the sketch (line 126) to suit the ESP. This wrong will happily stop all sensible output.
What I’ve done is forced debug = 0
immediately below line 198 to get rid of some of the unwanted human user config messages and output
if (Serial) debug = 1; else debug=0; //if serial UART to USB is connected show debug O/P. If not then disable serial
debug=0;
but your main problem was it was going to sleep before it had chance to send all the wanted serial data. I cured this by putting a big delay - probably too big - just after that at what is now line 378
if (CT4) { Serial.print(F(",power4:")); Serial.print(emontx.power4); }
Serial.print(F(",Vrms:")); Serial.print(emontx.Vrms*0.01);
Serial.println("");
delay(100);
You also need to increment the message count:
Serial.print(F("MSG:")); Serial.print(emontx.Msg++);
[The significance of putting these bits right over to the left is so that they stand out!]
You’ll will need to shorten the main delay to keep the reports coming at just under 10 s intervals - it’s a little over at present. But if data gets cut off, lengthen the 100 ms delay and shorten the main one even more.
[I had my Covid booster today, and I feel bloody awful. So if I don’t respond tomorrow, you know why.]