Closed gdudek closed 2 years ago
EDIT: Removing my "use the template" quick reply -- I missed it at the bottom of your post. Sorry!
I haven't seen this particular exception before (though I've dealt with a similar behavior in the past -- "turn off switch" ... switch turns off ... "The device is not responding" or similar error).
I also have no idea why the sleep would help anything -- out of curiosity, what made you think to try that?
On older hardware like a Pi2, I wonder if the speed of the device is becoming an issue. Have you tried installing something like uvlooop that can considerably speed up the async event loop?
From the template:
config.json
Bump.
This issue is pending a response and is blocked until I have more info. To keep the issue list groomed, I will often close these stalled issues if they go a prolonged time without a response. In this case, I will give it another week or so.
Thanks for the feedback. I tried using a sleep because the error seems sporadic and thus smells a bit like a race condition to me. Putting in a short sleep worked (as opposed to other tricks I considered). My hypothesis is that Alexa and/or downstream software is not able to accept very rapid messages. If UDP is being used (and I apoglize for not remembering) then it' possible the the message could arrive out of order without the delay.
Fair enough. If the issue returns and/or you're able to complete the rest of the issue template let me know!
My Issue
When I turn on my faxumo device with Alexa, I usually see an exception and then the Alex reports an ``error with the device'' (even though the device changes state correctly).
The exception is: _Exception in callback _SelectorSocketTransport._readready() which is down the call chain from _handleaction(msg)
Alex then reports one of a few errors such as that the device "isn't responding"
[solution at the bottom]
fauxmo --version
): 0.5.2I "solved this" by adding a horrifically ugly 2s sleep in get_state in simplehttpplugin.py and filed a pull request, but the "fix" is probably too ugly for most people who don't have this problem.