lumapu / ahoy

Various tools, examples, and documentation for communicating with Hoymiles microinverters
https://ahoydtu.de
Other
954 stars 225 forks source link

Documentation: Example for pure Home Assistant MQTT Zeroexport / Nulleinspeisung with Battery & AHOY-DTU Automation #964

Open beebee opened 1 year ago

beebee commented 1 year ago

Hello,

I tried to find a pure and simple Home Assistant only solution for a Zero Export / Nulleinspeisung automation without NodeRed and python scripts, additional RPIs, tools etc to simply work directly with HA & ahoy-du via MQTT and didn't find any matching my requirements. So I created my own with some support from ChatGPT to enhance it further and would like to share it here so others can use it as a starting point.

You need:

input_boolean: battery_nulleinspeisung: name: Battery Nulleinspeisung icon: mdi:battery-heart-variant

initial: false

- Automation. You need to adjust the MQTT Topics to match your ahoy-dtu inverter target. Can set min, max battery power, hysteresis. If _input_boolean.battery_nulleinspeisung_  is flipped off, you can use the slider for _input_number.battery_limit_ to manually set the battery limit and skip the calculation. Inverter target will be turned off/on dynamically with the first MQTT publish when lower than 7W which you can adjust there of course in the template. My HM-400 does not follow any limit values below 8W so switching off is better for my battery for "idle" power saving (Bluetti EB70 only). Also HM400 stays in "hot-standby" and is turned on and power-set  directly when MQTT limit is calculated for higher again or manually set 

alias: AHOY-DTU Battery Nulleinspeisung mit Hysterese description: >- Hält den Battery-Power-Limit für die Nulleinspeisung durch die Batterie aufrecht. trigger:

Hints:

lumapu commented 1 year ago

do you see any task for me so far?

is it a big problem?

ahoy-dtu does not seem to read the retained power on/off state when subscribing to the MQTT broker/topic after a reboot from my experience. I suggest you set some lower persistent limit on your battery inverter directly via ahoy GUI.

Should we think of publishing such tutorials / examples on https://ahoydtu.de?

beebee commented 1 year ago

No big problem from my side about the retain. I was putting it here for documentation/people to fiddle with and thought it might be helpful for the GitHub Wiki for the HA users. No Idea really about how big the need is - Examples on ahoy website sound nice to me.

stefan123t commented 2 weeks ago

@beebee @lumapu sollen wir das in tools / doc mit dem Script und einem Readme.md dokumentieren ?