Announcement

Collapse
No announcement yet.

Mirroring/intercepting SunPower Monitoring Traffic?

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

  • Hey everyone,
    Over the last week I've been hacking on this and I got my math to work out finally. My capture script hasn't changed, although I did modify the "sp_raw2" table in my DB to include the insert_timestamp rather than just the src_timestamp from the panels/supervisor. Things are still slightly wonky as I'm using the supervisors total_energy reported to calculate whether I'm sending power to the grid or pulling from the grid. This, unfortunately, doesn't give me an entirely accurate view about how much power my house is CONSUMING. I will keep looking at that and see if I can't work out how to get a more accurate view. For now, though, check out my latest commits to the GitHub project here: https://github.com/ehampshire/sunpower/tree/dev . Mostly just updates to the web section (with index2.php) and a new solar_analysis3.py that fills in the sp_energy and sp_power tables appropriately. Here's a screenshot from a couple minutes ago of what it looks like for my system: https://imgur.com/a/3CdJzDh

    Hope that helps, guys!

    Comment


    • Hmmmmmm, so I wrote up this reply but it showed as awaiting approval. Maybe because I included an imgur link to a screenshot of my current code working? Anyways, wanted to let you guys know I updated my GitHub project with new, working code based on the direct querying of the SP supervisor.

      Comment


      • Originally posted by ehampshire View Post
        Hmmmmmm, so I wrote up this reply but it showed as awaiting approval. Maybe because I included an imgur link to a screenshot of my current code working? Anyways, wanted to let you guys know I updated my GitHub project with new, working code based on the direct querying of the SP supervisor.
        posts with more than 1 link, get held for moderation, we released it.
        Powerfab top of pole PV mount (2) | Listeroid 6/1 w/st5 gen head | XW6048 inverter/chgr | Iota 48V/15A charger | Morningstar 60A MPPT | 48V, 800A NiFe Battery (in series)| 15, Evergreen 205w "12V" PV array on pole | Midnight ePanel | Grundfos 10 SO5-9 with 3 wire Franklin Electric motor (1/2hp 240V 1ph ) on a timer for 3 hr noontime run - Runs off PV ||
        || Midnight Classic 200 | 10, Evergreen 200w in a 160VOC array ||
        || VEC1093 12V Charger | Maha C401 aa/aaa Charger | SureSine | Sunsaver MPPT 15A

        solar: http://tinyurl.com/LMR-Solar
        gen: http://tinyurl.com/LMR-Lister

        Comment


        • Hi Eric. Because I am unable to intercept traffic from my supervisor, I decided to go the monitor.us.sunpower.com API route that Jeff Kowalski implemented. I have branched it and am doing a Python implementation of the capture part. I have the capture largely done, now working on the visualization / reporting. I will post repo link once done - hopefully later this week. I like your graphics.

          I can't recall whether you said what firmware you are on. Did you say? I am on Version 2018.4, Build 1092

          I won't have the per-panel data which is too bad but I don't think i have a micro-inverter (or do I, i have one? SMA 3800 TL). We only have 12 panels, small 3.9 kW system.

          Comment


          • Originally posted by cord_thomas View Post
            Hi Eric. Because I am unable to intercept traffic from my supervisor, I decided to go the monitor.us.sunpower.com API route that Jeff Kowalski implemented. I have branched it and am doing a Python implementation of the capture part. I have the capture largely done, now working on the visualization / reporting. I will post repo link once done - hopefully later this week. I like your graphics.

            I can't recall whether you said what firmware you are on. Did you say? I am on Version 2018.4, Build 1092

            I won't have the per-panel data which is too bad but I don't think i have a micro-inverter (or do I, i have one? SMA 3800 TL). We only have 12 panels, small 3.9 kW system.
            If you hook a Raspberry Pi (or any computer really) up to the installer port on your supervisor, you can use the same direct query method I use and skip the SunPower portal entirely. They are getting the individual panel data, they just aren't exposing it. I would love to see what you came up with, I wasn't sure what to do for visualization, so I kind of just copied the SunPower site as a challenge. Can slice/dice the data however I want, but my help page does show how to layout your panels like they are on your roof (and my page is laid out that way).

            I forget how to get my supervisor version - remind me?

            Comment


            • Looks like I'm still on Version 5.0.0, Build 325

              I've complete forgot how I query the device for that, but browsing through the setup pages gives it to me. It also notes there's a firmware update available, downloads it, and "succeeds" on install. Of course, going back to that webpage shows it's still on the same version. So, I guess I'm lucky that it can't update past it? Sorry, maybe my updated scripts won't actually work for people past that firmware version.

              Comment


              • Ok, my supervisor did update, but my code still works. Thought I'd update the thread to say that. I'm now on Version 2018.5, Build 2041

                Comment


                • Great work by all on figuring out and discussing URLs. I created a new thread, basically as a landing page and place to discuss a project I'm working on for monitoring SunPower systems using PRTG. The thread is pending approval as I'm a noob on this forum. Here is a link to it. I'm guessing it will be approved in a day or so.

                  https://www.solarpaneltalk.com/forum...wer-using-prtg




                  Comment


                  • Thanks for some information here, I use the "devicelist" url to write a quick script to send data to pvoutput.org (using a cronjob every 5 mins):

                    https://pastebin.com/3aYeSH5u

                    And my system: https://pvoutput.org/list.jsp?userid=68865

                    Comment


                    • Originally posted by faraway View Post
                      Thanks for some information here, I use the "devicelist" url to write a quick script to send data to pvoutput.org (using a cronjob every 5 mins):

                      https://pastebin.com/3aYeSH5u

                      And my system: https://pvoutput.org/list.jsp?userid=68865
                      Hi Faraway and welcome to solarpaneltalk.com. Once the admin approves you for posting, you'll be able to start your own thread. I left this one here since it seems to be related to the topic. Posting links it normally frowned on for first timers since spammers do it frequently, but I tried yours and they seem fine. I didn't know about pastebin.com, it looks useful.
                      Last edited by sdold; 08-23-2018, 01:37 PM.

                      Comment


                      • Originally posted by sdold View Post

                        Hi Faraway and welcome to solarpaneltalk.com. Once the admin approves you for posting, you'll be able to start your own thread. I left this one here since it seems to be related to the topic. Posting links it normally frowned on for first timers since spammers do it frequently, but I tried yours and they seem fine. I didn't know about pastebin.com, it looks useful.
                        Thanks!

                        Just to note, it seems that my sunpower consumption monitoring is off (or reversed), so take out the -1 from:
                        1. usage = float(device["p_3phsum_kw"])*1000*-1

                        Comment


                        • Originally posted by faraway View Post

                          Thanks!

                          Just to note, it seems that my sunpower consumption monitoring is off (or reversed), so take out the -1 from:
                          1. usage = float(device["p_3phsum_kw"])*1000*-1
                          I've seen in other posts that if your consumption is 'reversed', it usually means the leads from your consumption monitor are reversed.

                          Comment


                          • Is there a way to reboot PVS5x remotely? Mine seems to stop sending telemetry data to SunPower, but WiFi seems to be working, the only thing I see thats different is the cell - says SIM card error right now, I am out of the country so don

                            Comment


                            • Originally posted by faraway View Post
                              Is there a way to reboot PVS5x remotely? Mine seems to stop sending telemetry data to SunPower, but WiFi seems to be working, the only thing I see thats different is the cell - says SIM card error right now, I am out of the country so don
                              The system reconnected to SunPower, not sure if I did something or not. Also the mobile connection was up and down again.

                              Comment


                              • Originally posted by faraway View Post

                                Thanks!

                                Just to note, it seems that my sunpower consumption monitoring is off (or reversed), so take out the -1 from:
                                1. usage = float(device["p_3phsum_kw"])*1000*-1
                                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})

                                Comment

                                Working...
                                X