OpenEnergyMonitor Community

emonTx Arduino Shield v2.4 usable to send data to a pi or homeassisant?

Hi All

Does anyone know how I can get this emonTx v2.4 Ard Shield to get info into Homeassistant, either directly or via an emoncms pi setup?

Thanks in advance


Welcome, Darryl, to the OEM forum.

The emonTx Shield with its Arduino Uno host is generally no different to an emonTx, so everything written here in Learn, Guide and Resources that applies to the emonTx also applies to the emonTx Shield, with very few (and obvious) exceptions.

I don’t know my way around HomeAssistant, so if your question is really about that, someone else will need to help me out there.

Thanks Robert.

My question now that I know that is how do i connect the emonTx Hat + UNO to a pi running the emon software?

Pin outs etc. Would it just be a standard UART connection, and would I need to edit anything in the config of the pi version?

Thanks again


One other thing, do I or should I upgrade the firmware?

You have a choice of two: if a wired connection is possible and short, you can connect the FTDI UART Connector on the Shield to the GPIO of the Pi, details are here: EmonTx V3.4 - OpenEnergyMonitor Wiki
Bear in mind that the emonTx V3.4 and the emonTx Shield serial outputs on the FTDI UART connector are labelled wrongly. The data is output on the Rx pin (i.e. it is looking for the Rx pin at the other end) and the incoming data is expected on the Tx pin. The swap (Tx →Rx) has already been done on the p.c.b.

Alternatively, you can buy the RFM69Pi receiver module for your Pi, and use the radio link. Obviously, you also need an RFM69CW on the Shield.

Either way, the data arrives as a serial data stream, and you need to handle it inside the Pi. The easiest is to download the emonCMS image (includes the OS), and write it to an SD card.

Awesome thanks so much, Robert. You have been a lifesaver.

I am just waiting for a 16GB micro sd and then going to flash a pi and connect the UART with tx to tx and RX to RX, and see what I can get going…

Sorry to ask again, but do you think I need to upgrade the firmware on the emonTX? I don’t particularly want to if I don’t have to.

Can’t wait to get this working!!!

I don’t understand the question. The title of this thread is “emonTx Arduino Shield v2.4”, but I’m beginning to think that isn’t what you have. You need to look at the Shop pages and tell me exactly what you do have. The emonTx has the analogue conditioning circuits, a processor and a radio module. The emonTx Shield has the analogue conditioning circuits, the radio module but there is no processor, so no firmware - it uses the Arduino Uno. The Pi shield is effectively a 2-channel emonTx that plugs directly into a Raspberry Pi.

The sketch you need for your Arduino Uno can be downloaded from Github:

(If you have the normal UK single phase supply - but you haven’t put your country down in your profile so I’ve no idea where you are.)

HI Robert

I def have the emonTx Shield UNO Hat, v2.4.

Do I need the uno?

I live in South Africa, Single phase, 220v.

I was hoping to just power the hat with the UART pins, 5v, Gnd, Tx, Rx to a Pi.

Then I can link the pi to homeassistant with the instructions available.

The board is a Hat, it has no processor… so yeah i see what you mean about firmware, there isnt any for a board with no processor.

Try reading again what I wrote:

You must mean the emonTx Shield. As I understand it “hat” is a reserved name for a Raspberry Pi add-on board. Yes, you can power the Arduino at 5 V, but experiences reported here indicate that using the 8 V( ? ) input and the on-board regulator provides better analogue performance, i.e. a lower noise level and better accuracy at low currents.

Thank again Robert

Sorry, I didnt read that last part. it uses the uno. So can must I connect the shield to the uno and then the uno tp the pi?

I will power externally

As the photo shows, the Shield plugs directly into the Uno.

To send the data from the EmonTx Shield/Arduino combination to the Pi, you need, as I wrote in post no.5 above, either the wired serial connections or a radio link.

Ok just for clarity sake:

TxShield —> UNO ----> UART (Serial) —> Pi for locally hosted emoncms?

There is not radio on mine and would prefer a wired connection anyways.

Yes, that’s fine.

Strictly, you could just install emonhub and send the data to MQTT for Home Assistant to consume. However, a local emoncms and the emoncms component in HA is probably a better solution.

Getting there.

Busy reading through the setup process for HA:

I’m not sure what to configure as my inputs? emonpi or one of the emontx’s…

First setup the EmonTX so the data is going to Emoncms and being logged to a feed.

The HA component then talks to Emoncms and pulls the feed data into HA.

Thanks borpin.

Busy trying to setup the inputs and feeds.

Am I on the correct path??

Usually I am quite savvy, but this set up has me confused lol.


That doesn’t surprise me. Have you got Tx and Rx swapped - or not (according whichever naming convention you’re using :cry:).
Remember, the Shield is transmitting on the pin labelled Rx. You probably don’t need the 4th wire as you’re unlikely to be sending data from the Pi to the Shield - but it only causes trouble if the Pi sends unwanted data that gets interpreted and instructions to change the settings or calibration. You will need it if you use the Pi as a programmer.