Problem with emonhub rx data after upgrade of EmonTx to LPL and CM version

I have just updated my system to use LPL radio format and CM sketch on the emonTX3 as follows.

Swapped RFM69Pi to the RFM69SPI and changed the emonhub config to use SPI rather than the old interface.
Installed a new EmonPi_SD image on the emon base, then imported a backup from my old system.

Used the Admin-Update with the USB-Serial programmer to update the EmonTH2 unit… all worked perfectly
Used the Admin-Update with the USB-Serial programmer to update the EmonTX3 to lasted CM sketch.
I am now getting very odd readings on the inputs from the EmonTx3, see screenshot below.

I connected the Serial monitor to the EmonTX3 directly and I am seeing the expected values. (see Screenshot)

Debug in the emonHub log shows incorrect values received in the message.

emonhub config

        Type = EmonHubRFM69LPLInterfacer
            nodeid = 5
            networkID = 210
            pubchannels = ToEmonCMS,

        group = 210
        frequency = 433
        baseid = 5                              # emonPi / emonBase nodeID
        calibration = 230V                      # (UK/EU: 230V, US: 110V)
        #quiet = true                             # Disable quite mode (default enabled) to enable RF packet debugging, show packets which fail crc
        # interval =  300                         # Interval to transmit time to emonGLCD (seconds)


    nodename = emontx3cm15
       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

What am I missing ??

That’s your problem. It must be OFF (whitening = 0) when using LPL. It’s not required because it’s totally unnecessary - the encryption removes the long strings of zeros which is what whitening also does.

Brilliant, thanks for the quick reply, that has sorted the readings out and they now make sense


The real problem was, emonHub was “undoing” whitening which the new sketch in the emonTx doesn’t do in the first place.

The clue was, express one of those small energy values in hexadecimal and it’s 0x555555… which is the value which when xor’d with a string of zeros gives in binary 101010101…

It’s all tied up with the radio losing synch and failing to decode the message, because it needs to see a bit change from 0 to 1 (or 1 to 0) moderately frequently.

stupid question, what is “whitening” ?

Not stupid, but I’ve added to my response above.