Comments (4)
Can you check for me what MQTT topics are on the Button 6 inside the web interface of both Button+ devices? It should look something like this:
The idea was to use the unique Button+ device in all MQTT topics and in the entity names of HASS so that this shouldn't happen.
Could you also check the debug log when the button is pressed? It should look something like this in the log if you press buttons:
2024-01-15 14:53:58.387 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_4967c8/button/6/click: press
2024-01-15 14:53:58.388 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 6
2024-01-15 14:54:34.874 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_4967c8/button/4/click: press
2024-01-15 14:54:34.875 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 4
2024-01-15 14:54:35.808 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_4967c8/button/5/click: press
2024-01-15 14:54:35.809 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 5
from ha-button-plus.
From MQTT-Explorer
B+ with ID 45a450, click button 6 publishes: buttonplus/btn_45a450/button/6/click (press)
B+ with ID 45a5d0, click button 6 publishes: buttonplus/btn_45a5d0/button/6/click (press)
From webinterfaces: see attached files 45a450.png en 45a5d0.png
![45a450](https://private-user-images.githubusercontent.com/20152820/296809497-498c08ac-4ff7-46e8-89d4-bae43ea0688d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NjYxNjEsIm5iZiI6MTcxODg2NTg2MSwicGF0aCI6Ii8yMDE1MjgyMC8yOTY4MDk0OTctNDk4YzA4YWMtNGZmNy00NmU4LTg5ZDQtYmFlNDNlYTA2ODhkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTU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kPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._F2dnnSJXnZdMGMIfY2WWZrqgcU1boDp_VPnwN419N0)
Debug started, each button 6 clicked ONCE:
debug log:
2024-01-15 16:50:33.921 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration button_plus which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:33.921 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:33.921 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration mass which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:33.921 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration browser_mod which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:33.921 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration lovelace_gen which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:33.922 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:33.922 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration scheduler which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-15 16:50:37.214 ERROR (MainThread) [homeassistant.components.button] Error adding entities for domain button with platform button_plus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1250, in add_to_platform_start
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity 'button.btn_45a450_0' cannot be added a second time to an entity platform
2024-01-15 16:50:37.215 ERROR (MainThread) [homeassistant.components.text] Error adding entities for domain text with platform button_plus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1250, in add_to_platform_start
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity 'text.label_btn_45a450_0' cannot be added a second time to an entity platform
2024-01-15 16:50:37.216 ERROR (MainThread) [homeassistant.components.button] Error while setting up button_plus platform for button
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1250, in add_to_platform_start
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity 'button.btn_45a450_0' cannot be added a second time to an entity platform
2024-01-15 16:50:37.217 ERROR (MainThread) [homeassistant.components.text] Error while setting up button_plus platform for text
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1250, in add_to_platform_start
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity 'text.label_btn_45a450_0' cannot be added a second time to an entity platform
2024-01-15 16:53:24.918 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_45a450/button/6/click: press
2024-01-15 16:53:24.919 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_45a450/button/6/click: press
2024-01-15 16:53:24.919 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 6
2024-01-15 16:53:24.919 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 6
2024-01-15 16:53:27.632 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_45a5d0/button/6/click: press
2024-01-15 16:53:27.632 DEBUG (MainThread) [custom_components.button_plus.coordinator] Received message on topic buttonplus/btn_45a5d0/button/6/click: press
2024-01-15 16:53:27.633 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 6
2024-01-15 16:53:27.633 DEBUG (MainThread) [custom_components.button_plus.button] async press from mqtt button: 6
2024-01-15 16:53:27.634 WARNING (MainThread) [homeassistant.components.automation.b_luxstdkopen] B+LuxStdkOpen: Already running
home-assistant_button_plus_2024-01-15T15-53-28.960Z.log
from ha-button-plus.
Could this be the problem?
https://github.com/koenhendriks/ha-button-plus/blob/cc0cc2ce1fba503a8e35a51b5a73e96787aea70e/custom_components/button_plus/coordinator.py#L28C1-L28C65
More specifically, the first +? I think that should be the hub-id
self._mqtt_topic_buttons = "buttonplus/+/button/+/click"
from ha-button-plus.
Thanks for the issue details @wimjanse.
@casparz was right here and @P-Storm has already made a PR that fixes this bug. I'm about to merge and release 0.0.7
from ha-button-plus.
Related Issues (20)
- Entities do not get removed upon removal of the integration HOT 1
- retain topics for labels and top_labels HOT 2
- HASS label Entity value does not match button value HOT 1
- Integration does not connect properly to MQTT topics HOT 1
- When removing the integration device and entity registry remain HOT 1
- Text entities added representing non existing labels on the display module.
- Re-add light entities and sync over MQTT HOT 3
- Documentation for installation and inner workings.
- Two B+'s, cannot assign B+ to different areas HOT 7
- Error messages in log after adding second B+ HOT 1
- How to setup the project with HA
- Weird grouping behaviour HOT 4
- Integration does not work after upgrade to 0.9 HOT 39
- Add linter and/or basic Python validator as Action HOT 2
- Temporarily disable HOT 3
- ButtonPlusBrightness is overriding deprecated methods on an instance of NumberEntity HOT 2
- entities are not linked to devices after upgrade to 0.12 HOT 4
- Can´t add button again after 1.12.2 firmware update HOT 1
- Unable to add Button+ to integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-button-plus.