Auto turn off lights

Post Reply
jerrybboy
Posts: 10
Joined: Wednesday 20 December 2017 21:50
Target OS: Linux
Domoticz version:
Contact:

Auto turn off lights

Post by jerrybboy » Monday 05 March 2018 20:01

Hello People,

Could you guys help me with the following things :

I have a few philips hue lights in my house that can not be turned off without a mobile phone, so when my cleaners comes to my home she is unable to turn on/off or change the brightness of the lights. The only way to turn them on or off is to flip the switch in my kitchen. But this way I can not control the lighting because the light bulb doesn't have any power.

I was wondering if the following things are possible :

1) When the light is turned on by the switch it should switch off the light after lets say 30 minutes.
2) When the switch is flipped 2 times within 10 seconds it should activate 100% brightness
3) When the switch is flipped 3 times within 10 seconds it should activate 50% brightness

Could you guys give me some tips on how to achieve this, the most important one is #1.

Best regards,
Jerry_bboy

freijn
Posts: 378
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Auto turn off lights

Post by freijn » Monday 05 March 2018 21:30

Do you have the Philips Hue Bridge ?
You require an interface to the domoticz...

jerrybboy
Posts: 10
Joined: Wednesday 20 December 2017 21:50
Target OS: Linux
Domoticz version:
Contact:

Re: Auto turn off lights

Post by jerrybboy » Tuesday 06 March 2018 0:18

freijn wrote:
Monday 05 March 2018 21:30
Do you have the Philips Hue Bridge ?
You require an interface to the domoticz...
Yes I have the philips hue bridge. I can controle it through my Phone with the philips hue app. And I can controle it through domoticz.

Amsterdam020
Posts: 61
Joined: Saturday 05 March 2016 22:42
Target OS: Raspberry Pi
Domoticz version: 3.5629
Contact:

Re: Auto turn off lights

Post by Amsterdam020 » Tuesday 06 March 2018 0:44

You could use a kaku (klik aan klik uit) remote controle ( https://www.klikaanklikuit.nl/nl/ayct-1 ... ening.html ) if you have a rfxcom
You could create a script where the kaku remote swithces your hue light.

Or more expensive, use a smart wall switch, see
viewtopic.php?f=11&t=19592&p=152379#p152379
Rp3, youlesss, rfxcom, philips hue, dsb1820

User avatar
waaren
Posts: 913
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Auto turn off lights

Post by waaren » Tuesday 06 March 2018 0:45

If the switch is only controlling the power to the hue light and not known in domoticz, domoticz have no way to control or check the state of the bulb if it is switched off.
In order to do that you would need another switch that can function as a trigger to a scene and/or script

With such a switch defined in domoticz, it is quite simple to implement requirement #1 with a scene or script and requirement #2 and #3 can be done using a dzVents scripts (and probably also with other types of scripts)
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

freijn
Posts: 378
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Auto turn off lights

Post by freijn » Tuesday 06 March 2018 9:20

So.. What you are looking for is only a switch into domoticz and operated by the cleaners. ?

- connect a simple switch to your IO on the raspberry Pi ( need a cable between switch and raspberry :-( )
- get a NodeMCU Arduino, put a switch on that one and place the switch anywhere you like ( power and Wifi required)
- get a rflink gateway and do it with the "action shop doorbell kaku'

jerrybboy
Posts: 10
Joined: Wednesday 20 December 2017 21:50
Target OS: Linux
Domoticz version:
Contact:

Re: Auto turn off lights

Post by jerrybboy » Tuesday 06 March 2018 16:36

freijn wrote:
Tuesday 06 March 2018 9:20
So.. What you are looking for is only a switch into domoticz and operated by the cleaners. ?

- connect a simple switch to your IO on the raspberry Pi ( need a cable between switch and raspberry :-( )
- get a NodeMCU Arduino, put a switch on that one and place the switch anywhere you like ( power and Wifi required)
- get a rflink gateway and do it with the "action shop doorbell kaku'

First I don't have a raspberry Pi, but I run domoticz on my hp microserver so I won't be able to connect a cable to that.

Please tell me if what I was thinking is possible or not,
When I turn on the lights in my kitchen (hue lights) with the app I see in domoticz that the lights are on.
Also when I turn on the lights with the switch (switch is not visible in domoticz) i can see that the light is on
See the picture below it says (aan) to show that the lights are on.
Image

Also I can see that every light is going on in the following picture
Image
So what I thought should be possible is that when the light is turned on/off 2/3 times within a "X" amount that it will trigger a scene.

Also I would like to turn of the light after 30 minutes when it is switched on by a switch or by the hue app or by domoticz .

But maybe i'm wrong and it is not possible .

jerrybboy
Posts: 10
Joined: Wednesday 20 December 2017 21:50
Target OS: Linux
Domoticz version:
Contact:

Re: Auto turn off lights

Post by jerrybboy » Tuesday 13 March 2018 12:43

No one that has an idea if this is possible ?

Somebody said to me it might be possible with dzvents ?

User avatar
waaren
Posts: 913
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Auto turn off lights

Post by waaren » Tuesday 13 March 2018 13:07

In this setup and with only the hardware you are describing, I don't know how to make this possible.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

alanlsmith
Posts: 104
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: 4.9701
Location: Near London
Contact:

Re: Auto turn off lights

Post by alanlsmith » Friday 16 March 2018 11:59

To turn off after 30 minutes you could use something like this script

Code: Select all

commandArray = {}

local light = 'YourHueLight'

if(devicechanged[light] == 'On') then
		commandArray[#commandArray+1] = {[light] = 'Off AFTER 1800'} -- 30 minutes
end

return commandArray		
For setting the level with multiple presses of the switch, if the switch also causes the hue light to go on and off the you could use a script to check the light going on repeatedly within a certain time and set the level accordingly but I feel that it might not be very reliable as it would be largely dependant on how quickly (or slowly) the switch was switched and whether Domoticz could keep up.

I use something similar with my porch light. If you open the door and close it in less then 10 second then the porch light goes on and remains on until you open and close the door again but if you open the door and leave it open the light stays on until you close the door.
Domoticz v4.9701 beta, Ubuntu 18.04 on Intel NUC i3, 8Gb ram, 70Gb drive, RFXtrx433, z-wave and a bit of Broadlink/Android

Ballo50
Posts: 3
Joined: Tuesday 21 November 2017 10:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Auto turn off lights

Post by Ballo50 » Friday 16 March 2018 12:43

The problem is indeed how fast Domoticz will detect the light has been turned off and on. The Hue bridge must first detect the light change and then report it to Domoticz.
An option would be to use a motion detector and script the light based on day and time the motion is detected. Of course this would require the cleaners to be around at the same day at around the same time.

An easy solution for this outside Domoticz would be to buy a Hue dimmer switch. You can program that within the Hue app and can place it on any location you like. just instruct the cleaners to use those buttons instead of the current light switch. I had the same problem with a switch in my hallway and solved it this way.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests