Options for Sunpower solar integration?

If anyone tries to get this working on a Raspberry Pi 4, you may find that it won’t connect to WiFi once plugged into the USB port on your PVS (I have a PVS5). It appears that the USB ports don’t provide enough power for a Raspberry Pi 4. Symptoms of this problem include failing to join WiFi, red power LED off or flickering, and “Under voltage” reported in the syslog (use “journalctl --no-pager -b-1 -xe” to show the last boot log).

Spent a weekend trying to figure this out, so sharing here in case anyone else runs into the same problem. I was eventually able to get it working by disconnecting the case fan and disabling Bluetooth, HDMI, etc. (see RPi4 - Power Savings - Page 3 - Raspberry Pi Forums for suggestions).

I’ve managed, using krbaker/hass-sunpower to get energy recordings to/from grid → but I’m struggling to find a value to use for my actual solar production. Has anybody got that working?

Update I found it!

sensor.lifetime_power was the value I was missing…

I setup mine like this, and compared it to Sunpower’s monitoring tool. Looks correct

Kudos to Dolf and Keith for making it easy to setup, and a fun weekend project.

Todd,
I like your approach with Rainforest Eagle 200. That is what I have in addition to a SunPower Equinox panels and PVS-6. I just found this thread tonight and just got HA running last weekend on a Raspberry Pi (I’m a refugee from Inston world).

I find that my data from SunPower is a bit unreliable. I check it against my Eagle and it’s off quite a bit. I have fought with SunPower support and in the end they pointed the finger at CertaSun (installer of PV system). I grew tired of fighting with their condescending engineers (I am an engineer myself so I’m probably their worst nightmare of a customer :slight_smile: ).

I also have a Sense monitoring system and plan to add the solar option soon. I have the most confidence in the Sense and Eagle systems and I compare against my ComEd bill here in the Chicago area. I have a +10kW system installed so I want to keep a better eye on things than SunPower provides.

So my point, though long-winded, is that I plan on integrating Sense (done, but no solar option yet), Rainforest Eagle 200 (done) and SunPower PVS-6 monitor all to my HA install and then aggregate all the data into something that makes sense (no punn intended).

I’ll update this thread in a few weeks if I get this done, with my progress.

Dave

There appears to be little mention of utilizing vlans? If you already have the equipment setting a vlan is relatively simple and painless (at least via UniFi). No routers, raspberry pis, configuring proxies or any other bridging solution is required. First vlan I ever setup and it worked the first time.

I am wondering the same thing about using a vlan. I have a “Plugable” USB3-E1000 adapter from Amazon, plugged into my RPi4 running HA. I ran a new conduit run to my PVS-6 and have two (2) ethernet cables run into the house so I do not need a RPi Zero, or router or anything else (I hope).

Can I just run a second NIC (USB3-E1000) as my interface to the PVS-6? I see the following when I check network info via CLI:

image
I think the NIC is “enp1s0u2” but it is not enabled. If I get this NIC enabled and let the PVS-6 assign an IP address to it, shouldn’t this work?

Ok it did work! It was as easy as enabling the NIC. I used the official Terminal & SSH and configured the NIC with the following commands:

ha> ha network update enp1s0u2 -e
ha> ha network update enp1s0u2 --ipv4-method auto

Both commands returned “Command completed successfully.”
I then added the SunPower integration per instructions using 172.27.153.1 and everything came in. I now have 31 devices (28 panel system) and 331 entities. Now the fun really begins!

DZ

Hi,
I tried following these steps laid out by @tsaylor with an old ASUS RT-AC66U router I had running the latest beta firmware v9.x from ASUS. I am connecting to the router using a laptop via ethernet cable to one of the LAN ports. I have turned off the wifi radio in the laptop.

I put the outer into repeater mode. There are very few options once that is complete. In repeater mode, I can only set the IP address, subnet mask, gateway and DNS server addresses.

Nothing I have tried has resulted in being able to connect back to the ASUS router from the laptop. I have not tried connecting to the PVS5 at this point.

I set the LAN IP in the ASUS router to 172.27.153.2 and the gateway to 172.27.153.1 with the DNS servers at 1.1.1.1 and 8.8.8.8

Before changing the IP address over to 172.27.153.2, I was successfully able to connect to the internet via the router acting as a repeater. I have also tried leaving the gateway at 192.168.1.1 with no luck.

Is it just that the ASUS router does not have the capability to do what needs to be done or what am I missing here?

Thanks!

Hi @ctbaker. I’m not familiar with those details and I don’t see a great online manual describing all the options there so I can only take a few guesses. One question that comes to mind is whether the router will allow you to define a forwarding rule which will also be needed eventually.

But first, the basic config. I think your laptop is basically taking the place of the PVS5 for now, so I’d expect it to have an IP address somewhere in the 172.27.153 range. Checking internet access is one measure of connectivity, although that piece is not needed at all for this integration (in my case I disallowed internet access for it, and all of my tests were coming from the other side, with a laptop on the main network trying to contact the PVS5 subnet). I’m thinking you set the LAN IP correctly, but the gateway IP should probably point to the “other router” (the one you’ve connected to via Wi-Fi). Is that other router at 192.168.1.1? I would expect that you can’t get out to the internet if the gateway is wrong, or if the laptop’s IP doesn’t match the subnet for the LAN IP that was assigned.

hey guys and gals… I’m late to the party as usual… a few failed attempts using HA in the past, recently decided to give it another shot after finding 66pg PDF online about this pi proxy setup for SunPower systems… took me a couple of days, got it up and running… oh, WOW, data…

a quick thanks to Dean, Scott, and anyone else that’s mentioned in the document I found… looks like you guys are all here too… found this today, after playing with my new data over the past couple of weeks…

I have a SunPower system, installed Oct 2018, PVS5X, (17) 360W panels, central CA SoCal Edison territory… I also have Sense, EAGLE-200, Flume (water meter) and planning on setting up SDR for gas meter…

so I setup HA originally on a pi3b, but NodeRed wouldn’t work right (taking hours to update)… so I installed docker on my home media server, installed HA there, and wow, much much faster (less than a minute compared to the pi) and stable than running on a pi… anyway, 194 SunPower entities later, I can’t believe the info I have now… when my system was first put online, my installer gave me a login to their system, being able to see each panel power and such, but this has even more… sunpower took my login away after about a year and wouldn’t give it back, so I’ve been very unhappy not knowing the true status of my system… but with this, I even have the panel temps… wow…

I got my energy dashboard setup, now I need to setup the grafana/influxdb stuff… and I’m getting my installer to send me a diagram of where my panel s/n numbers are installed in my array, the plan is create a dashboard with my panel layout and the individual data of each panel… much like the sunpower installer access… I also want to find a way to push my info to PVOutput… I’ve been doing it everyday by hand since Oct 2018… now its time to automate it… my 3rd goal here is to finish my panel auto-cleaning system… I’m going to setup and use 2in tall rainbird popup sprinklers around my array to keep it clean… I already have all the parts, just need the time to sit down and finish it… the rainbird controller is already added to my HA install…

let me know if there is anything I can help anyone with… again, glad to have finally found this…

Thanks to everyone for this thread, and especially to @Keith_Baker for the integration!

My Sunpower system (PVS6, 37 360W AC panels) was installed last week and activated today. I ran two Cat6 cables to the PVS and patched the LAN1 and LAN2 ports to my network switch.

LAN2 is connected to a VLAN that only allows outbound access to the Internet and nothing else; that allows the PVS to connect to Sunpower.

LAN1 is connected to a VLAN that has only one other device, which is a Raspberry Pi 4 that was already running some other software including NGINX. The switch tags the LAN1 packets so that the RPi can see them on a distinct network interface, and NGINX provides a reverse proxy to the PVS’s web interface.

Once I got that all working I installed the integration into HA, gave it the hostname of the proxy, and a few seconds later it had added 403 entities to my HA installation :slight_smile:

@Keith_Baker I owe you some adult beverages of your choice!

1 Like

I’m having trouble setting up the GL-MT300N-V2 router. I’ve used routers before, but I can’t seem to get port 8080 open. Device is hooked to my WiFi on the wan side (google wifi) just fine, I changed the LAN IP to 172.27.153.10, I set up the port forwarding, opened ports 80 and 8080, went to advanced wifi settings to make sure wan zone to lan is set to Accept. No problem accessing router and configuring on my WiFi network. But when I check open ports using Fing, 8080 doesn’t show as open. And the SunPower HA integration says cannot connect when I enter the router ip (on my network, 192.168.86.45:8080). Any help would be appreciated.

The Sunpower box doesn’t listen on port 8080, only on 80 and 443. You only need port 80 for the integration.

I’m using port 8080 on the WAN side of the router, to connect to my WiFi on a different subnet. The port forward rule is supposed to let me connect to port 8080 through the WAN which forwards to port 80 on the SunPower box, on it’s subnet.

1 Like

It sounds like your setup is the same as mine, and it sounds like you already went through the steps from my notes in that earlier post. For reference and in case it helps, my Firewall Zones settings look like this:

…and the settings for that “wan” zone look like this: image

Looking at this now, I’m not sure if this is even a correct approach, as putting everything into “Covered networks” is putting lan and wan into the same “zone”. That’s what I had done to get this working, and this is possibly the difference between your setup and mine. But it seems like it is cheating, and there should be a better approach that retains separate zones.

My settings look just like that. Unless I screwed up another setting along the way of troubleshooting, I can’t seem to nail down the problem. I’m going to reset the device and start from scratch.

Hmm, not sure what might be wrong there. The only other thing that comes to mind is the port forwarding rules (shown here from the Advanced screens). But I’m guessing you have this already.

My screens look a bit different, maybe because of a firmware upgrade. But these look the same.

And the Port Forward.

Yeah that looks very similar. And if you click “Edit” on the wan zone, you should be able to see the “Covered networks” setting from my second screenshot. That’s the part where I’m now thinking I cheated by putting wan/lan in the same firewall zone rather than using forwarding between the zones – thinking about that again it probably makes more sense to accept wan => lan rather than combining zones. But for now I’ll leave it alone since it is working for me the way I have it.