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
1353638404170

Comments

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


    Part 1 is certainly doable. Assuming you have the myenergi integration (if not add it). Here's my setup for the Bord Gais Smart EV plan, so daylight savings doesn't apply. I'm sure you can handle DST but not sure exactly how - I see some recommendations to handle it with a separate entity tracking.

    I added the below to configuration.yaml which sets out the source for the data and the entities to track that. For example, one of the entities it created was sensor.daily_energy_ev and there's a corresponding monthly variant too.

    utility_meter:
      daily_energy:
        source: sensor.myenergi_home_2_grid_import_today
        name: Daily Energy
        cycle: daily
        tariffs:
          - day
          - night
          - peak
          - EV
      monthly_energy:
        source: sensor.myenergi_home_2_grid_import_today
        name: Monthly Energy
        cycle: monthly
        tariffs:
          - day
          - night
          - peak
          - EV
    

    In order to tell it when to add usage you'll need to add an automation. Below is my automation.

    If you click the 3 dots in the top right after creating an automation you can "edit in YAML" where the code can be pasted in, or switch back to "edit in Visual editor" where you can add the various blocks and build it up that way.

    alias: Stats - Electricity Tariffs
    description: Set tariff based on BGE Smart EV hours
    trigger:
      - platform: time
        at: "08:00:00"
        variables:
          tariff: day
      - platform: time
        at: "17:00:00"
        variables:
          tariff: peak
      - platform: time
        at: "19:00:00"
        variables:
          tariff: day
      - platform: time
        at: "23:00:00"
        variables:
          tariff: night
      - platform: time
        at: "00:00:00"
        variables:
          tariff: night
      - platform: time
        at: "02:00:00"
        variables:
          tariff: EV
      - platform: time
        at: "05:00:00"
        variables:
          tariff: night
    condition: []
    action:
      - service: select.select_option
        data:
          option: "{{ tariff }}"
        target:
          entity_id: select.daily_energy
      - service: select.select_option
        data:
          option: "{{ tariff }}"
        target:
          entity_id: select.monthly_energy
    mode: single
    
    


    This is all based on my own configuration so while it won't do what you want with day/night and DST, it may give you a starting point.



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


    On part 2, what inverter do you have?

    if this is a solis, what data logging stick do you have? if you don't know then a picture of it will help determine.



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


    What's the default polling rate for the Solis DLS-W stick with the Solarman integration in homeassistant? how can I check and/or adjust that?



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


    30 seconds. You'll have to amend the const file yourself as it isn't exposed as a configurable parameter.



  • Registered Users Posts: 1,728 ✭✭✭tnegun


    I'm currently in the process of adding a second inverter and additional panels to my setup. I'm having a lot of hassle sourcing a Solis CT to enable export limitation on one of the inverters as I'll have almost 7kWp of panels with 8kw of inverter. I've found a couple of threads detailing using a PI or ESP32 to simulate a smart meter and relay grid import/export values to the inverter over modbus to allow it adjust its output and keep within the export limits. Has anyone done anything like that here? Preferably I'd like to keep the data logger connected to the RS485 port, update or borrow from the existing pysolarmanv5 project and use it to achieve the same anyone know if it's possible?



  • Advertisement
  • Registered Users Posts: 298 ✭✭JayBee66


    Faller at the first hurdle here. I'm trying the client_example.py code and am getting "No Socket Available".

    I have a Solarman logger SN: 1776** on a KStar hybrid inverter.

    I can access the logger but the Status page is always blank.

    In the advanced section, the LAN settings give an address 10.10.100.254, which I used to get into logger to change the router when we got a new Internet provider. However, using this address in client_example.py produces the "No Socket Found" error.

    I'm an old school programmer from the 80s and would appreciate some initial help to get me started. Thank you.



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


    You need to find the IP it was assigned by your new router (likely 192.168.1.*) I often use AngryIP Scanner to scan the network to see whats connected, https://angryip.org/



  • Registered Users Posts: 298 ✭✭JayBee66


    Tried AngryIP but could see no ports open on any IP address.

    I wonder that because I can't see the Status page on the logger that it is not setup for this purpose.

    I think it is in AP mode rather than STA mode, if that makes a difference. I see the logger name on my list of available WiFI providers as AP_17.......



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


    Change it to STA(client) mode and see if tcp/8899 is open.



  • Registered Users Posts: 298 ✭✭JayBee66


    I'm a bit wary of changing anything in case the logger loses connection with Solarman.

    I looked at the firmware and it says, "LSW3_15_1216_1.06". I see other users, on this thread, with firmware beginning with MW.

    I assume the loggers for KStar and Solis are probably different in form and therefore in firmware too.

    Is there anything I can do first to check that the logger is even capable of providing data or is it a matter of trying to get data out of it?



  • Advertisement
  • Registered Users Posts: 298 ✭✭JayBee66


    I found page .../config_hide.html on my logger, which is a Model LSW-3-C

    The config_hide page shows the following...

    I have tried the example code with 10.10.100.254 but with no success. I just get the No Socket Available error.

    I'll try Remote Server rather than Access Point in the morning.



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


    That all looks correct. Can you attach the DLS to a wifi network as a client and then scan to see if tcp/8899 is open? It may not be available in AP mode.



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


    Is the logger posting to the solarman website?

    If so the 10.10.100.254 is the wrong IP for the logger,... Very unusual to have that as your home IP range.



  • Registered Users Posts: 298 ✭✭JayBee66


    Yes, the Solarman website has always been updated.

    10.10.100.254 is the IP address of the Access Point (the current mode of the logger) that I have to log into to do any admin on the logger. Such as change of Internet provider modem.

    10.10.100.254/config_hide.html was the page I called up (after switching logging into the logger) to get the data in the images above.

    I also tried 10.10.100.254/status.html but it was blank as is the Status on the logger admin page.

    The house IP range is the usual 196.* but that is on the house modem. Currently, I cannot see the logger or port 8899 listed anywhere in the 196.* range. I will try changing the logger from AP to STA mode and hope not to brick it all. I am no network specialist, just a lowly AI degree here.



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


    As it's logging to the internet, it has to have an IP on the house network.

    All mine respond to simple pings. You need to find it's IP address on your home network



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


    Port 80 should be open. Use Angry IP scanner. And it's 192.* 😉



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


    I like Angry IP, but if you want a complete no app version.....save the following as a batch and fire away

    for /l %%i in (1,1,254) do @ping 192.168.0.%%i -n 1 -w 100 | find "Reply"
    


  • Registered Users Posts: 298 ✭✭JayBee66


    I have an hypothesis with regards to my system before I mess it up. It came to me when I awoke (my best thinking period). My inverter manufacturer KStar have the ability to log into my inverter to tweak it (yes, the Chinese have access to my house) because it's a relatively new product and they need data. KStar also tweaks individual inverters to suit the owner's needs.

    I believe the logger is a special and hard coded for KStar (there is a drop down menu on the config_hide page with only KStar in the options), which probably means I can't change the IP address it's operating on (10.10.100.254). I was talking with a coder, who works for my installer, who is working on a bespoke hardware add-on that runs through the COM port on the inverter. Probably similar to MyEnergi's Libbi (an add-on for their rebadge of the same inverter from KStar that I have). The coder is adamant that's the only way to access the inverter and that my protestations are incorrect that there is a brainy bunch on Boards.ie proving him wrong. Probably, Solis are using off-the-shelf loggers thus the success you are all having.

    I have been running the example Python code whilst connected to my home router. I will try it again whilst logged into the logger Access Point and that will prove my hypothesis. From there on what do I do? Have a device that is permanently logged into the logger Access Point?

    To be honest all I really want is the SOC from the battery, to calculate a few moving averages to guesstimate when the battery will get to 90% and then start switching on the immersion and heaters. I don't want an Eddi or similar device to detect export. I'd rather start using the battery before it is full with a little fuzzy logic to leave enough in the battery for the evening. Updating the inverter time would be good too as the inverter doesn't use any automated process for that. Also, switching between self-consume and night charging would be good too. Home Assistant, charts etc. I am not particularly bothered about. I have Solarman Pro (it was a simple process to migrate to that from Solarman Home). I just need to integrate my SOC algorithm with WiFi switches and I'm away.

    Post edited by JayBee66 on


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


    You may not be able to pull stuff directly from the logger, I can pull stuff from the logger on the solis, but you cant on the newer loggers.

    I have not been able to pull stuff from the logger on my sofar. But I talk to them via RS485.

    You will not be able to talk to the logger on the 10.* IP address from the AP from your home network, ever.

    It HAS to have an IP from your home network. If it doesnt, It wont log anything to the internet.

    First step is being able to log into the logger from the home network. For that you need to find its IP. (the logger has 2 IPs, One for AP mode, which you are connecting to via its hotspot, and one that is connected from your home network.



  • Registered Users Posts: 298 ✭✭JayBee66


    Okay...

    Using Advanced Port Scanner I can only see port 8899 on 192.168.1.1

    I put that IP address in the example code and got the following error.

    According to Advanced Port Scanner, that IP address is a "Smart Light Bulb". I have smart sockets but no smart light bulbs. I switched the smart plugs off and this IP address is still scanable so it must be the logger.

    Many thanks for your input.



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


    your too far ahead of yourself again.

    Forget about ports for now, Angry IP scanner just pings, Not advanced port scanner.

    If you must scan for ports, try doing port 80. Need to find the IP of the Logger. then you can poke it for open ports.



  • Registered Users Posts: 298 ✭✭JayBee66


    Guilty.

    I have Angry IP too but it reports the same that 192.168.1.1 is the only address with 80 and 8899 open.

    I am running fael's test code on page 8 of this thread. Been running for 10 minutes and still querying input registers.

    Reports no registers found. I'll have to try a different range.



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


    If you put 192.168.1.1 into your browser, what comes up? does the loggers webpage come up?

    If you open cmd, and put ipconfig, what is the IP of your computer (It will be a private address so dont worry) likely 192.168.1.x or 192.168.0.x

    Just so we know your looking in the right range.



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


    192.168.1.1 is my broadband router and usually is for that. Put http://192.168.1.1 or https://192.168.1.1 into your browser while on the WIFI and check if it's your broadband box



  • Registered Users Posts: 298 ✭✭JayBee66


    Phew! Success. I found the input and holding register ranges for KSTar in the StephanJoubert support section on GitHub.

    Now for some paracetamol and a dark room.

    Thanks all.

    This is just the beginning. I may be back. 🤪



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


    Can someone pls share their HA config for this card, I just can't seem to get it right.




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


    This bad boy nest hub is on sale right now, €60 from google or €65 from Harvey Norman if you don't want to wait like I did.




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


    Is it hackable, or are you using the Google Cast on a 10 minute loop approach?



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


    I'll get you mine later, some of the feeds may be location telling so, prob will pm you



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


    No 10 min loop thing it just stay on indefinitely and looks much nicer with dark theme.

    But I do have the nabu casa subscription so maybe that's why?

    Handy to have it show the camera when someone hits one of the door bells too.

    Ah I got it sorted last night, using some serious templates 🤣



Advertisement