I have a strange problem with the Presence Sensor SNZB-06P. I have set up a scene: if presence is detected and it’s after sunset or past a certain time, turn on the light attached to S60 smart plug, and similarly, do not turn it on after a certain time, e.g., 1 AM. The problem is that if, for example, a person is within range of sensor before sunset or before the time when the scene should turn on the light, it doesn’t work. The person has to leave and come back after some time. Similarly, if a person is within range of sensor and the scene is supposed to turn off/not turn on the light, they have to leave and come back for it to stop turning on.
Scenes do not remember the state of devices in continuous mode. The scene responds only to the moment of state switching. This is crucial and explains the behavior of the devices.
But I can see in the logs that it turned light on, but in fact it didn’t. This doesn’t explain anything other than bug in software logic.
Connected to this is that the presence sensors have a light sensor, but it cannot be Independently read and used, so you cannot switch the light on when it gets dark. Otherwise one could combine that with a switch off if no presence detected since 3 minutes.
The logic and sensors are in some cases needlessly limited. Why?
The bigger issue is that it won’t turn on light if sensor has active human presence detected. For example:
Person sat on the sofa at 4.55PM and scene has trigger: if presence detected and it is between 5.00PM and 1AM. It will not turn the light despite you can see in the logs it did it. To fix, person need to move out of the presence sensor range, wait 2-3 minutes and comeback. Then it will work. This is clearly a bug in the logic.
The presence sensor is not quite suitable for what you want because it takes a while for it to change state and depends on its settings, but your problem is what if the presence is from 16:50 and your scene starts at 17:00, you can add the start time to 17:00 to the condition and the property that all conditions, i.e. time and presence, must be met and then the light will turn on. Then you have to create another wall if the presence is turned on and the active time of the scene will be from 17:00 to 1:00. The first scene ensures that if the presence is before 17:00, it will trigger thanks to the inserted time condition. And the second scene will monitor if the presence occurs after 17:00
I will try that and if it will work then it only confirms a bug in the logic. Presence sensor is perfectly suitable for this, if I enter the sensor range after 5PM it works like a charm, If i leave to make a tea it will turn it off.
Does anyone know what does it mean:
-
Occupancy detected and ambient light is bright
-
Occupancy detected and ambient light is dim
Does it have a light sensor built-in?
it works first I tried it. but it is not a complete error in logic rather different than what you are used to. this is not a principle like the one used by Siemens or personal plc where the control process takes place every cycle of about 50-150 milliseconds but rather a process of reporting changes claud probably performs the control but the sensor only sends changes to save energy and data transfer. Claude that presence is at the value true but because the scene was limited by time there is no reason to execute it because there was no change otherwise it would still send a request to turn on the light. when you add a time condition the system finds that the event time has come and it also has the status of the sensors saved so both conditions of your scene will be true and claud can start the scene. I use the same solution with temperature sensors so that I don’t have to wait for the temperature to change.
It has a light sensor, but I couldn’t accurately estimate its values so that it would work in practice. It’s more of a trial and error method. This solution is more suitable for walk-through rooms when the hallway is already very dark and no one stays there for too long. Personally, I have this set to a detection time of 15 minutes and 15 after the end of detection to avoid unwanted shutdowns when it’s not convenient.
As I said it has a light sensor, but it only distinguishes dim and not dim and cannot be read or configured Independent from the presence indication.
Unfortunstely the presence sensors are Sonoffs weakest sensor products. Pretty slow, sometimes inaccurate, weak configuration options.
It should probably get a complete revamp. Currently you need to combine it with the PIR sensor to be borderline useful.
