Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Solar PV Monitoring/Automation Thread

Options
1262729313270

Comments

  • Registered Users Posts: 700 ✭✭✭fuse


    Yes i'm set up on solcast website, can see my forecast there https://toolkit.solcast.com.au/rooftop-sites/

    In HA though, I can't even see where I can input my solcast API key.

    EDIT: I found it, managed to add the integration properly now and I'm sorted - Still getting to grips with HA and HACS!



  • Registered Users Posts: 8,579 ✭✭✭micks_address


    anyone using this? https://evcc.io/ looking at it as ive a vw ev car charger.. dont have solar yet but maybe looking at it in ext 6 months or so.. set it up on rasperry pi yesterday



  • Registered Users Posts: 1,440 ✭✭✭DC999


    Tis in German, but the google tells me it's the same as the software from a MyEnergie Zappi to let you throttle the charge speed for what's available from solar excess. So turns a standard EV charger into a solar aware one. Seems to be open source. That the jist of it? Part of the site says "Numerous manufacturers of wallboxes are already supported and evcc makes it possible to control the current with which the car is charged. That is, if a lot of solar power is generated, evcc allows the connected car to be charged with high power. If less electricity is generated, evcc slows down or pauses the charging process."



  • Registered Users Posts: 8,579 ✭✭✭micks_address


    yeah thats the gist of it - i dont have a zappi.. so hoping to maybe use this to divert excess solar production to my ev charger... i wont have solar any time soon as lead times seem to have gone out a lot



  • Registered Users Posts: 1,440 ✭✭✭DC999



    That's a class idea. Take the hardware you have (ev charger) and this software. And you don't need to buy something new (Zappi) and find a seller for old one



  • Advertisement
  • Registered Users Posts: 2,279 ✭✭✭SD_DRACULA


    @Jonathan any chance can add panel angle to the calculation?

    I have two strings on different slopes, something like 38 and 15 and would like to split them which will give me more accurate estimates and also the 15 degree one is shaded in winter so I need to exclude it from the daily estimate.



  • Registered Users Posts: 68 ✭✭Niceday20


    @Jonathan ..... many thanks for this which makes access to the MetEireann data so much easier than the spreadsheet I was having to import previously.

    As I am aware that the Met forecast actually covers three 24 hour periods I have added a "next day" to "today and "Tomorrow" making your meteireann_solarforecast.py as below. I have also rounded the result to two decimals, as being a newbie, I haven't worked out how to format numbers in YAML, nor have I worked out how to include py code other than as an attachment!




  • Registered Users Posts: 1,081 ✭✭✭silver_sky


    The met éireann forecast got it spot on today - 100%... well 100.746% 😅

    I have the efficiency adjusted to 0.185 which seems to be a sweet spot. I plugged in some historic radiation data from the last few weeks and it's close enough. Like @Niceday20 above, I couldn't quite figure out how to add in the other attributes (units etc) via the python script so actually have separate template sensors setup for that. It's not ideal as it's adding further complexity (and issues) but working for now.



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,145 Mod ✭✭✭✭Jonathan


    It isn't something I've looked into, but the source code is there for you to expand yourself. You would need to take into more than just tilt though. To do it properly, you'd need to take the hourly radiation figures, and multiply by average angle of incidence for that hour, for each array. The current algorithm is very naive and just gives an estimate based on the total radiation for the day. However, clearly heavy rain in morning and evening with clear skies between 12:00 and 14:00 will benefit a south facing array more than an E/W array. Similarly a E/W array will out perform a south facing array on a day with clear skies in morning and evening with heavy showers between 12:00 and 14:00.

    The main thanks is due to @connesha for the Met Eireann XML parsing class; I just wrapped it to make it accessible.

    I've been doing more playing around with Pyscript, and am working away on a new and improved version. It is a lot more polished, including bundling it as a "app" (yaml config), adding proper attributes, and making the values persistent. I'll publish the new version on github, along with a similar pysolarmanv5 Pyscript wrapper.



  • Registered Users Posts: 1,081 ✭✭✭silver_sky


    I managed to modify the existing one for now for my needs, but looking forward to the "polished" version. Considering I don't really know python - just what I figured out in a few hours through trial and error it's probably not great. 🤣

    I have it setup so it won't refresh the state of today's forecast when I run it in the evening/night. It's a bit "hacky" I think but couldn't figure out a better way aside from separate scripts for today and tomorrow.

    import datetime
    from weatherforecast import WeatherForecast
    
    
    @service
    def meteireann_solarforecast():
        weather = WeatherForecast(53.123, -6.321)
        weather.load_weather_data()
    
    
        arrayMultiplier = 0.185*23.52/1000 # panelEfficiency * panelArea(m2) / 1000 (to kWh)
    
    
        today = round(weather.get_radiation_for_date_total(datetime.date.today()) * arrayMultiplier,2)
        tomorrow = round(weather.get_radiation_for_date_total(datetime.date.today() + datetime.timedelta(days=1)) * arrayMultiplier,2)
    
    
        current_time = (datetime.datetime.now().strftime("%H:%M"))
    
    
        if "00:00" < current_time < "09:00": 
            state.set("sensor.meteireann_solar_today", today,{'friendly_name':'Met Éireann Solar Today','icon':'mdi:solar-power','unit_of_measurement':'kWh','device_class':'energy'})
            state.set("sensor.meteireann_solar_tomorrow", tomorrow,{'friendly_name':'Met Éireann Solar Tomorrow','icon':'mdi:solar-power','unit_of_measurement':'kWh','device_class':'energy'})
        elif "18:00" < current_time < "23:59": 
            state.set("sensor.meteireann_solar_tomorrow", tomorrow,{'friendly_name':'Met Éireann Solar Tomorrow','icon':'mdi:solar-power','unit_of_measurement':'kWh','device_class':'energy'})
    




  • Advertisement
  • Registered Users Posts: 13 toledobastos


    Just a quick note to say I reached out to Knut Kohl, the developer behind Forecast.Solar, and long story short you should use 0 for due south orientation when calling the API. This is confusing because the azimuth in the HA integration is 180 for due south.

    Long story long, HA uses internal over their integrations, with a 0° ... 360° radius that is translated to Forecast.Solar as -180° ... 180°. For due south, you should use 180 in the HA integration, but 0 in the API call (otherwise you'll be querying data for due north if orientation is set to 180).

    There was quite a difference between the estimates I was getting from the Forecast.Solar integration for HA and what I was getting from querying the API. Forecast.Solar would not only underestimate the production (that would’ve been corrected by the moving average that's baked into the model I'm using), but it would also overestimate it. So if you experienced something like this, make sure to correct the azimuth in the API call.

    There's more information here:



    https://doc.forecast.solar/doku.php?id=api:estimate#azimuth

    Post edited by toledobastos on


  • Moderators, Science, Health & Environment Moderators Posts: 4,696 Mod ✭✭✭✭Tree


    What's not clear is if it's specifically when using an API key or generally when using HA. In the HA integration field where you configure forecast.solar azimuth, the helper text says 180 is south.



  • Registered Users Posts: 2,279 ✭✭✭SD_DRACULA


    The HA energy dashboard seems to use forecast.solar by default for today/tomorrow predictions:

    Anyone know if possible to swap that out for our Met predictions? Can't find the setting for it if possible.

    Also, the pyscript prediction sensors seem to lose their values upon HA server restart, any way to make them persistent?



  • Registered Users Posts: 1,081 ✭✭✭silver_sky


    You can swap it out for Solcast but i didnt see an option for your own one.



  • Registered Users Posts: 1,081 ✭✭✭silver_sky


    Click edit on Solar Production on the Energy Dashboard setup page. If you have Solcast installed you can select it there.





  • Registered Users Posts: 13 toledobastos


    The API uses -180 to 180 whereas HA uses 0 to 360. HA will translate the 0 to 360 to the -180 to 180 used by the API. It’s documented in the forecast.solar page linked above.



  • Registered Users Posts: 2,279 ✭✭✭SD_DRACULA


    Yes that's one I found too.

    Guess it's not an option to use your own yet.



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,145 Mod ✭✭✭✭Jonathan


    MyEnergi not ruling out the possibility of adding a local API for their products. 🙂

    https://myenergi.info/viewtopic.php?p=62259#p62259



  • Registered Users Posts: 14,900 ✭✭✭✭Ha Long Bay


    Looking for some help here new to HA but have it setup running Solarman and able to gather data but seeing errors in the energy dashboard.



    Second issue followed the excellent guide on page 19 from @connesha to have the ability to write to the inverter but getting a compile error even though I just modified the IP and serial number.


    I am not seeing anything at all in the logs. I just copied the files into the app folder.


    Any help would be appreciated.



  • Registered Users Posts: 189 ✭✭connesha


    You'll need to post logs to understand where the issue is. When others had an issue, it was:

    • formatting/indentation of the python file was changed so it doesn't compile
    • the "datetime" and "umodbus" packages were not added as per the instructions (make sure you hit "save" after adding them)

    To get logs, go to Settings->AddOns->AppDaemon->Log

    You should see the reason for the error in the logs. You may need to restart AppDaemon if the error was a good while ago (the failure is not in the logs that are currently showing)

    if you post the logs here, can have a look.



  • Advertisement
  • Registered Users Posts: 14,900 ✭✭✭✭Ha Long Bay


    Thanks for the reply. Modules were loaded and saved tried this a few times.


    Error log is here. Tried to uninstall and reinstall a few times etc.





  • Registered Users Posts: 189 ✭✭connesha


    Your _INVERTER_SERIAL is the wrong format.

    it should be all numbers, 10 digits long. (You've a letter in there)



  • Registered Users Posts: 14,900 ✭✭✭✭Ha Long Bay


    Is it the serial of the data logger that needs to be there? Inverter has characters in it.


    Sorry I am idiot I did not read the comment in the code.






  • Registered Users Posts: 189 ✭✭connesha


    Yes, its the logger; the 406... one. (Same as you'd put in for HA-Solarman, if you use that)



  • Registered Users Posts: 700 ✭✭✭fuse


    Did we establish if you have the right values for the HA Energy dashboard?

    I remember finding a guide somewhere that said you should use total rather than daily values for the config. Can anyone confirm?



  • Registered Users Posts: 14,900 ✭✭✭✭Ha Long Bay


    Looking for some more help now after getting HA up and running and have verified that I can write to the modbus to change the settings so making progress. I did a test to change register 43110 to 35 which was previously set to 33.

    This had the effect of discharging from the inverter and diverting to the eddi which I was not expecting. Set it back to the previous value and all good again.

    I am moving onto a smart plan with BGE as it was the best rate I could find with free time Saturday 9-5pm. Two things I would like to achieve is the ability to charge the batteries from the grid to top them up during that window and second to not discharge the batteries during that time.

    Anyone know how I can achieve this? Also struggling to understand how to convert the bit numbers to decimal or hex.


     I have read @Jonathan detailed post on page 24 but still can't get my head around how to achieve this.

    Any help would be appreciated. I don't want to have to visit the attic every Saturday.

    Post edited by Ha Long Bay on


  • Moderators, Home & Garden Moderators Posts: 5,974 Mod ✭✭✭✭graememk


    Yeah hex can be a bit confusing at the start but you actually don't have to worry about that

    What I'm planning on doing is not touching that setting, once it's set

    But what I am planning on doing is changing the charge times and charge current.

    To prevent overnight discharge, set the time to 00:00 to 09:00 and charge rate to 0amps

    To charge overnight you just have to change the amps. And once you reach the desired SOC you can set the amps back to 0



  • Registered Users Posts: 189 ✭✭connesha


    This had the effect of discharging from the inverter

    If it discharged from the inverter when you set this, then you must have also set the discharge times and current (post a photo of the inverter screen if you want it checked). If charge and discharge current are 0, and none of the times are set, then setting to 35 would have had no effect.

    Are you only looking to charge (or prevent discharge) during this Saturday slot? If so:

    Set Charge times on the inverter to 9:00 to 17:00, and don't change them ever

    Set the Charge Current on the inverter to be enough to slowly charge the battery during this time, and don't change it ever **

    Create an automation that sets 43110 to 35 on Saturday morning (at e.g. 8am)

    Create another automation that sets 43110 to 33 on Saturday evening (at e.g. 6 pm)

    This will have the effect of slowly charging the battery through out the day. And even if it fills before 17:00, it won't discharge until after 17:00


    ** current calculation:

    ((usable_battery_wh)/hours)/53

    e.g. a 5kwh battery, with 20% lower limit (4kwh usable), charged for 8 hours:

    (4000/8)/53 = 9.4 Amps


    Note, if you're looking to night charge/prevent discharge, I gave a script for that a couple of pages back: see post #788



  • Registered Users Posts: 14,900 ✭✭✭✭Ha Long Bay



    Firstly thanks for all your help on this thread would have been lost without your detailed post on getting this initially setup and input from other users.

    I will check the inverter charge time settings tomorrow they should be on defaults I never altered them post install.

    I have 10kw of battery storage just trying to figure out the best way make use of the free energy on Saturday between 9-5pm.

    This was the best rate I could find I looked at the option of the very cheap EV rate between 2-5am but the standing charge an extra €120 on that plan. If I stayed on 24 hour the discount on gas was only 10% with BGE and 15% with Energia with the smart plan it's 38%.

    Ideally would like to use as much free energy on Saturday and be left with the batteries close to full that evening so either charge them in the morning or evening.



  • Advertisement
  • Registered Users Posts: 189 ✭✭connesha


    Great, then do the steps I put just above and it'll do exactly what you're asking for (leave charge current set to 18.7A permanently, since you have 10kwh battery, assuming 20% lower SOC). It'll have your battery full by 5pm on Saturday, regardless of how empty it was in the morning. And there will be no discharge until after 17:00

    Because the automation will set 43110 to 35 on Saturday only, the times don't need to be changed at all (they'll have no effect on other days because its set to 33)

    so either charge them in the morning or evening

    Is better, and much easier, to charge slowly for the entire period, like I put above. (I cannot see any reason to try to charge for only part of the time, and then try to "stop discharge").


    BTW, I am on the EV 2am-5am plan. Yea, the standing charge is terrible, but with a large array, 20kwh battery, and lots of automation, can get close to 100% of purchased electricity be during this period (at 5.7 cents / unit). Different plans suit different people.

    Watch out for the monthly limit on that Free Saturday plan.. its capped at 100kWh a month



Advertisement