EmonTx4 cumulative energy input is negative - do I just add an offset to the input?

Hi folks,

I have just installed my brand new emonTx4 setup and I have one persistent data anomaly that I’m not sure what (if anything) to do with.

First, here’s the setup:

  • emonTx4 + emonVs + emonBase bundle (order #29921)
  • emonTx4 firmware updated to v1.5.4, though if you can tell me where to look to double-check that, I can’t see it listed anywhere in the emonCMS UI
  • UK plug plus an adaptor for an Australian socket - I understand AU and UK power are very similar
  • Single phase
  • CT1 50A (total home), CT2 50A (oven), CT3-CT6 20A (other individual circuits)
  • Input configuration using the emonTx4 device template

When I first installed it, I accidentally had the oven sensor (CT2) around the wrong way, so had negative power readings from it. I have since reversed the direction of the sensor and trimmed all feeds’ data up to a point after the orientation was fixed. All of the P* and E* numbers now look plausible, except E2.

E2 is reading -65.43kWh. The EmonHub log is also giving the value as -65430, so I guess this means it’s the hardware that’s reporting the large negative number? (Also, I notice that value is not far off 2^16, though it’s not very close either…)

2023-01-09 08:55:48,560 INFO     SPI        Packet received 52 bytes
2023-01-09 08:55:48,560 DEBUG    SPI        271 NEW FRAME : 
2023-01-09 08:55:48,562 DEBUG    SPI        271 Timestamp : 1673254548.560673
2023-01-09 08:55:48,562 DEBUG    SPI        271 From Node : 17
2023-01-09 08:55:48,563 DEBUG    SPI        271    Values : [275, 234.06, 825, 0, 563, 141, 2, 110, 7517, -65430, 2208, 3263, 126, 1692, 0, 0, 0, 4294967295, 0, 0.0]
2023-01-09 08:55:48,563 DEBUG    SPI        271      RSSI : -27

My best guess is that initially collecting some negative power data on CT2 has caused this, but I can’t work out how to reset it and start again.

Is my best bet to just include a “+65430” processing step on the input, throw away any older E2 data, and be done with it? Do you have any other recommendations?

Thanks,
Suzy

The ‘E’ readings are cumulative and stored on the device so you need to clear the values manually.

https://docs.openenergymonitor.org/emontx4/configuration.html#using-the-web-tool

And a z issued to the EmonTX.

[edit]
Feedback on the docs welcome from a user perspective :slight_smile:

If Trystan has used the configuration code I wrote for the emonTx V3, then a z will indeed zero the energy values - all of them. If that’s not acceptable, then you need to process that particular channel’s energy as it comes through the Inputs page of emonCMS.

Note a ? issued to the emonTx should give you a page of ‘Help’, albeit rather abbreviated.

Thanks, both!

Do you have to do that with a direct serial connection (as discussed in ‘Directly via serial’ on that page)? Or is that what the ‘Console [text box] Send’ is for in the web tool image?

Mostly there’s just a lot to take in… I guess from this question in particular:

  • The page above doesn’t mention that ‘Send’ button or give any indication that you can send those single-char commands to the emonTx using it. (Or whatever else it might be for.)
  • Discussion of kWh feeds seems to be mostly around calculating it from the power reading. There’s not much about the values from the default config for the emonTx4 or how to adjust them.
  • Maybe a basic troubleshooting playbook would be useful? For example, ‘to diagnose a strange reading, check here, here, here then here’. Not so much an intro to the basic principles of the whole system as a procedure for narrowing down which part of the system you need to dig into. (I have no idea how feasible such a playbook is, but even directions how to collect basic system info for your request for help from the forum might be useful :stuck_out_tongue:.)
  • How do I check what firmware version my emonTx is running?

By the way, connecting the emonTx4 to Chrome on a Windows machine over USB-C didn’t work - seems to be a missing driver. I haven’t dug into that further to figure out how much that’s a ‘just me’ problem.

1 Like

:person_facepalming: It’s right there, if I had actually read the list of commands on the configuration page you just sent me to (sorry):

Still, might be worth calling out on Firmware — OpenEnergyMonitor 0.0.1 documentation

Yes that can be an issue. Did you try the cable both ways (as per the docs)?

@TrystanLea - I think there used to be something somewhere about getting and installing drivers for Windows? Installing the Arduino IDE – Windows 10 — OpenEnergyMonitor 0.0.1 documentation

@suzyh - plug it into the emonbase - it will work then.

To the best of my knowledge, this has always been the case – WIndoze machines need drivers. Full instructions for Win10 used to be in the old ‘Learn’ section - but everything is being moved around at the moment so I’ve no idea what the state is today, let alone tomorrow, It appears to be in ‘Docs’ but “below the fold” Learn: Electricity Monitoring — OpenEnergyMonitor 0.0.1 documentation and it should be in “Using the Arduino IDE - Windows 10”

Yeah, I had.

Wow, I haven’t heard it called Windoze since I was a teenager, haha.

Yep, I got it to work by plugging into the emonBase, figuring ‘Serial Config’ sounded plausible, going ‘I have no idea what the consequence of stopping emonHub is, but the UI is encouraging me to do that, and what’s the worst that can happen?’ and sending some characters to it. (I had a look for docs on the ‘Serial Monitor’ and ‘Serial Config’ pages, but they aren’t in obvious places.)

Since it’s a new setup and I don’t have any historical data I’m particularly attached to, I just zeroed it all, and then went and trimmed the feeds to that time. Should be good to go now, thanks :+1:

1 Like

It stops sending data to emonCMS, until you restart it - you’ll have a stretch of NULL values in all the feeds originating from data passing through emonHub. If you don’t stop it, you need to interleave any commands you send with the data it’s sending, and particularly you need to see its response before it sends data and the bit you wanted disappears upwards out of the window.

1 Like