it’s said if you don’t pay, you can only get the data locally in the app… thus there must be a way to make it happen but that is also something I am interested in.
Their API documentation is so well described it must be something nice to make, but I could use some help with temporarily accessing powerfox so that I can test whether the data is being fetched correctly.
Hi plaxtika, would you kind enough to tell me where in the home assistant I need to add the script for this to work? Both my powerfox and synology running home assistant are in the same network.
As there are some problems with the API calls to the powerfox backend currently, I tried to get the data directly from the device.
Took some time to figure it out, but I’m able to read the values now.
Working on integrating that in my ha config now
There’s a local RPC endpoint at http://IP of the device/rpc
All you need is the correct json payload for the RESTful sensor.
Returns json with the result encoded in the value result as base64 string.
Decoding that gives another json with all the data you need
Sounds great, i prefer to use a solution without any cloud connection. That’s why I also switched to a esp8266 meter reader. But using the powerfox hardware directly would be awesome.
hi klaas, sorry the late response.
powerfox makes a lot of problems the last 2 months. so I don’t think am integration through the cloud makes sense now.
but there is a possibility to switch to local data only…
I captured the HTTP Requests that the Android app did when switched to local mode.
As this is HTTP and no HTTPS, the request is readable with a packet sniffer.
Not sure, if this is the same for everyone.
As you can see, there are two A_Plus and A_Minus values. I didn’t see any differences. They were the same during my tests. Not sure if this is some kind of error checking.
Just found that those are HT and NT. Corrected in code
Just set your poweropti IP in resource
I return a json string for the next part (the sensors):
Can confirm this works perfectly. I changed the scan interval to 1 and now get essentially realtime power values. It might now be even faster than my Shelly 3EM…
I tested this in front of the actual meter and saw only minimal delay (maybe 1-2 seconds) and perfect accuracy from what I can tell
Compared to the Shelly, it is (obviously) a bit more accurate but the Shelly is about 1 Second faster to react to changes. I tested by showing both sensors on the dashboard and turning on the Toaster. Saw the uptick in consumption just slightly sooner with the Shelly, but it’s really negligible.
I can’t test reliability or anything yet, but I don’t see any reason for issues…unless Powerfox changes something deliberately.
Works for 8 hours now here.
Just let’s hope they don’t “close” the http backend with an “update” some time.
I changed my former web sensors to the new config, so energy dashboard still has all statistics
Yeah, I messed that up and the stats are now gone from my Energy Dashboard, but it’s Ok. My rooftop solar is only going to arrive next week, so that’s when the stats get interesting
Edit: I managed to get the stats back…all perfect now
this sounds great! I will test it tomorrow… to understand: an internet connection is not needed any more, or? so we cut the connection on the router an powerfox can’t change something an the software, right?