Most of the parts that i need to read out my Amtron Wallbox are running now, but i have a probleme to read out the ‘Charging session meter count’.
In the Modbus Tool from Radizio it is build up correctly. When i load the car with 500 Wh i see in the tool the value 500 for the address 30782.
But in openHAB the value for the Item shows 420085760 when i begin to load and after the load of 500 Wh it shows 4286262. When i start a new load it resets the value to 420085760 and counts up.
So i investigated that the value 420085760 = 0, because it starts every time at this value.
When i load the car it counts up to what i load and holds the value (e.g. 42008626 for 500Wh) until the next load starts then it beginns with 420085760.
readStart 780 is right because i have to count down two from the address
Item:
Number AmtronPwCons "Charging Consumption" <counter> {channel="modbus:data:d38acc9062:fa7bc66e42:number"}
Do i have to convert the value from the Item or do i have to transform the value, or what i have to do, that i only get the ‘Watt’ or ‘Kw’ as readable value?
32-bit Modbus - how does it work? Modbus only has 16-bit registers.
That’s okay, we can glue any arbitrary two registers together to make 32. Common sense says to use two adjacent registers, but there is no actual rule about that.
Then there is the order - A+B is different from B+A here, and no rule about that either. We have to find out what the device designer did, or guess.
Amtron are pretty good here - explaining how to make the 32-bit value from registers at addresses x030D and x030E (781 and 782 decimal)
They also make clear that 781 is the low bits and 782 the high.
So that’s wrong, use 781.
Make sure the associated poller Thing includes 781 and 782 as well.
Referring to the binding docs
we can read that uint32 will take (register) and (register+1) to make the 32 bits
but
(register) will be the most significant bits, and (register+1) the least. That’s wrong, the opposite of what Amtron are doing.
Binding allows for value type uint32_swap which will do what we want - it will put the first register in the lowest part of 32-bits
and set the DataThing to the read addreess 781 and then i start to charge the car.
Ok, what is see in the DataThing is that my Item value jump to ‘0’ at start and counts up, after i have load around 1 kwh (i see in the app for the Wallbox) i stopped the charging process and looked at the value for the Item in the DataThing.
It show a value of 64684032. I dont know what dimension this value is, but when i going to devide it with
60.000 i get 1.078 and that looks like about 1 kwh.
Where can i now convert this value (64684032) to get the the value in Kwh
I have tried out your advice with the gainOffset profile, but i can’t figure it out what exactly i must do that it work, most of my tries i get an UNDEF Item value
Can you give me an example how to have the item looks with the gainOffset profile, specially what i have to use for a value gain=“xxx”
Divide by 60,000 is same as multiply by 0.0000016667, so for a Number type Item
gain=“0.0000016667”
or for a Number:Energy type Item
gain=“0.0000016667 kWh”
Note that editing profiles in flight and/or making/breaking links can be problematic. When you are happy with your edits, but still not seeing what you expect, try a reboot.
Remember we cannot see over your shoulder, its always best to show us what you are doing.