EmonTH 2 not connecting

Hi,
I have just received a brand new emonth 2 sensor . This is my third one . Previous ones are working normally.
This one does not result in emonhub and no input is created.

Here all actions listed :

  • batteries are ok,
  • id is 25 (OFF-ON) as requested (others emonth sensors are 23 and 24)
  • when battery is inserted green led is on for few seconds and then off
  • emonhub,conf looks ok as node configuration for id 25 is same as for 23 and 24
  • emonhub has been restarted
  • emonbase has been restarted
  • sensor has been placed near emonbase

Does anyone have any pointers on how to troubleshoot this issue ? Thanks a lot
giuseppe

Hi @gmaui

are you sure that the new one has ID 25? The DIPswitch has no effect at the moment, I did a pull request a week ago: Fix DIP switch had no effect by elias-rexometer · Pull Request #2 · openenergymonitor/emonth2 · GitHub

To test if that is the reason please remove the batteries of your older emonTH with NodeID 23 and see if you still get values …

What is your change? It does require a restart (i.e. remove and replace the batteries) after changing the DIP switch, but if I am reading of the sketch (V2.7 - dated 04/01/17) correctly, the switches will change the NodeID.

Hi Robert,

at the moment the RF-Initialize is before the DIP-switch is being read: https://github.com/openenergymonitor/emonth2/blob/master/firmware/src/src.ino#L202

I changed that so that the DIP-switch position is being read before the rf12_initialize

The error is in the emonTH2 firmware

That does rather explain it. How did that get through testing - or shouldn’t I ask?

Hi Simsala

You are right. After removing batteries on id 23 I continue to receive data .
Instead if I remove batt on id 24 data stops.

Do you have any idea when your fix will be released?
THX

Do you have a USB-to-serial programmer? With that, you can simply set your own NodeID (enter the config menu with +++ or you can upload the fixed version: emonth2/src.ino at 40dc513436a3885b876366952029d367c6c5f2be · elias-rexometer/emonth2 · GitHub

If you have a programmer, you can edit the sketch and have it working immediately.

Move the line that initialises the radio:

rf12_initialize(nodeID, RF_freq, networkGroup); // Initialize RFM

down a few lines so that it is below the DIP switches. ( if ((DIP1 == ... etc )

Yes, I have one. Great to know that nodeid can be changed on sw.Thanks a lot Simsala.
Could you tell me how to connect the usb-serial programmer to the 6 pins on the emonth board ?
Thanks again

HI Robert
I definitively will do that if changing the nodeID on the config menu fails.
Thanks a lot

I am wondering how my two emonth sensors worked so far.
The currently installed firmware should uses 23 as initialized value for nodeID. but I have 23 and 24 working.

It will fail, because you will still have two items transmitting using the same Node ID, and that’s not allowed (each will add to the same data stream, making your data wrong). The config file tells emonHub how to interpret the data it gets, by looking at the NodeID that comes with the data, and comparing that with the list of configurations in the config file. It doesn’t allocate the Node ID to the data.

not the emonhub config file but the config setting on eeprom of the emonth which are read in the firmware

Yes, that should work.

You plug it in! The GND pin is labelled on both.

Everything is fine now.

Summary :

  • first emonth I bought had nodeID 23 (as requested)
  • second emonth I bought has nodeID 24 (as requested)
  • third emonth did not get switch setting (it was correct set to 25) due to error in the firmware; it reported 23
  • I flashed latest firmware (with Simsala fix) and it got nodeID 25 as per switch setting
  • BTW, I had to modified my usb-serial programmer (not bought at OEM) to be used with emonth both for flashing and for serial monitoring

Simsala, Robert thanks for your time and support.
Best regards

2 Likes

Hi,
I have a similar situation with a brand new emonth 2 sensor - my firs one. I am not receiving anything from the sensor in emonhub.
The emonth has been ordered with nodeid 23.
The batteries are ok - I measured the voltage for both and it’s around 3V.
When I insert the batteries, there is no green led turning on - I tried inserting the batteries without any lights on.
Emonhub config looks ok - it has an entry for nodeid 23.
Emonpi has been updated and restarted.
The sensor is placed at 2 meters from the emonpi.

Does anyone have some ideas on how to troubleshoot the issue?

Thank you,
Liviu

The LED is turned on by the very first action in the sketch.
Do you have a programmer? If yes, you could connect that and check if there is any output. If there is, then say what you see. You should see (at 115200 Baud) something like

OpenEnergyMonitor.org
emonTH FW: V3.2

and then some more about the radio and the sensor(s) fitted/connected.

But I suspect your emonTH is faulty.

If you see nothing, or you do not have a programmer, email the shop and include a link to this thread.

I have a programmer, but it’s not the one you from the shop so I cannot connect it directly to the board.
Can you tell me what pins should I connect and their positions on the board - I imagine at a minimum Tx/Rx and GND.
I tried to find them on the board schematics, but couldn’t find the labes.
Thank you,
Liviu

image

You must connect your RXD to RXI, your TXD to TXO, your RTS to DTR, and of course GND to GND.
GND is the end nearest the USB connector.

(The crossover Rx-Tx & Tx-Rx happens on the emonTH PCB, and DTR is the reset line that puts the processor into programming mode.)

1 Like