home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

AVM FRITZ!SmartHome Setup fails with error "could not convert string to float:" #118244

Closed RSchaffrath closed 2 months ago

RSchaffrath commented 3 months ago

The problem

Hi i have a simulair problem as issue #116809. but in my case there is no group with only one member.

2024-05-27 14:05:34.709 ERROR (MainThread) [homeassistant.components.fritzbox] Unexpected error fetching ... ValueError: could not convert string to float: '' integration.log

What version of Home Assistant Core has the issue?

core core-2024.5.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

fritzbox

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @mib1185, @flabbamann, mind taking a look at this issue as it has been labeled with an integration (fritzbox) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `fritzbox` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign fritzbox` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


fritzbox documentation fritzbox source (message by IssueLinks)

mib1185 commented 3 months ago

Hi @RSchaffrath

please enable debug logging, restart the integration and download and provide the log file after the issue occur again.

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

thx 👍

issue-triage-workflows[bot] commented 3 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Matthias1111 commented 3 months ago

Short Feedback from my side: I saw this error ("Unexpected error fetching Value Error: could not convert string to float: '') as well after updating my 6660 and 7530AX to the current lab firmware (7.90-xxxxx). Deactivating and activating the integration solved the issue (Neither reloading the integration nor restarting HA itself solved the issue before).

Best Matthias Core 2024.6.2, Supervisor 2024.06.0, Operating System 12.3

mib1185 commented 2 months ago

still need the debug logging as requested in https://github.com/home-assistant/core/issues/118244#issuecomment-2134008337

tksolution commented 2 months ago

Hi @mib1185, please see the attached log. Thanks error_log-1.txt

tksolution commented 2 months ago

Some more context: after a power failure, over several hours, the dect devices lost connection to the FritzBox. I bring it back one by one but only one faulty devices was enough to crash the complete integration. After all devices are back, everything works fine...

mib1185 commented 2 months ago

Hi @tksolution the provided log file is not with enabled debugging for the integration as requested in https://github.com/home-assistant/core/issues/118244#issuecomment-2134008337 - please follow the comment and provide a log file with enabled debugging, thx

wettermann32 commented 2 months ago

smae here, no mor connection to all smarthome devices from avm. Log: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/fritzbox/coordinator.py", line 152, in _async_update_data new_data = await self.hass.async_add_executor_job(self._update_fritz_devices) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/fritzbox/coordinator.py", line 106, in _update_fritz_devices self.fritz.update_devices(ignore_removed=False) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/fritzhome.py", line 180, in update_devices device = FritzhomeDevice(self, node=element) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyfritzhome/fritzhomedevice.py", line 38, in init super().init(fritz, node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomeentitybase.py", line 28, in init self._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/fritzhomedevice.py", line 41, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicealarm.py", line 18, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedeviceblind.py", line 18, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicebutton.py", line 17, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicehumidity.py", line 18, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicelevel.py", line 19, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicelightbulb.py", line 25, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicepowermeter.py", line 21, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicerepeater.py", line 16, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedeviceswitch.py", line 20, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicetemperature.py", line 19, in _update_from_node super()._update_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicethermostat.py", line 40, in _update_from_node self._update_hkr_from_node(node) File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomedevicethermostat.py", line 57, in _update_hkr_from_node self.target_temperature = self.get_temp_from_node(hkr_element, "tsoll") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyfritzhome/devicetypes/fritzhomeentitybase.py", line 79, in get_temp_from_node return float(self.get_node_value(elem, node)) / 2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: could not convert string to float: ''

wettermann32 commented 2 months ago

all Updates on fritzbox and homeassiatnt are on todays versions

wettermann32 commented 2 months ago

i am afraid to send the full logfile as requested from you in earlier post since i do not understand what private information im am sending to public then. If you can better tell what are you searching for i could send the requested snipet?

mib1185 commented 2 months ago

Unfortunately, because it is an unknown issue, I can't tell what I'm searching for - I just need to understand what happens, which data does the frirzbox send to HA and was is HA doing with it. Nevertheless, I fully understand your concerns, so feel free to contact me on Discord

wettermann32 commented 2 months ago

Hi did some logfile reading. I seems to be related to my Fritz DECT 440 Thermostat, and there to a function in FritzboxSmarthome you can add two or more HK301 to a group. Find attached the part of the logfile where it happens. I have change some long Hex-Codes to "eeeee..." by search an replace for privacy reasons (i have no idea what do the mean). So hopefully i did not change important information here. All other AVM DECT-devices (2 301 Thermosatats and 4 200-Switches) did not produce an error. but are not available in homeassistant. Also the battery on the DECT301 where low. But that happened often before. logfile_send.txt

wettermann32 commented 2 months ago

I have now deleted the thermosatat group in FritzboxSmarthome. Now all other DECT devices are back in homeassistant and usable. But now it seems to me that AVM did translate all sensor names to german (in my case). e.g. "power_consumption" on a DECT200 is now "Leistung". This is resulting to float conversion errors if you use these names in templates, since the values are then unknown. (yes i know i should have set a default value :-)). Best

mib1185 commented 2 months ago

logfile_send.txt

indeed this was helpful - the group did not return any current (<tist />) or target (<tsoll />) temperature values which leads to the ValueError while trying to read the tsoll . This needs to be solved in the lib ... will prepare a PR soon

wettermann32 commented 2 months ago

great, thanks for fixing the issue.