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
1242527293070

Comments

  • Registered Users Posts: 13 toledobastos


    I don’t remember the details, but the XML packs a few variables like cloudiness and radiation per sqm, which is a proxy for solar production. Like Brian I’m just taking 15% off that latter figure, but this certainly can be improved. I don’t want to start parametrizing the Met Eireann data because I prefer to model the raw data towards the end of the prediction model. I haven’t include a model yet because I only have a few weeks worth of data, but the next thing for me is to transform the best.guesstimate variable in a Bayesian model. It should be pretty straightforward with more data.



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


    Only issue with tying to model it, is that it's specific to your panels, fine for you, but nobody else.

    I might look into it a little bit more, as met data seems to be the most accurate for me. (Even for day to day work, it's pretty good 24 hrs out, rainfall wise anyway!)



  • Registered Users Posts: 13 toledobastos


    It shouldn't be. The model will be based on your data, not mine. For clarity, the dependent variable is actual production, which the model reads from your Solis (but it could be other brands of inverter), with the independent variables being the many forecasting services available, again queried with your data (lat, lon, slope, kwp, and orientation). My expectation is that the accuracy of the model will vary over the year, particularly as seasons change, so I'm guessing a temporal series of a few weeks may perform better than the annualized solar return. But I need more data to get to the point where it's fun to start looking into this.



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


    Ah! I get you, that's really cool.

    Yeah there will be some outliers (like today, got a great spell of sun and turned a poor day into a decent one.



  • Registered Users Posts: 2,475 ✭✭✭bullit_dodger


    i use the xml from met eireann as does connesha. Basically for every hour there's something like.....

    <time datatype="forecast" from="2021-08-26T10:00:00Z" to="2021-08-26T10:00:00Z">
             <location altitude="28" latitude="53.0000" longitude="-9.0000">
                <temperature id="TTT" unit="celsius" value="19.1"/>
                <windDirection id="dd" deg="33.8" name="NE"/>
                <windSpeed id="ff" mps="2.3" beaufort="2" name="Svak vind"/>
                <globalRadiation value="448.2" unit="W/m^2"/>
                <humidity value="86.4" unit="percent"/>
                <pressure id="pr" unit="hPa" value="1025.7"/>
                <cloudiness id="NN" percent="11.7"/>
                <lowClouds id="LOW" percent="11.7"/>
                <mediumClouds id="MEDIUM" percent="0.0"/>
                <highClouds id="HIGH" percent="0.0"/>
                <dewpointTemperature id="TD" unit="celsius" value="17.0"/>
             </location>
          </time>
    

    The way i did it was to add up all the "globalradiation values" for a day. Above you can see it's 448 watts for that hour. When you add all of them up you get a figure like 4604 (or something). You can then equate that back to the actual output that you did for that day, so you can generate say a 10 pt moving average of the number Kwhr produced / 1000. Then with tomorrows forecast you can equate that to a value. No mapping of angles, etc.

    and from that you can see that it's (relatively) good.

    We had a thread on this last year.



  • Advertisement
  • Registered Users Posts: 1,080 ✭✭✭silver_sky


    Has anyone managed to pull the Met Éireann radiation data into homeassistant? the integration for MÉ doesn't include radiation data. :(



  • Registered Users Posts: 188 ✭✭connesha


    This should be a drop in to HA for overnight-charging a battery to a target battery SOC.

    Its the same logic as the earlier post; but packaged as a script that should be easy to setup.

    To use:

    Put this into your scripts.yaml

    
    inverter_set_energy_storage_mode:
      alias: "Inverter Set Energy Storage Mode"
      sequence:
        - service: script.inverter_write_holding_register
          data:
            register_addr: 43110
            register_value: "{{ storage_mode }}"
    
    inverter_set_charge_current:
      alias: "Inverter Set Charge Current"
      sequence:
        - service: script.inverter_write_holding_register
          data:
            register_addr: 43141
            register_value: "{{ current_da }}"
    
    
    set_night_charge:
      alias: "Set Night Charge"
      icon: mdi:flash
      variables:
        charge_voltage: 53
        charge_hours: 9
        night_usage_wh: 3000
        battery_capacity_wh: 20000
        lower_soc_limit: 20
        now_soc: "{{ states('sensor.battery_soc') }}"
        target_soc: "{{ states('input_number.target_soc') }}"
        soc_to_wh: "{{ (battery_capacity_wh / 100) | int }}"
        now_battery_usable_wh: "{{ ((now_soc - lower_soc_limit) * soc_to_wh) | int }}"
        target_battery_usable_wh: "{{ ((target_soc - lower_soc_limit) * soc_to_wh )| int }}"
        energy_storage_mode: >-
          {% if (now_battery_usable_wh - night_usage_wh) > target_battery_usable_wh and is_state('input_boolean.force_always_charge', 'off') %}
            33
          {% else %}
            35
          {% endif %}
        charge_needed_wh: "{{ target_battery_usable_wh - (now_battery_usable_wh) }}"
        current_needed_a: "{{ ((charge_needed_wh/charge_hours) / charge_voltage) }}"
        current_needed_deci_amps: >-
          {% if current_needed_a < 0.1 %}
            0
          {% elif current_needed_a > 100 %}
            1000
          {% else %}
            {{ (current_needed_a * 10 ) | int }}
          {% endif %}
      sequence:
        - service: script.inverter_set_energy_storage_mode
          data:
            storage_mode: "{{ energy_storage_mode }}"
        - delay:
            seconds: 30
        - service: script.inverter_set_charge_current
          data:
            current_da: "{{ current_needed_deci_amps }}"
    

    Change:

    • charge_hours to how long you are charging for in hours
    • night_usage_wh to how many watt hours you generally use during this time (ideally how many watt hours get discharged from your battery during this time)
    • battery_capacity_wh to your battery capacity, in watt hours. (5kwh would be 5000)
    • lower_soc_limit: how low do you let your battery go (most common is 20%)
    • if your storage mode register values are not 33 and 35, then change them

    Create an input_number:

      target_soc:
        name: Target SOC
        min: 40
        max: 100
        step: 5
        initial: 50
    

    Create an input_boolean:

      force_always_charge:
        name: Force Always Charge
    

    Manually set the charge times on the inverter and leave them set.

    Call script.set_night_charge from an automation, ideally a couple of minutes before your charge window starts.


    This script will try to charge your battery to close to the target_soc level by the end of the charge window. (Note: it will not be exact, but should come reasonably close. You can vary the charge voltage to adjust if yours behaves differently)

    It will set the registers on the inverter to enable/disable charge, and to set the charge current.

    If there is enough battery to last until morning, it will discharge over night. You can override this behaviour by setting force_always_charge to On: this means that it'll "charge" at 0A even if there is sufficient battery, so that it does not allow discharge overnight. (useful if you want to run heavy loads at night and not use battery)


    You can vary the target_soc by changing the input_number.target_soc (recommend putting this in your UI as a slider, as well as input_boolean.force_always_charge)

    If you want to link it to a solar forecast, the easiest way will be to have the solar forecast update input_number.target_soc (so no change is required in the script)

    Good luck!


    Disclaimer: This hasn't been tested, and its not what I'm using myself, so try it out first.



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


    In the app daemon python file had something like this for safe values:

    if register_addr == 43141:
                if register_value == 0 or register_value == 500 or register_value == 600:
                    is_safe = True  
    

    Just change that to something like?

    if register_value >= 0
       is_safe = True 
    




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


    How timely. This evening's hacking efforts have been spent trying to get this working in HA using pyscript and a modified version of @connesha's WeatherForecast class.


    Install pyscript from HACS and set up the integration (Select yes to Access hass as a global variable? and Allow All Imports?)

    Then copypasta into following locations:

    /config/pyscript/meteireann_solarforecast.py:

    import datetime
    from weatherforecast import WeatherForecast
    
    @service
    def meteireann_solarforecast():
       weather = WeatherForecast(53.123456, -6.123456)
       weather.load_weather_data()
    
       arrayMultiplier = 0.18*23.52/1000 # panelEfficiency * panelArea(m2) / 1000 (to kWh)
    
       today = weather.get_radiation_for_date_total(datetime.date.today()) * arrayMultiplier
       tomorrow = weather.get_radiation_for_date_total(datetime.date.today() + datetime.timedelta(days=1)) * arrayMultiplier
    
       state.set("sensor.meteireann_solar_today", today)
       state.set("sensor.meteireann_solar_tomorrow", tomorrow)
    


    /config/pyscript/modules/weatherforecast.py:

    import logging
    import requests
    import xml.etree.ElementTree as ElementTree
    from pandas import DataFrame, to_datetime
    import datetime
    
    _LOGGER = logging.getLogger(__name__)
    
    
    class WeatherForecast:
    
       def __init__(self, lat, long):
           self.weather_data_frame = None
           self.lat = lat
           self.long = long
           self.WEATHER_URL="http://metwdb-openaccess.ichec.ie/metno-wdb2ts/locationforecast?lat=%s;long=%s" % \
                   (self.lat, self.long)
           return
    
       def get_radiation_for_date_total(self, date):
           daily_weather_data = self.weather_data_frame.resample('H').ffill().resample('D').sum().iterrows()
           radiation = self._extract_radiation_for_date_total(daily_weather_data, date)
           return int(round(radiation))
    
       def get_radiation_for_today_total(self):
           return self.get_radiation_for_date_total(datetime.date.today())
    
       def get_radiation_for_date_hourly(self, date):
           hourly_weather_data = self.weather_data_frame.resample('H').ffill().iterrows()
           radiation_list = self._extact_hourly_radiation_for_date(hourly_weather_data, date)
           self._ensure_full_day(radiation_list)
           return radiation_list
    
       def get_radiation_for_today_hourly(self):
           return self.get_radiation_for_date_hourly(datetime.date.today())
    
       def load_weather_data(self):
           response = task.executor(requests.get, self.WEATHER_URL)
           tree = ElementTree.fromstring(response.text)
           parent_map = {c: p for p in tree.iter() for c in p}
           result_dict = {}
           for n in tree.iter('globalRadiation'):
               result_dict[parent_map[parent_map[n]].attrib['from']] = n.attrib['value']
           self.weather_data_frame = DataFrame.from_dict(result_dict, orient='index')
           self.weather_data_frame.index = self.weather_data_frame.index.map(to_datetime)
           self.weather_data_frame.columns = ['globalRadiation']
           self.weather_data_frame['globalRadiation'] = self.weather_data_frame.globalRadiation.astype('float')
           return
    
       @staticmethod
       def _ensure_full_day(radiation_list):
           # when you get data for TODAY, it will only be from this hoiur onweards, so pad the previous hours
           first_hour = radiation_list[0][0]
           # _LOGGER.debug(radiation_list)
           if first_hour != 0:
               for i in range(first_hour, 0, -1):
                   radiation_list.insert(0, [i-1, 0])
           # _LOGGER.debug(radiation_list)
    
       @staticmethod
       def _extact_hourly_radiation_for_date(hourly_weather_data, date_to_get):
           hourly_radiation = []
           for index, row in hourly_weather_data:
               radiation = int(round(row['globalRadiation']))
               radiation_date = index.to_pydatetime().date()
               radiation_hour = index.to_pydatetime().time().hour
               if radiation_date == date_to_get:
                   hourly_radiation.append([radiation_hour, radiation])
    
           return hourly_radiation
    
       @staticmethod
       def _extract_radiation_for_date_total(daily_weather_data, date_to_get):
           for index, row in daily_weather_data:
               radiation = row['globalRadiation']
               radiation_date = index.to_pydatetime().date()
               if radiation_date == date_to_get:
                   return radiation
    


    /config/pyscript/modules/requirements.txt:

    requests
    pandas
    


    Then set up an automation to call the service:

    alias: Refresh MetEireann Solar Forecast
    description: ""
    trigger:
     - platform: time
       at: "07:00:00"
    condition: []
    action:
     - service: pyscript.meteireann_solarforecast
       data: {}
    mode: single
    
    Post edited by Jonathan on


  • Registered Users Posts: 188 ✭✭connesha


    Replace the full _verify_safe_register with the below. It verifies a bunch of extra registers: all the ones needed for charging/discharging. (Watch that the indentation is consistent after copying it in).

    def _verify_safe_register(self, register_addr, register_value):
        is_safe = False
        if register_addr == 43110:
            # storage control mode
            if register_value in {33, 35, 96, 49, 51}:
                is_safe = True
        elif register_addr in {43141, 43142}:
            # charge/discharge current
            if 0 <= register_value <= 1000:
                is_safe = True
        elif register_addr in {43143, 43145, 43147, 43149}:
            # hour
            if 0 <= register_value <= 23:
                is_safe = True
        elif register_addr in {43144, 43146, 43148, 43150}:
            # minute
            if 0 <= register_value <= 59:
                is_safe = True
    
        if not is_safe:
            self.log(f"ERROR The register {register_addr:05} or value {register_value:05} is not safe, as defined in your _verify_safe_register method. Either update your _verify_safe_register method or set a different register_addr or register_value")
            raise Exception(f"ERROR The register {register_addr:05} or value {register_value:05} is not safe, as defined in your _verify_safe_register method. Either update your _verify_safe_register method or set a different register_addr or register_value")
    


    (Edited to add 49/51, as some people have different setups)

    Post edited by Jonathan on


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


    Thanks for these, will get them in there.

    Yes I have 49/51, it's basically toggling between Backup mode and Self Use.

    What's 96 for?



  • Registered Users Posts: 188 ✭✭connesha


    49/51 added (post is edited above)


    96 is Feed In Priority Mode (FIP). This means that the battery will not charge (but may discharge if house_load is greater than solar_gen)

    It prioritises export over battery charge. I use it all the time to prioritise the Eddi over the battery (you could for Zappi too).

    Each morning, when my SOC is above a certain level, and solar_gen is more than covering house_load, I set to FIP mode. This means that all solar_gen goes to house or export, so the Eddi kicks in and takes all the excess (instead of the battery), so we get hot water a few hours earlier in the day rather than waiting for battery to fill first. It has advantages over Eddi "boost", as the Eddi varies its load constantly, so your dishwasher/washing machine/kettle can run at the same time, with less chance of importing.



  • Registered Users Posts: 188 ✭✭connesha


    Yea, mine is quite similar. Probably the main difference is that I try to use a selection of the "most similar days to today" from the recent period for the calculation (where the size of the "recent period" varies according to the time of the year). This is the thread, and a link to the reasoning behind it: #64

    Here is how it has worked since spring:

    Its been very successful in automating night-time battery charging; almost all electricity purchased has cost 5.7 cents (between 2am and 5am, on BG EV smart plan)


    And just out if interest, I started tracking Forecast.solar at some point for comparison purposes (its not used in any calculation anywhere), see it in the blue... (its rubbish... completely unusable...)


    The hourly radiation levels are also useful to track. Here is a screenshot from HA:

    At a glance, it can tell:

    • whats it like now (the vertical red dotted line is "now")
    • what time of the day, roughly, will there be higher radiation (and hence higher generation). On bad days like last Sunday, the line never want above 100...
    • how does the met.ie forecast from 1:45AM this morning (that we used for charging automation) compare to now (the solid line is the level locked in at 1:45AM forecast time, and the dotted line is updated from met.ie every 10 minutes). When the solar forecast is out, you'll most often see a deviation between solid and dotted line

    Also, for automating night time charging, it allows a few more conditions to be covered, especially this time of year. For instance, yesterday, the forecast was more than we needed for the day. BUT the generation started a little late. So, morning time would not have been covered.

    So, the charge automation has a second condition:

    It looks for the hour that "real generation" starts, and if the battery has not got enough to get to that time (regardless of total daily generation), it tops up the battery enough to get there. Specifically, it looks for the first hour where radiation is over 50. It makes sure that the battery has base_load * hours to get there. AND, if that hour is 8am or later, then add a bit extra (i.e. add a bit extra for breakfast)



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


    Ninjas, ye are a bunch of solar ninjas. I knell at the altar of your collective ninjadom 🤣



  • Registered Users Posts: 696 ✭✭✭fuse


    I think there's something up with my HA Energy dashboard config 😁

    Got the Solarman linked up and the data looks fine in the individual entities.

    Started out like this after dashboard config, then I had a couple of days where the values were ok and now they've reverted to crazy numbers.



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


    Next on my to do list this.

    Is this the same as what @Jonathan detailed above or are you pulling this data differently?



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


    You've managed to insult @connesha pretty comprehensively there. 😂

    No. What I've posted above is very basic, more akin to Forecast.solar and Solcast. @connesha's is a far more comprensive model, including comparisons of previous predictions to actuals etc.



  • Registered Users Posts: 188 ✭✭connesha


    Its got some parts of it.

    What @Jonathan posted above in weatherforecast.py is what I use for pulling the Daily Radiation for today/tomorrow from met.ie

    The difference is in what is then done with that radiation.

    Jonathan is taking that radiation and multiplying it by a fixed multiplier (derived from the size/efficiency of your own array). See arrayMultiplier in meteireann_solarforecast (radiation to solar_forecast will be linear across the year). Once you set the multiplier for your system, it should be pretty good; definitely much much better than Forecast.solar, and I'd guess quite a bit better that Solcast too (although I've never used Solcast)

    What I'm doing is comparing "todays radiation" against a selection of previous days, to calculate a new multiplier every single day. So it automatically learns/adjusts across the year, based on your own recent actual radiation->generation data (doesn't have any hard-coded multiplier), and tries to lessen the skewing effect clipping can have (for those with arrays much larger than inverter)

    I'd say go with what Jonathan has put above. It'll be much easier to setup, and give most of the benefit. My full one would take a lot more to setup (its got a database, loads more code, etc).


    If you wanted to link it to the night charging (assuming you put in the script I posted last night), you could do a very quick first implementation along the lines of this (you can can make it prettier, and do more scaling/tuning at a later point):

    Create a new automation that runs at e.g. 10:30PM. It should call these actions in sequence:

    1) execute pyscript.meteireann_solarforecast

    2) delay 60 secs

    3) check the value of sensor.meteireann_solar_tomorrow, and

    • if its low (under 5kwh) then set input_number.target_soc to 100
    • if its high (over 20 kwh) then set input_number.target_soc to 30
    • scale in between

    4) delay 10 secs

    5) execute script.set_night_charge


    Note:

    • numbers are only for illustration purposes, set your own
    • the delays are there because I haven't looked at pyscript, and don't know if calls into it are synchronous or not (the delays are no harm either way, so you can leave them there regardless)


    A couple of things to be conscious of:

    1) Don't fully rely on the met.ie API being available... It was down for hours on end for good parts of the summer. So, you'll want to have some "cached" results to fall back on. Easiest way would be to call pyscript.meteireann_solarforecast every 1 hour, so if it fails at 10:30PM, at least you'll have the values from one of the previous hours...

    2) When I initially wrote the forecasting, I cant remember if it handles DST, and what happens in the hour from midnight to 1am (I remember there was a little issue here in my general forecasting implementation, but I'd need to dig more to remember). For now, just avoid triggering all this between midnight and 1am and you'll be fine (not sure if you checked this Jonathan)



  • Registered Users Posts: 188 ✭✭connesha




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


    I guess it was wishful thinking that @connesha 's data/graphs would be that easy to set up 🤣

    I agree @connesha for my use case it doesn't need to be that complicated because of a big problem I will soon have called shading.

    Got 3kwh on the front of the house and 4kwh on my shed, the 4kwh string is useless/just for show from mid-October to mid-February as the house is completely shading it 😰 So I only have 3kwh usable which means I can just let the battery charge every night during those times.

    In reality the automation will only be useful to me Sept to mid-Oct and then maybe mid-Feb to April.

    First year with a big battery so I'm still learning the patterns.



  • Advertisement
  • Registered Users Posts: 3,956 ✭✭✭mp3guy


    @unkel what are you planning on mining now that ETH is ded?



  • Registered Users Posts: 65,061 ✭✭✭✭unkel


    Crazy volatility this morning in terms of market value, difficulty and thus profitability of the usual suspects of POW GPU mineable coins. The only coin at the moment you can profitably mine if your electricity rate is €0.28/kWh is ERG. And it is borderline, and only with fairly efficient GPUs.

    That said, lots of us have night rate and / or battery and / or solar PV, so our weighted average electricity cost per unit is far, far lower than €0.28c/kWh so it looks like mining is still pretty profitable. And even if it were slightly loss making, it would still be a greener and cheaper way to heat your house this winter than from burning fossil fuels. So yeah, things are looking pretty ok. But early days yet, we'll see how it pans out.

    Just did a calculation and by using mining rigs sensibly to heat my home, I will have prevented about a million liters of gas being burnt this winter, presuming night rate electricity is roughly 50% wind and 50% gas



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


    You must have a massive gaff :) Take it you mean based on your gaff, if scaled to X houses it would have prevented about a million liters of gas being burnt this winter.

    Tbh it makes sense to use heat from one thing to heat the living space. So in a well insulated house (not ours) the dishwasher is a kitchen radiator. Time it to be nearly finished when you get up in the morning and room would be warmer. Same for clothes dryer if used. If the primary purpose of the mining rig is heating (I guess it is now while it seems mining profits are low) using largely renewable sources, and 2nd purpose is to make a few quid - I'm good with that.



  • Registered Users Posts: 65,061 ✭✭✭✭unkel


    No, a modest and small 3 bed semi originally but extended several times so suit growing family (of 5) and working from home. Average gas consumption for a 4-5 person household in Ireland is 18000kWh per year and those figures are from before COVID, so from before working from home. If I change that to about 22000kWh, this is 2000m3, which is 2 million liters, so if replaced a tiny bit by PV but 95% by electricity at the night rate, which is over 50% from wind in winter (and the rest mainly from gas), I will save over a million liters per year.


    You make a good point about all heat generating machines in the house being "radiators". Must run dishwasher etc. in the early hours of the morning instead of when I go to bed. I do heat my water from electricity in the last few hours of the night rate, this works as a little "radiator" in the hot press



  • Registered Users Posts: 2,475 ✭✭✭bullit_dodger


    I never thought of that......going to change my habit there instead of launching at 00:05, to launch at 07:00 (takes about 2 hrs for a wash/dish cycle). Makes sense that the heat losses go into the kitchen especially for the dish washer, instead of being "lost" at 2am.

    It's the little things.



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


    This is great, thank you! to yourself and @connesha and actually everyone else here. 😂

    I may put a little spin on it to get a reactive estimate like connesha rather than static. Just trying to continue on what I've been working up outside of HA. I'll share if I do get it working. Given it's history based it'll take some time to test, but this code is a great starting point. 😀



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


    Holy Cow, I had no idea that 22000kWh = 2000m3 = 2 million liters. I thought you had a typo!! That save a 'million liters of gas per house' should be the marketing campaign to get us all weaned off gas so we all firstly realise the volumes per house. Because it's piped we never see the volume. Maybe if I had gas tanks, likes places that don't have mains gas, I'd see it differently.



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


    If you're using the standard solis configuration for the solarman integration then check that the state_class for the daily generation, battery charge, and battery discharge are set to "total_increasing". I loaded a dodgy config there recently that hadn't been updated and it screwed up my stats. I've managed to sort of fix them but it was a dodgy fix.



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


    All setup and working now. Cheers for that! what would be the best way to handle setting the attributes on the new entities (UOM,unique id, device class) and also rounding. They're pretty raw. I tried to figure out how to set it in the meteireann_solarforecast.py script but couldn't get it to work.

    The alternative I was thinking is to pull out the calculation and just bring in the radiation totals and use those in template sensors to format etc. Also leaves room for ease of adding a variable in the formula. 🤔


    In other news - my feed-in priority switch is now setup and working. The value is 112 on mine which was confirmed by making the change on the inverter itself and checking.

    Here's my YAML for the automation. Everything is manual for now. I'll get to automation later when I'm happy with the forecasting setup.

    alias: Solis Grid Feed-in Priority
    description: ""
    trigger:
      - platform: state
        entity_id:
          - input_boolean.solis_grid_feed_in_priority
        id: "on"
        to: "on"
      - platform: state
        entity_id:
          - input_boolean.solis_grid_feed_in_priority
        id: "off"
        to: "off"
    condition: []
    action:
      - choose:
          - conditions:
              - condition: trigger
                id: "on"
            sequence:
              - service: script.inverter_write_holding_register
                data:
                  register_addr: 43110
                  register_value: 112
          - conditions:
              - condition: trigger
                id: "off"
            sequence:
              - service: script.inverter_write_holding_register
                data:
                  register_addr: 43110
                  register_value: 49
        default: []
    mode: single
    
    
    


  • Advertisement
  • Registered Users Posts: 1,239 ✭✭✭mag


    thanks a lot for this.

    followed the steps but HA isnt finding pyscript.meteireann_solarforecast for some reason :

    "Unable to find service pyscript.meteireann_solarforecast"

    ive double checked that all the files/directories are created as you outlined and pyscript is installed as described and running

    any steer on what might be the issue?



Advertisement