Items bound to a channel are empty / not updated

Hi there,

I’ve developed a new binding which reads out data of my sma inverter.

Everything is working fine so far but the items on my sitemap page are not showing anything and do not receive any updates…

So in my binding, if a value has changed for the current daily production value I update the state:

updateState(SMAInverterBindingConstants.CHANNEL_DAILY, new DecimalType(dailyProduction.doubleValue()));

My thing is properly configured:

Thing smainverter:inverter:tpl10k

My item has been added to the .items file:

Number SMA_Daily_Prod           "Daily production [%.1f kWh]"      <solarplant>      { channel="smainverter:inverter:tpl10K:daily" }

and my sitemap does contain the item:

Frame label="SMA Inverter" {
    Text item=SMA_Current_Prod
    Text item=SMA_Daily_Prod
    Text item=SMA_Total_Prod
}

and of course my channel is exposed via pom.xml

<channels>
        <channel id="daily" typeId="daily" />
        <channel id="current" typeId="current" />
        <channel id="total" typeId="total" />
    </channels>

Images and text is shown fine, but no value is added, every label contains a “-”.
Am I missing anything?

Would really appreciate any help, thank you very much in advance

Does it show in the log it received updates? And do you have the code somewhere on GitHub, because based on the information you gave I can’t see what might be wrong.

I’ve uploaded the stuff to a repository here:


Unfortunately no update logs are shown even on TRACE level

Not sure if it causes your problem, but your channels are defined as QuantityType, but you pass a DecimalType as argument. Also don’t override updateState. The method has a variant with ChannelUID as argument and if you would call that instead of the String variant it would bypass your override method and cause unexpected behavior.

So I changed my item type to energy (as already defined in the channel)

Number:Energy SMA_Current_Prod         "Current production [%.1f kWh]"    <solarplant>      { channel="smainverter:inverter:tpl10K:current" }     
Number:Energy SMA_Daily_Prod           "Daily production [%.1f kWh]"      <solarplant>      { channel="smainverter:inverter:tpl10K:daily" }       
Number:Energy SMA_Total_Prod           "Total production [%.1f kWh]"      <solarplant>      { channel="smainverter:inverter:tpl10K:total" }       

And now do not pass DecimalType but

return new QuantityType<Energy>(value, SmartHomeUnits.KILOWATT_HOUR);

Unfortunately this does not change anything.

I really don’t get what I am missing