Skip to content
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

Home Assistent auto-discovery broken for multiple batteries #1587

Open
schlimmchen opened this issue Jan 26, 2025 · 2 comments
Open

Home Assistent auto-discovery broken for multiple batteries #1587

schlimmchen opened this issue Jan 26, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@schlimmchen
Copy link
Member

As the MQTT Home Assistent handler for the battery uses a hard-coded "serial", users cannot use two OpenDTU-OnBattery to talk to multiple batteries.

I think that integration of battery information in home automation and/or MQTT is a stand-alone feature of OpenDTU-OnBattery, so that should work properly when combining multiple "agents" (OpenDTU-OnBattery instances) to connect to multiple batteries.

Hallo, seit diesem WE nutze ich eine 2. Open DTU Parallel in Verbindung mit HA.
Diesen Schritt bin ich gegangen, da ich seit je ein24V mit AGM und ab sofort ein 48V System mit Pylontech 5K betreibe. Vorerst soll das auch so bleiben, auch wenn es Energetisch Unsinn ist, das 24V System jedoch ein vorhandenes USV System für Server speist. und solange die Batterien noch Ok sind, möchte ich Sie nicht entsorgen, bzw gegen Converter Tauschen. Das ist insofern alles OK, beide DTU verichten Ihren Dienst, bis Home Assistant bzw. Mqtt ins Spiel kommt, ab da wirds komisch....der Topic "dtu_battery_0001" ist ja in beiden Fällen der gleiche. So steuert der Victron SmartShunt als auch der Pylontech seine Daten bei ...das führt zu Datensalat im HA. Gibt es eine Möglichkeit die Pfade entsprechend anzupassen ? Leider erlaubt es momentan ja jeweils nur ein Batteriesystem seitens der openDTU.

Originally posted by @Mickel4711 in #1586

@schlimmchen schlimmchen added the bug Something isn't working label Jan 26, 2025
@schlimmchen
Copy link
Member Author

Still borken in #1451, but for no good reason: There, every battery provider already has a "HASS integration" instance, which is specialized, i.e., derived from the base class that does all the sensor publishing. It shouldn't be too hard to transport an actual serial into that class instance. Something to consider is merely that the hass integration implementation must not publish sensors until the serial is known. That should also be no big deal.

@AndreasBoehm
Copy link
Member

What if we include the unique dtu id as described in #963 in every topic to avoid collisions?

Or as you suggested use a different strategy for things that can be uniquely identified and "moved" between different DTUs without causing interruptions/duplicates on mqtt receivers. (Batteries, ac chargers, solar chargers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants