Read Power Meter EASTRON SDM72D-M via Modbus - need Help

Hi,

I am already reading data from my Huawei Inverter via Modbus rtu (thanks to this turorial: Reading data from Huawei inverter SUN 2000 (3KTL-10KTL) via modbus RTU)

Now I added a new power meter (EASTRON SDM72D-M) to this Bus. I gave it slave id 2.
The Modbus registers of the power meter are documened here: https://stromzähler.eu/media/pdf/6d/02/af/SDM72DM-manual.pdf

I added these lines to my existing BridgeModbus.things file:

Bridge modbus:serial:slave200 [ port="/dev/ttyUSB0" ,id=2 , baud=9600, stopBits="1", parity="none", dataBits=8, encoding="rtu" ]{

Bridge poller slave201input [ start=30073, length=8, refresh=10000, type="input" ]{
        Thing data Import_kWh                 [ readStart="30073", readValueType="float32" ]
        Thing data Export_kWh                  [ readStart="30075", readValueType="float32" ]
   }

Bridge poller slave202input [ start=31281, length=8, refresh=10000, type="input" ]{
        Thing data Import_W                 [ readStart="31281", readValueType="float32" ]
        Thing data Export_W                 [ readStart="31283", readValueType="float32" ]
   }

and added this to my items file:

Number  Import_kWh      "Stromzähler Import [%.1f kWh]"           <energy>          (gSolar)      { channel="modbus:data:slave200:slave201input:Import_kWh:number" }
Number  Export_kWh      "Stromzähler Export [%.1f kWh]"           <energy>          (gSolar)      { channel="modbus:data:slave200:slave201input:Export_kWh:number" }
Number  Import_W        "Stromzähler Momentan Import [%.1f W]"    <energy>          (gSolar)      { channel="modbus:data:slave200:slave202input:Import_W:number" }
Number  Export_W        "Stromzähler Momentan Export [%.1f W]"    <energy>          (gSolar)      { channel="modbus:data:slave200:slave202input:Export_W:number" }

But openhab doesnt get the values. The 4 items have the value 0. At the PaperUI the created things are online.
Can anyone help? Thank you!

Best regards
Robbelt

Ok…I got it working by myself.
Modbus is not very intuitive :wink:

I had to change the things file to:

Bridge modbus:serial:slave200 [ port="/dev/ttyUSB0" ,id=2 , baud=9600, stopBits="1", parity="none", dataBits=8, encoding="rtu" ]{

Bridge poller slave201input [ start=72, length=4, refresh=10000, type="input" ]{
    
        Thing data Import_kWh                 [ readStart="72", readValueType="float32" ]
        Thing data Export_kWh                 [ readStart="74", readValueType="float32" ]
   }

Bridge poller slave202input [ start=1280, length=4, refresh=10000, type="input" ]{
    
        Thing data Import_W                 [ readStart="1280", readValueType="float32" ]
        Thing data Export_W                 [ readStart="1282", readValueType="float32" ]
   }
1 Like