Announcement

Collapse
No announcement yet.

Mirroring/intercepting SunPower Monitoring Traffic?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by fslipcam View Post

    I think PVOutpot Net Data Upload only works for Donators. If you don't have Donator mode enabled, doesn't matter you set n:1 or n:0, "v4" still upload as consumption mode and ignored any negative value. You may try take out the "*-1" and modify v4 like below.

    usage = float(device["p_3phsum_kw"])*1000

    requests.post(pvoutput_url, data={"d":date.strftime('%Y%m%d'), "t":date.strftime('%H:%M'), [COLOR=#FF8C00][B]"n":0, "v4": usage + sum},[/B][/COLOR] headers = {'X-Pvoutput-Apikey': pvoutput_key, 'X-Pvoutput-SystemId': pvoutput_systemid})
    I have done something like this in my latest version, I will post it when I get home

    Comment


    • Here is the latest code that I have:

      #!/usr/bin/python3

      import requests
      import json
      import datetime
      from datetime import datetime

      # this is the default URL for the admin interface of SunPower PVS5
      pvs5_url = "http://172.27.153.1/cgi-bin/dl_cgi?Command=DeviceList"

      # pvoutput.org
      pvoutput_url = "https://pvoutput.org/service/r2/addstatus.jsp"
      pvoutput_key = "_your_key_"
      pvoutput_systemid = "_your_id"

      r = requests.get(pvs5_url)

      prod = 0
      net_usage = 0
      total_usage = 0

      for device in r.json()["devices"]:
      if device["MODEL"] == "AC_Module_Type_D" and device["STATE"] != "error":
      prod += float(device["p_3phsum_kw"])*1000
      if device["MODEL"] == "PVS5M0400c":
      net_usage = float(device["p_3phsum_kw"])*1000

      total_usage = prod + net_usage

      date = datetime.now()

      requests.post(pvoutput_url, data={"d":date.strftime('%Y%m%d'), "t":date.strftime('%H:%M'), "v2": prod, "v4":total_usage}, headers = {'X-Pvoutput-Apikey': pvoutput_key, 'X-Pvoutput-SystemId': pvoutput_systemid})

      Comment


      • Hi everyone, how can I sniff the data that my Data Logger is transmitting to Sunpower's server?

        Comment


        • Hi everyone,
          Just finished reading all 13 Pages. Though you might want to know of an on the cheap way to hook up to the installers port on the PVS5. What is needed is a NAT engine, the same as in all routers. Got an old router collecting dust (or possibly for a buck or two at your local thrift store). Just connect the WAN port to the PVS5 installers port, set up your "route" table to point to the old router for 172.27.153.0 (like so for linux:
          ip route add 172.27.153.0/24 via <the old routers address on your Lan>
          For most of these old routers you can find info on the manufactures site on how to reset them and assign them an address on your Lan. While in there you may want to turn the radio off and make sure it is set up for a DHCP WAN connection. On the gravy side, you will now have 3 additional connections on your Lan (the extra ports on the old router).

          Comment


          • it looks like my inverter is failing and as part of the RMA they may replace my PVS2 with a PVS5 or PVS6. sounds like with PVS5 you can connect to the installer port to get the production info - i am assuming that snarfing the data flowing to sunpower would be impossible with a PVS5 since the data is encrypted. does that sound right?

            how about PVS6? is there a way to directly access the production data on one of those?

            Comment


            • astroboy: I have a PVS5. I get data from the installer port using an old router to do the NAT thing. See my post just above yours. The command to send it is as given in "faraway's" post a few before that. I am reading the data and working with it using TCL rather then Python, but the URL is the same and the language you use is up to you. My plan is to put the code on a rasberry-pi zero+ with a small display and put that in the Sunpower SPR-PRM-WDISP that used to display what the system was up to.

              Comment


              • Originally posted by georgeanzi View Post
                astroboy: I have a PVS5. I get data from the installer port using an old router to do the NAT thing. See my post just above yours. The command to send it is as given in "faraway's" post a few before that. I am reading the data and working with it using TCL rather then Python, but the URL is the same and the language you use is up to you. My plan is to put the code on a rasberry-pi zero+ with a small display and put that in the Sunpower SPR-PRM-WDISP that used to display what the system was up to.
                thanks, yes this is likely what i'm going to have to do. just wondering if PVS6 has the same 2nd ethernet port. all of this garbage is inside a little weatherproof box and i'm not sure if there's room inside for a RPI though.

                one thing is that in a couple of months i should have my powerwalls installed so i can probably just grab the solar data from the powerwall's monitoring API. but in the mean time, unless i can get your style of monitoring going, i'll lose PVOutput which is very helpful to me.

                Comment


                • I don't have anything in the box/enclosure with the PVS5. I just have two cat5 cables to it. It's in the garage, the old router is upstairs in the house and is actually in use as an extra WIFI source as well as a NAT engine, and it give me a couple of extra cat5 ports.

                  Comment


                  • well... mine is on the outside of the house so pulling cables to it is kind of a non-starter. i have powerline networking to establish internet connectivity for the PVS2.

                    Comment


                    • Originally posted by georgeanzi View Post
                      Hi everyone,
                      Just finished reading all 13 Pages. Though you might want to know of an on the cheap way to hook up to the installers port on the PVS5. What is needed is a NAT engine, the same as in all routers. Got an old router collecting dust (or possibly for a buck or two at your local thrift store). Just connect the WAN port to the PVS5 installers port, set up your "route" table to point to the old router for 172.27.153.0 (like so for linux:
                      ip route add 172.27.153.0/24 via <the old routers address on your Lan>
                      For most of these old routers you can find info on the manufactures site on how to reset them and assign them an address on your Lan. While in there you may want to turn the radio off and make sure it is set up for a DHCP WAN connection. On the gravy side, you will now have 3 additional connections on your Lan (the extra ports on the old router).
                      Would anyone be able to explain this to a NOOB. My PVS6 is currently connected to my wifi network and I have an old router with DD-WRT that I can use, but not exactly sure what I need to change to 172.27.153.0 in the old router and what other settings I need to change in the router.

                      Comment


                      • It looks like sunpower disabled my access to their installer link which showed stats per panel. Did anyone else get knocked out? I have not logged in for a few months. I liked being able to check at the panel level.

                        Comment


                        • Originally posted by Crash View Post
                          It looks like sunpower disabled my access to their installer link which showed stats per panel. Did anyone else get knocked out? I have not logged in for a few months. I liked being able to check at the panel level.
                          Most everyone got knocked out.

                          Sunpower, never a powerhouse with respect to helpful, informed customer service, dropped a lot of information access.

                          That was most likely done, at least in the opinion of some informed folks, because S.P. got sick of answering a lot of ignorant questions from ignorant users who thought differences of a fraction of a volt or two between panels meant ailing systems, or who were apoplectic because their panels weren't always putting out the STC rating. Such questions started popping up with annoying frequency about the time or shortly after S.P. went to microinverters.

                          Having been knocking around here for 7+ years, I don't doubt such things added to the S.P decision to reduce access to data, but having dealt w/ S.P. a fair amount, I'm equally sure other reasons such as cost savings as well as their disregard to customer service had equal impact in the decision.

                          Comment

                          Working...
                          X