jrconlin / sunpower_hass

A Hacky script to fetch solar production information from SunPower
MIT License
18 stars 3 forks source link

Updates? #2

Closed rome1983 closed 3 years ago

rome1983 commented 5 years ago

Are you still working on this?

jrconlin commented 5 years ago

Sort of? It's complicated.

Recently (3 months ago?) sunpower started rolling out a change in how their site reports data. They also changed how logins are done and several other bits, including how often data is reported back to the site.

It broke my script, obviously, but I also was seeing HUGE outage periods that were later back-filled. Even now, my dashboard lags "real time" by about an hour. I'm hoping that this is just Sunpower working out the kinks on their new system (and I say that as I look at the orange "Display of data may be intermittent. Learn more." banner on https://monitor.us.sunpower.com/#!/dashboard.

I swear I'm about this >< close to just building a MITM box for my device Wifi and intercepting the damn data from the panel controller box.

image (It's 16:50. Do you know where your power graphs are? We don't.)

So... it's not dead, yet. But I'm not going to waste hours trying to crack a broken system that may get massively rewritten when some SunPower engineer finally figures out their new reporting, either

jrconlin commented 5 years ago

not_dead :notes:I feel happy, I feel happy...:notes:

rome1983 commented 5 years ago

Yeah the monitoring is worthless right now. I was hoping the enphase envoy integration worked since I have IQ7 inverters. Looking forward to your updates. Thanks

rome1983 commented 4 years ago

Hi, have you seen this? https://blog.gruby.com/2020/04/28/monitoring-a-sunpower-solar-system/

jrconlin commented 4 years ago

I have not! Very cool and beats me trying to MITM the box.

Does require a bit of extra gear, but seems straight forward enough.

FWIW, the latest changes seem stable, but wow, only hourly updates, and the site has terrible response. If I go the Pi route, might just drop the box from the net.

On Fri, Sep 25, 2020 at 12:32 PM rome1983 notifications@github.com wrote:

Hi, have you seen this?

https://blog.gruby.com/2020/04/28/monitoring-a-sunpower-solar-system/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jrconlin/sunpower_hass/issues/2#issuecomment-699114756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAIXKZSIDZKJCN6P7LI25TSHTV3VANCNFSM4JCM6TPA .

rome1983 commented 4 years ago

I had a pi 2 just collecting dust. It fits comfortably inside the PVS6 with the official pi wifi adapter.

jrconlin commented 4 years ago

Huh, neat! I had a rpi 3 that works pretty well with it. Managed to write up a crappy python cgi that dumps the attributes and does the right sampling.

Going to need to dork with this a lot more before I can put together something I'm happier with, but this is a helluva better start.

Also, a bit surprised that there's a cell connection in there. I wonder what that's used for?

rome1983 commented 4 years ago

No idea about the cell connection.

rome1983 commented 4 years ago

https://github.com/xlukose/sunpower-pvs-exporter

I was able to get this working. I got all the containers running on my NAS. Next is to grafana up and running. I scrapped the home assistant thru nodered because grafana looks good.

madrobby commented 3 years ago

If anyone is interested, I've pushed an updated version of this repo with an equally hacky version that works for the current Sunpower website as of 12/29/2020 at https://github.com/madrobby/sunpower_hass

You will need to add an "address" field to your config file (you can spy on what that is if you inspect the URLs the Sunpower website uses when it accesses data while loading).

jrconlin commented 3 years ago

First off: (blah, yeah, looks like the "API" changed again. Thanks @madrobby.

Secondly: Looks like the addressId is in the authenticate response. (looks like there's the potential for multiple of these, too.) Aaaand, apparently I never bothered to commit the changes I was working on. FWIW, they're in the api_v3 branch now. FWIW, they're not drastically different than the fork.

Thirdly: I'll admit, I've kinda given up on chasing after the ever "evolving" non-API in favor of an installed RPI in my monitor box that's directly polling the device and reporting out. I can monitor the temp of the RPI, the panel temps, panel production and a whole lot more, plus I can do it at 5 minute update intervals so clear win there.

I honestly don't expect to update this library further because of that, and frankly kinda suggest that if you REALLY want to have accurate data polling for your Sunpower device, buy a spare RPI3 (or like) and stuff it in to the controller box. It's actually very easy to get this rigged up and it works spectacularly well. (I'll write up something soon that describes what I did.)

jrconlin commented 3 years ago

Right, added the write up for how to get direct access of the Sunpower data, for the cost of an old Raspberry Pi and some extra cables you might have lying around.

Thanks all for the dope slap to actually write this up.