When installed and configured it generates three sensors:
sensor.solar_power_current (Watt)
sensor.solar_power_today (kWh)
sensor.solar_power_total (kWh)
It has been tested and written for an Omnik 4k TL2 but might work on others too, and that’s where I need you! The only requirement is that your inverter is connected to your local network and you need to know the IP address.
You can either manually install it or use HACS (custom repository at the moment).
Hi @robbinjanssen, thanks for this component! As stated in one of the other threads, after some days (now after 2 days since last reboot) the component will no longer give updates; at that moment the log shows the following warning:
WARNING (MainThread) [homeassistant.components.sensor] Updating omnik_inverter sensor took longer than the scheduled update interval 0:00:30
And is unable to connect/retrieve info from then on. A direct call to “http://192.168.xx.xx/js/status.js” returns a JSON file in my browser, to the inverter is reachable. Using three separate calls with a command_line platform and using CURL does not freeze at all. Unsure why this keeps freezing after 2 - 3 days of running after a reboot…
So one interesting thing I notice immediately is that my inverter only updates the status.js file every 5 minutes. The component polls the status.js every minute. We can change this to 5 minute to reduce the number of calls already.
Seems like my data has been consistent for the past few days, I did restart home assistant a few times however because of updates. I’ll check a few more things and then wrap up a new release this week, see if it works better
Hi @Flaker, I haven’t had any problems anymore since I did my update. If you still want to you can try out version 1.3.0 (you need to enable “Show Beta” to see this release).
Other news; I’ve also added support for inverters that output the data via status.json. We can now use use_json: true in the configuration to enable this
Hey @robbinjanssen, where the previous version(s) would stop working within 24 hours, the latest version has been running for 8 consecutive days! Seems you nailed the problem. Nice, will now integrate it into the main HA tab. Thanks for your efforts, much appreciated!
Hi, I’ve been using this for a while now, but I have one problem. I’m using this with two inverters, and they don’t reset the daily total at the same time. Is there something I can do to make them both reset at midnight? Thanks in advance!
I’m struggling getting my Omnik work with the Hass utility meter. When the sun is gone, the omnik doesn’t get power and the wifi drops and all (most) sensors turn to “unknown”. So far I’ve been using the other Omnik custom component
I might try this one. But before that, I wanted to know does this component keep outputting all it’s values, even when the Omnik is unavailable, i.e. Actual power = 0, total power remains total power, power today = power today or 0, depending on time of day.
I think if you will use the caching option it will work for you. The caching option keeps the total (max) value at least until the next day has passed. It will reset as soon as it is after midnight or the value is something else then the cached value (most of the time 0 )
Hi Spudje, i’m not sure what happens if the inverter becomes unavailable, it might just log an error and keep the current value since it doesn’t update the state at that point.
If I understand correctly your inverter works normally, except when the sun is gone, it becomes unavailable (because of wifi) but you would like to keep the total value until the next day?
With the other Omnik component, I believe the actual power stays at 0 when the omnik goes offline, however the energy total (and energy today) become unknown when the omnik is offline. This energy total drives (part of) the Utility Meter and hence gives crippled results.
Yes I’m almost there. Your component keeps state while the converter goes offline so that’s good.
However, the Home Assistant Utility Meter refreshes its daily cycle exactly at 0:00:00 (e.g. for daily total returned energy), where the solar_power_today sensor refreshes at 0:00:45. This results in a max value of (Dagelijks verbruik uit zon) daily local consumption (solar_power_today - daily total returned energy) at the start of the cycle which equals the maximum value of solar_power_today of the previous day