EmonTXshield software version

Hi all :
I am new to EmonTX and I am an average user of Arduinos. I have ordered an EmonTx shield in order to setup my installation and an SD card to display data on a Raspberry and a radio module RFM69Pi 433Mhz.
My setup will use 2 CTs, will provide power diversion to a water heater and should display on emoncms. Single phase EU version.Basic Arduino UNO.

I have a few issues :

  • Which software version is the right one to use ? I have been reading lots of docs and visiting many github pages but at the end I am just totally confused.

  • I have opened in Arduino what I believe is the version 3.4 of Emontx. Then tried to fight with libraries and some issues. It compiles almost fine, the only thing it does not like is the line
    if (UNO) wdt_reset(); in the file emontx_lib.

it replies :
In function ‘void emontx_sleep(int)’:
emontx_lib:12:11: error: ‘UNO’ was not declared in this scope
I could not figure what is wrong with that. something missing or a library in the wrong place ?
If I delete the line, everything is fine though.

  • Then, for the power diverter. I understand the principle but the trouble is first to find where to connect the static relay to the shield. not clearly mentioned, although I could find this one later by going back to schematics.

Sorry for posting many issues at once. Hope for some of you this is more clear. Thanks for reply.

Welcome, Franc, to the OEM forum.

I think you need to look at the ‘Learn’ section and PV Diversion: Learn→PV Diversion→Introduction, rather than trying to add the diversion code to a standard emonTx sketch.

On Robin Emley’s website (mk2pvrouter.co.uk), there are several sketches that will provide you with a good starting point, but you will need to adjust I/O pin numbers to suit the Arduino and the emonTx Shield.

Alternatively, MartinR’s PLL diverter should also be relatively easy to convert to work with your Shield, again it should only need changes to the I/O pin numbers and possibly the interrupt for the radio.

You won’t connect the power switch output to the Shield, you must connect it to a spare digital I/O pin on the Arduino itself. (The Shield provides the hardware interface for the analogue inputs and the interface to the radio only.)

“UNO” I believe comes from the Arduino IDE itself. Did you have that specified in the Boards Manager?
But you should not be using emontx_lib at all with the diverter software.

Thanks for the answer. I think I have to be more modest and do all this progressively. I will use PV diversion at a later stage.