Hi Gerard, your solution worked for me. Thanks a lot.
Good to hear, thanks for your confirmation.
@pgdg71 @gerard33 @Philippe_Bouwen
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
.
Check it out: https://github.com/robbinjanssen/home-assistant-omnik-inverter
You can also add it as custom repository in HACS
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?
Thanks for trying the component!
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
This way you can create a fancy graph:
@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).
I would love to have such a bar graph for my omnik. Could you maybe explain how you achieved this? Thanks!
I think he used the custom:mini-graph-card
component for it, or at least I did. Here is my configuration:
- entity: sensor.solar_power_today
name: 1
group_by: date
hours_to_show: 168
icon: 'mdi:weather-sunny'
name: Per dag 1
points_per_hour: 1
show:
graph: bar
type: 'custom:mini-graph-card'
Like @Sjorsa said, you can do it by using the mini-graph-card. You can install it through HACS.
This is my current view:
Code:
color_thresholds:
- color: '#3498db'
value: 0
- color: '#f39c12'
value: 1000
- color: '#c0392b'
value: 1800
entities:
- entity: sensor.solar_power_current
index: 0
show_points: true
state_adaptive_color: true
hour24: true
hours_to_show: 24
icon: 'mdi:weather-sunny'
line_width: 2
lower_bound_secondary: 0
name: Zonnepanelen actueel
points_per_hour: 20
show:
extrema: true
points: false
type: 'custom:mini-graph-card'
And:
aggregate_func: max
cache: false
entities:
- color: '#e74c3c'
entity: sensor.solar_power_today
index: 0
show_points: true
group_by: date
hours_to_show: 168
name: Zonnepanelen vandaag
show:
graph: bar
type: 'custom:mini-graph-card'
Thank you very much. I got it working with Grafana and InfluxDB. But this is much easier!
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 :
SolarHome AC Output Power became unavailable
10:15:12 AM - 6 minutes ago
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.
Hi,
Seems that after an upgrade to the latest core the sensor is not recognized anymore. I get the below message when validating configuration.yaml.
Platform error sensor.omnik_inverter - Integration ‘omnik_inverter’ not found.
Did anybody run into this same issue? Thanks!
yes, i just upgraded and found the same… Any solutuion found?
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)