I have a Victron Venus OS running on a Rasperry Pi3. It has its own MQTT broker. I have created a second bridge to it. Keep Alive and first couple of items are below
512
Dc
0
Power = {"value":418}
Current = {"value":8.5}
Voltage = {"value":49.220001220703125}
Temperature = {"value":9.199999809265137}
openHAB just displays the voltage as 49. I’m not sure what I’m doing wrong (I tried changing the outgoing to .2f% but it made no difference).
Any ideas?
Then, the Item Type should be Number:Dimensionless and Number:Power respectively.
Take a look at the Item list (Main UI - > Administration → Items) Do the values show up as Integers or are they of type float, and only shown as integer in the Item details? Then try to set the State Description Pattern to %.2f %unit%.
If using QuantityType Items (Number:), please also ensure to set the correct unit ONCE in th eItem metadata. Please be aware that this unit should be set only once, as it influences the value stored in the Item (and therefor the persisted value as well).
The Display unit can be set as often as you want.
Interesting. In the Items list it appears as float but in the item in the Thing (and the Sitemap despite it having %.2f in the label) it’s an integer.
I don’t have the problem with the Mosquitto broker.
I changed the unit to V for a voltage one and it made no difference.
I deleted them all and re-created them and it’s fine now (apart from showing as an integer in the channel)
I started with OH2 and use the sitemap as my main view (including in the app) so all of my items have the format in the label. I only use the main UI for checking things are working. I don’t want to re-write the whole of the sitemap for 1 device which is giving issues.
I suspect that the problem was caused because I copied the code from the node-red supplied data into the Victron Thing and something got lost in the shuffle.
I configure the Things in the UI but use items files (I find it easier - I create the first Channel and copy it a few times in the code - just change 1 letter - BatI to BatV - then create one item in the items file and do the same)
I tried patterns when I upgraded to OH4 but it didn’t work correctly with a couple of bindings.
One day I will sit down and go through everything but it’s sort of, if it ain’t broke don’t fix it.
Then forget about checking in Items but only check in Item list. The Item list shows the real value (in the meaning of more accurate) The Item details and the Item in Channel view will show the pattern formatted value.
I don’t want to be offensive, but I’m pretty sure that this is due to wrong configuration.