SDM120 meters not being read

Hello,
Some will remember that I had a small struggle to connect the SDM120 meters to my emonPi. Thanks to a lot of help and handholding I got it work.
Unfortunately some time ago both meters stopped communicating. I don’t know what I’ve done wrong. I’ve looked at previous discussions about this and think I’ve tried all the suggestions.

This is the log message I get:

2025-02-02 10:43:27,373 ERROR SDM120 Could not read register @ 74: No communication with the instrument (no answer)
2025-02-02 10:43:28,391 ERROR SDM120 Could not read register @ 76: No communication with the instrument (no answer)
2025-02-02 10:43:28,491 ERROR SDM120 Could not read all registers
2025-02-02 10:43:28,492 INFO SDM120 Connecting to Modbus device=/dev/ttyUSB0 baud=2400 parity=none datatype=float
2025-02-02 10:43:31,099 ERROR SDM120 Could not read register @ 0: No communication with the instrument (no answer)

I’ve tried restarting, I’ve checked the code and it’s unaltered, the meters have the correct baud rate and id numbers, I’ve tried a different USB port, I’ve replaced the USB to RS485 adaptor…

So I’m stuck.

Here is the sdm120 config part:

[[SDM120]]
    Type = EmonHubMinimalModbusInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 2400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        nodename = sdm120
        # prefix = sdm_
        [[[[meters]]]]
            [[[[[sdm120a]]]]]
                address = 1
                registers = 0,6,12,18,30,70,72,74,76
                names = V,I,P,VA,PF,FR,EI,EE,RI
                precision = 2,3,1,1,3,3,3,3,3
            [[[[[sdm120b]]]]]
                address = 2
                registers = 0,6,12,18,30,70,72,74,76
                names = V,I,P,VA,PF,FR,EI,EE,RI
                precision = 2,3,1,1,3,3,3,3,3

Any suggestions? I’m sure it’s something trivial but I can’t see the wood for the trees.
Thanks,
Andrea

[Edited for presentation. Moderator (RW)]

Hi Andrea, Did you confirm that the cables are still secure?

The signal cable to the sdm120 is pretty fine. I had a few goes making up the Daisy-chain cable between my 4 sdm’s before I was happy with it.

1 Like

Ah! I hadn’t thought of that - it may have got knocked as it’s a bit exposed. the power light on the RS485 adaptor is on, while the Tx light flashes periodically but rather weakly. I don’t know what the light actually mean, of course.

device = /dev/ttyUSB0

I would also check that this address hasn’t changed.

1 Like

“rather weakly” – is this different to before? It might indicate a shorted Tx wire.

This is probably it, if you can connect via SSH please post the output of

ls /dev/serial/by-id/ -la

Instead of using device = /dev/ttyUSB0 it would be better to address the device directly to avoid this issue happening again e.g

device = /dev/serial/by-id/usb-1a86_USB_Single_Serial_xxxxxxx-xxxx

The address will be unique to your USB to Modbus adaptor. The command ls /dev/serial/by-id/ -la will show you the address of your adaptor.

OK. This is seriously embarrassing. I figured that in the end it must be the old “Is it plugged in? Is it switched on?” approach and took out all the wires. That’s wehn I spotted that the “A” wire was snapped right where it went into the terminal connection of the meter. It must have got yanked at some point.
When I put it all together again… sigh… it works.

I’ll never ask another question again for fear of wasting everyone’s time. Thanks for the many replies.
A

2 Likes

Don’t worry - those of us who’ve been in this game for a long, long time have been there and done that - more than once.

That’s the usual place where a wire will break, and first place to look.

Don’t you dare go away! You must stick around - if somebody else learns from your experience, some good has come from it.

1 Like