Delay after increasing/decreasing brightness
Opened this issue · 9 comments
This is probably my own set ups fault, but I have an issue where Mycroft (or chopper in my case) stops responding for a while after increasing or decreasing the brightness of the lights.
There is nothing in the log files, and usually he springs back in to life after 30s - 2mins.
Any ideas? I cannot see any rhyme or reason as to why..
Do you have verbosity turned on? If not, can you turn it on, and tell me if the delay happens before or after Mycroft speaks (he should say something like 'Turning up the lights')?
You should be able to turn verbosity on/off via https://home.mycroft.ai/#/skill, or your Mycroft config.
Verbosity is on and I still have the issue. It might be a bottleneck in my setup somewhere.
To be clear then, the delay occurs after Mycroft speaks? So:
- You ask him to turn the lights down
- The lights start to go down
- Mycroft says "turning the lights down" (or something similar)
- Mycroft is unresponsive
Is that correct?
-Chris
Yeah, that's right.
Like I said, chances are it's my set up. I cannot see anything that would cause the delay in the code..
Yeah, unfortunately I don't know that there's much I can do, if he's speaking before the delay - that's the last line of the function here, at which point execution should return to Mycroft core.
It is interesting that it only happens after this intent, though. Does the delay happen consistently when you adjust the brightness? Or is it just some of the time? Does it matter which phrase Mycroft says? Does it make any difference if you turn verbosity off? I'm curious if there's something about what he's saying that causes the delay.
It is just when I dim or brighten the lights, this is what is confusing me. Verbose on or off makes no difference. It is every time, I've been trying to fix it for hours but to no avail. I'm tempted to wipe everything clean and reinstall and see if that makes a difference.
Part of me is wondering if it's to do with phue ?
To my knowledge, everything in phue is synchronous, so by the time execution returns to the plugin, phue shouldn't be executing anything. You could try using it directly though, by activating the venv, importing phue, and testing the functions being used by the skill. Might be worth doing that with a profiler, to see if it shows anything that sucks more time than it should.
If you watch top
(or better yet, htop
), while you trigger the intent, does cpu spike after you trigger the intent?
Also, if you trigger the intent via the mycroft cli, are you able to trigger other intents immediately via the cli? Or do you experience the same delay there?