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

events triggered twice for Wireless switch (2-key) - TS0021 on 2.0.0 #25605

Open
wjansenw opened this issue Jan 6, 2025 · 6 comments
Open

events triggered twice for Wireless switch (2-key) - TS0021 on 2.0.0 #25605

wjansenw opened this issue Jan 6, 2025 · 6 comments
Labels
problem Something isn't working

Comments

@wjansenw
Copy link

wjansenw commented Jan 6, 2025

What happened?

Since I moved to 2.0.0, and started to use the events, I see strange behavuour:

  • when zigbee2mqtt container is started, everything works as expected. Single button, double button: it works OK.
  • after a while, zigbee2mqtt sends the events to HA twice

logs after a restart of the container (my button is called button_1, and I'm pressing the 2nd button once - this might make it a bit hard to read)

[2025-01-06 11:46:12] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/button_1', payload '{"action":"button_2_single","battery":0,"last_seen":"2025-01-06T10:46:12.177Z","linkquality":255}'
[2025-01-06 11:46:12] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/button_1/action', payload 'button_2_single'

logs after having the container active for a while:

[2025-01-06 11:45:06] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/button_1', payload '{"action":"button_2_single","battery":0,"last_seen":"2025-01-06T10:45:06.453Z","linkquality":255}'
[2025-01-06 11:45:06] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/button_1', payload '{"action":"button_2_single","battery":0,"last_seen":"2025-01-06T10:45:06.453Z","linkquality":255}'
[2025-01-06 11:45:06] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/button_1/action', payload 'button_2_single'
[2025-01-06 11:45:06] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/button_1/action', payload 'button_2_single'

What did you expect to happen?

only a single event to be submitted to HA

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.0.0

Adapter firmware version

0x26720700

Adapter

ConBee2/RaspBee2

Setup

containerized on odroid n2+

Debug log

No response

@wjansenw wjansenw added the problem Something isn't working label Jan 6, 2025
@wjansenw
Copy link
Author

wjansenw commented Jan 6, 2025

Might be relevant (or not):

homeassistant:
  enabled: true
  experimental_event_entities: true
  legacy_action_sensor: false
  status_topic: homeassistant/status
  legacy_entity_attributes: false
  legacy_triggers: false

@aluspl
Copy link

aluspl commented Jan 6, 2025

Thank you Dude! It helps also on ikea tardif (I couldn't update since 1.42 z2m because of double click)

@ThrawnJL
Copy link

ThrawnJL commented Jan 6, 2025

I think I am having the same problem but it does not just send the command twice, it sends it 3-4 times each time i click currently

@Koenkk
Copy link
Owner

Koenkk commented Jan 7, 2025

@wjansenw could you provide the debug log of this?

See this on how to enable debug logging.

@wjansenw
Copy link
Author

wjansenw commented Jan 7, 2025

@wjansenw could you provide the debug log of this?

See this on how to enable debug logging.

I would love to - but when I do it now; I don't seem to get this behaviour...
Anyway, I have activated debug and will monitor. I do not use the button that often and the logs have rotated due to some restarts. I will disable rotate to make sure I do not miss the logs if it happens again.

@wjansenw
Copy link
Author

wjansenw commented Jan 7, 2025

I'm now wondering if it could be because of a router that is unresponsive from time to time. When I was testing, the button was close to that router. Now it is close to another router.
Will see what happens if I can test it close to the malfunctioning router.

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

No branches or pull requests

4 participants