Hey everyone,
I have a strange issue. I have a number item which doesn’t display it’s value in the sitemap even if it has the exact same configuration as another similar item.
I have a mini PV system which socket is attached with a shelly pm to see the watts the PV system produces. But as the shelly normally is made for reading the energy usage of the attached machine the value for energy production is negativ. Of course I want to read it as a positive value. So what I have done is that I created one number item which reads the values of the shelly via MQTT. So this items number value is always 0 or a negativ number. On every change of this item I send it’s value to a similar number item but before that i calculate *-1 so it always has the same value as the other item but it’s always 0 or a positiv number. So far so good. Checking it in the openhab userinterface both have a value but in the sitemap only the item which receives it’s data directly from the shelly displays it’s data.
Data in UI
Screenshot was made in the dark. By day it’s working perfectly fine so for example value of first item is 200 and value of second item is -200. Value of first item is the value that won’t be displayed.
Data in App
Interesting is that the charts are although using the data from the item which values won’t be displayed.
Item Config
//PV Anlage und drum herum
Number PV_Anlage_Produktion "Stromproduktion PV Anlage Originalwert" <solarplant> {channel="mqtt:topic:mqttbroker:PVAnlage:PVStromproduktion"}
Number PV_Anlage_Produktion_Positiv "Stromproduktion PV Anlage" <solarplant>
Sitemap config
Text label="PV Anlage" icon="solarplant" {
Default item=PV_Anlage_Produktion label="Aktuelle Produktion (Echtwert)"
Default item=PV_Anlage_Produktion_Positiv label="Aktuelle Produktion"
Chart item=PV_Anlage_Produktion_Positiv period=D refresh=30000
Chart item=PV_Anlage_Produktion_Positiv period=M refresh=30000
Chart item=PV_Anlage_Produktion_Positiv period=Y refresh=30000
}
Rule that sends data to the itmes
rule "PV Wert positiv machen"
when
Item PV_Anlage_Produktion changed
then
PV_Anlage_Produktion_Positiv.sendCommand((PV_Anlage_Produktion.state as DecimalType) * -1)
end
Any idea what may be the cause of this?