-
Notifications
You must be signed in to change notification settings - Fork 37
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 FoxESS data: Expecting value: line 1 column 1 (char 0) #177
Comments
I'm experiencing the same problem. Usually it happens a few times a day, every day. Very annoying because I have a couple of utility meters that depend on the data that I have to manually calibrate each day now. Sometimes I only loose a couple of readings of the sensor.battery_soc entity. Here is my log: Logger: custom_components.foxess.sensor Unexpected error fetching FoxESS data: Expecting value: line 1 column 1 (char 0) |
at least i'm not alone <3 |
i created a fix. I forked the code .. and requested for a pullrequest to get it back into here. i assume it will be merged soon here. Enjoy |
Thank you for your work! |
I'm going to test it now! Thanks! |
2023-06-25 22:03:46.756 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform foxess |
Thanks! Actually it looks very promising for me, as issue #156 does NOT persist with your changes! Before it was like below and counters were raising up during the time:
Now, after few hour of testing
Looks awesome! |
Seeing this error as of last night around ~ 0200 UTC. Rebooted HA but still no dice:
I didn't change any of the creditials recently. I had updated to the latest HA core and HAOS but the system had worked fine after this for about a day, so I don't think it's related. |
FoxESS appear to have disabled private access to their cloud again, this was always going to happen but the timing of it seems to have taken everyone by surprise, so I suspect once FoxESS UK support get involved with their opposite numbers in China that change will be reversed. The OpenAPI version is written and working, it needs a personal_api_key to operate and you get that from the FoxESS cloud platform - but at the moment the request a key isn't working either, if you have a personal api key already their openAPI will work, but until they get that request screen working again there's not much to do - i've just given FoxESS UK support a nudge. I'll post more when I have updates |
I see. Couldn't obtain the API key either. Let me know if there is anything I can help with. |
API key generation is back online and 0.33 appears to work fine! Thanks a lot! |
Can also confirm I've been able to update to the open API version and generate an API key which seems to be working so far. |
Thanks again, I have not seen any issues since the switch. Since the OpenAPI server limits the number of accesses - could it be an interesting feature to do the queries in a non-linear way, for example do less queries during the night and more during daytime? |
@xrad i’ve been working on improving the pacing mechanism for api calls. |
Makes sense. I totally ignored the datalogger invervall in my speculation. Cheers! |
HA 2023.5.3
foxess-ha version: v0.26
Logger: custom_components.foxess.sensor
Source: custom_components/foxess/sensor.py:276
Integration: foxess (documentation, issues)
First occurred: 23 maggio 2023 alle ore 16:33:05 (4 occurrences)
Last logged: 23 maggio 2023 alle ore 16:58:25
Unexpected error fetching FoxESS data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 217, in _async_update_data
return await self.update_method()
File "/config/custom_components/foxess/sensor.py", line 141, in async_update_data
await getAddresbook(hass, headersData, allData, deviceID, username, hashedPassword,0)
File "/config/custom_components/foxess/sensor.py", line 276, in getAddresbook
response = json.loads(restAddressBook.data)
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/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)
The text was updated successfully, but these errors were encountered: