OpenEnergyMonitor Community

Emontx connecting to RPi 3

I’ve received my box of bits from open energy and am now trying to connect things up. I have a RPi 3 which has been sitting in a box for months now powered up and on my network. I have a emon tx with AC - AC psu and 3 x clamps. Basic question but how does the RPi 3 and emon tx link together are they hard wired or radio.

This follows on from Remote PV monitoring

Have you put the RFM69Pi onto your Pi 3, and is it running on the SD card (or the download) with emonCMS?

If yes to those, then the emonTx should be communicating by radio.

That’s where I going wrong, I didn’t realise I needed a RFM69Pi on my Pi 3, it is running on the SD card with emonCMS. I have ordered a Pi zero W but that has not arrived yet and I was itching to get started, I will have to wait. Am I right in thinking the emon tx will link to the Pi zero W without any other parts. As I have two emontx should I order another Pi zero W or get the RFM69Pi. Thanks for your reply.

I think you’ve got a bit mixed up here.

The usual/intended method of use is the emonTx transmits using its built-in radio on the 433 MHz ISM band to an emonBase/emonPi (for your purpose, these are the same, the difference is the emonPi also has 2 energy monitoring channels of its own).

But you can connect them serially with wires, provided the distance isn’t great - if you are that desperate to get going, the instructions are here: EmonTx V3.4 - OpenEnergyMonitor Wiki

You can also connect them by WiFi - but the emonTx doesn’t have Wi-Fi. Therefore, you need something to convert the serial output to Wi-Fi - that’s where the ESP8266 or the Pi Zero W comes in. Those connect serially to the emonTx (in principle exactly as the link above), then launch the data to be picked up by your router, hence it finds its way into the emonBase.

@borpin is our advocate for the Pi Zero W, so he’ll be able to tell you in detail how to connect and what you need to do to get the Pi Zero W functioning as a serial - Wi-Fi converter.

It’s very easy for me to get mixed up, every day is a school day. I’ll wait until the Pi zero w arrives although I still need to order either another Pi zero or the ESP8266, which do you recommend. Thanks

What do you want the second one (whichever) for? I’ve had a quick look at the old thread (why did you start a new one?) Is it for the second emonTx, in which case you don’t need the RFM69Pi.

You only need one way of connecting the emonTx to the Pi,
either ISM band radio via a RFM69Pi
or serial with wires
or Wi-Fi using an ESP8266
or Wi-Fi using a Pi Zero W

I have a garage at the bottom of the garden with PV and going to have EV and battery storage so wanted emontx for that. Then at the house I wanted export, total consumption and spare for ASHP, so another emontx for that. I didn’t realize I had to stick to one topic heading, I just submitted a different heading as it was a different question.

You don’t have to stick to one topic, but looking up the topic with all your details in it, rather than just scrolling up the thread, is a bit of a pain. It’s easy for you, you know. I look at every post published, so it’s hard to remember just who is using what to do what. I’ve locked the old one now so we don’t have two running for the same installation.

OK, I was thinking that you’d be using the ISM band radio in the house. My list of how to connect is not mutually exclusive, but it really should be - you can get into difficulties if you’re using (say) Wi-Fi and the same data is being received by the radio.

Just to make it simple as this is my first try I have ordered two of the RFM69Pi and have ordered another RPi 3. I can then experiment with the Pi zero w when I have more confidence.

I think I can see what you’re going to do now.

In the garage, you’ll have an emonTx talking to a RPi equipped with an RFM69Pi.
In the house, you’re going to have the same.
You’ll choose one of the Pi’s as the “master”, and the other will send its data to that one via your LAN.
You will have emonCMS on both, but you’ll only “use” the master for recording and viewing the data,

I was only trying to save you some money by suggesting the Pi Zero W. You won’t need that now, unless you’ve got something in mind for the Pi 3 that it will release.

Yes that will be my setup and now you’ve raised another point I wasn’t aware of, one has to be a master!. Thanks

Indeed. Normally, you will have only one emonCMS that you “use” and take an interest in - if I could put it that way. The garage emonCMS can, and will by default, record it’s own information, but its primary function will be to send the data to the one in the house. There, you’ll be able to gather and display the data for both house and garage.

1 Like

I am now in the process of fitting my two emon tx and two RPi 3 with RFM69Pi. I have one RPi with both emontx connected and can view the inputs on emoncms, however I want to have one emontx connected to my other RPi 3 but can’t seem to link them I’ve taken a screenshot of the emonhub I’m trying to connect to but not sure if that will help.

Both emonTx’s transmit on the same radio frequency, and both RFM69Pi’s listen on the same frequency.

What differentiates the two emonTx’s is they must have different NodeIDs. If you don’t do that, and I can’t see from that screenshot - and in any case we much prefer a copy & paste, the data will be mixed up and you won’t tell which is which.

What you need to do is configure your router to allocate a fixed IP address to each RPi, then in the emonhub.conf (not the log) for the RPi that you want to send the data to the other, put the receiving RPi’s IP address in here

    Type = EmonHubEmoncmsHTTPInterfacer
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url =
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
        senddata = 0                    # Enable sending data to
        sendstatus = 1                  # Enable sending WAN IP to MyIP >
        sendinterval= 60                # Bulk send interval to in seconds

in the place where is, along with its APIkey on the next line, and senddata = 1 of course. You’ll get the receiving RPi’s APIKey from its Inputs Help page.

Before I go any further I have been messing about with some of the input readings and charts and had no idea how advanced this equipment is, I’ve spent thousands on fluke power quality analysers to get the same type of results that your equipment does for tens of pounds. I must apologize for making what I thought were helpful comments on other threads I will keep my nose out and just concentrate on getting my own house in order. I’ll get back to the matter in hand I can see I’ve got years of knowledge to catch up on.

I don’t think that is altogether necessary. True, I’d noticed the comments and my eyebrows raised a little. But cross-fertilisation of ideas is always welcome. It’s been a while since I had any direct involvement in power quality and stuff like that and I’m quite sure the ‘bells & whistles’ have advanced even though the underlying principles have remained much the same. And I’d caution about comparing the OEM kit against professional standard test gear with traceable accuracy.

Collectively, there’s an awful lot of knowledge and experience on this forum, if someone with the specialist knowledge doesn’t chip in, we can usually point you in the right direction.

Thanks for your understanding.

Is the APIKey the read only or the read and write.

I have changed the NodeID on one of the emontx so I have one on 15 and the other on 16

1 Like

It is the Read & Write that you want - sending the write APIkey back is the way the sender convinces the receiver that the data is legitimate.