jayme-github / fritzbox_smarthome_exporter

AVM FRITZ!Box Home Automation / Smart Home exporter for Prometheus
GNU General Public License v3.0
39 stars 11 forks source link

Unable to parse saving temperature of "Thermostat Schlafzimmer" : strconv.ParseFloat: parsing "OFF": invalid syntax #11

Closed michaelarlt closed 2 years ago

michaelarlt commented 2 years ago

Hi im getting the error: Unable to parse saving temperature of "Thermostat Schlafzimmer" : strconv.ParseFloat: parsing "OFF": invalid syntax

Package used: fritzbox_smarthome_exporter_0.4.0_linux_amd64.tar.gz

This might be similar to #10

jayme-github commented 2 years ago

I can't reproduce that with 0.4.0. Could you please double check you are running 0.4.0? The sha1sum of your binary should be 6be39aebc2b7f2b29fd4940d60527a34b211b101 and you should also see fritzbox_thermostat_state metrics, which where introduced with 0.4.0.

michaelarlt commented 2 years ago

image It is indeed that version When i open the metrics site im getting the following: An error has occurred while serving metrics:

error collecting metric Desc{fqName: "fritzbox_thermostat_saving", help: "Configured energy saving temperature in units of 0.1 °C", constLabels: {}, variableLabels: [device_id device_type device_name]}: strconv.ParseFloat: parsing "OFF": invalid syntax

jayme-github commented 2 years ago

Could you please run the exporter with -loglevel=debug and post the line starting with DATA:<devicelist ... here?

michaelarlt commented 2 years ago

Could you please run the exporter with -loglevel=debug and post the line starting with DATA:<devicelist ... here?

Of course i will ;)

2022/06/09 07:40:02 DATA:<?xml version="1.0" encoding="utf-8"?><SessionInfo><SID>0000000000000000</SID><Challenge>c5eb49fd</Challenge><BlockTime>0</BlockTime><Rights></Rights><Users><User last="1">BoxAdmin</User><User>(removed)</User></Users></SessionInfo>

2022/06/09 07:40:02 FRITZ!Box challenge isc5eb49fd
2022/06/09 07:40:03 DATA:<?xml version="1.0" encoding="utf-8"?><SessionInfo><SID>c092b3d2dc167d53</SID><Challenge>53f6218d</Challenge><BlockTime>0</BlockTime><Rights><Name>Dial</Name><Access>2</Access><Name>App</Name><Access>2</Access><Name>HomeAuto</Name><Access>2</Access><Name>BoxAdmin</Name><Access>2</Access><Name>Phone</Name><Access>2</Access></Rights><Users><User last="1">BoxAdmin</User><User>(removed)</User></Users></SessionInfo>

2022/06/09 07:40:03 Login successful
2022/06/09 07:41:12 GEThttp://192.168.7.1/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=c092b3d2dc167d53
2022/06/09 07:41:12 DATA:<devicelist version="1" fwversion="7.31"><device identifier="09995 0003386" id="16" functionbitmask="320" fwversion="05.02" manufacturer="AVM" productname="FRITZ!DECT 301"><present>1</present><txbusy>0</txbusy><name>Thermostat Wohnzimmer</name><battery>100</battery><batterylow>0</batterylow><temperature><celsius>225</celsius><offset>0</offset></temperature><hkr><tist>45</tist><tsoll>20</tsoll><absenk>20</absenk><komfort>20</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>0</endperiod><tchange>20</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive></hkr></device><device identifier="09995 0182300" id="17" functionbitmask="320" fwversion="05.02" manufacturer="AVM" productname="FRITZ!DECT 301"><present>1</present><txbusy>0</txbusy><name>Thermostat Bad</name><battery>60</battery><batterylow>0</batterylow><temperature><celsius>245</celsius><offset>0</offset></temperature><hkr><tist>49</tist><tsoll>24</tsoll><absenk>16</absenk><komfort>24</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>60</battery><nextchange><endperiod>0</endperiod><tchange>24</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive></hkr></device><device identifier="09995 0182040" id="18" functionbitmask="320" fwversion="05.02" manufacturer="AVM" productname="FRITZ!DECT 301"><present>1</present><txbusy>0</txbusy><name>Thermostat Schlafzimmer</name><battery>60</battery><batterylow>0</batterylow><temperature><celsius>230</celsius><offset>0</offset></temperature><hkr><tist>46</tist><tsoll>16</tsoll><absenk>253</absenk><komfort>40</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>60</battery><nextchange><endperiod>0</endperiod><tchange>40</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive></hkr></device><group synchronized="1" identifier="7A:A5:7A-900" id="900" functionbitmask="4160" fwversion="1.0" manufacturer="AVM" productname=""><present>1</present><txbusy>0</txbusy><name>Heizung Wohnzimmer</name><hkr><tist></tist><tsoll>20</tsoll><absenk>20</absenk><komfort>20</komfort><lock>0</lock><devicelock>0</devicelock><errorcode>0</errorcode><windowopenactiv>0</windowopenactiv><windowopenactiveendtime>0</windowopenactiveendtime><boostactive>0</boostactive><boostactiveendtime>0</boostactiveendtime><nextchange><endperiod>0</endperiod><tchange>20</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive></hkr><groupinfo><masterdeviceid>0</masterdeviceid><members>16</members></groupinfo></group><group synchronized="1" identifier="grp7AA57A-3A3E703C3" id="902" functionbitmask="4160" fwversion="1.0" manufacturer="AVM" productname=""><present>1</present><txbusy>0</txbusy><name>Heizung Bad</name><hkr><tist></tist><tsoll>24</tsoll><absenk>16</absenk><komfort>24</komfort><lock>0</lock><devicelock>0</devicelock><errorcode>0</errorcode><windowopenactiv>0</windowopenactiv><windowopenactiveendtime>0</windowopenactiveendtime><boostactive>0</boostactive><boostactiveendtime>0</boostactiveendtime><nextchange><endperiod>0</endperiod><tchange>24</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive></hkr><groupinfo><masterdeviceid>0</masterdeviceid><members>17</members></groupinfo></group><group synchronized="1" identifier="grp7AA57A-3A8AFA86F" id="901" functionbitmask="4160" fwversion="1.0" manufacturer="AVM" productname=""><present>1</present><txbusy>0</txbusy><name>Heizung Schlafzimmer</name><hkr><tist></tist><tsoll>16</tsoll><absenk>253</absenk><komfort>40</komfort><lock>0</lock><devicelock>0</devicelock><errorcode>0</errorcode><windowopenactiv>0</windowopenactiv><windowopenactiveendtime>0</windowopenactiveendtime><boostactive>0</boostactive><boostactiveendtime>0</boostactiveendtime><nextchange><endperiod>0</endperiod><tchange>40</tchange></nextchange><summeractive>0</summeractive><holidayactive>0</holidayactive></hkr><groupinfo><masterdeviceid>0</masterdeviceid><members>18</members></groupinfo></group></devicelist>
jayme-github commented 2 years ago

That was helpful, thanks! I just cut a new release (v0.4.2) which should fix the issue.

michaelarlt commented 2 years ago

I was out for vacation, therefore wasnt able to crosscheck but can verify, that im getting values now and the metrics looks good. Thanks in advance for fixing it so fast ;)