michbeck100 / pv-monitoring

Contains configuration and Grafana dashboard for monitoring PV inverters
Apache License 2.0
43 stars 11 forks source link

Integrate Net kW export from ioBroker into HomeKit as a sensor? #4

Closed dmindfuse closed 1 year ago

dmindfuse commented 1 year ago

I love the dashboard. During this pre-spring period I would love to be able to switch on/off an electric heater into a smart plug when the net export goes above 1.2kW for example during the day. Saves heating with gas in the room.

however, what is the ioBroker container included here missing for such a feat? When I visit port 8081 it reports a missing cert and no option to continue. Can it be done? What do I need to look into?

michbeck100 commented 1 year ago

Iobroker is just a leftover. I would rather remove it, because it is not used. If you would like to use it, then just run your own iobroker instance in the same docker network. Or connect to the exposed ports from outside.

dmindfuse commented 1 year ago

Hi, thanks. Followed your suggestion and removed iobroker. Went ahead to install a separate Home Assistant container and after some faffing around with Firewall ports I managed to get the HASS Bridge integrated into my Homekit environment. However, it only exposes the temperature of the inverter. So I did some research, turns out that „energy“ and „power“ type sensors are not supported status today. Oh well, bad luck. But, my well plugs work in HA and so I managed to do what I wanted inside HA. Case closed. Cheers.

PS: off topic, but what do I add to sungather‘s config to export the battery charge rate? Export_to_battery? I’ll do some digging… 🫡

michbeck100 commented 1 year ago

I'm personally using the integration of mkaiser: https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant and connect it to the Modbus proxy

dmindfuse commented 1 year ago

Thanks, I will have a look at it too. One question: export_to_grid and import_from_grid -after a random period of time- default to 0 in influxdb, ref below, and then obviously show 0 in Home Assistant. I can't explain why in Grafana it shows correct values... at the moment 4.5kW...? How do I find the source of such an issue? Don't grafana and mqtt read the same influxdb series? And why would it stop working after a while?

select "time", "export_to_grid" from mqtt_consumer order by "time" desc limit 5
name: mqtt_consumer
time                export_to_grid
----                --------------
1681136666316731687 0
1681136657156785177 0
1681136647322033353 0
1681136637083381745 0
1681136627126112075 0
michbeck100 commented 1 year ago

export_to_grid is calculated, see https://github.com/bohdan-s/SunGather#useful-registers. Since I have a hybrid inverter I use export_power_hybrid instead. But this is a question you should ask at https://github.com/bohdan-s/SunGather or their discord channel. I'm closing this issue now.