Options for Sunpower solar integration?

I worked on this over the weekend.

Used a Raspberry Pi 0W with an Ethernet Hat to be able to plug into the SunPower box. It took a few hours but I got it working. I followed @sgruby 's instructions for getting HAProxy setup on the Pi, but then used @Keith_Baker 's custom component instead of doing the much more complex NodeRED setup. This is probably the simplest option for other folks trying to get set up going forward.

In addition, I was able to get the Energy Dashboard working by following the customize.yaml workaround described by @mhutch here: https://github.com/krbaker/hass-sunpower/issues/8

Annoyingly, it doesn’t look like the Energy Dashboard does any kind of aggregation if I add each individual panel to the Solar Tracker.

It also looks like I have a similar problem to @tsaylor where my consumption meter is still showing 0 for most of the entities. Did you ever get this problem fixed?

@mhutch - I’m also curious about your solution to fix the backwards production meter. How does your template sensor work?

Yeah, energy dashboard isn’t doing much for me so far, hopefully in future versions. Currently I have an Eagle-100 that reports huge numbers periodically (they are lifetime totals, but somehow show up on the graph as huge bars occasionally). And all the separate inverters are listed but don’t seem to be doing much for the graphs. I don’t understand my dashboard currently but I haven’t spent a lot of time on it.

My zero consumption meter problem is for the totals, not for the inverters (just to be clear). No solutions for the produced/consumed totals, but the numbers appear to be coming that way out of the PVS5’s API so there’s nothing the integration can do about it (unless it wants to offer its own aggregation instead).

The template sensor simply subtracts the value from the value it was when I created the sensor:

template:
  - sensor:
      # PVS5 production is going backwards for some reason??
      - name: "PVS5 Production Fixed"
        unit_of_measurement: "kWh"
        state: >
          {% set pvs5_lifetime_production_reset = 5839.51  | float %}
          {% set pvs5_lifetime_production  = states('sensor.power_meter_pvs5XXXXp_lifetime_power')  | float %}
          {{ (pvs5_lifetime_production_reset - pvs5_lifetime_production) }}

Note that you’ll need to use customize.yaml changes to set the class/type of the template sensor:

sensor.pvs5_production_fixed:
  device_class: energy
  state_class: total_increasing
  meter_type: 1
  meter_type_name: ELECTRIC
  last_reset: "1970-01-01T00:00:00+00:00"

The newest version should set everything needed for energy monitor out of the box. I do wish energy monitor had a concept of contribution from panels to make up a whole system (for now I use the overall production monitor though each micro inverter has data usable in energy monitor too). I did find that the lifetime meters do ‘spin’ backwards which makes home assistant throw errors in the log, I think it does see some drain from either slight calibration errors or maybe drain from inverters not yet shutdown but producing less than they consume.

1 Like

Thanks a bunch Keith! Seems to work great now, I can finally use the “Energy Management”!

Do you have a more elaborate description somewhere of the different entity IDs in your integration, and what they do? Especially the ones for “sensor.power_meter_x”. Do not seem to find them described on the Github page, wiki or elsewhere on the page.

Say for example I want to add the GitHub - reptilex/tesla-style-solar-power-card: Home assistant power card mimicking the one tesla provides for the powerwall app. or gauges/graphs for:
kW from solar
kW from grid
kW for home
Total kW for system
etc.

What entity to use?

Thanks!

Most of the names for parameters come directly from the ‘api’ names on the PVS so I’d be guessing a bit in some cases but not a bad idea to put even those guesses together. Would be nice to track things like the fact that production meters can go backwards :slight_smile:

I followed @tsaylor 's instructions above and I have data flowing into Home Assistant via @Keith_Baker integration. I’m getting 14 inverter devices, 2 power meter devices and 1 PV supervisor device. They are all showing data.

What’s the best way to add this to the HA energy dashboard? Right now, it shows the power production of all my inverters separately. Is there a way to show the combined power production?

thanks!
Chris

Hi! I added these from Keith_Bakers integration:
Screen Shot 2021-11-03 at 11.26.18

Energy will show up like this after about 2-3 hours:

Interesting approach … I have a TPLink AC750 (wr902acv3) travel router - that I recently flashed with Open WRT and its just sitting around.

Seems like a much easier approach than mounting a PI in there… when I get around to playing with this I’ll give it a go.

And we are go!

Oddly enough it seems like the restAPI started timing out → things were working great a few hours ago and now nothing… is that normal?

That used to happen to me with the Pi-Zero-W, sometimes it would run for weeks, sometimes hours. Setup a cron to reboot every night, and it got better for a while, and then it started occasionally again!

After replacing the Pi with the GL-iNet travel router model GL-MT300N-V2, I have not seen any timeouts/dropouts, it has just worked.

has anyone tried getting this to work with an older monitoring system? i have two arrays on my roof and two separate monitoring systems, one PVS6 and also one older one, what i think what i have is a SMS 2.x, based on pictures in sunpower’s documentation…

I’m going to be setting this up on my PVS6 using the GL-MT300N-V2. I’d like to use the existing CAT6 connection instead of WiFi. How would using a hardwired connection change travel router configuration listed above by Todd Saylor?

On the setup page (First Time Setup - GL.iNet Docs), it specifies: " Note: GL-AR300M-Lite has only 1 Ethernet port which works as WAN by default. You can only connect to it via Wi-Fi when you first set up the router. Once you have connected to it, you can change the WAN port to LAN port in Internet so that you can connect to it via Ethernet cable.

Thank you for the documentation link. I believe the version I purchased has both WAN and LAN ports. I currently have a hardwired connection to the PVS6 as wireless is a bit weak where the PV6 is located. It looks like I’ll need to keep the wired connection as-is and setup a wireless connection as described by Todd.

As far as I know, all of them have 2 ports, but what they are saying here is, that only one of them can be used as a WAN-port (uplink-port on different network)! This is needed, since you need them on 2 different networks, or you will get problems, since the PVS runs its own DHCP-server, that we cannot control (as far as I know at least).

OK. I understand now. I’ll run it wireless according to Todd’s procedure. Router arrives tomorrow.

Well, instead of PVS on WAN and your network on Wifi, you would do PVS on WAN (same), but your network on LAN, and disable the DHCP for LAN in the GL-AR300M-Lite router, and use the one you already have in your existing network.

My Ubiquiti router is having difficulty maintaining a connection. Connections oscillate between the IP assigned by the UDMP (192.) and the IP assigned to the GL-iNet router (172.). Anyone have a suggestion how to correct this on the UDMP?

Need a link to the HACS repository. Couldn’t find it with search.

This is what I was saying about having one on the WAN and one on the LAN-side on the GL-iNet router above, sounds like you have both links (PVS and your router) on the LAN-side, and the DHCP servers are fighting each other!