-
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! |
It looks like this problem is back. The integration was working well (thank you), but after restarting Home Assistant, it now fails to start: Traceback (most recent call last): |
Oops, I should have mentioned that I’m using version 0.43 of the integration, installed using HACs on Hass 2024.10.2. |
It’s the Fox OpenAPI that is currently down for all users - hopefully they’ll get it sorted soon 👍 |
It came back approx 2.25am this morning - working normally now. |
My Home Assistant needed a restart just now as the integration didn’t recover by itself.
Cheers,
Mark.
On 15 Oct 2024, at 09:04, Dave Foster ***@***.***> wrote:
It came back approx 2.25am this morning - working normally now.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABYNACO7WYYDW6UL7UHOO73Z3TEBBAVCNFSM6AAAAABP5N75XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJTGE3TIMJTGU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
@mt104 if you hadn't restarted HA yesterday after the error, there's a chance it would have re-connected ok, but the best advice is to restart your HA to be sure. |
Yes, I had restarted HA while the API was down to fix an unrelated problem. Next time I notice the API down I’ll try to leave HA alone to see if it recovers by itself.
Thanks,
Mark.
On 15 Oct 2024, at 09:26, Dave Foster ***@***.***> wrote:
@mt104<https://github.com/mt104> if you hadn't restarted HA yesterday after the error, there's a chance it would have re-connected ok, but the best advice is to restart your HA to be sure.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABYNACMUXCFCW54UOCILOATZ3TGTJAVCNFSM6AAAAABP5N75XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJTGIZDCOJWGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Daft question but is there a simple way of knowing it is down, or just the
fact we get no reply to an API request? My separate calls (i.e. not via
Home Assistant) were getting a 502 response.
Simon
…On Tue, 15 Oct 2024, 09:04 Dave Foster, ***@***.***> wrote:
It came back approx 2.25am this morning - working normally now.
—
Reply to this email directly, view it on GitHub
<#177 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD2M5DMCDCHOQNCG3JMJU3Z3TEA7AVCNFSM6AAAAABP5N75XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJTGE3TIMJTGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@ssherlock no there’s no other way of knowing, 503 is a fatal error and so you don’t get any supplemental status - I have an automation that watches my rvolt sensor and if it goes unavailable for 15 minutes it notifies me. |
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: