Code Monkey home page Code Monkey logo

Comments (4)

koenhendriks avatar koenhendriks commented on July 1, 2024

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:

image

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.

wimjanse avatar wimjanse commented on July 1, 2024

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 45a5d0

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.

casparz avatar casparz commented on July 1, 2024

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.

koenhendriks avatar koenhendriks commented on July 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.