How to speed up Domoticz event action
Posted: Thursday 06 October 2016 21:33
Hi there !
Nearly 2 year i'm using Domoticz, spending time to improve 433 reception, introduce new devices (esp8266, RFLINK, Milight, Zwave).
Checking various hardware solution : RPI B+, RPI2, WD Mybookworld, Chroot on various android device, Synology DS 216 Play, and now testing with a Intel NUC I5 with 4G ram + 64GO ssd).
Really Happy with solution, easy clik and play, and always found a solution for device who are not listed (Scripting).
Only 1 thing don't put the WAF at 100% :
Domoticz Beta : 3.5700 on a Debian Linux 8.5 on a intel core i5 Nuc
I'm using some chacon wall switch to light up Milight Bulb.
Those Milight Bulb are drive by RFLInk (was drive by Milight wifi gateway by the past).
Chacon Switch are RFXTRX hardware part.
As 2 switch can drive the same bulb groupe, i'm using this kind of LUA script
On script :
- Inter Plaf Salon : is the Chacon switch module
- Plafonnier Salon : is a Milight Bulb Group drive by a group scene
Can't use toggle fonction because i'm using a device twice script who send order twice time (433 + 2.4ghz to be sure that device recieve order).
Can't use zwave module doesn't get 230V at real switch.
Since 2 years now each time i'm using this kind of event : it can takes 1 to 4 secondes to run.
Got a second one who looks like this
Result is the same
4 secondes for waiting a light up, that long, very long, and WAF go down under 0.
On french forum, someone found Some Sleep_second(1) on domoticz code (SQLHelper and another fie), and decide to set it at 100 MS before compiling, i try this and this works.
On my RPI testing machine i got better speed result than on my core i5 (who run near 1% on cpu usage, a Ferrari to go shopping).
But doing this doesn't allow update, and can be a source of non stability, even if i don't face this since 1 week.
What be done to speedup domoticz Event, reaction, to make it run faster, more reactive ?
Nearly 2 year i'm using Domoticz, spending time to improve 433 reception, introduce new devices (esp8266, RFLINK, Milight, Zwave).
Checking various hardware solution : RPI B+, RPI2, WD Mybookworld, Chroot on various android device, Synology DS 216 Play, and now testing with a Intel NUC I5 with 4G ram + 64GO ssd).
Really Happy with solution, easy clik and play, and always found a solution for device who are not listed (Scripting).
Only 1 thing don't put the WAF at 100% :
Domoticz Beta : 3.5700 on a Debian Linux 8.5 on a intel core i5 Nuc
I'm using some chacon wall switch to light up Milight Bulb.
Those Milight Bulb are drive by RFLInk (was drive by Milight wifi gateway by the past).
Chacon Switch are RFXTRX hardware part.
As 2 switch can drive the same bulb groupe, i'm using this kind of LUA script
Code: Select all
commandArray = {}
if (devicechanged['Inter plaf salon tv'] and otherdevices['Plafonnier Salon'] == 'Off') then
commandArray['Group:Plafonnier salon']='On'
elseif (devicechanged['Inter plaf salon tv'] and otherdevices['Plafonnier Salon'] ~= 'Off') then
commandArray['Plafonnier Salon']='Off'
end
return commandArray- Inter Plaf Salon : is the Chacon switch module
- Plafonnier Salon : is a Milight Bulb Group drive by a group scene
Can't use toggle fonction because i'm using a device twice script who send order twice time (433 + 2.4ghz to be sure that device recieve order).
Can't use zwave module doesn't get 230V at real switch.
Since 2 years now each time i'm using this kind of event : it can takes 1 to 4 secondes to run.
Got a second one who looks like this
Code: Select all
commandArray = {}
if (devicechanged['Inter lum salon']) then
commandArray['Lumiere Salon']='Toggle'
end
return commandArray4 secondes for waiting a light up, that long, very long, and WAF go down under 0.
On french forum, someone found Some Sleep_second(1) on domoticz code (SQLHelper and another fie), and decide to set it at 100 MS before compiling, i try this and this works.
On my RPI testing machine i got better speed result than on my core i5 (who run near 1% on cpu usage, a Ferrari to go shopping).
But doing this doesn't allow update, and can be a source of non stability, even if i don't face this since 1 week.
What be done to speedup domoticz Event, reaction, to make it run faster, more reactive ?