light on when its dark LUX

Moderator: leecollings

Post Reply
behave49
Posts: 10
Joined: Thursday 08 March 2018 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

light on when its dark LUX

Post by behave49 »

OKe, just got my new sensors (Aqara body en light sensor)
I want to make a blocky wich will turn my light on when it becomes dark. It looks how many LUX there are and if the are below 4 it turns on my light.

And it does, but won;t go out anymore becasue at night its below 4 to hahah
How to solf this?
Attachments
lichten.jpg
lichten.jpg (39.36 KiB) Viewed 1665 times
Toulon7559
Posts: 850
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: light on when its dark LUX

Post by Toulon7559 »

Suggestion:
insert an extra clock-related time-gate which only allows switch-on in the evening.

Something like
IF ((light <4 ) AND ((Time > 17:00) AND (Time < 23:00))) THEN ......
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
behave49
Posts: 10
Joined: Thursday 08 March 2018 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: light on when its dark LUX

Post by behave49 »

Great idea, thank you..
behave49
Posts: 10
Joined: Thursday 08 March 2018 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: light on when its dark LUX

Post by behave49 »

Is there a way to skip this action when i'm not at home? I saw someone made something with his phone.
If phone is not home then dont put light on. But dont know how i could make that.
I see my gsm in Domoticz but thats all
Toulon7559
Posts: 850
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: light on when its dark LUX

Post by Toulon7559 »

Where do you see your GSM in Domoticz?
[and how did you get that signal?]
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
behave49
Posts: 10
Joined: Thursday 08 March 2018 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: light on when its dark LUX

Post by behave49 »

Toulon7559 wrote: Saturday 04 May 2019 16:27 Where do you see your GSM in Domoticz?
[and how did you get that signal?]
Settings, more options, gsm
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: light on when its dark LUX

Post by emme »

I do have a variable handled by the presence script that update the number of presence device detected (mostly mobiles phones and tag BLE), if it sets to 0 it means none is at home.

then my lux script evaluate that variable and also external Luxes and time frame (between sunset and sunrise) and switch on or off automatically
The most dangerous phrase in any language is:
"We always done this way"
behave49
Posts: 10
Joined: Thursday 08 March 2018 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: light on when its dark LUX

Post by behave49 »

Emme, how did you do that?

other problem
I now have 2 scripts. 1 who detects its dark so my lights go on. Amd one wich detects its light enough to turn them off again.
both scripts working but the last one keeps sending the command light off whole day. How can i stop this.
I get why its doing that because if lux is higer then 10 it sent the command. so all of the day the luz is higher then 10 en everytime it gets higher it will sent the off command
mrf68

Re: light on when its dark LUX

Post by mrf68 »

@behave49,

you could add a check to the second script: if lux is higher than 10 AND light is on THEN turn the light off.
doh
Posts: 82
Joined: Monday 01 December 2014 13:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: London, UK
Contact:

Re: light on when its dark LUX

Post by doh »

You could use the geolocation feature of the domoticz phone app to turn a switch on/off when you leave the house.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest