Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error fetching system data - SFR Box integration #104249

Closed
Maison-GIDON opened this issue Nov 20, 2023 · 7 comments · Fixed by hacf-fr/sfrbox-api#216 or #104580
Closed

Unexpected error fetching system data - SFR Box integration #104249

Maison-GIDON opened this issue Nov 20, 2023 · 7 comments · Fixed by hacf-fr/sfrbox-api#216 or #104580
Assignees

Comments

@Maison-GIDON
Copy link

The problem

Hi,

Here is the continuation of the previous ticket created : #104246

Errors are regularly occurring with SFR Box Integration :

Unexpected error fetching system data: 2 validation errors for SystemInfo alimvoltage value is not a valid integer (type=type_error.integer) temperature value is not a valid integer (type=type_error.integer)

I've got this on the api webpage : http://#ip_of_my_sfr_box#/api/1.0/?method=system.getInfo

<rsp stat="ok" version="1.0">
<system product_id="BOX8F-UBE-r0" serial_number="5054XXXXXXXXX" mac_addr="6C:XXXXXXXXXX" net_mode="router" net_infra="ftth" uptime="1888" version_mainfirmware="3GN9030001R13" version_rescuefirmware="" version_bootloader="" version_dsldriver="" current_datetime="20231120110042" refclient="" idur="RQUUZOI" alimvoltage="3342" temperature="26000"/>
</rsp>

I just did enable debug on sfrbox integration and I'll send you the logs when the error reappears.

Thanks.

What version of Home Assistant Core has the issue?

core-2023.11.2

What was the last working version of Home Assistant Core?

none

What type of installation are you running?

Home Assistant OS

Integration causing the issue

sfr_box

Link to integration documentation on our website

https://www.home-assistant.io/integrations/sfr_box/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sfr_box.coordinator
Source: helpers/update_coordinator.py:290
Integration: SFR Box (documentation, issues)
First occurred: 01:59:02 (2 occurrences)
Last logged: 07:29:37

Unexpected error fetching system data: 2 validation errors for SystemInfo alimvoltage value is not a valid integer (type=type_error.integer) temperature value is not a valid integer (type=type_error.integer)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sfr_box/coordinator.py", line 37, in _async_update_data
return await self._method(self.box)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sfrbox_api/bridge.py", line 161, in system_get_info
return SystemInfo(**xml_response.attrib) # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/dataclasses.py", line 325, in new_init
self.pydantic_validate_values()
File "/usr/local/lib/python3.11/site-packages/pydantic/dataclasses.py", line 425, in _dataclass_validate_values
raise validation_error
pydantic.error_wrappers.ValidationError: 2 validation errors for SystemInfo
alimvoltage
value is not a valid integer (type=type_error.integer)
temperature
value is not a valid integer (type=type_error.integer)

Additional information

No response

@home-assistant
Copy link

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

Code owner commands

Code owners of sfr_box 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 sfr_box Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


sfr_box documentation
sfr_box source
(message by IssueLinks)

@epenet
Copy link
Contributor

epenet commented Nov 20, 2023

These XML lines should also appear in your debug file.
It seems that sometimes the XML is missing information so you will need to post the log file after the error has occured.

@Maison-GIDON
Copy link
Author

Maison-GIDON commented Nov 22, 2023

Hello @epenet !
You'll find the debug file logs below (the error occurred at 08:19:42 this morning)
I hope it will help you to find the problem with this FTTH Box.

I'd like to add that the "Reboot" button doesn't work either (if you need log too, i will try do the logs)

Thanks !

home-assistant_sfr_box_2023-11-22T18-46-01.435Z.log

@epenet
Copy link
Contributor

epenet commented Nov 27, 2023

The validation errors should be fixed when the next release of sfrbox-api is available.

Regarding the reboot button, does it work if you press the button a second time?
It would be good to have some logs also for this.

@Maison-GIDON
Copy link
Author

The validation errors should be fixed when the next release of sfrbox-api is available.

Thanks !!!

Regarding the reboot button, does it work if you press the button a second time? It would be good to have some logs also for this.

You'll find it below (I tried 4 times : nothing happened with the box)

Regards,
Ozz.
home-assistant_sfr_box_2023-11-27T19-53-52.827Z.log

@Maison-GIDON
Copy link
Author

Hello @epenet , did you receive the logs ?

Do I have to create a new issue ?

Thanks.

@epenet
Copy link
Contributor

epenet commented Nov 30, 2023

It seems that you are getting error 901 - which does not currently reset the token.
It might be fixed via the previous patch, so please wait until 2023.11.4 is released, and try again after that.

If it still doesn't work then, please open a new issues and provide fresh logs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants