I’ve been inspired by the custom sensor of @gerard33 and created a custom component that provides a sensor.solar_power_current, sensor.solar_power_today, sensor.solar_power_total.
Great stuff, guys!
The configuration from @gerard33 works like a charm. I also tried @robbinjanssen 's integration, nice too! I have both now running in parallel (to compare).
So far I see @robbinjanssen 's integration/HACS component doesn’t reset the solar_power_today value. I do see it updates the .powertoday.pickle (every 30s or minute or so) - but it keeps the highest value recorded so far. So if I had yesterday a total of 10kWh, it will only start showing data after I pass the 10kWh…
And then stay at the new high. @robbinjanssen, I do not see the reset behavior from the inverter you described. At 22:00 hours my inverter still reports the day total correctly (using Gerard’s configuration example), so maybe this has something to do with it?
Seems like the cache doesn’t reset at 00:00 in your case, strange. Did some thinking and I think it would be best if I made the caching optional in the config! I’ll see if I can find some time this week to update the component!
Hi @Flaker the caching should be fixed now, please try upgrading to v1.2.0.
For some reason after your post my inverter started acting up weird as well and didn’t “reset” the power today before or after 00:00, but somewhere around 04:00. Anyway, the current caching mechanism makes sure it resets at 00:00 and will only register the new value if it differs from the cache value.
Let me know it this works for your
Note: Shout out to @gerard33 as he has been contributing to the component as well
Thank you @robbinjanssen ! Installed it as soon as it became available and it has been running fine for the past days. I did notice the Omnik does reset the day counter exactly at sunrise. Nice, as also after midnight you can see what the was delivered the previous day. Maybe an idea for a future upgrade as Home Assistant does have a trigger for sunrise?
P.S. I had one freeze but that was the Omnik that became unresponsive. A power off/on did the trick. Thanks again for a great component!
If you don’t want to reset the power at midnight, then you can disable the cache and the output will be whatever the omnik tells home assistant it is So in your you can see after midnight what your power delivery was. The reason I want the power to be reset at 00:00 is for graph/stats purposes
@robbinjanssen, thank you, I will give it a try. I do notice however that your component ‘freezes’ after a few days to a week (meaning the graphs just show 0 and the total counter stays stuck at the value at the moment of ‘freezing’). The individual calls from @gerard33 keep functioning however. I did an analysis in the log files (as it is apparent from the graph at what time no more updates are processed) and found the following:
In the moments leading up to the freeze, I see the Data DEBUG messages every 30 seconds in the log.
On the moment of the ‘freeze’, there is an error: “Update for sensor.solar_paneles_current fails” (this is the individual call from @gerard33.
The debug messages from thje omnik_inverter.sensor keep coming every 30 seconds. But from this time, data is no longer shown in the graph.
About 7 hours later, the omnik_inverter.sensor does not get any data anymore (and it stays that way in the update every 30 seconds): WARNING (MainThread) [homeassistant.components.sensor] Updating omnik_inverter sensor took longer than the scheduled update interval 0:00:30
The culprit may be that we’re both using the same call, but I did start using the separate @gerard33 queries as I had the omnik_inverter.sensor do the same freezes before. Hmm, I’ll give it another try with the caching turned off and also with the individual calls turned off (no conflicts).
Hi,
First of all a big thanks for the great effort you guys put in here.
I am using the component of @heinoldenhuis to integrate 2 omnik inverters in my HA.
the thing I can’t seem to find out is that it works flawless on one of the inverters, (garage) but at the other one (huis) it seems to loose connection pretty consistent every 8-9 minutes, resulting in a zero value (unavailable)
Showing this in the log for all sensors :
I don’t see any disconnects in the WIFI network, and with the @robbinjanssen component (huis_2) I don’t have the disconnect issue, but I find that the data refresh rate is very low (data change around 10 minutes).
Any idea what could be causing the disconnects / zero values?
Hi,
I’m new with home assisant. at the moment i’m trying to get connection the omnik solar converter. But have still no luck, it looks like i have a problem with the path configuration. I placed sensor.py file is in the following path: config\custom_components\omnik\sensor.py
The error what i received by debugging is:
2021-02-21 11:50:41 ERROR (MainThread) [homeassistant.components.hassio] Invalid config for [sensor.omnik]: [name] is an invalid option for [sensor.omnik]. Check: sensor.omnik->name. (See ?, line ?).
Is there any one that see this problem before? What i can read out the error is that the path is not corosponding with the custom_components. But i don’t know how to fix this.
This is great! thanks for sharing this! Works for both my inverters. Only downside is a lot of errors in the log when the inverter goes offline at night (the older model is powered by PV power)