-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESSMQTT: Multitenancy / support multiple inverters #30
Comments
Generally I'm in favor of having multi ESS support. However a breaking change wrt the setup dialogue may be a big obstacle for some users. And changes in the mqtt topic will be disruptive to all users (but we could prevent that by leaving the mqtt patches for the first ess with the current default if unconfigured) Ideally we might find a way to prevent also the addon setup from breaking. I'll hopefully find time to look closer into this next weekend (around August 26th). |
I absolutely agree with you, especially given that 99% of the users probably only have one anyway. We could make the Thank you for your commitment! Don't stress it, I just see this as a long-term goal to foster a sustainable future (maintaining a soft-ish fork is hard!) |
I wanted to ask the same Issues. My idea was to install the add-on twice to perhaps be able to address 2 ESS. By the way: Is there a reason why only 2 inputs are retrieved? @SIMULATAN |
@fitorfun absolutely, please use it and give us feedback! It'd be great to get a second opinion and not just have to rely on my own experiences. I've been using a local developer build of my fork so far, just tested the GitHub version and had to fix the repository it points to. You can add The configuration is the same as the official one - just with an array of the keys instead of them being at the root. It'll auto-fill demo keys (i.e. inverter), just copy-paste it for your inverters and modify the parameters. Let me know if you have any issues or need further help (also, feel free to open an issue on my forks to avoid cluttering this issue) |
Currently, ESSMQTT only supports a single ESS instance as it publishes to the root of the MQTT server (specifically, under
/home
and/common
).Since we have 2 ESS inverters, I was tasked with altering the code of this (awesome!) project.
In my fork, I implemented a basic namespacing system. It allows users to specify the ESS name using
--ess_name
. You can find the commit here: d152e67With this change, ESSMQTT publishes to
/ess/{name}/(home|common)
. This allows me to run two docker containers publishing data for both our inverters in parallel without MQTT topic conflicts.Currently, I am in the process of forking and altering the homeassistant addon to finally get ESSMQTT to run alongside HomeAssistant instead of a separate server. My current approach is to implement a "supervisor" / watchdog in bash that executes multiple ESSMQTT instances in the background (using bash's
&
). This would allow maximum flexibility (different ESSes, different settings) but, more importantly, reduces the amount of code changes required (modifying ESSMQTT to support this would be quite the task).Would you be interested in upstreaming these changes? If so, I'd create separate branches and prepare a version that is as unopinionated as possible so everyone can enjoy them. The biggest problem is that changing the topic name is a breaking change (if you configured sensors manually or use the MQTT topics outside of HASS' autoconfiguration) and the addon configuration would be changed to an array of ESS configurations.
Please let me know what you think, I'd be happy to get my changes into the main codebase to avoid fragmentation and innovate efficiently going forward. Thanks in advance.
The text was updated successfully, but these errors were encountered: