emonTX to emonbase via wifi

Hi.

I need to link several emonTX to an emonbase for local monitoring. They are in different buildings so well out of range of RF communication. Can I make this work with the Huzzah WIFI modules instead? If so then can you tell me how? They can all go on the same VLAN if necessary.

Thanks

Welcome, Andy, to the OEM forum.

You can add the ESP8266 module, but due to the increased power consumption, youā€™ll also need the 5 V USB power supply.

Note that the input via Ethernet/WiFi bypasses emonHub, and goes straight into emonCMS.

Thanks for the quick reply.
So Iā€™m still not sure how can I log data on my emonbase. Iā€™ve added an ESP8266 and the extra power supply to an emonTX but Iā€™m not sure what the correct setup is.

Have you set the output format of the emonTx appropriately?
Which sketch are you using?

Maybe this will be of some help:

1 Like

All sorted now thanks. I had a typo in the apikey.

1 Like

Good useful information. Thanks.

1 Like

Hello - jumping in here with a not-dissimilar question. Running an EmonTx as a PV diverter using one of the earlier sketches for that purpose (and dā€¦n good it is, too!). Connecting to an EmonLCD to see what is going on. So far so good. All the kit is in the cellar

Now I also have an airsource heat pump, 25m away in the garage, and Iā€™m setting up to monitor this (and the forthcoming batteries) with an EmonCMS setup. So Iā€™ve got another EmonTx for the garage and because I need inputs from wide-ranging places Iā€™ve got a Huzzah Wifi running on that second EmonTx.

Now I want my PV diverting EmonTx to be WiFi enabled as well, so I built another Huzzah module and plugged it in. Obviously it doesnā€™t work!

Based on @Robert.Wall comment, I know the data from the EmonTx needs to be in a specific format for the Huzzah wifi, and that current builds of the firmware for the EmonTx are correct in that regard. However, what do I need to do to one of the PV Diverter sketches to make my PV diverting EmonTx communicate with its wifi module?

Or do I just give up, leave the diverter as it is, and get another EmonTx to get me the data I need from the cellar?

THanks
Damien

Thatā€™s the simple, safe and expensive way, but a possibility.

Slightly more complicated, but nevertheless it should be possible.
First, to keep the emonGLCD going, you must keep the RFM12ā€¦ bits of the diverter sketch.
What you need to add is Serial.print... statements with the data you need in around the same place as the ā€œsendā€ statement for the RFM12B in loop( ). Youā€™ll need to crib the format from one of the other emonTx sketches that does work with the ESP8266.

But, do you need to do that? if you have an emonBase/emonPi, is it within range of the cellar? If so, you can use the 433/868 MHz ISM band radio thatā€™s already sending the data to the emonGLCD.

I canā€™t help a lot this week - my laptop died and Iā€™m struggling with an old one out of mothballs, with no access to all my data. Iā€™m hoping to be up and running a week today.

If you need any more help, say which or attach the sketch youā€™re using in the diverter emonTx.

Thank you Robert.

  • I donā€™t know which sketch I am using! I did it several years ago, and donā€™t have IDE folder on my laptop anymore. And as far as I can tell, I canā€™t ā€˜readā€™ the EmonTx and de-compile the sketch that is running on it?
  • I guess I should re-upload a modified sketch, as you say ā€“ Iā€™m anxious about breaking what is currently working very well!
  • The reason I want to go down this route is that the RFM12B signal struggles to get out of the cellar, and just makes it to the EmonGLCD. In the rest of the house, and where I want to install the EmonBase, thereā€™s no chance of picking up the RFM12B :frowning:

But thanks for what you have said ā€“ I think I need reload my newer EmonTx (currently sitting at the ASHP end of the house) with a modified PV sketch to see if I can get it to work as you describe. If it doesnā€™t, I can always plug the current diverter EmonTx back inā€¦ā€¦ Not that thereā€™s much to divert at the moment!

Thanks

So helpfulā€¦ :blush:

Damien

That is unfortunately the case.
Presumably, you donā€™t have a suspect file with the extension ā€œ.inoā€? Itā€™s only that which we need.

You are likely to have either one of Robin Emleyā€™s or Martin Robertsā€™s sketches, from here: Choosing an Energy Diverter ā€” OpenEnergyMonitor 0.0.1 documentation

Robin now has his own website at www.mk2pvrouter.co.uk, and there youā€™ll find later and refined versions of the sketches listed in Learn, but beware, they use the I/O of his dedicated hardware, so youā€™ll need to change pin numbers for a standard emonTx.

Neither he nor MartinR use the Serial output format dedicated to the ESP8266, so neither has an advantage there. Robin produces a steady stream of kits, so he must be doing something right.

The other thought that occurs to me is you canā€™t have the sketch for the emonGLCD either? Which means that if you canā€™t remember the RF packet that your emonTx is transmitting, and youā€™ve no means to ā€œsniffā€ it and reverse engineer it, to make the emonTx send the same packet, or you will need to get a sketch for the emonGLCD too, simply so that the two can continue to work together.

Except that with an an RFM12 hat on my Pi, I think Iā€™ve been able to work out what each ID is. But you are right. All in all a challenge. Oh that I hadnā€™t wiped my Mac clean to give to my other half a few weeks ago!

Thank you for the warning on the pins, though. That would have kept me puzzled. I may go back to the original sketches pre his own hardwareā€¦ I seem to recall thatā€™s around the time I put my system togetherā€¦