Page 1 of 2

API update

Posted: Thu Dec 21, 2023 2:56 pm
by aclang
Hi,
My inverter stopped conversing with HomeAssistant at 02:00 on the 20th Dec. I note from the FoxESS API page (https://www.foxesscloud.com/public/i18n ... ument.html) that an update emerged on 20th Dec. Are the two issues related ?
Thanks,
Alan

Re: API update

Posted: Thu Dec 21, 2023 3:49 pm
by leonb
Hi,

I'm getting the same issue. 2:52am on the 20th was the last data the API returned.

Looking at the HA debug logs the authentication is returning an error 'HTTP 406 Not Acceptable'.

I've been getting plenty of HTTP 500 errors on the foxesscloud website today as well.

Leon

Re: API update

Posted: Thu Dec 21, 2023 4:42 pm
by davidpeacock
I was a happy user of the IOS app “”Energy Stats” to monitor my installation. This stopped working earlier this week, and after contacting the developer got the email below. Seems Fox have locked down the API :roll:

Email from Energy Stats developer:

If you're an Energy Stats user then unfortunately it will no longer work. Recently FoxESS have added the requirement for all API requests to be HMAC signed and therefore only from known clients, ie. theirs.

This means Energy Stats, Home Assistant (via Cloud), Tony M's Python scripts won't work any more without serious reverse engineering of their web code to determine the secret key and algorithm which I'm not prepared to do.

Thanks for all your support over the last year, we got to nearly 6k installs. I hope that if anything the development of ES helped FoxESS understand what the community want from an end user app.

I'll be removing Energy Stats from the App/Play Stores until anything changes. I am currently in talks with Fox about this and will re-publish the apps if the situation changes.

Re: API update

Posted: Thu Dec 21, 2023 4:54 pm
by phoenix66
For those who haven't already heard, Fox will be reverting the change that caused this tomorrow, so 3rd party integrations should start working again.

Re: API update

Posted: Thu Dec 21, 2023 4:58 pm
by davidpeacock
Thanks for that update phoenix66 :)

Fingers crossed…..

Re: API update

Posted: Thu Dec 21, 2023 5:37 pm
by aclang
Thanks Everyone. At least it's nice to know i didn't break it!

Happy Christmas to All!

Re: API update

Posted: Tue Feb 20, 2024 5:53 am
by reef
So, energy stats is no longer working again. There's a message when you go into the app saying he'll update as soon as possible but the list of limitations he's having to deal with in the new API means it'll probably be a shadow of its former self.

It's particularly annoying as I now will have no idea what my PV are generating accurately. I run a dual inverter setup so it's impossible to calculate. Energy stats could calculate it all but its still beyond Fox it seems.

It's all very disappointing. I havent used the old Fox v1 app in ages and forgot how bad it is. Such a shame.

Re: API update

Posted: Tue Feb 20, 2024 8:10 am
by Dad
Completely agree.

It wouldn’t be so bad if Fox provided a good app themselves with the data that users are looking for in a clear and concise manner. But they don’t.

Re: API update

Posted: Tue Feb 20, 2024 10:24 am
by RedBaron
TonyM1958 on github has 'published' a python library to access the new openAPI. Have used a previous version of his library, before openAPI, with great success.
HOWEVER - I cannot get the Foxess Cloud site to issue me with an API key - it just throws an API Error 500 and you have to log back in.

Is anyone else having the same problem, or alternatively can you get the site to issue your api key?

Re: API update

Posted: Tue Feb 20, 2024 11:11 am
by Dave Foster
Just a quick note to say we’re all working on it.

Al is looking after the Energy Stats, Tony M on his Jupyter cloud access suite and i’m on the FoxESS cloud integration - bear with us - FoxESS have taken us all by surprise but it’ll be ready shortly - Al will be pushing new apps to the stores.

On the limitations, that is an old error message - the developers have been working with FoxESS in the backgroiund for the last month - most of those limitations have now been overcome.
RedBaron wrote: Tue Feb 20, 2024 10:24 am Is anyone else having the same problem, or alternatively can you get the site to issue your api key?
Yep, we’re also chasing them to get that sorted 👍

Re: API update

Posted: Tue Feb 20, 2024 11:57 am
by Dave Foster
RedBaron wrote: Tue Feb 20, 2024 10:24 am HOWEVER - I cannot get the Foxess Cloud site to issue me with an API key - it just throws an API Error 500 and you have to log back in.

Is anyone else having the same problem, or alternatively can you get the site to issue your api key?
It is working again, you can now get your api_key

You can now download the latest version of Energy Stats which uses the openAPI

For users of FoxESS home assistant cloud integration, the latest version is also ready to download on github.

Re: API update

Posted: Tue Feb 20, 2024 12:49 pm
by Dad
As always thanks for the updates Dave.

Slightly off topic (or is it?), do you know why the Fox app doesn’t have an accurate daily PV generation value on the Home Screen (like Energy Stats) as it’s probably the single most basic value a user looks for. It seems such an obvious gap in functionality.

Having to make calculations or indeed dust off the soldering iron to surface some of this data just seems ridiculous to me. It should just be standard data.

Thanks again.. do appreciate all the hard work you guys do for us !

Re: API update

Posted: Tue Feb 20, 2024 1:46 pm
by RedBaron
OK, the Error 500 finally gave up and I managed to get my API key sorted.

Re: API update

Posted: Tue Feb 20, 2024 1:49 pm
by Dad
Updated the Energy Stats app and applied the API key and all working as previously - including the daily PV figure.

Re: API update

Posted: Tue Feb 20, 2024 1:49 pm
by Dave Foster
Dad wrote: Tue Feb 20, 2024 12:49 pm As always thanks for the updates Dave.

Slightly off topic (or is it?), do you know why the Fox app doesn’t have an accurate daily PV generation value on the Home Screen (like Energy Stats) as it’s probably the single most basic value a user looks for. It seems such an obvious gap in functionality.

Having to make calculations or indeed dust off the soldering iron to surface some of this data just seems ridiculous to me. It should just be standard data.

Thanks again.. do appreciate all the hard work you guys do for us !
I'm not sure of the reason but it has to be the single most asked for feature on the app - the strangest thing is that the inverter does actually report this to the Fox cloud but the cloud never reveals it in any of its data streams as if they forgot to store it in their database when they first started logging.

It was asked recently and i'm pretty sure the FoxESS UK support manager said it will be making it into the V2 app (but wouldn't promise when)

Re: API update

Posted: Tue Feb 20, 2024 1:56 pm
by RedBaron
Like to echo the comments by 'Dad' above: -
Many thanks to Dave, Al, Tony for all their speedy work to catch up with the changes from Foxess.

Incidentally, I just tried downloading the latest Energy Stats from Apple, but it still wanted my password rather than my API key, so presumably the App Store has not fully updated yet. Will try again in a few hrs.

Re: API update

Posted: Tue Feb 20, 2024 2:11 pm
by Dad
I may have found a small bug in the updated Energy Stats app. When the solar is putting power back into the battery the value used to be green. When taking power from the battery the power is depicted as red. Now it appears that the value is depicted as red regardless of topping up or discharging.

Also says under the battery symbol that the battery will be empty in xx days/hours whereas it should be saying it will be full up as it is actually putting power in. The battery value is going up so it does work.

Makes no difference, just an observation!
IMG_1031.png

Re: API update

Posted: Tue Feb 20, 2024 2:16 pm
by Dad
Another screenshot showing same issue:-
IMG_1032.png

Re: API update

Posted: Tue Feb 20, 2024 3:07 pm
by Dave Foster
Dad wrote: Tue Feb 20, 2024 2:16 pm Another screenshot showing same issue:-

IMG_1032.png
Looks like Al has already picked up on that bug, he asks to update to V2.1 when you can.

Re: API update

Posted: Tue Feb 20, 2024 4:11 pm
by Dad
Thanks. Still v2.0 on App Store but will keep an eye out.

Re: API update

Posted: Tue Feb 20, 2024 7:16 pm
by reef
I'm on v2.2 from play Store and still have this bug. Is that the latest version?

Daily usage is also blank for me.

Edit: found the option to enable it. It was off by default.

Re: API update

Posted: Tue Feb 20, 2024 8:02 pm
by Dad
I emailed Al and he is aware of the battery flow bug (it’s actually a second bug as it is now showing the flow the other way around) and will release a new version in the morning.

Re: API update

Posted: Tue Feb 20, 2024 8:35 pm
by Dave Foster
Latest state of play is Android 2.3 now in the store, Ios 2.2 coming very soon and these should be the flow fixes

Re: API update

Posted: Wed Feb 21, 2024 10:32 am
by leonb
Just to echo others and say a big thanks to all for updating the app and the HA integration. You forget how reliant you become on these!

:)


One thing I've noticed about the new 'Residual Energy' value is that it seems to have the wrong calculation, so on mine it shows 0.152kwh instead of 15.2kwh.

Re: API update

Posted: Wed Feb 21, 2024 1:16 pm
by Dave Foster
leonb wrote: Wed Feb 21, 2024 10:32 am One thing I've noticed about the new 'Residual Energy' value is that it seems to have the wrong calculation, so on mine it shows 0.152kwh instead of 15.2kwh.
Can you confirm is that low value on the app or the HA cloud integration please