Community
OpenEnergyMonitor

OpenEnergyMonitor Community

New Additional EmonTx error in log

Tags: #<Tag:0x00007f68225ce220>

I have a couple of emonTX devices on nodes 7 and 8 already and have recently purchased two more. I’ve plugged the first in and thankfully it’s already set to node 15.

I’ve added the addition config into Emonhub, named it as appropriate and basically copied the rx details from one of the other emonTX devices.

However, this is not working and I can see an error in the Emonhub which suggests that the data codes are incorrect for the frame that it is receiving.

I can’t see anything that suggests that this emonTx provides anything other than the original 11 h and 1 L code in its outputs so I’m a bit stuck.

I’ve checked that the entire frame can be read by setting datacode = 0 to read it in unprocessed and that works.

Any clues as to what is wrong with my datacodes config as per the sample from the log below (shows both node 15 failing and node 8 working).

Thanks

2021-01-04 16:00:26,029 DEBUG RFM2Pi 291 NEW FRAME : OK 15 84 84 85 85 89 15 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 101 32 101 32 101 32 84 85 85 85 (-50)
2021-01-04 16:00:26,030 WARNING RFM2Pi 291 RX data length: 40 is not valid for datacodes [‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘h’, ‘L’]
2021-01-04 16:00:30,371 DEBUG RFM2Pi 292 NEW FRAME : OK 8 167 3 37 1 50 14 155 10 217 91 184 11 184 11 184 11 184 11 184 11 184 11 0 0 0 0 (-49)
2021-01-04 16:00:30,373 DEBUG RFM2Pi 292 Timestamp : 1609776030.371351
2021-01-04 16:00:30,374 DEBUG RFM2Pi 292 From Node : 8
2021-01-04 16:00:30,374 DEBUG RFM2Pi 292 Values : [935, 293, 3634, 2715, 235.13, 300, 300, 300, 300, 300, 300, 0]
2021-01-04 16:00:30,375 DEBUG RFM2Pi 292 RSSI : -49
2021-01-04 16:00:30,375 DEBUG RFM2Pi 292 Sent to channel(start)’ : ToEmonCMS
2021-01-04 16:00:30,376 DEBUG RFM2Pi 292 Sent to channel(end)’ : ToEmonCMS

You need to look at the source code for the sketch that’s in the ‘new’ emonTx.

If it’s a standard recently shipped stock item, it should have this sketch:


and on line 30 of the source, you will see the configuration it requires
[[15]]
  nodename = emontx3cm15
  [[[rx]]]
    names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
    datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L
    scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
    units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
    whitening = 1

Which is 40 bytes, and it might just fit the data you’re seeing. Another good clue is the row of “85”, which is 0x55, and that’s the byte we XOR the data with for data whitening - in this case the original byte was 0.

Without knowing what each of your config. entries is, I don’t know what’s gone wrong - quite possibly it’s just how things have changed over time, because with only 30 node IDs available, they’ve had to be re-used with a new configuration as the amount of data sent back has increased.

But I’ve given you the sure-fire way to identify what you need. If you don’t know the exact version of the sketch, then you must look through the versions over time to identify the byte count of each and compare that with what you’re receiving.

Thanks Robert.

I knew it had to be something simple, so basically I was copying the Rx details from my older emonTx devices purchased a couple of years or so back and using it as the detail for the newer emonTx purchased a few months back!

All updated now and using the newer units with continuous power monitoring. :slight_smile:

As long as the old units have RFM69CW radios, then you should be able to update them, should you wish.

1 Like