Hello everyone,
the last two days I have been trying to get Openhab to read my SMA TriPower inverter data via Modbus TCP.
In general, I think it works, f.e.
Bridge modbus:tcp:inverter [ host="192.168.178.XXX", port=502, id=3, connectMaxTries=3] {
// Current power generation
Bridge poller power_current [ start=30775, length=4, refresh=5000, type="input" ] {
Thing data power_current [ readStart="30775", readValueType="int32"]
}
// Total yield - all together
Bridge poller power_alltogether [ start=30529, length=2, refresh=15000, type="input" ] {
Thing data power_alltogether [ readStart="30529", readValueType="uint32", readTransform="JS(divide1000.js)"]
}
}
This example returns values as I would expect.
But when I try different Modbus channels I also get data formated like a timestamp:
Bridge poller info_30513 [ start=30513, length=4, refresh=5000, type="input" ] { Thing data info_30513 [ readStart="30513", readValueType="uint64"] }
This should return the total yield in “Wh” (watt hours). But I always get this error message:
2020-07-02 15:30:32.559 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '1970-01-03T13:12:42.000+0100' of item Solar_info_30513 with format '%.0f Wh': f != java.time.ZonedDateTime
This is the item:
String Solar_info_30513 "30513 [%.0f Wh]" { channel="modbus:data:inverter:info_30513:info_30513:number" }
Can someone see my mistake? I happens with a couple of different addresses (each one returns a timestamp value). I see these timestamp values even in the PaperUI!
Could someone post your (working) modbus thing + items? That would be very nice!!!
Thanks a lot and bye