-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Multiple EMS Devices share same id when using HA & MQTT #759
Comments
EMS-ESP was never really designed to run as multiple units, or even tested, but it should be possible. What we need to do is append the base to the Home Assistant object_ids and test it. |
Does using 2 different base settings in mqtt does not work? |
it works for MQTT, but not HA Discovery which generates the unique entity IDs without the base or hostname. So to use your last issue as an example in HA |
Code is in the PR (Michael to double check as I'm sloppy these days), then it needs testing properly |
I'm really starting to hate this enhancement! |
@Rainson12 think it's implemented, if you would like to test it; |
@proddy Have you implemented a parameter in the settings to choose new or old version to keep compatibility to older versions? |
no, and not intending to either. The change is only in the MQTT Discovery config topics where the As an example, looking at the topic old payload in v3.5.0b10 was new payload is v3.5.0b11 |
thank you for the very quick implementation, this is amazing! I will flash and test the new software next weekend! |
Changing unique_id is a breaking change and all HA users need to adjust their dashboards and or own automations, node-red processing etc as far as I understand. Any history / statistics data is lost as well ... or not? Is this what you want for the very few users with multiple EMS-ESP devices or are I am wrong to consider this to be a breaking change? |
BTW: ioBroker can handle multiple ems-esp devices by running multiple adapter instances parallel. I hope that the API-interfaces is unchanged .... or not? |
good point. it will remove all historic data. I think I'll need to add a new flag in the Settings to enable multiple EMS-ESP's which then adds the base to all HA unique_ids.
no, API stays the same. It's unique in itself because of the IP address and hostname. |
It is a great feature to have multiple MQTT base (I have 2 boilers in my house and it was a major issue to equip both with EMS-ESP). However, would it be possible to add a toggle in the UI so that only people using such feature would have the mqtt base "ems-esp" added in their entity names... It is a major work in HA to rebuild dashboards and automations with the new entity names for a feature not used by most people. |
yes, you're right. an oversight from my side. I'll add the flag. |
…ompatibllity with v3.4
I added the flag, did a quick test and it's backward compatible with previous versions. Thanks @tp1de Thomas. |
Is this change already within latest b11 bin-file? If yes I can test too ... |
It's a PR #793 |
@proddy I did a first test with b11. For me it doesn't work the b10 entity ids are not filled with the right data in HA. There seems to be changes within object_id. I moved back to b10. I might do some further tests tomorrow. Example: b10 vs. b11 object_id // unique_id b10 : sensor.boiler_outside_temperature // boiler_outdoortemp |
strange, it works for me. I'll test this weekend when I'm back home. Did you compile yourself or take the binary? |
I took the binary. |
I used the binary file and it finally worked for me as far as I could tell so far. I use 2x GB172 with RC310 and HA on a Rspi 4. |
Many thanks to proddy. Great job. |
I'll close this now |
Before creating a new issue please check that you have:
Bug description
We operate 2 EMS-ESP-32 systems for 2 houses conntected to the same MQTT broker. The heating systems connected to the ems-esps are the same model. I have configured unique network hostnames and unique client ids for both ems-esps. However when running HA & MQTT, home assistant only detects one of the ems-esps and it seems like all entities are overwritten by each other meaning if I add the detected entites to the overview, the displayed values keep switching between the first and seconds ems system (overwriting each others values).
Steps to reproduce
Connect two EMS-ESP-32 to the same heating system model, set different hostnames and clientids and run Home Assistant and enable auto discovery.
Expected behavior
The detected devices and entities have unique ids.
Screenshots
EMS-ESP #1
EMS-ESP #2
HA logs:
HA MQTT detected devices:
Device information
Device #1
Device #2:
I would appreciate any suggestions or ideas to resolve this issue
The text was updated successfully, but these errors were encountered: