Latency issue
Posted: Tuesday 02 August 2016 12:52
Hi everyone,
I am a new user here, but I've been using Domoticz for a few weeks now, and I have to admit I fell in love with it
I have started to integrate my home automation system with Domoticz and MySensors, but I am now facing an issue.
I have placed in my bedroom and my bathroom some PIRs and relays to switch on the light automatically, and this is nearly working fine.
The reason why I say "nearly" is because there is a random latency between the detection by the PIR and the actual activation of the relay.
I've checked the logs on my Raspberry, and I can see the latency.
Below are the logs when I play with my Android app (Domoticz Lite). You can the delay between the command and the actual action. The delay you can see here is a bit longer than what I really face in this case, but this cannot be considered as "instant".
Below are the logs when I walk in the bedroom.
You can see there is the roof light ("Plafonnier") and some LEDs, which are on some buttons my wife and I press when we go to bed or wake up.
Some information regarding my setup:
- Domoticz v3.5382 running on a Raspberry Pi B2
- MySensors Gateway 2.0.0 running on a ESP8266 (Adafruit Huzzah to be more specific)
- Various MySensors nodes based on Atmega328p (5 nodes so far)
Transmition details:
- PIRs: my nodes are set to only transmit when their state changes
- Temp/Hum/Lux sensors: they transmit every 15 minutes, except for the lux sensor which also transmits when a change >50lux occurs.
From my point of view, there should not be any network congestion.
As I write this post, I wonder if this is a Domoticz issue, a MySensors issue, or a Domoticz/MySensors communication issue...
Still, I am very happy with my setup, but my wife isn't much because of the delay (which can, from time to time, exceed 2 seconds (I have no logs for that, but I've seen it)).
Can anyone help me with this issue, or tell me where to look?
Many thanks!
EDIT: I think this was unclear in my post, but the delay has been there from the beginning. I just didn't realize how "important" it would be in real life usage.
I am a new user here, but I've been using Domoticz for a few weeks now, and I have to admit I fell in love with it

I have started to integrate my home automation system with Domoticz and MySensors, but I am now facing an issue.
I have placed in my bedroom and my bathroom some PIRs and relays to switch on the light automatically, and this is nearly working fine.
The reason why I say "nearly" is because there is a random latency between the detection by the PIR and the actual activation of the relay.
I've checked the logs on my Raspberry, and I can see the latency.
Below are the logs when I play with my Android app (Domoticz Lite). You can the delay between the command and the actual action. The delay you can see here is a bit longer than what I really face in this case, but this cannot be considered as "instant".
Code: Select all
2016-08-02 12:19:05.501 User: bh initiated a switch command
2016-08-02 12:19:06.404 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:11.380 User: bh initiated a switch command
2016-08-02 12:19:12.383 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:17.800 User: bh initiated a switch command
2016-08-02 12:19:18.403 (Huzzah) Lighting 2 (Salle de bain / Lumière)
2016-08-02 12:19:23.021 User: bh initiated a switch command
2016-08-02 12:19:23.428 (Huzzah) Lighting 2 (Salle de bain / Lumière)
2016-08-02 12:19:29.148 User: bh initiated a switch command
2016-08-02 12:19:29.450 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:31.802 User: bh initiated a switch command
2016-08-02 12:19:32.404 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:35.067 User: bh initiated a switch command
2016-08-02 12:19:35.469 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:37.545 User: bh initiated a switch command
2016-08-02 12:19:38.447 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:43.442 User: bh initiated a scene/group command
2016-08-02 12:19:43.446 Activating Scene/Group: [Lumières salle de bain]
2016-08-02 12:19:43.448 Activating Scene/Group Device: Salle de bain / Lumière (On)
2016-08-02 12:19:44.450 (Huzzah) Lighting 2 (Salle de bain / Lumière)
2016-08-02 12:19:44.542 Activating Scene/Group Device: Salle de bain / Spots (On)
2016-08-02 12:19:45.444 (Huzzah) Lighting 2 (Salle de bain / Spots)
2016-08-02 12:19:48.692 User: bh initiated a scene/group command
2016-08-02 12:19:48.696 Activating Scene/Group: [Lumières salle de bain]
2016-08-02 12:19:48.698 Activating Scene/Group Device: Salle de bain / Lumière (Off)
2016-08-02 12:19:49.400 (Huzzah) Lighting 2 (Salle de bain / Lumière)
2016-08-02 12:19:49.491 Activating Scene/Group Device: Salle de bain / Spots (Off)
2016-08-02 12:19:50.381 (Huzzah) Lighting 2 (Salle de bain / Spots)
You can see there is the roof light ("Plafonnier") and some LEDs, which are on some buttons my wife and I press when we go to bed or wake up.
Code: Select all
2016-08-02 12:22:10.456 LUA: Bedroom luminosity handler: luminosity is low, turning on roof light
2016-08-02 12:22:10.458 EventSystem: Script event triggered: Bedroom luminosity handler
2016-08-02 12:22:10.427 (Huzzah) Lighting 2 (Chambre / Détecteur de mouvement)
2016-08-02 12:22:11.502 (Huzzah) Lighting 2 (Chambre / Boutons / LEDs boutons)
2016-08-02 12:22:12.441 (Huzzah) Lighting 2 (Chambre / Plafonnier)
2016-08-02 12:22:49.465 LUA: Bedroom luminosity handler: luminosity is high, turning off roof light
2016-08-02 12:22:49.467 EventSystem: Script event triggered: Bedroom luminosity handler
2016-08-02 12:22:49.439 (Huzzah) Lux (Chambre / Capteur de luminosité)
2016-08-02 12:22:50.523 (Huzzah) Lighting 2 (Chambre / Plafonnier)
2016-08-02 12:22:51.467 (Huzzah) Lighting 2 (Chambre / Boutons / LEDs boutons)
- Domoticz v3.5382 running on a Raspberry Pi B2
- MySensors Gateway 2.0.0 running on a ESP8266 (Adafruit Huzzah to be more specific)
- Various MySensors nodes based on Atmega328p (5 nodes so far)
Transmition details:
- PIRs: my nodes are set to only transmit when their state changes
- Temp/Hum/Lux sensors: they transmit every 15 minutes, except for the lux sensor which also transmits when a change >50lux occurs.
From my point of view, there should not be any network congestion.
As I write this post, I wonder if this is a Domoticz issue, a MySensors issue, or a Domoticz/MySensors communication issue...
Still, I am very happy with my setup, but my wife isn't much because of the delay (which can, from time to time, exceed 2 seconds (I have no logs for that, but I've seen it)).
Can anyone help me with this issue, or tell me where to look?
Many thanks!
EDIT: I think this was unclear in my post, but the delay has been there from the beginning. I just didn't realize how "important" it would be in real life usage.