-
Notifications
You must be signed in to change notification settings - Fork 2
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
Big time delay between execution. #7
Comments
@Mayki07 please enable Debug log per device and attach log where your scene is activated. |
Hi everyone! Any update? I have the same issue |
@Napalmcold Can you gather and attach log with debug enabled? |
Just stumbled upon this thread. have the same problem. logs below. 2019-12-22 20:01:15.215 (Bedside Light (Xiaomi)) Pushing 'onCommandCallback' on to queue |
A couple more observations. I run the mybulb.py script directly - and it works reasonably fast. then I run it again from domoticz, and I see the light bulb react quickly, but then domoticz takes a few more seconds until it updates, this slows down any scene or automation considerably |
OK - further debugging put the culprit in this line in plugin.py in the BulbStatus init function. I just put some debug messages around and saw what takes time.
any idea why it takes 5-6 seconds? |
There is a dev branch exist. https://github.com/deennoo/domoticz-Xiaomi-Led-Lamp/tree/dev. You can try dev version of Domoticz with that version of plugin. In dev (Beta) version a bug with side-projects initialization of python is fixed so after that no need to use external script at all. |
I am waiting the next release of Domoticz to merge dev branch to master. |
Ah - much appreceated. I think I"ll wait for the next release then... dont want to mess my house too much :-) |
just tried it on the latest domoticz. seems much improved. I will test more. beware that the latest domoticz breaks support in ubuntu 18 (but someone compiled a fix...) |
OK - still have some problems with the development branch. update: I put some debug messages after the " self.MyBulb.off()" and " self.MyBulb.on()" lines in the oncommand section and the printouts are coming pretty fast. but the light doesnt actually turn on or off until I see the onHeartbeat code get executed which appear after 10 seconds or so - at least this is how it seems. another update - here is the log. note the 5 seconds gap from the moment the oncommand is run, until the onheartbeat finished. not sure if this is related or not, I thought the self.MyBulb.on() should have done the trick.... last update for today : maybe sensor_measurement takes a lot of time? its the last printout before the we get stuck for a few seconds. should we move the heartbeat to a different thread? (not on the oncommand thread. couldn't resist update: its not sensor_measurement, it looks like the domoticz update is taking the time. any idea why? 2020-04-28 19:11:45.631 (Parents Right Bedside Light (Xiaomi)) Pushing 'onCommandCallback' on to queue |
I continued to investigate, and remove all the onheartbeat code completely, and the issue still happening, ist on the "self.MyBulb.off()" and " self.MyBulb.on()" lines in the oncommand section - the commands just takes 5-6 seconds (at least the time between the log before and after). |
Try to update miio library in python: pip install -U python-miio |
I did, using the latest now... if I run it from command line, it work immediatly. if I run it from domoticz, it gets delay.... |
I actually implemented a virtual button using dzvents running linux command line (python-miio) and it works great in terms of responsiveness, but of course I dont have the feedback and its quite an ugly implementation. any suggestion on what to investigate next? its pretty annoying to debug as it happens only after a short while. |
Sorry, but i flash Tasmota on it....doesn't use this plugin anymore. Frok it ans make it yours, i will update domoticz forum about this |
I have four light bulbs added to the Domoticz. I have created a script for DzVents.
If I execute a command, the time delay between each bulb is about 8 seconds. The same thing when I create a scene to turn all the bulbs on and off at once, the time delay between the bulbs is 8-10 seconds. Is there anything we can do about it?
The text was updated successfully, but these errors were encountered: