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

Blocking commands result in queued actions. #38

Open
whiteduck22 opened this issue Apr 24, 2021 · 0 comments
Open

Blocking commands result in queued actions. #38

whiteduck22 opened this issue Apr 24, 2021 · 0 comments

Comments

@whiteduck22
Copy link

Thank you for this - it's very good and useful!

I spotted a feature that when a command is running and there is a likelihood of a second mqtt message pattern being matched the first command blocks the next until complete. While this is OK for short running commands or scripts it can cause a problem with queued messages and unresponsive switches.

My situation is Smartthings, motion detected which triggers a camera capture (which then sleeps for 30 seconds) and then I tried to issue a virtual switch command but it was not-responsive. The log seemed to show the commands queue and then fire once the first command finishes - I am sure this is by design.

2021-04-24 18:49:33,382 smartthings/Driveway Motion/motion/state 0 active
2021-04-24 18:49:33,389 Running t=smartthings/Driveway Motion/motion/state: ['sudo', '/home/pi/ha/getimages']
2021-04-24 18:50:06,856 smartthings/Garage/switch/state 0 off
2021-04-24 18:50:06,860 Running t=smartthings/Garage/switch/state: ['/home/pi/ha/garage.py']

So the fix is for me to put the first command into the background but may be worth noting this in the example config so others don't trip over it.

Thanks a lot!
Ian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant