I am having a hard time coding exactly what I want. Also not a cider at all.
What I want to accomplish is:
I have 2 iPhones set up as presence sensors as well as 2 arrival sensors. iPhone and arrival sensor for me and another set for my partner.
My partner doesn’t drive a lot, so his keys and arrival sensor are often left at home, while his phone is always with him.
My thought process is to make 2 pistons,
-
Using our iPhones and arrival sensors to set the mode from home to away.
So using all 4 devices to make mode change.
Example:
-if my arrival sensor leaves, as well as my phone, mode stay as home
-If my arrival sensor, my phone and his phone, mode changes to away.
-If my arrival sensor, my phone, his phone and his arrival sensor leaves, change to away.
-If any arrival sensor returns, change mode to home -
If status changes From away to home, run welcome home automation
If status change from home to away, run goodbye home automation.
But also :
-if my arrival sensor and iPhone leave, and his are home, lock front door
-if my arrival sensor arrives, unlock front door
-same 2 ifs as above for him
I’m having a hard time thinking about how to lay this out, run smooth, without a bunch of bloat.
Any ideas to point me in the right direction, or better yet, any one have a Similar piston I could use and modify?
Thanks in advance for any help!