Jump to content

Homeassistant & Solarman 'Realtime' Monitoring


dino_coder

Recommended Posts

I had my installation done last week, so I am new to solar. My first thought was that the monitoring isn't real-time so I find myself waltzing down to check what is really happening on the inverter all the time.

I am not familiar with HA, so I will have to explore that, but sounds like this post is exactly what I'm looking for.

Are there any other tools available to interact with the wifi adapter on Deye inverters to get real-time information?

Thanks in advance.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Hi Gents

Hope you or anyone else can assist. 

I setup she solar-assistant software yesterday and I set everything up and it is working like a charm. It’s on it’s own raspberry PI3B. I then have another raspberry PI4 which is running HA and Node-Red. I managed to find my Deye inverter and all of the settings in HA and I created and entity card with the required settings. 

 I would like to set it up to talk to Node-Red on the RPI4 where my HA install is. So I enabled the MQTT from the Solar-Assistant side however I need assistance with the Node-Red setup in my HA installation. I’m pretty new to Node-red and there isn’t documentation on the solar-assistant website on how to do it. It did say coming soon 😊  though, not sure how long that coming soon has been there. 

 

Link to comment
Share on other sites

On 2022/01/31 at 8:49 AM, dino_coder said:

Super easy Solarman data logger integration with HA.

https://github.com/StephanJoubert/home_assistant_solarman

Edit: Just to clarify, I'm not the author. The author is quite active and responds to queries within a day or so.

It seems to pull values from the inverter about once per minute. Do you know if one can set this value shorter?

Link to comment
Share on other sites

On 2022/07/02 at 9:22 PM, Speedster said:

It seems to pull values from the inverter about once per minute. Do you know if one can set this value shorter?

I also tried set it to shorter intervals without any luck but I'm ok with updates every minute or so. Perhaps log an issue on the github.

Link to comment
Share on other sites

  • 2 months later...

I kind of stopped my urge to monitor real-time after posting this. The fact that the whole setup just works so damn well left me gob-smacked for a couple of months. The only issue is that I do overload the inverter from time to time, and my installed put a trip in front of it to protect the inverter, so then my lights go out temporarily when geyser+pool+kettle are on.

It's a minor issue, everyone in the house are trained and understand how to manage the situation. But, it has been stewing in the old noggin for a while now. I almost went solar-assistant but it looked like I can't do automation with it. But, it has good integration into home-assistant, so there's that...but that would now need two rpi's, getting a bit messy. Anyway, solar-assistant is also not real-time as far as I can determine, it give you the values at the same time the wifi-logger tool is updated, which by default is two minutes. So, if a condition occurs (inverter overload) it can be anything from 1 to 120 seconds before the logger reports it.

Anyway, I installed home-assistant os on rpi, and the integration that @dino_coder started this thread with works a charm. I have configure HA to give me the ringing alarm bells when there is overload. Next step is to add automation to switch off geyser in such a case. However, I now need to increase the frequency that logger updates at. 

From the documentation it seems possible, but I have no idea how to change the parameters for the wifi-logger on the Deye inverter. I'm guessing a lot of you folks do though, please help an uneducated soul...

thanks

Link to comment
Share on other sites

If you integrated Solar Assistant into HomeAssistant using mqtt then you SHOULD get 1-2 seconds delay from inverter to HomeAssistant. This is ample to allow you to run automations. If you have your geyser / pool on a CBI astute smart plug then your logic would be:

  • If Inverter load > Xw for longer than T time
  • then
  • switch off Geyser and / or pool

This is how i have set it up - this also sends a notification to mine and the wife's phone 

alias: Max Safe Load
description: ""
trigger:
  - type: power
    platform: device
    device_id: 117ead9d18839677c42ebf09cb30f4e4
    entity_id: sensor.load_power
    domain: sensor
    above: 5500
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition:
  - condition: device
    type: is_on
    device_id: f58645638cce28e4225ceffc4fc2b79d
    entity_id: switch.geyser_switch_1
    domain: switch
action:
  - type: turn_off
    device_id: f58645638cce28e4225ceffc4fc2b79d
    entity_id: switch.geyser_switch_1
    domain: switch
  - service: notify.mobile_app_nyasha_a52
    data:
      message: Max safe load reached - Geyser off
  - service: notify.mobile_app_iphone
    data:
      message: Max safe load reached - Geyser off
mode: single

 

Link to comment
Share on other sites

17 hours ago, mzezman said:

If you integrated Solar Assistant into HomeAssistant using mqtt then you SHOULD get 1-2 seconds delay from inverter to HomeAssistant. This is ample to allow you to run automations. If you have your geyser / pool on a CBI astute smart plug then your logic would be:

  • If Inverter load > Xw for longer than T time
  • then
  • switch off Geyser and / or pool

This is how i have set it up - this also sends a notification to mine and the wife's phone 

alias: Max Safe Load
description: ""
trigger:
  - type: power
    platform: device
    device_id: 117ead9d18839677c42ebf09cb30f4e4
    entity_id: sensor.load_power
    domain: sensor
    above: 5500
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition:
  - condition: device
    type: is_on
    device_id: f58645638cce28e4225ceffc4fc2b79d
    entity_id: switch.geyser_switch_1
    domain: switch
action:
  - type: turn_off
    device_id: f58645638cce28e4225ceffc4fc2b79d
    entity_id: switch.geyser_switch_1
    domain: switch
  - service: notify.mobile_app_nyasha_a52
    data:
      message: Max safe load reached - Geyser off
  - service: notify.mobile_app_iphone
    data:
      message: Max safe load reached - Geyser off
mode: single

 

Thanks for the feedback.

I *think* I am getting realtime information from the Solarman integration. I just did the install the way it was described in the docs, don't think it uses mqtt?

The issue is that Solarman (the "logger") only collects data every sixty seconds. It can be seen if you go to "device" on Solarman smart. This is the value I want to update. Are you sure yours is real-time? Mine seems that way on occasion but if an event occurs just after the last update, it definitely waits a minute before I see it on HA. It's a lot better than Solarman, but I'd like to reduce that value to ten seconds, that would work for me.

 

image.png.7ae96ceba28f1647ec1a4a7d2e4af751.png

Link to comment
Share on other sites

2 minutes ago, Naboo said:

Thanks for the feedback.

I *think* I am getting realtime information from the Solarman integration. I just did the install the way it was described in the docs, don't think it uses mqtt?

The issue is that Solarman (the "logger") only collects data every sixty seconds. It can be seen if you go to "device" on Solarman smart. This is the value I want to update. Are you sure yours is real-time? Mine seems that way on occasion but if an event occurs just after the last update, it definitely waits a minute before I see it on HA. It's a lot better than Solarman, but I'd like to reduce that value to ten seconds, that would work for me.

 

image.png.7ae96ceba28f1647ec1a4a7d2e4af751.png

Ah ok - so you are using the Solarman integration not the Solar Assistant one - makes sense. SO we are talking across purposes and technologies. 

Link to comment
Share on other sites

Having 100% "live" up to the second inverter data is not really possible unless you are querying a very limited number of values. I think that it is important to understand that the software has to ask for each value individually i.e. SOC, Battery Voltage, MPPT Voltage, amperage, wattage etc 

The age of the data that you will in Home Assistant will dependant on:

A- How many values you are asking your inverter the value for

B- How you are querying the inverter i.e. using the Solarman Dongle, directly through the 9 Pin interface the dongle plugs into or via the RS485/Modbus interface - that all have different data response rates

I am using Home Assistant with Node Red and the Bloubul7 flows, using a USB-RS485 converter and it has a QUERY frequency rate of 0.2 seconds between queries, you can make it faster but it does start to stop dropping data if you reduce the gap between queries too much as you don't give the inverter time to give you the answer before you ask the next question.

I am querying a total of 20 items every 0.2 seconds and then I have another 10 values that are queries once a minute (daily solar production etc., values that mostly only increase in value and don't change significantly).  So in theory any value should not be older than 4 seconds old.  

 If I remember correctly, queries through the solarman dongle are not able to be done as quickly which results in slightly less responsive data. In the big scheme of things I don't think that would really be a problem.

Link to comment
Share on other sites

  • 4 weeks later...

Is it possible to run Solarman & SolarAssistant? I'm looking into getting a system, and the installer uses Solarman to view and manage (and support) all their installed sites, which I understand and have no issue with. Though looking around I'd like to get the higher rate info from Solar assistant, and pull that into Home Assistant, for exactly the type of fail-safe automations discussed earlier in this thread.

So, is it possible to run both Solarman and SolarAssistant?

Link to comment
Share on other sites

1 hour ago, Elroc said:

Is it possible to run Solarman & SolarAssistant? I'm looking into getting a system, and the installer uses Solarman to view and manage (and support) all their installed sites, which I understand and have no issue with. Though looking around I'd like to get the higher rate info from Solar assistant, and pull that into Home Assistant, for exactly the type of fail-safe automations discussed earlier in this thread.

So, is it possible to run both Solarman and SolarAssistant?

Yes you can - Solarman dongle connect on the RS232 port while Solar Assistant uses the RS485 port. I have it setup like that on my 5kw Sunsynk. Deye should be the same

Link to comment
Share on other sites

  • 2 months later...

Hi, I have solar panels and a battery from Kstar. I use SolarmanPV, I see all the info via the app and website. I am trying to make the home_assistant_solarman work via HA. I have linked the IP as described in the manual, but I do not receive any data. Is there anyone who can help me on my way?

 

Thanks in advance , Tom

Link to comment
Share on other sites

On 2023/01/13 at 9:54 AM, TomH said:

Hi, I have solar panels and a battery from Kstar. I use SolarmanPV, I see all the info via the app and website. I am trying to make the home_assistant_solarman work via HA. I have linked the IP as described in the manual, but I do not receive any data. Is there anyone who can help me on my way?

 

Thanks in advance , Tom

th best way is to go intoo the issue section of the github repository (Issues · StephanJoubert/home_assistant_solarman (github.com), I solved my problems following some of the many ongoing dicussions

Link to comment
Share on other sites

  • 1 month later...
On 2022/09/30 at 2:06 PM, Sc00bs said:

Having 100% "live" up to the second inverter data is not really possible unless you are querying a very limited number of values. I think that it is important to understand that the software has to ask for each value individually i.e. SOC, Battery Voltage, MPPT Voltage, amperage, wattage etc 

The age of the data that you will in Home Assistant will dependant on:

A- How many values you are asking your inverter the value for

B- How you are querying the inverter i.e. using the Solarman Dongle, directly through the 9 Pin interface the dongle plugs into or via the RS485/Modbus interface - that all have different data response rates

I am using Home Assistant with Node Red and the Bloubul7 flows, using a USB-RS485 converter and it has a QUERY frequency rate of 0.2 seconds between queries, you can make it faster but it does start to stop dropping data if you reduce the gap between queries too much as you don't give the inverter time to give you the answer before you ask the next question.

I am querying a total of 20 items every 0.2 seconds and then I have another 10 values that are queries once a minute (daily solar production etc., values that mostly only increase in value and don't change significantly).  So in theory any value should not be older than 4 seconds old.  

 If I remember correctly, queries through the solarman dongle are not able to be done as quickly which results in slightly less responsive data. In the big scheme of things I don't think that would really be a problem.

@Sc00bs Are you able to use Home Assistant in this setup to also change your inverter settings? If so I would love to know how you set this up. I have a 5kw Deye which should work the same as your sunsynk

curently I have the SOLARMAN WiFi logger running but I have ordered a rs to usb cable from the solar assistant website. I am not able to change the inverter settings without this cable from what I understand 

thanks for your help

Link to comment
Share on other sites

Hi @Clayton321

Not sure if you can do it via Stephan's integration, I think it will depend on the API for the Sunsynk inverter and to be honest I have no idea if it has that ability.

You can however write settings using the ESPHome integration with a ESP32 & Max485 RS485 adapter. 

 Have a look at the end of the thread for the changes so that you can write settings@. 

@jacauchas a Github with the latest code https://github.com/jacauc/SunsynkEsphome  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...