SDM120 no longer working

So I edited my emonHub config file via the GUI to add autoconf = 1 prior to booting up my nice new emonTX4 and upon restarting the hub, my sdm120 values are being dropped.

Log states …

2> 022-12-05 14:52:42,376 INFO MainThread Setting SDM120 read_interval: 10

2022-12-05 14:52:42,377 INFO MainThread Setting SDM120 meters sdm120 address 1
2022-12-05 14:52:42,378 INFO MainThread Setting SDM120 meters sdm120 registers [0, 6, 12, 18, 30, 70, 72, 74, 76, 342]
2022-12-05 14:52:42,379 INFO MainThread Setting SDM120 meters sdm120 names [“V”, “I”, “P”, “VA”, “PF”, “FR”, “EI”, “EE”, “RI”, “TP”]
2022-12-05 14:52:42,380 INFO MainThread Setting SDM120 meters sdm120 precision [2, 3, 1, 1, 3, 3, 3, 3, 3, 3]

2022-12-05 14:54:10,769 DEBUG SDM120 [236.3, 5.65, 1279.1, 1337.3, 0.957, 49.9, 751.044, 0.0, 2.02, 751.044]
2022-12-05 14:54:10,770 DEBUG SDM120 60 NEW FRAME :
2022-12-05 14:54:10,771 WARNING SDM120 60 Unable to decode as values incorrect for datacode(s)

I didn’t change any other config - the config / node is as follows and that worked fine before!

[[SDM120]]
        Type = EmonHubMinimalModbusInterfacer
        [[[init_settings]]]
            device = /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0
            baud = 9600
            parity = none
            datatype = float
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            read_interval = 10
            nodename = modbus
            [[[[meters]]]]
                [[[[[sdm120]]]]]
                    address = 1
                    registers = 0, 6, 12, 18, 30, 70, 72, 74, 76, 342
                    names = V, I, P, VA, PF, FR, EI, EE, RI, TP
                    precision = 2, 3, 1, 1, 3, 3, 3, 3, 3, 3

Any ideas?

(I’ve re-edited to remove the autoconf entry but still not working)

Hello @greentangerine did you update emonhub today? there was a fix for an issue that sounds like it could be the one affecting you - it does relate to autoconf. If you check you nodes list in the emonhub config you may see a sdm120 entry, you will want to remove that and restart emonhub.

I didn’t update anything; just edited the config to add autoconf = 1 and now wish I hadn’t. It now has autoconf = 0 and that is being picked up as emonhub is logging it. There are no other SDM120 entries in the file that I can see - I’m just using the GUI.

TX4 is still in the box and I’m just about to add some debug code to emonhub_interfacer.py as the SDM120 shouldn’t even get to the code that is throwing the Exception.

Can you double check the [nodes] section

WARNING SDM120 60 Unable to decode as values incorrect for datacode(s)

it should only be getting to that point because there is a nodes configuration for it added - in error (bug now fixed in latest). But you will need to remove that nodes configuration…

Ah, there was a modbus node inserted right after #26. Now working again.

Is it safe to turn on autoconf now?

Great, only after updating emonhub…