Use lux sensor with motion sensor
Moderator: leecollings
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Use lux sensor with motion sensor
The code is working if i use sunset and sunrise
But i now want to use the lux sensor. But i can't get it working.
The lights go not on and when i use the =/ and i hold a light on the lux sensor. So the lux sensor is above 2 lux, the lights still go on????
So no lights with >< and lights on when =/ with every lux and motion????
But i now want to use the lux sensor. But i can't get it working.
The lights go not on and when i use the =/ and i hold a light on the lux sensor. So the lux sensor is above 2 lux, the lights still go on????
So no lights with >< and lights on when =/ with every lux and motion????
- Attachments
-
- lux motion blocky.jpg (105.52 KiB) Viewed 3566 times
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Use lux sensor with motion sensor
Well the ElseIf will always be true when the Buitenlicht lux sensor is greater than 0 so the light will be switched on.
What exactly is the intent for that ElseIf test?
Jos
What exactly is the intent for that ElseIf test?
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Re: Use lux sensor with motion sensor
it is comming from the sunset and sunrise. but even without the elseif. I get the same results.
- Attachments
-
- lux motion blocky2.jpg (153.85 KiB) Viewed 3560 times
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Use lux sensor with motion sensor
In your last elseif the light value is always accepted, except at value 0
Are you sure that your minimum value of 0 or 1 isn't too low? Even your outdoor light could increase this small number.
Are you sure that your minimum value of 0 or 1 isn't too low? Even your outdoor light could increase this small number.
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Re: Use lux sensor with motion sensor
yes i am sure. my outdoor light don't effect the light meter. And it is so dark here that i don't have any light at night. So how do i make it than. The lights need to go on at 0.
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Re: Use lux sensor with motion sensor
This one is not working
this one is working
This one is working at down and the lights didn't go on at day. But this blocky is al working with a 7 lux and less from the light sensor.
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Re: Use lux sensor with motion sensor
Log from the tuinverlichting this day.
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Use lux sensor with motion sensor
the first one isn't working because you've got the wrong if-block. If you're using only 1 if statement, you should use the one without the blue icon on the upper left corner.
the ≠ blocks won't get you your desired result. It literally means 'not equal to', so if the value of 'Buitenlicht actual' isn't 1 (which is very likely it isn't), it triggers. So it'll trigger pretty much always when motion is detected.
I think you're looking for something like this (If-block WITHOUT the blue icon):
* I chose 5 because 1 seems very little light to me, you should see what value the light sensor gives when you think it's dark enough for the light to go on at movement
So all the movement sensors in or-blocks and those combined in an and-block with the lux value of the current light sensor
PS: do your motion sensors have a built-in lux sensor? because you say your last blockly pretty much works as you want and doesn't trigger during the day. Which is odd because during the day the lux value certainly isn't equal to 1
the ≠ blocks won't get you your desired result. It literally means 'not equal to', so if the value of 'Buitenlicht actual' isn't 1 (which is very likely it isn't), it triggers. So it'll trigger pretty much always when motion is detected.
I think you're looking for something like this (If-block WITHOUT the blue icon):
Code: Select all
If [ [ [ [Terras bewegingsmelder = On] or [Oprit bewegingsmelder = On] ] or [Schuur bewegingsmelder = On] ] and [Buitenlicht] actual <= [5]* ]
Do [Set [Tuinverlichting] = [On]]
[Set [Tuinverlichting] = [Off] After [300] seconds]
So all the movement sensors in or-blocks and those combined in an and-block with the lux value of the current light sensor
PS: do your motion sensors have a built-in lux sensor? because you say your last blockly pretty much works as you want and doesn't trigger during the day. Which is odd because during the day the lux value certainly isn't equal to 1
Last edited by tozzke on Saturday 27 May 2017 23:34, edited 1 time in total.
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Re: Use lux sensor with motion sensor
the <= and or >= are not working ether. I already attempted that.
I will try to use the if without the blue icon
ps. no my motion sensors don't have a build in lux sensor. I use a mysensors lux sensor. And indeed it is wierd that the tuinverlichting blocky is somewhat working. no the lux is far above the 1 during day especially today.
I will try to use the if without the blue icon
ps. no my motion sensors don't have a build in lux sensor. I use a mysensors lux sensor. And indeed it is wierd that the tuinverlichting blocky is somewhat working. no the lux is far above the 1 during day especially today.
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
-
- Posts: 36
- Joined: Wednesday 01 March 2017 13:00
- Target OS: Windows
- Domoticz version: all
- Contact:
Re: Use lux sensor with motion sensor
long time domiticz user, running 8 domoticz installations on vm's nuc i3. And espeay hosting more than 30.
Re: Use lux sensor with motion sensor
As far as I can read this last Blockly example, it will always turn on the lights whenever movement is detected. When "Terras bewegingsmelder" is ON, the statement is TRUE and it does'nt matter what the other conditions are. The same goes for "Schuur bewegingsmelder", if it is ON, again the statement is TRUE and the lights will turn on, etc.
You say it worked with <Sunrise and >Sunset, so every change from there should be inspected. And sure, when part of the condition is "Buitenlicht /= 1" ,as mentioned in a previous post, it will always be TRUE, except when the value is exactly 1, so if lux = 0 or 7 or 85 or whatever except 1, it will trigger.
You say it worked with <Sunrise and >Sunset, so every change from there should be inspected. And sure, when part of the condition is "Buitenlicht /= 1" ,as mentioned in a previous post, it will always be TRUE, except when the value is exactly 1, so if lux = 0 or 7 or 85 or whatever except 1, it will trigger.
Who is online
Users browsing this forum: No registered users and 1 guest