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'), "n":0, "v4": usage + sum}, 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


                          • Originally posted by faraway View Post
                            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})

                            Hi everyone. I am new to Sunpower, but have managed to hook up a RasberryPi to the admin port and I am able to connect there to get data.

                            Does anyone have a script, similar to the one above that essentially calls up with PV, gets the data and then stores this into a database (like mysql)? Alternatively, does anyone have a way to decode the messages that come from the PV? (i.e. what fields represent what data)?

                            Thanks!

                            Comment


                            • Not sure if anyone has decoded these yet, but could someone help with the meaning of the following fields?

                              Code:
                              {
                              "ISDETAIL": true,
                              "SERIAL": "PVS6M19180892p",
                              "TYPE": "PVS5-METER-P",
                              "STATE": "working",
                              "STATEDESCR": "Working",
                              "MODEL": "PVS6M0400p",
                              "DESCR": "Power Meter PVS6M19180892p",
                              "DEVICE_TYPE": "Power Meter",
                              "SWVER": "3000",
                              "PORT": "",
                              "DATATIME": "2021,02,14,19,16,43",
                              "ct_scl_fctr": "50",
                              "net_ltea_3phsum_kwh": "14535.2303",
                              "p_3phsum_kw": "0.8852",
                              "q_3phsum_kvar": "0.5067",
                              "s_3phsum_kva": "1.021",
                              "tot_pf_rto": "0.8502",
                              "freq_hz": "60",
                              "CAL0": "50",
                              "origin": "data_logger",
                              "OPERATION": "noop",
                              "CURTIME": "2021,02,14,19,16,44"
                              }, {
                              "ISDETAIL": true,
                              "SERIAL": "PVS6M19180892c",
                              "TYPE": "PVS5-METER-C",
                              "STATE": "working",
                              "STATEDESCR": "Working",
                              "MODEL": "PVS6M0400c",
                              "DESCR": "Power Meter PVS6M19180892c",
                              "DEVICE_TYPE": "Power Meter",
                              "SWVER": "3000",
                              "PORT": "",
                              "DATATIME": "2021,02,14,19,16,44",
                              "ct_scl_fctr": "100",
                              "net_ltea_3phsum_kwh": "148.3403",
                              "p_3phsum_kw": "6.9333",
                              "q_3phsum_kvar": "0.6461",
                              "s_3phsum_kva": "7.1999",
                              "tot_pf_rto": "0.9687",
                              "freq_hz": "60",
                              "i1_a": "25.6216",
                              "i2_a": "33.7147",
                              "v1n_v": "121.9915",
                              "v2n_v": "120.8465",
                              "v12_v": "242.8377",
                              "p1_kw": "2.9701",
                              "p2_kw": "3.9632",
                              "neg_ltea_3phsum_kwh": "9856.6974",
                              "pos_ltea_3phsum_kwh": "10005.0955",
                              "CAL0": "100",
                              "origin": "data_logger",
                              "OPERATION": "noop",
                              "CURTIME": "2021,02,14,19,16,44"

                              In the first device section, I am looking for:
                              "net_ltea_3phsum_kwh": "14535.2303",
                              "p_3phsum_kw": "0.8852",

                              In the second device section, I am looking for:
                              "neg_ltea_3phsum_kwh": "9856.6974",
                              "pos_ltea_3phsum_kwh": "10005.0955",

                              Thanks.

                              Comment


                              • Hi Marciallapp. I have a pvs5 on my installation so the output is a bit different but I would guess (and someone correct me if I'm wrong)
                                This first one is the production meter
                                "net_ltea_3phsum_kwh": "14535.2303", --> life time net power generation
                                "p_3phsum_kw": "0.8852", --> current power generated

                                These are from the consumption meter
                                "neg_ltea_3phsum_kwh": "9856.6974",
                                "pos_ltea_3phsum_kwh": "10005.0955",
                                well, life time power accumulator but I don't know how neg (negative) and pos (positive) plays into it. in my system I have a CT for the consumption meter but the production meter numbers come from added up data based on the values of individual panel data because there isn't any CT to measure it on the line.

                                As far as scripts go, my data collection has gone through several rewrites. I started with using python to read the pvs5 data writing to mongo database but over the years I ended up with a node-red installation that does all the queries to the pvs5 and parses the data into the mongo db. I have some configuration data in the mongo db that controls what and how the data gets stored. Then I have some other endpoints in node-red which serve the data so Grafana can chart it. It all has some commented out code because I'm always playing around with it but it does the basics of what I wanted. I get the data collection and I can see the power / heat sink temp / what ever of each panel charted in Grafana. If you go way back in this thread you'll find my comments about using a raspberry pi to connect to the installers port at a time when everyone else was trying to sniff the network line and parse out data from the packets being sent back to sunpower. That was too complicated and there was too much conversion going on. I decided to store the data from the installers port in MongoDB because since I'm getting json from the pvs5 and MongoDB stores documents as json there is an advantage. There was a software update one time where the field names of the data changed and since I was just storing what I got out of the pvs5 I didn't loose any data like others did due to serialization errors when they tried to put it into their SQL like databases that required a schema. The only thing I had to fix was downstream interpretation of the data. Have you given any thought to your project beyond what you've shared here as far as what visualizations or tools you want to use to see your data ?

                                Comment

                                Working...
                                X