OpenEnergyMonitor Community

Missing temperature feeds on emonTX and emonCMS setup

Tags: #<Tag:0x00007f1d45b26b28> #<Tag:0x00007f1d45b26a60>

I’ve recently installed an emonPi for monitoring household and PV energy + an emonTX to monitor an air source heat pump. I’m still getting to grips with how it all works, so apologies if I’ve made a daft mistake.
Today I added a breakout terminal board to the emonTX, connected via the RJ45 socket. On the breakout board I wired in 6 new DS18B20 sensors.
Everything was off while i did this. Once I powered it back on and checked the feeds in the emonCMS I found only 3 temp sensor inputs showing.
The emonTX is powered by AC adapter, not 5v USB. I’ve also got a meter pulse feed directly from the pulse output on the meter wired to the IRQ1 screw terminals on the emonTX board.

  1. What have i done wrong, where are the other temp 3 inputs?
  2. On the input list in emonCMS there are E1, E2, E3. E1, and E2 are increasing in value, by about 1 unit every second. What is it measuring?
  3. What is the MSG input?

Many thanks

Nothing. When the emonTx is powered from the a.c. adapter, then so that a substantial divot is not taken out of the a.c. waveform that you’re measuring the voltage with, current is strictly limited. That’s why only 3 temperature sensors are available by default. With more, and when the supply voltage is low, there’s a real possibility that the emonTx will fail due to under-voltage. The answer is a 5 V USB power supply, and change the sketch and emonhub.conf to accept all 6 sensors. If you’d like detailed instructions or a custom sketch, ask.

The “E” values are the accumulated energy in Wh, since the last restart.

‘MSG’ is the count of transmitted messages, since the last restart. It’s there so that you can see if messages fail to get through.

Thanks Robert.
I’ve got a spare 5V power supply, and guess the jumper that needs removing is easy to identify.
Can you explain a bit more or point me in the direction of a guide for howto change the sketch and emonhub.config file? Thanks!

Unfortunately, there isn’t a guide.

What you need to do is spot all the places where there are three temperature sensors, and change it to six. Unfortunately Trystan wrote the sketch originally and didn’t make it easy to change. I think the easiest will be to send you a custom sketch and let you test it, as I haven’t got 6 sensors. I’ll try to do that during today.

Thanks, that wouldbe great.
I assume I will also need a uart to usb adapter to edit/upload a new sketch?

I’m afraid so.

And you’ll need to install the Arduino IDE to compile it. (Platformio screwed up my system - I cannot advise it, nor support you if you use it.) All the instructions are in ‘Learn’.
Learn→Electricity Monitoring→Using the Arduino IDE
Learn→Electricity Monitoring→Programmers→FTDI Programmer→FTDI Programmer

It’s compiled, runs for me with 2 sensors, see how it goes and report back if there’s a problem. (12.9 KB)

Brilliant, thanks Robert. It’ll take me a while to get the bits and software. Hopefully I’llbe able to try your sketch next weekend.
Once again, thanks for your assistance.

I’ve ordered a USB to UART. Hopefully i can try out your config this weekend. Will installing this have any effect on auto-updating the emonTX?
It’s not quite clear to me if the files you’ve prepared are a modified firmware or a change to settings.

The emonTx does not “auto” update. That sketch is unique to you and any update must be done manually - by you - doing exactly as you will do to update the original sketch when your programmer arrives.

That sketch is a modified / extended version of the one I published here:

which should become the standard version (when Glyn or Trystan can do it).

I’ve managed to get the sketch you provided onto the emonTX. Unfortunately I haven’t been able to see if it works as the EmonPI is now stuck trying to boot. The display just says ‘Booting… Please wait’. It’s been like this for 30 min. I can’t access the emonCMS either.
This is what I did,
Loaded your modified sketch onto the emonTX. It took me a while to figure out how to do it as I’ve never used the Arduino IDE before. But it uploaded it and all seemed fine.
I powered up the emonTX from the AC adapter with only CTs connected to see if it would link to the emonPI.
No input from the any feeds from the emonTX.
Tried deleting the input. Realised this was a stupid idea, but too late.
Turned off the emonTX and re-connected all other inputs (pulse, 6 temp sensors), removed the jumper jp2, and powered up using DC 5V with the AC adapter plugged in for voltage sensing. The red LED came on and flashes every 10s.
Went back to the emonPI to try to figure out how to get the emonTX input back.
Tried the re-boot button in the admin menu.
Waited 10 min but EmonPI didn’t come back on, so turned off at the plug and re-started it. Now it gets stuck at “Booting…”
I can ping its IP address but I get a message that the destination host in unreachable.

Any suggestions of what to do next? Remove the SD card and reload everything fresh?

That’s OK. You can delete inputs with impunity. The input(s) magically reappear as soon as the data comes in. In fact, that’s the only way that the inputs can be created on the Inputs page of emonCMS. It only becomes a problem when you’ve added Feeds that use those inputs - then you need to reconnect them.

Unfortunately not. I’m by no means an emonCMS expert, but as you’ve nothing to lose, then reflashing the SD card is probably the easiest and quickest.

OK thanks. I’ll do that another day when I havetime.

Hi Robert,
I’ve got the emonPI back up and running. However, there is no signal coming from the emonTX. The red LED is flashing about every 10 s, but nothing showing on the inputs in the emonCMS.

How can i check that the modfied sketch you sent me has been uploaded correctly, or is running as intended?
Any other suggestions?

Did you edit emonhub.conf with the changes that are spelled out at the top of the sketch, part of the changes I did for you? Access it via your web browser and emonCMS.

It seems I forgot to mention that is needed to be done as well. Sorry.


  nodename = emontx3cm15
    names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, T4, T5, T6, pulse
    datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,h,h,h,L
    scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,1
    units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,C,C,C,p
    whitening = 1

Ooops, nope.That sounds like the solution to the problem. Thanks.
I’ll let you know how i get on.

If you look at emonhub log (almost the same place), you’ll probably see it rejecting the data because it doesn’t match what it expects.

Yes, there are some “not valid” comments in the log at regular intervals. Something like
“RX data values. length not valid”

So do i just need to click on edit config and copy the code in?

Yep, that’s done it.
I can see the input from the emonTX and the extra temperature sensors are showing too. Fantastic!
MAny thanks for the step by step assistance with this Robert.
I’ve got a lot to learn with this…