Page 1 of 2
Suggestions from anyone who has an action with presence det.
Posted:
Fri Dec 21, 2018 2:04 pm
by mpovolo
Hi. Was looking for ideas from anyone who does actions based on presence detection. Right now I have an action when the garage Pi detects my car keys driving into the garage it unlocks the door into the house. I did this based on signal strength greater than -75. Problem is depending on where the keys are it continues to do it so I need to attach a different or an additiona check. For example, leaving, I lock my door, get into the car and go figure my door gets unlocked again because I’m still there. Lol. Any ideas?
Thanks
Re: Suggestions from anyone who has an action with presence
Posted:
Fri Dec 21, 2018 2:22 pm
by kw123
Check out homeaway plugin
You can add a gate function w it
Ie iBeacon plus door must be open to trigger
Gate can be x sec before and after
Sent from my iPhone using Tapatalk
Suggestions from anyone who has an action with presence det.
Posted:
Fri Dec 21, 2018 2:45 pm
by kw123
For these kind of things you need an asymmetrical trigger.
First establish away ( signal off for >x minutes ) Set away true eg in a variable
If away and signal: open door and set away to false
That and more is done in home away plugin.
Sent from my iPhone using Tapatalk
Re: Suggestions from anyone who has an action with presence
Posted:
Fri Dec 21, 2018 4:05 pm
by mpovolo
Thanks everyone. Great idea.
Re: Suggestions from anyone who has an action with presence
Posted:
Fri Dec 28, 2018 11:58 am
by johnpolasek
A little late, but I have pi's near each of the 3 doors that have Z-wave locks on them and a script which triggers on number of "Family" beacons changing; if Family beacons goes to 0, it locks all the doors and sets a variable to give me a pushover alert on movement or door opening, and clears if family beacon count becomes > 0. I also have a trigger on each valid beacon state becoming "up" which causes the puts the "closestRPI" state into a variable and calls an action script which unlocks the door that that Pi is closest to. It also used to put the closestRPIText states of all the present family beacons into a list and put that into a variable so I knew who was home, but Karl deprecatd that state for some reason and I've been trying to find all the places I used it ever since. Since everybody carries XYs on their keys, we rarely have to unlock anything.
Re: Suggestions from anyone who has an action with presence
Posted:
Fri Dec 28, 2018 2:42 pm
by kw123
Oops
Will check.
Karl
Sent from my iPhone using Tapatalk
Suggestions from anyone who has an action with presence det.
Posted:
Fri Dec 28, 2018 4:24 pm
by kw123
can't you use state = closestRPI instead of closestRPIText in your variable?
2 vs RPI-2?
I thought the info is equivalent..
Karl
Re: Suggestions from anyone who has an action with presence
Posted:
Sat Dec 29, 2018 9:01 am
by kw123
how about we put the the device name there (state name= closestRPIdevName) and not closestRPItext ="RPI-2"
eg state: closestRPIdevName = "front left entry" or "back garage" ...
?
Karl
Re: Suggestions from anyone who has an action with presence
Posted:
Sat Dec 29, 2018 10:52 am
by johnpolasek
kw123 wrote:can't you use state = closestRPI instead of closestRPIText in your variable?
2 vs RPI-2?
I thought the info is equivalent..
Karl
That's what I have been doing: replacing
- Code: Select all
closestPiText = MyDevice.states["closestRPIText"]
with
- Code: Select all
closestPiNum = MyDevice.states["closestRPI"]
closestPiText = "RPi"+str(closestPiNum)
every time I find another rarely used script that throws the error... The problem was (is) that I used it in bunch of places, and since the log doesn't tell me what trigger/schedule/action has thrown the error, I've got one that I can't find that is hitting once an hour or so (On Average).
Re: Suggestions from anyone who has an action with presence
Posted:
Sat Dec 29, 2018 11:14 am
by kw123
I have the new version ready that shows the name of the rpi in closestRPItext
Will publish later today
Sent from my iPhone using Tapatalk
Re: Suggestions from anyone who has an action with presence
Posted:
Sat Dec 29, 2018 12:35 pm
by kw123
question:
when an ibeacon goes offline (= goes away) the closest RPI goes to -1 should the costestRPItext go to ""
or should it keep the last RPi dev name, to see eg where the ibeacon exited?
Karl
[edit]
added option to select if clostestRPItext should go blank or should keep the last RPI dev name
doing some more testing, should be ready today
Re: Suggestions from anyone who has an action with presence
Posted:
Sat Dec 29, 2018 6:10 pm
by kw123
@johnpolasek , have added back the closestRPItext, but realized it is now text and not Text..
hope that's not a problem.
Karl
Re: Suggestions from anyone who has an action with presence
Posted:
Sun Dec 30, 2018 8:34 am
by johnpolasek
kw123 wrote:@johnpolasek , have added back the closestRPItext, but realized it is now text and not Text..
hope that's not a problem.
Karl
Unfortunately that is THE problem; I've scrubbed all MY actions and triggers, but I'm still getting
Dec 30, 2018, 8:17:15 AM
Error device "Johns XY" state key closestRPIText not defined
Error device "Johns XY" state key closestRPIText not defined
Error device "Jeffs Keys2" state key closestRPIText not defined
Error device "Jeffs Keys2" state key closestRPIText not defined
but now I'm also getting occasional
SQL Logger Error exception trying to insert row into table variable_history_1858841481 ("iBeacon_With_Status_Change")
SQL Logger Error ERROR: column "closestrpitext" of relation "device_history_1762882528" does not exist at character 569
SQL Logger Error INSERT INTO variable_history_1858841481 (value) VALUES (%s);
which means that it's somewhere else... Is it possible that it's in the PostGres SQL table for the the existing beacons? And if it is, will I have to delete them and rebuild all the triggers I have in place?
Re: Suggestions from anyone who has an action with presence
Posted:
Sun Dec 30, 2018 10:07 am
by kw123
Ok will change.
The sql error:
Stop sqllogger wait 10 sec and restart
Sent from my iPhone using Tapatalk
Re: Suggestions from anyone who has an action with presence
Posted:
Sun Dec 30, 2018 10:33 am
by kw123
posted v .262 has old state name for costestPRPIText
and a side remark .. the new temp sensor max31865 goes from at least -50C ... +200C (tested w cold spray and gas flame)
Karl