Community
OpenEnergyMonitor

OpenEnergyMonitor Community

EmonTX firmware flash required

Hi to everyone,
Just a quickie if anyone has had the same issue. The battery went flat in my EmonTX a couple of months ago (they usually last a good 6-10 months depending on brand).
So I changed them and then logged into my EmonBase which has been working flawlessly since 2015ish, and noticed there was an update. So I downloaded the latest image burned it to a new SD card, edited the config as Iv done several times before and left it to do its thing.
A few days later I noticed I wasn’t getting any new readings from my EmonTX.
Because it originally stopped working from what I thought was batteries, but also because I’d done an update I wasn’t sure where the issue was.
Iv read topic after topic to try and fix it in software on EmonCMS and after looking at the log I noticed even though it was RX from EmonTX it said it wasn’t the correct length… or something like that?
The short of the story is that I had to re-flash the firmware and everything worked again straight away.
So seeing as Iv never ran into firmware going faulty… what’s changed in the latest Emon SD to stop the original firmware working, but the latest EmonTX3CM firmware does work?

P.S. I like to add it’s taken me a couple of months in the evenings when I get chance cos everything has seemed to opt for the PlatformIO way now and I was trying to get my head round it, and it kept throwing up errors on compiling. In the end I re-installed ArduioIDE and did it the way Iv always done it.

Very sensible. I cannot recommend and I can’t use platformio. When I tried it, it moved files and directories and destroyed my system. I suggest remove it completely. I’ve been castigated here by its proponents for categorising it as malware, but that’s how it behaved on me.

Back to your original problem - it was probably that the default emonHub configuration has been updated to account for the more data that the later emonTx sketches send. By changing a few lines in the file (which you can do through the web browser interface), you would most likely have avoided most of the trouble.

But on the good side, the “CM” sketch should give you more accurate data, especially if you have rapidly switching loads.

Ahhh… Thankyou for your reply :blush:. That’s something I will go and have a look at in a bit.
As I said before… apart from batteries… it’s been a brilliant little setup, with a few EmonTHs dotted around the house and sheds one outside, and the EmonTX powered off batteries next to the consumer unit (because there’s no mains socket there).
I did purchase an EmonPI hat last month and was going to do some wiring and change it over to that to see if it worked. Now I think il leave it all as it is (if it works don’t touch it!!lol). Over all I think this product is far better than some of the “big tech” Hive, Nest over priced stuff. The only thing I would like it do is some sort of weather sensors (wind, rain, air, light sensors). Would you know if anyone on the forum has attempted to modify an EmonTH to run any of these I2C sensors?

I think I read emonTx as emonTH, as very few people now run the emonTx from batteries. It didn’t register that you were operating your emonTx from batteries.

In that case, I’d strongly advise you to go back to the old sketch that you had, and update (backdate?) the emonHub configuration to suit. The reason is, the new sketch that you’ve loaded runs the processor continuously (that’s the “CM” – Continuous Monitoring bit), so it will run your batteries down very quickly. The old sketch only runs the monitoring part for 200 ms in every 10 s, then the processor sleeps and uses only a very small current for the remaining 9.7 or so seconds, so the batteries will last much longer.

The sketch you want is this:

and the configuration you need is in the comment in the sketch itself. (Lines 61 - 69).
You edit emonhub.conf via the web browser: Emonhub → Edit Config and scroll down to Node 8. You should have exactly the same as shown in the sketch, but if not, replace any existing configuration for Node 8 with the lines from the sketch. You must not have two definitions for the same node.

You’ll have a similar power problem if you add to the emonTH, I can’t recollect seeing this reported by anyone, but quite a few of our users integrate the output of a weather station with their energy monitor, for obvious reasons. But that isn’t what you want. The usual additions to an emonTH are a second temperature sensor or a pulse counter for the LED on the electricity meter.

Robert,
Thanks again for this valuable information :). In my case the hard bit is doing the software side of things and getting that working. So seeing as iv got that part re installed and sorted on the laptop (and found out all the misplaced cables and adapters lol) doing a 2 min reflash will be a doddle. Thanks for telling me which part of the config I need to edit aswell…that should save me a few hours of head scratching!!
As with the adding weather sensors, I said that because I can (and have already) built a little board with an arduino nano and Si7021 running off rechargeables and a solar panel from the EmonTH schematic and v2 hex file for my outside temp/humidity. I was just wondering if anyone has attempted to add other sensors. For my case it helps me decide when iv got to turn the heater on in the outside shed because of the water pipes… and I like looking at weather info and patterns… it must be a UK thing?!lol