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

All sensors unavailable (Kiosk) #143

Closed
acombos opened this issue Jan 26, 2024 · 5 comments
Closed

All sensors unavailable (Kiosk) #143

acombos opened this issue Jan 26, 2024 · 5 comments
Labels
Huawei Issue Issue with Huawei, contact Huawei waiting for feedback Further information is requested

Comments

@acombos
Copy link

acombos commented Jan 26, 2024

As of a few hours ago, all devices exposed in HA are unavailable.

HA Version:
Core 2024.1.5
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0

Integration Version:
v3.0.2

Using Kiosk mode, the URL is still valid (checked on browser, was set ~2 months ago.

Logs show:

Logger: custom_components.fusion_solar.sensor
Source: helpers/update_coordinator.py:300
Integration: FusionSolar ([documentation](https://github.com/tijsverkoyen/HomeAssistant-FusionSolar), [issues](https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/issues))
First occurred: 10:02:02 (8 occurrences)
Last logged: 11:12:03

Unexpected error fetching FusionSolarKiosk data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/sensor.py", line 79, in async_update_kiosk_data
    data[f'{DOMAIN}-{kiosk.id}'] = await hass.async_add_executor_job(api.getRealTimeKpi, kiosk.id)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/kiosk/kiosk_api.py", line 37, in getRealTimeKpi
    jsonData[ATTR_DATA] = json.loads(html.unescape(jsonData[ATTR_DATA]))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

No changes or updates were made between yesterday (working normally) and today (not working).

@tijsverkoyen tijsverkoyen added waiting for feedback Further information is requested Huawei Issue Issue with Huawei, contact Huawei labels Jan 26, 2024
@tijsverkoyen
Copy link
Owner

I would suggest to give it some time. As there are already many other issues that resolved themself after a while, or after a reboot of Home Assistant:

@migube
Copy link

migube commented Jan 26, 2024

same issue since 2 days no more data, can it be they are working on the platform regardingAPI's? on the Fusionsolar site, there is data. and a mention about ongoing activities.
(I restarted HA)

@tijsverkoyen
Copy link
Owner

I don't know about Huawei infrastructure. I'm not related to them or working for them.
I just wrote this integration in my spare time to see data in my Home Assistant ;-)

If you are using Kiosk inside Home Assistant. I would strongly suggest to switch to the Northbound API. The Kiosk mode is using an undocumented API.

@AndreVde
Copy link

Hi all. Same problem here. Also using kiosk mode. The only way to repair this is to reïnstall the integration but after a few days it breaks again (url still works). Too bad I can't use the northbound api because my installer doesn't cooperate very well.

@acombos
Copy link
Author

acombos commented Jan 27, 2024

I confirm that today it works normally, without any further restarts of HA or reinstallations of integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Huawei Issue Issue with Huawei, contact Huawei waiting for feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants