Old emonTx sending invalid data

A long time ago, I purchased a coupl of emonTXV2.2 boards but got diverted onto other projects. I’ve now come back to this and am having problems.

I’ve uploaded the code from emonTx_CT123, set the node ID to 5 and only disabled CT1 and 2. However, I am getting the following in the EmonHub log

020-10-26 17:26:59,542 DEBUG    RFM2Pi     648 NEW FRAME : OK 5 243 6 0 0 0 0 231 12 (-42)
2020-10-26 17:26:59,544 WARNING  RFM2Pi     648 RX data length: 8 is not valid for datacodes ['h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'L']

Has something changed since I purchased these boards to prevent them being recognised, or have I missed something in the configuration?

I don’t keep track of all the changes that have happened over the years, but the cure is simple. You need to change the entry in emonhub.conf to match the data being sent by the emonTx. If you look at the source code for the sketch, you’ll see that the payload data is 4 integers (always - whether all three c.t’s are working or not) - 3 powers and the battery voltage. That looks correct because the emonHub error says there are 8 bytes.

Now the second possible problem is you say you’ve got the NodeID set to 5. That is probably clashing with your emonBase’s NodeID.

So I suggest you change the emonTx to NodeID = 4 (say - that’s a number that isn’t currently used), and then add a new definition into emonhub.conf:

[[4]]
    nodename = emontxV2
    [[[rx]]]
       names = power1, power2, power3, vBatt
       datacodes = h,h,h,h
       scales = 1,1,1,0.001
       units = W,W,W,V

(You can use NodeID = 3 for the second, that too is unused, though it’s quite in order still - as it was when you bought your emonTx’s - to use whichever Node IDs you want. All you need is a matching definition/declaration in emonhub.conf to allow it to validate the data, but make sure you don’t have any duplicates.)

Thanks, @Robert
I changed the node id to 10 as this is preset as emontx1. I did have to edit the config string in emonhub.conf to match what was being sent.