OpenEnergyMonitor Community

Setting up EmonTx to EmonPi using Wifi

Hi Guys, I have searched the forums for this but I can’t seem to find what I’m looking for, forgive me if this has already been discussed.

I have a EmonPi and EmonTx, both working fine, the Tx reports info from my solar setup and all works/reports perfectly. I had one problem though, the distance using the built in radio was -89db and quite often lost connection. I have therefore decided to install the Wifi module that I purchased with the devices some time ago. Removing the jumper/installing the module and adding an usb powersupply all worked fine. I connected to the Tx via wifi, connected it to the home Wifi, a great signal -53db and logged back into it. So now what do I do ? I have noticed that in the feeds on the EmonPi its still sending to it with I presume the built in radio. So my question is I have to disable the built in raidio and put some settings into the webinterface ?

Any help much appreciated.

Welcome back, Karl.

You don’t need to turn off the radio in the emonTx, just ignore the data it’s sending.

You should have, on your inputs page in emonCMS, two sets of inputs, one via the radio and one via WiFi. If you don’t have the second set, did you put your Wi-Fi credentials into the ESP8266? Details are here: GitHub - openenergymonitor/EmonESP: ESP8266 WIFI serial to emoncms link

GIven that you have two sets of inputs, you need to (manually) copy the input processing you have on the radio inputs to the WiFi inputs, using the same feeds, and then delete the “log to feed” in the radio input processing so that you don’t get both sets of data arriving in the same feed. (Even that shouldn’t matter, because the last to arrive in its time slot will be kept, but it will surely be confusing long-term.)

Hi Robert, yes I haven’t posted for a long while, like everything when its working its working.

No I never set up anything else, the inputs only have the EmonPi and EmonTx.

Reading that info do I need to setup EmonCms and MQTT ? I have put the info in the EmonCms but it won’t save without a writeapi key ? which it doesn’t say about where to find.

Your Write (more strictly Read & Write) APIkey is under Input API Help on the Inputs page of emonCMS.

EmonCMS should be setup ready to accept the data once you give it the assurance that the data’s legitimate, which you do by sending the APIkey with it.

Perfect Robert, added immediately to the inputs list. The only difference is the numbers on the temp sensor and vrms seem to be missing a decimal place, so 29.6 degrees is now 296, vrms is now 25245 instead of 252.4, must be a way of changing that. Power seems fine.

Using a times by 0.1 before the log to feed seems to work fine, not sure if that is the right way of doing it.

That’s the easiest way. I’m not sure how that’s happened, because the serial output that goes to the ESP8266 from the emonTx itself should have the decimal point in the right place. In the sketch would be the “right” place, but probably not worth the trouble of changing unless you’re reloading the sketch with the radio disabled. As the data’s going nowhere else, it doesn’t really matter where you do the division - inside the sketch or inside emonCMS.

I’ll keep an eye over the feeds over the next few weeks and see how it goes, thanks for all your help Robert, much appreciated.

1 Like


But would be possible connect more emontx (2,3,4,eccc) with wifi?

Yes, provided that you give each an unique Emoncms Node Name on its Emoncms page.