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

1484951535471

Comments

  • Registered Users Posts: 161 ✭✭johndoe11


    In just completed this as well, used a rs485 to USB instead of the Elfin-EW11 and connected it to a orange pi running solar assistant, then have it connected to home assistant using mqtt. Works perfectly and still have solis cloud running as well. Can't get the picture to rotate.




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


    On the otherhand, they finally have to do lists properly done, so I'll take a reorg on an energy panel as payment.



  • Registered Users Posts: 76 ✭✭riccol1966


    Hi can I ask a few questions, yes I've read through all the posts, I'm already using Home Assistant for some time but I'm unclear on a couple of points: I noted a few pointers to Shelly EMs back on p12 and p36 but nothing answered it fully for me...

    1) I'm running HA in a windows VM, does this mean I can also use all the python scripts etc in windows to communicate with the inverter and I don't need any other hardware, if I want to go this route? I can see python does come in Windows?

    2) If I decide to go the Shelly route then one CT clamp gets placed on the L-wire of the main breaker in the Consumer unit, this will monitor the grid power in (consuming) and out (exporting surplus). Hope I have that right? Then another CT is placed on the Inverter L-wire feeding back to the CU. This will monitor when the inverter/battery is pushing power out to the house, or when the battery is being charged from the grid, is that right? But then, how do I know when PV is feeding the battery and not grid power, notwithstanding that I can instruct the inverter what time to charge the battery etc. Also, can I add a 3rd CT clamp to the P+ DC wire going to the battery bank or is this not the way - if not how do we get all the battery data if not talking to the inverter directly. I guess I'm just trying to fill in the blanks on what exactly we can get from the Shelly CT clamps ?

    3) and finally if I was adding PV into home assistant which CT clamp(s) in my outline above is HA actually expecting to use to gather all its data?

    Kudos to all who have trailblazed on this topic already, very impressed by the knowledge shown.



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


    Hi ya.

    So for Q1: Yes, python on Windows will run code the same as it would on any other platform, so calls to an inverter should be the same there as anywhere.

    Q2: CT on main breaker and on feed from inverter - yes, correct. Others can correct me if I'm wrong on this but the power running to the battery is best off coming off the inverter itself (via python or HA). And no, you can't add a standard CT onto a DC cable - CT's are for AC only (unless you have a hall-effect DC-specific CT).

    Q3: You would add all CT's mentioned into HA:

    Main breaker would provide "Energy Consumed (from grid)" and "Energy Returned (to grid)".

    Inverter would provide "Energy from grid to battery" and "Energy from inverter".

    Under "Home Battery" you would add in the exposed values off the inverter for the battery state.

    You then get this:

    Don't forget to modify the data retention period for HA, default is only a few months, or install Grafana and influxdb and away you go with beautiful graphs.



  • Registered Users Posts: 76 ✭✭riccol1966


    Thanks for that, just doing another search I found the HA official page on battery integration (https://www.home-assistant.io/docs/energy/battery/) which talks about using Shelly for battery monitoring but doesn't mention how to do it.. ?



  • Advertisement
  • Registered Users Posts: 824 ✭✭✭HotSwap


    This would only work if the battery has a dedicated AC connection to your electrical panel.

    If the battery is connected via DC into a Hybrid inverter the only way you can get the data is from the inverter.



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


    Not the only way.. but it is the easiest!

    Other options are

    a DC shunt to measure the current and then also measure the voltage and then work out the power.

    Or talk to the BMS directly.

    Getting it from the inverter is the most straightforward way.



  • Registered Users, Registered Users 2 Posts: 2,041 ✭✭✭remoteboy


    Just getting started with home assistant and trying to build out a summary page for my electricity usage. I have a Solis inverter and a Zappi connected to a myenergi hub. I can see the CT clamp for the hub is connected in the meter box, but have no idea where the Solis gets its data from. There’s a couple of hundred watts difference in the import/export numbers between the Solis and the myenergi. Id like a single source of truth. Which one should I use?



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


    I tend to use the myenergi for daily totals etc, but use the Solis for real-time stuff. Also be aware that there is a "feature" on the Solis inverters whereby the house load modbus register drops to "0W" below about 200W or so. Inverter continues to draw from battery to match house load though 🤷‍♂️

    Looking forward to getting P1 data from smart meter once available as a true (from a billing perspective anyway) source of truth.



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


    I have an emontx and it's spot on. But again that's extra cost and hardware.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77


    Can anyone using a Huawei inverter with home assistant explain how to set up the energy tab to show the true hourly solar generation? I added the inverter as per guide below but using inverter yield total entity shows generation after sunset. Input power looks to be what I am looking for but I can't select that for solar production.



    Also has anyone set up tariffs in home assistant where they can set the exact unit cost for peak and off peak hours?

    Post edited by kaisersose77 on


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


    I'm following the instructions with the integration: https://github.com/wlcrs/huawei_solar/wiki/Daily-Solar-Yield

    Then I use the riemann integration on the energy dashboard, works lovely!



  • Registered Users Posts: 824 ✭✭✭HotSwap


    Same here. Followed those steps it works perfectly.

    As for the cost per kWh depending on the time; I’m using “utility meter” helper. Which is set using an automation like this:

    Then I have a template sensor that looks like this:


    It’s value is set depending on the value of the smart meter.

    then use that “energy price” sensor as the “cost” input to the energy dashboard; like this;




  • Registered Users Posts: 824 ✭✭✭HotSwap


    the entity’s looks like this:





  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77


    Thanks folks, much appreciated! @HotSwap , can you clarify exactly how you set the different unit cost for each tariff?



  • Registered Users Posts: 824 ✭✭✭HotSwap




  • Registered Users Posts: 41 Rob99


    Hi All

    Just a quick intro before I get round to trawling through this whole thread. Based SE England.

    I'm just about to have my Sunsynk 8kW inverter commissioned, along with a pair of Seplos 280L DIY battery builds, and have a Loxone system at home. Plan is to connect up to the inverter via RS485 port and use modbus to pull data into Loxone and change settings based on various logic around solar forecast etc and cheap rate electric periods.

    There is a huge amount of info about connecting to inverters using various wifi devices, RPi and home assistant etc but I don't want to introduce another layer so am going to attempt this with Loxone. Surprisingly there's not that much info about using modbus with Sunsynk inverters so I'm going to have to do a lot of digging around and will no doubt be posting lots of questions so bear with me......

    Cheers

    Rob



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


    So it doesn't get buried here, we do have a sunsynk thread too.

    I'm using this to pull the modbus data into home assistant (via mqtt)

    I'm using a homemade modbus to TCP using a rs485 board, esp32 and tasmota.

    Haven't done much with control yet though



  • Registered Users Posts: 41 Rob99


    Ah excellent, thanks @graememk I will take a look through that thread.

    I've looked at the kellerza github info and very useful. I've already got myself a Waveshare RS232/RS485 to Ethernet to use as a modbus gateway between Loxone and sunsynk inverter so just waiting for the installer to commission this week and then I'll be seeing what works.



  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77




  • Advertisement
  • Registered Users Posts: 824 ✭✭✭HotSwap


    template:

     - sensor:

       - name: Energy Price

        unit_of_measurement: "€/kWh"

        state: "{{ 0.11 if states('select.esb_smart_meter') == 'Boost' else 0.19 if states('select.esb_smart_meter') == 'Night' else 0.39 if states('select.esb_smart_meter') == 'Day'}}"



  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77


    Should I be abled to pick solar_energy_riemann as the sensor for solar in the energy dashboard when the "better approach" option is used? Not seeing it at the moment.



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


    I use the "better approach". You need to add the sensor config to your configuration.yaml, they don't provide it as a built in.



  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77


    Anyone see anything below they would think would cause the Riemann sensor not to show up? The efficiency loss sensor seems to be working as it's generating values.





  • Registered Users Posts: 824 ✭✭✭HotSwap




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


    @Jonathan is it possible to somehow add angles and direction of the panels to the met.ie script?

    I have 3 strings now (2 S at different angles and 1 N) and the numbers are not accurate anymore.

    I have something like this currently:

    def meteireann_solarforecast():
       weather = WeatherForecast(53.345225, -6.413277)
       weather.load_weather_data()
    
    
       #arrayMultiplier = 0.194*39.6/1000 # panelEfficiency * panelArea(m2) / 1000 (to kWh) //Front and shed (no shading)
       arrayMultiplier = 0.194*19.8/1000 # panelEfficiency * panelArea(m2) / 1000 (to kWh) //Front only (shed winter shading)
    
    
       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)
       dayaftertomorrow = round(weather.get_radiation_for_date_total(datetime.date.today() + datetime.timedelta(days=2)) * arrayMultiplier,2)
    




  • Registered Users Posts: 824 ✭✭✭HotSwap


    Try changing the indentation of your sensor starting on line 146. Can’t remember why I had to remove it from under the template.


    also try rebooting the server when you make changes like this.



  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77



    Unfortunately no luck so far whatever way i have the riemann sensor part, all other sensors seem to be working fine including your energy price one (cheers for that).



  • Registered Users Posts: 824 ✭✭✭HotSwap


    Try putting it as the last sensor under template. I remember I had issues also; just can’t remember them specifically.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,710 ✭✭✭kaisersose77



    Cheers, that worked (i'm pretty sure i tried that yesterday with no luck! :)


    Thanks again


    template:

     - sensor:

       - name: Energy Price

        unit_of_measurement: "€/kWh"

        state: "{{ 0.0815 if states('select.esb_smart_meter') == 'EV Rate' else 0.3661 if states('select.esb_smart_meter') == 'Night' else 0.3661 if states('select.esb_smart_meter') == 'Day'}}"

      

     - sensor:

      - name: "input_power_with_efficiency_loss"

       unique_id: "input_power_with_efficiency_loss"

       unit_of_measurement: "W"

       device_class: power

       state_class: measurement

       state: >-

        {% set inverter_rating = 5000 %} {# adjust this value to the rated power of your inverter #}

        {% set inpower = states('sensor.inverter_input_power')|float(0) %}

        {% if inpower < (inverter_rating*0.1) %}

         {{ inpower * 0.90 }}

        {% elif inpower < (inverter_rating*0.2) %}  

         {{ inpower * 0.95 }}

        {% else %}

         {{ inpower * 0.98 }}

        {% endif %}

         

     - sensors:

       gas_meter:

        friendly_name: Gas Meter

        value_template: "{{ states ('counter.gas_counter') | float * 0.01}}"

        unit_of_measurement: "m³"

        icon_template: "mdi:fire"

        device_class: gas


    # Example configuration.yaml entry

    sensor:

     - platform: integration

      source: sensor.input_power_with_efficiency_loss

      name: solar_energy_riemann

      round: 3



Advertisement