EmonTx V3.2 upgraded firmware now voltage reads wrong

It was a timing problem. It most times worked for me, occasionally it wouldn’t, which pointed me in the right direction. Let’s try again.

emonLibCM.cpp.zip (14.5 KB)

OK Sorted. Now I have installed the wifi card.
It does not want to connect to my pi.
I have it connected to my wifi but it won’t connect to Pi
Instructions in the guide section of website don’t help an idiot like me

If you’re not going to be specific, like which page, and how far did you get before you got lost, or what don’t you understand, there’s little I can do to help you.

I understand it’s a steep learning curve, but losing it helps nobody. I’m prepared to stick with you and help, you need to do the same.

Apologies. Not loosing it at all Robert just self deprecating. An attempt at humour maybe. I appreciate yr help and patience.
I enclose a pic of the setup that I am struggling with and which shows no connection. Or do I use MQTT? I can’t work it out from the instructions on the openenergymonitor site.
rgds
Mark Webb

You’re seeing that how? Did you look at your router and get the IP addresses of the ESP8266 and the emonPi from that?

Is 192.168.0.66 the IP address of your emonPi? And does your router show that as a “Fixed” address (or equivalent words - mine says “Always use this IP address: Yes/No”)? If not, you should make it so. (Because if the router restarts for whatever reason, it must give the emonPi the same address, or your data won’t find it until you go back to the ESP8266 and change it to suit.)

Is this a standard emonPi set-up, and you haven’t changed anything?
Did you get the APIKey from your emonPi and put it in the “Write apikey” box?
Did you leave “SSL SHA-1 Fingerprint” empty?

I don’t know anything about MQTT, so I can’t help you there.

I am seeing that info by going to the esp8266 up address with a browser.
192.168.0.166 is the address of the rasp pi which is locally hosting emoncms for me. It is a fixed address.
I do not have an APIkey I thought that was only required for emoncms.org hosting?
SSL fingerprint was left blank.
Nothing to do with mqttt then

Yes you do and no it isn’t only for emoncms.org! That’s the bit that’s missing, then. emoncms.org and your local emonCMS are almost identical. Go to the Input page of your emonCMS on your Pi, click Input API Help and it’s there, a few lines down. Copy and paste that into the ESP8266 and it should happen. At the bottom, you’ll see a count of successful messages.

putting in the APIkey from my emoncms account seems to have made it work!
I now need to turn off the radio. I think I can see where to do that in the sketch.

Your emonCMS is single user by default, but you could make it multi-user, and if you had a static IP address yourself, it could be accessed from anywhere with the right settings in your router. Then the APIKey would be essential. It’s equivalent to a password.

Remember to save the settings when you’ve turned the radio off. They are not saved automatically.