Homey Community Forum

Turn lights on when i get home

#1

Hi. I cant find a solution. I want homey to turn on some of my lights if me or my girlfriend comes home but only if No one is home. And its after sunset.

Ive tried
when: some one came Home.

And
Its after sunset
Nobody is home

Then
Turn the lights on.

I guess its beacuse when someone comes home the status change to home and when the card nobody is home activate it wont work just beacuse someone is home.

I would like the card nobody is home to be placed under when but thats not an option

#2

So u would like this as a trigger card?
When would it trigger then?

And when u use WHEN someone came home AND nobody is home that would be confusing aye?
Can u try without the “And nobody is home” card and see if that works?

#3

Okay. I can see that problem. But How should i do it.

Turn the lights on if its after sunset and Im the First one home. I Dont want the lights to turn on if someone is home.

In case i comes home at night and my girlfriend is asleep. I do not want the lights to turn on. But if shes not home then i want them to turn on

#4

Ur cards are in the Smart presence app!

chrome_2019-04-02_21-16-00

#5

I would create variable ’ someonehome’.

when: some one came Home.

And
Its after sunset
Someonehome == off

Then
Turn the lights on.
Set variable Someonehome = on

make sure to create flow to set Someonehome to Off when everybody left

1 Like
#6

Im a noob and cant make it work. I have port forwarding on my router. I have the option to create DHCP but the gap betwen the ip Numbers must be at least 20

I have a tplink router

#7

U must be looking for DHCP reservations me guess.
Like here.

#8

Ive created static ip for my phones should that ip be between that 20 i have to choose.

For exempel. My iPhone is xxx.xxx.xx107
Should i set the DHCP reservation to xxx.xxx.xx.100 - xxx.xxx.xx.120?

#9

No, just 107.
So reservation for phone would be xxx.xxx.xx.107
Added link in my above post.

#10

Thats not possible it have to be 20 between.

I can make a reservation for my phone so that get the same ip all the time. Is that enough? Its calles adressreservation on my router

#11

That will be correct!

#12

Alright. I Will try that. Now my phone has the same ip all the time. With some of my Otter devices. Thanks.

Do you now How long i Will have to be disconected for it to activate? And i just downloaded it to my homey. Is there anything else i have to do?

#13

It did not work. I Will try ifttt now.

#14

How do you make that kind of variable?

#15

So. I might figured it out.
I Will use ifttt to mark me or my girlfriend home or away when connecting or disconecting from our router.

When

Someone came home.

And
Its aftersunset
A specific user is not home. (Me)
Or
Its after sunset
A specific user is not home (girlfriend)

Then
Turn lights on

So if someone of us comes home late and one of us isnt home, the light Will turn on?

#16

#17

Which doesn’t work in 2.0 right?

#18

Can’t you use the “asleep” function? Or a certain time frame only?

Vkr
Victor

#19

I have learned that splitting up flows makes life much simpler.
Yes you do get a lot of flows, but you can also re-use them.
My action flows trigger (WHEN) with a card ‘when this flow is started”
My trigger flows end (THEN) with a start this flow

1 create an action flow that sets your lights to the desired state
2 create trigger flow that triggers when nobody is home (and triggers the flow above
3 create a flow that diables the action flow when its ligt
4 and another that enables the flow when its dark
(This is were you can easily combine flow, one “its dark” flow enables a whole set of flows)
5 and another that disables the action flow when somebody is home
6 and one to enable…
Yes, lots of flows, but less entanglements and easy to debug (use the papaertrails app)

#20

Is working here.