tobof / openhab-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 2.0
39 stars 30 forks source link

messages are sent multiple times #61

Closed fipilica closed 7 years ago

fipilica commented 7 years ago

With an arduino pro mini driving a 5v relay module, turning on and off a bunch of LEDs, Openhab2 log is showing multiple ACK sent. Behavior is not consistent :) capture capture2 I attached the items and things config_files.zip

tobof commented 7 years ago

Thank you for reporting this issue. Looks like there is a bug in the ACK - mechanism of the binding.

We'll fix this after (or with) the refactoring.

andreacioni commented 7 years ago

Found a possible race condition in MySensorsWriter thread. When we get the message from the blocking queue and we start to process it, Reader thread could try to remove acknowledged message but fail because Writer has not yet re-inserted the message in queue.

andreacioni commented 7 years ago

PR #64 now contain a fix for this issue, commit: 99d9c7b