[avmfritz] OH 5.1.0M2 When high frequency polling is set, the power readings are sometimes divided by 10

In OH 5.1.0M2 a new ThingAction has been introduced by @cweitkamp, that increases the polling frequency of the power consumption measured by Smart meters such as the DECT 200.
When high frequency polling is set, the power readings are not always correct. Very often a correct reading is followed by another one whose value is exactly divided by 10. The smaller values do not appear in the fritzbox interface.

By raising the log level of avmfritz to debug, it appears that when high frequency polling is set,
the binding queries the fritzbox in two ways. In the first, power is expressed in W (e.g. 298.020) while in the second it is an integer in mW (298020). For some reason the value in mW is divided by 10000 instead of 1000 before being assigned to the item value

I post in the following the significant lines

2025-11-16 14:44:44.779 [DEBUG] [nal.hardware.FritzAhaContentExchange] - GET response complete: <devicelist version="1" fwversion="8.03"><device identifier="" id="20000" functionbitmask="0" fwversion="" manufacturer="0x0000" productname=""><present>0</present><txbusy>0</txbusy><name></name></device><device identifier="09995 0521715" id="22" functionbitmask="320" fwversion="05.23" manufacturer="AVM" productname="FRITZ!Smart Thermo 301"><present>1</present><txbusy>0</txbusy><name>TermoSeba</name><battery>100</battery><batterylow>0</batterylow><temperature><celsius>220</celsius><offset>-15</offset></temperature><hkr><tist>44</tist><tsoll>46</tsoll><absenk>28</absenk><komfort>46</komfort><lock>0</lock><devicelock>0</devicelock><errorcode>0</errorcode><windowopenactiv>0</windowopenactiv><windowopenactiveendtime>0</windowopenactiveendtime><boostactive>0</boostactive><boostactiveendtime>0</boostactiveendtime><batterylow>0</batterylow><battery>100</battery><nextchange><endperiod>1763852400</endperiod><tchange>46</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive><adaptiveHeatingActive>0</adaptiveHeatingActive><adaptiveHeatingRunning>0</adaptiveHeatingRunning></hkr></device><device identifier="08761 0238863" id="23" functionbitmask="35712" fwversion="04.27" manufacturer="AVM" productname="FRITZ!Smart Energy 200"><present>1</present><txbusy>0</txbusy><name>Lavatrice</name><switch><state>1</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><simpleonoff><state>1</state></simpleonoff><powermeter><voltage>231877</voltage><power>1430</power><energy>1422398</energy></powermeter><temperature><celsius>225</celsius><offset>0</offset></temperature></device><device identifier="08761 0215097" id="24" functionbitmask="35712" fwversion="04.27" manufacturer="AVM" productname="FRITZ!Smart Energy 200"><present>1</present><txbusy>0</txbusy><name>TV</name><switch><state>1</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><simpleonoff><state>1</state></simpleonoff><powermeter><voltage>231308</voltage><power>140</power><energy>63491</energy></powermeter><temperature><celsius>250</celsius><offset>0</offset></temperature></device><device identifier="11657 0215539" id="25" functionbitmask="35712" fwversion="04.27" manufacturer="AVM" productname="FRITZ!Smart Energy 210"><present>1</present><txbusy>0</txbusy><name>PresaEsterna</name><switch><state>1</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><simpleonoff><state>1</state></simpleonoff><powermeter><voltage>231074</voltage><power>0</power><energy>556519</energy></powermeter><temperature><celsius>135</celsius><offset>0</offset></temperature></device><device identifier="08761 0257983" id="26" functionbitmask="35712" fwversion="04.27" manufacturer="AVM" productname="FRITZ!Smart Energy 200"><present>1</present><txbusy>0</txbusy><name>Frigorifero</name><switch><state>1</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><simpleonoff><state>1</state></simpleonoff><powermeter><voltage>230300</voltage><power>570</power><energy>149468</energy></powermeter><temperature><celsius>245</celsius><offset>0</offset></temperature></device><device identifier="08761 0204051" id="27" functionbitmask="35712" fwversion="04.27" manufacturer="AVM" productname="FRITZ!Smart Energy 200"><present>1</present><txbusy>0</txbusy><name>Condizionatore</name><switch><state>0</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><simpleonoff><state>0</state></simpleonoff><powermeter><voltage>231690</voltage><power>0</power><energy>1411714</energy></powermeter><temperature><celsius>235</celsius><offset>0</offset></temperature></device><device identifier="08761 0240908" id="28" functionbitmask="35712" fwversion="04.27" manufacturer="AVM" productname="FRITZ!Smart Energy 200"><present>1</present><txbusy>0</txbusy><name>Deumidificatore</name><switch><state>1</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><simpleonoff><state>1</state></simpleonoff><powermeter><voltage>230611</voltage><power>290600</power><energy>121625</energy></powermeter><temperature><celsius>255</celsius><offset>0</offset></temperature></device></devicelist>
2025-11-16 14:44:44.783 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:FRITZ_DECT_200:fb7590:087610240908' with device model: [ain=08761 0240908,bitmask=35712,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=true,isTemperatureSensor=true,isHumiditySensor=false,isPowermeter=true,isDectRepeater=false,isHeatingThermostat=false,hasMicrophone=true,isHANFUNUnit=false,isHANFUNOnOff=true,isDimmableLight=false,isColorLight=false,isHANFUNBlind=false,id=28,manufacturer=AVM,productname=FRITZ!Smart Energy 200,fwversion=04.27,present=1,name=Deumidificatore,battery=null,batterylow=null,[state=1,mode=MANUAL,lock=0,devicelock=0],[state=true],[voltage=230.611,power=290.600,energy=121625],null,null,[celsius=25.5,offset=0.0],null,null,null,[],null]
2025-11-16 14:44:44.791 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Power_Deumidificatore' changed from 29.103 W to 290.6 W (source: org.openhab.core.thing$avmfritz:FRITZ_DECT_200:fb7590:087610240908:power)
2025-11-16 14:44:51.906 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Power_Deumidificatore' changed from 290.6 W to 29.060000000000002 W (source: org.openhab.core.thing$avmfritz:FRITZ_DECT_200:fb7590:087610240908:power)

Should I raise a github issue?

Let me know if other informations are needed.

Thank you for your attention

Hi @Lionello_Marrelli ,

Thank you for paying attention to this new feature. There is no need to open an issue anymore as I already submitted a fix for the it. I realized the same behavior during development but unfortunately forgot to add it to the initial contribution of it.

Have fun.

1 Like