earion68 / hass_custom_bbox

Custom Home Assistant integration for Bbox
6 stars 3 forks source link

Not stable, devices and sensors "Away" one out of 2 #10

Open YannOrieult opened 1 week ago

YannOrieult commented 1 week ago

Hello, I have a Bbox and Home Assistant OS installed on a raspberry Pie 3. I have been using this custom Bbox integration for years now, mostly to manage presence, however, it's still not very stable. Once on two it's working, my devices are accurately "Home" or "Away" and, once on two, they are all "Away". Even though they are connected to the Bbox Wifi. Restarting home assistant seems most of the time (80%) to fix the issue. Is it a known issue? Are there some workarounds? Thanks.

YannOrieult commented 5 days ago

There are some logs showing a custom Bbox error:

Logger: homeassistant
Source: custom_components/custom_bbox/bboxApiCall.py:62
integration: custom_bbox ([documentation](https://github.com/earion68/hass_custom_bbox/))
First occurred: 7:11:28 PM (1 occurrences)
Last logged: 7:11:28 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 466, in async_device_tracker_scan
    found_devices = await scanner.async_scan_devices()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 984, in async_scan_devices
    return await self.hass.async_add_executor_job(self.scan_devices)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/custom_bbox/device_tracker.py", line 64, in scan_devices
    self._update_info()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 184, in wrapper
    result = method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/custom_bbox/device_tracker.py", line 87, in _update_info
    box.login(self.password)
  File "/config/custom_components/custom_bbox/pybbox.py", line 150, in login
    response = api.execute_api_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/custom_bbox/bboxApiCall.py", line 62, in execute_api_request
    raise Exception('Error {} with request {}'.format(
Exception: Error 400 with request https://mabbox.bytel.fr/api/v1/login