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

1495052545571

Comments

  • Registered Users Posts: 824 ✭✭✭HotSwap




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


    The script is pretty basic. It just polls the Met Eireann API and retrieves the globalRadiation figure for each hour period and returns the total. You are better off creating a feedback loop which compares the generation for a given day to the forecast and creating a multiplier for each array. I think @silver_sky had done this and posted the code somewhere in the thread.

    On a related note, I stumbled upon solXpect on FDroid a few weeks ago and have a todo item to read through the code to understand the algorithm used for calculating PV generation. I'll have to compare the global radiation figures provided by Met Eireann and OpenMeteo (which is what solXpect uses) too.



  • Registered Users, Registered Users 2 Posts: 7,256 ✭✭✭10-10-20


    That's a nifty attempt at an efficiency curve!



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


    I did that for a time but honestly didn't find much difference. It actually caused problems when you had an exceptionally bad day also. I'm sure I could have written to exclude exceptions but it was just getting overly complicated. There's another user here that has a large database that does this.

    Here's my current iteration which has been in use for many months now at this point. You can even see where I commented out my accuracy portion. The date and time is to ensure that it doesn't overwrite the current forecast if its still during generation hours. That part could be simplified if you didn't care about it.

    import datetime
    from weatherforecast import WeatherForecast
    
    
    @service
    def meteireann_solarforecast():
        weather = WeatherForecast(53.XXXXX, -6.XXXXX)
        weather.load_weather_data()
        #accuracy = float(state.get('sensor.solar_forecast_accuracy_7_day')) /100
    
    
        arrayMultiplier = 0.19*23.104/1000 # panelEfficiency * panelArea(m2) / 1000 (to kWh)
    
    
        today = round(weather.get_radiation_for_date_total(datetime.date.today()) * arrayMultiplier,1)
        tomorrow = round(weather.get_radiation_for_date_total(datetime.date.today() + datetime.timedelta(days=1)) * arrayMultiplier,1)
    
    
        current_time = (datetime.datetime.now().strftime("%H:%M"))
    
    
        if "00:00" < current_time < "07:59": 
            state.set("sensor.meteireann_solarforecast_today", today,{'friendly_name':'Met Éireann Solar Today','icon':'mdi:solar-power','unit_of_measurement':'kWh','device_class':'energy'})
            state.set("sensor.meteireann_solarforecast_tomorrow", tomorrow,{'friendly_name':'Met Éireann Solar Tomorrow','icon':'mdi:solar-power','unit_of_measurement':'kWh','device_class':'energy'})
        elif "08:00" < current_time < "23:59": 
            state.set("sensor.meteireann_solarforecast_tomorrow", tomorrow,{'friendly_name':'Met Éireann Solar Tomorrow','icon':'mdi:solar-power','unit_of_measurement':'kWh','device_class':'energy'})
    


    sensor.solar_forecast_accuracy_7_day
    

    This one was basically getting the 7 day average of another entity that had the percentage accuracy of the ME forecast vs actual for the day. Bit messy which is why I scrapped it.



  • Registered Users Posts: 231 ✭✭AnswerIs42


    Hi folks,

    I'm hoping to take my first step into energy monitoring and was hoping someone could sanity check what I am about to buy.

    The Shelly EM with 2 x 50 amp clamps is to monitor the 2 fuses for the heat pump.

    The Shelly pro comes with 3 x 120 amp clamps. 1 for solar PV generation, 1 for grid power and I'll throw the third around some other fuse. This should give me PV generation and grid import and export, right?

    The plugs are for some kitchen appliances.

    After install, I should be able to tell all these devices via the shelly app to send their data to a local instance of HA that I am running and nothing will be sent to the cloud.

    Is all that right and sound logical?

    Thanks




  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,256 ✭✭✭10-10-20


    Correct. You don't need the app at all, just configure them to HA as per the instructions: static IP, CoIoT, unicast, HA port.

    Then throw them individually into an integration helper and away you go.



  • Registered Users Posts: 231 ✭✭AnswerIs42


    Beautiful, thanks very much



  • Registered Users, Registered Users 2 Posts: 2,498 ✭✭✭ECO_Mental


    Whats the reasoning behind getting the Shelly Pro EM, Although it does have an ethernet which can be useful. I have 3 ShellyEMs and they are great (only ordered 2 but they sent me one extra by mistake result!!)

    You will need the app to discover them initially and get them on network, but once they are connected to the home network Home Assitant will pick them up straight away. Get InfluxDB and Grafanna set up and you are rocking..


    6.1kWp south facing, South of Cork City



  • Registered Users, Registered Users 2 Posts: 7,256 ✭✭✭10-10-20


    I've never needed the app, I just connect to the device's AP when it's running and then configure it from there. InfluxDB and Grafana are great though.



  • Registered Users Posts: 231 ✭✭AnswerIs42


    @ECO_Mental I selected the pro em because it says in the description that it is "photovoltaic ready"...now that I read the description in detail, I don't actually know what that means.

    It seems that I could replace the pro em with a standard em and save myself €60 in the process I guess.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,256 ✭✭✭10-10-20


    It's waffle really excpet that you get three power inputs on a Pro. All of the Shelly EMs are solar ready as the show feed and return and the cumulative kWh value. So save the cash if you know you can get the EMs into the same physical space.



  • Registered Users, Registered Users 2 Posts: 309 ✭✭JayBee66


    A future project, I'd like to implement in HA, is sending messages to my inverter, requesting it to start and stop charging. My KStar inverter has a register (in self-consume mode) where you can switch charging on and off, along with other registers to set a time for charging. My idea is to set the time manually to 24 hour charging but to Enable and Disable actual charging dependent on time (for night rate electricity) or to keep the battery above 20% State of Charge on low light days from within HA.

    As replies can be far quicker here than on GitHub, I thought I'd ask in this thread if the new 1.5.X Solarman integration supports sending messages to an inverter or if pysolarmanv5 is the way to go. I used the latter before installing HA so I have interrogated my inverter with pysolarmanv5 but not sent messages with it. Presumably, I would use Python Scripts within HA to send messages to my inverter.

    Any pointers as to the easiest way to achieve this will be gladly accepted. Many thanks.



  • Moderators, Home & Garden Moderators Posts: 6,215 Mod ✭✭✭✭graememk


    I think the solarman integration uses pysolarmanv5 now. Even supports writing to registers now.

    You can do the testing to see if you can do the control you want with the pysolarmanv5 first for proof of concept and then implement it in HA



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


    Yes, See example below using the solarman.write_holding_register service

    type: horizontal-stack
    cards:
     - type: custom:button-card
       name: Self Use
       icon: mdi:home-battery-outline
       size: 20%
       tap_action:
         action: call-service
         service: solarman.write_holding_register
         service_data:
           register: 43110
           value: 33
     - type: custom:button-card
       name: Feed In Priority
       icon: mdi:home-export-outline
       size: 20%
       tap_action:
         action: call-service
         service: solarman.write_holding_register
         service_data:
           register: 43110
           value: 96
     - type: custom:button-card
       name: Time of Use
       icon: mdi:home-clock-outline
       size: 20%
       tap_action:
         action: call-service
         service: solarman.write_holding_register
         service_data:
           register: 43110
           value: 35
    




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


    App Daemon stopped without my knowledge so my automation to charge the battery didn't run. Woke up to 18% SOC in it and forecast for about 2kWh generation today. Damn.

    Anyone have an automation to alert if App Daemon has stopped? Is that possible? 🤔



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


    You can enable the watchdog for add-ons which will restart in the event of an issue.

    The Supervisor integration also exposes metrics about a running add-on so you can automate on that in terms of notifications etc.




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


    AppDaemon has moved with the latest HA update which is why it's failing to run. I'm still trying to get my head around the instructions to fix. I may have to manually go and set the charge time on the inverter to get me by. 😣

    https://community.home-assistant.io/t/appdaemon-wont-start-complains-about-secrets-yaml/641197/23



  • Registered Users, Registered Users 2 Posts: 16,105 ✭✭✭✭Ha Long Bay


    I just managed to get this fixed. The thread made no sense to me at first. I used the Samba Share addon.

    Note you need to configure with a password on the configuration page.


    After that I was able to browse to Home Assistant folders using the local IP.


    Edit the file using notepad

    Change  from appdaemon/appdaemon.yaml" to “/homeassistant/secrets.yaml and save the file.

    After saving the service started and for me and was able to charge from grid using my saved scripts.



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


    Amazing! that did it and very easy. Thank you so much.



  • Registered Users, Registered Users 2 Posts: 16,105 ✭✭✭✭Ha Long Bay


    Glad you got sorted. I am sure there are easier ways through HA but I could not make sense of that thread you linked. The plugin has been stable for me since the change.




  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,764 ✭✭✭Raoul


    I work in a college and for some of our students we are always on the lookout for data for them to analyse for projects. Bit of a long shot but would anyone like to share any of their data. It could be totally anonymous. Thanks.



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


    Charged up successfully last night. 😀

    I've a formula to calculate the charge rate to reach the SOC target & in the charge hours I set. Both those are in a card so I can adjust if I want to. This is how I got from 25% up to 60% between 2-6am. Normally I have the SOC target calculated based on the Met Eireann forecast but I disable that now in winter.




  • Registered Users, Registered Users 2 Posts: 309 ✭✭JayBee66


    I notice others charging their batteries slowly during the entire night rate period. My inverter (KStar) is charging rapidly in about an hour and a half from roughly 25% to 95% for a 5KW battery. Is this too fast? Will it damage the battery? Should I (if possible) slow the charging rate down?



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


    I figure low and slow is probably better long term, but also it means it's not full in the first hour and then draining until I wake up. You could reduce the rate slightly and see how you get on. Mine charged above at about 1kW.



  • Registered Users Posts: 6,163 ✭✭✭championc


    You're charging at a rate of about 3kW or less. I wouldn't really call that fast.

    Many here have DIY powerwalls of 15kW and upwards



  • Registered Users Posts: 436 ✭✭jasgrif11


    Hi All,

    Has anyone figured out a way to easily add a daily standing charge in the tariff calculations within Home Assistant? I have Peak and Off Peak rates but not sure how to add a standing charge.

    Thanks



  • Registered Users Posts: 824 ✭✭✭HotSwap


    Add another consumption device to the dashboard and set it to a static price of whatever your standing charge is. And have it just consume 1 unit per day at 00:01am.



  • Registered Users, Registered Users 2 Posts: 3,222 ✭✭✭irishchris


    Tried adding this to config.yaml but not getting recognised as a consumption sensor in energy dashboard. Still learning my trade in home assistant so must be doing something wrong. Any pointers?

    sensor:
      - platform: template
        sensors:
          daily_standingcharge:
            friendly_name: "Daily standing charge"
            unit_of_measurement: "kWh"
            device_class: energy
            value_template: "{{ 0.77 }}"
            icon_template: mdi:flash
    
    
    automation:
    
    
      - alias: "Daily standing charge Reset"
    
    
        trigger:
          platform: time
          at: "00:01:00"
        action:
          service: homeassistant.update_entity
          entity_id: sensor.daily_standingcharge
    




  • Registered Users Posts: 436 ✭✭jasgrif11


    How many of you have installed a change over switch?

    Would you recommend them and roughly what is the cost?

    I have a couple of power outages per year (rural area and can last 6-10hrs). My system is a little complex in that I have my hybrid inverter in my Garage connected to a sub consumer unit. So I’m not sure how I would connect back to the main consumer board in the house. I would also want to isolate the Heatpump so that large load stays offline.

    Any guidance would be great. I also need to find someone to do it. My own electrican is, lets say “ pre solar”.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 309 ✭✭JayBee66


    I have one. It cost 730 (inclusive of installation and VAT), which sounds excessive and I'm sure it is. I live in a rural area too so at least the whole house is powered during the many power cuts. The alternative is a separate circuit with a couple of sockets with which to plug in devices or run an extension to.



Advertisement