davidrapan / ha-solarman

⚡ Solarman Stick Logger integration for 🏠 Home Assistant
MIT License
105 stars 24 forks source link

Update Interval #12

Closed Summer-of69 closed 4 months ago

Summer-of69 commented 4 months ago

Hi David! Where can I change the update interval? Currently the data is changed every 5 seconds.

Thanks Barnie

davidrapan commented 4 months ago

Hi Barnie, the update interval of the integration is somewhat hardcoded and due to many reasons is not really possible to make it any lower.

That being said if you want to fine control update intervals of specific sensors you can do it inside inverter definition yaml file by setting for example 'update_interval: 30' which translates to update every 30 seconds or 'realtime:' which translates to every 5 seconds which is integration minimum. But you have to remove registry sets at the start of the yaml file (if it's present) which are used to determine requests. Removing those 'request sets' will activate dynamic requests.

You can see all that in practice for example in the 'deye_sg04lp3.yaml' file.

Have fun!

Summer-of69 commented 4 months ago

Hi David! Thanks for the explanations, now I'm a bit smarter again! I have now found the file in which the interval can be set. The 5 seconds are too often for me, so I have now set a value of 15 seconds. Thank you for your commitment and this great solution!

davidrapan commented 4 months ago

The possibility of too often never even occurred to me.. As there for sure are sensor which don't need to be requested often which are for example those 'Total' ones.. But for sensors which shows for example PV Power I wanted to always have the most accurate value possible. But sure others might see it differently and that's why is there the possibility to change it. 😉

Even when one takes into consideration the question of too 'much data'.. HA does 5m sampling anyway so sub 5m intervals does not make any difference other than impact to direct observability.

Thank you for your kind words! And as always, have fun!

MarkoSchweizer commented 1 week ago

Hi, I tried to change the interval to realtime, but it didnt worked out. Here is what i did:

#

Sofar G3 also HYD 5-20KTL-3PH

#

Reference: https://github.com/user-attachments/files/17180102/SOFAR-G3.External.Modbus.Protocol-EN-V1.10.20220622.xlsx

#

This works also for rebranded ZCS Azzurro 3-Phase inverters such as the 3PH HYD6000 ZSS, or single phase such as 1PH HY6000 ZSS HP

Note that this won't work if your ZCS inverter is connected via Connext, you have to be using a Wi-Fi or Ethernet Kit such as ZSM-WIFI-USB.

#

default:

update_interval: 10

realtime: digits: 6

parameters:

What did i wrong?

Greets

davidrapan commented 1 week ago

Do:

default:
  update_interval: 5
  digits: 6
MarkoSchweizer commented 1 week ago

Do:

default:
  update_interval: 5
  digits: 6

Works faster, thanks!!!

MarkoSchweizer commented 1 day ago

Hi, can I update just certain register? I dont need all register fast, just 2-3 register.

davidrapan commented 1 day ago

Yes, update_interval property can be set for individual entities.