Hi,
I have a blocky the set the temp of 2 rooms when someone is at home. (Precense detection based on Life360)
The problem is when there is already some body at home (someonhome is on) and an other persons enter the geofence the someonehome switched is again set to on and the command to set the room temperature is sended again but this is not needed.
How can i avoid the set temperature when there is already someone at home?
Kind regards
Koen Deschepper
Someonehome
Moderator: leecollings
-
- Posts: 139
- Joined: Tuesday 06 September 2016 20:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: L stab
- Location: Belgium
- Contact:
Someonehome
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
-
- Posts: 15
- Joined: Monday 03 April 2017 15:01
- Target OS: Linux
- Domoticz version: 4.9701
- Location: Netherlands
- Contact:
Re: Someonehome
My first reaction would be don't switch On someonehome when On already and trigger the set temp in a separate blocky event based on the someonehome switch, check what the switch did, become On or Off.
Does that help?
Does that help?
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Someonehome
I assume Life360 will update to ON a switch... so re-assign On the same device will trigger again the script
you would need a second controlled variable (or device) to check that will count is someone is already at home or not
...how do you handle the absence of persons at home? simply having the Life360 switch set to off?
do you have a switch for a single person or do you have a common switch for all?
...maybe it would be better if you could post your script also
you would need a second controlled variable (or device) to check that will count is someone is already at home or not
...how do you handle the absence of persons at home? simply having the Life360 switch set to off?
do you have a switch for a single person or do you have a common switch for all?
...maybe it would be better if you could post your script also
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
- Posts: 331
- Joined: Monday 03 July 2017 19:58
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Someonehome
Try this:
Create a user variable "Family Presence" and the following lines in a Lua Device Script.
I use this to switch timer plan when anyone of the family is at home. You can put room temperature setting.
Create a user variable "Family Presence" and the following lines in a Lua Device Script.
Code: Select all
commandArray = {}
if (devicechanged['Life360 - Person1 Presence'] or devicechanged['Life360 - Person2 Presence'] or devicechanged['Life360 - Person 3 Presence']) then
if (otherdevices['Life360 - Person Presence'] == 'On' or otherdevices['Life360 - Person Presence']== 'On' or otherdevices['Life360 - Person Presence']== 'On') then
if uservariables['Family Presence'] == 'Away' then
os.execute('curl -s "http://user:[email protected]:8084/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=4" &')
commandArray['Variable:Family Presence'] = 'Home'
print("Family is Home")
end
else
os.execute('curl -s "http://user:[email protected]:8084/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=3" &')
commandArray['Variable:Family Presence'] = 'Away'
print("Family is Away")
end
end
return commandArray
-
- Posts: 139
- Joined: Tuesday 06 September 2016 20:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: L stab
- Location: Belgium
- Contact:
Re: Someonehome
Hi febalci,febalci wrote:Try this:
Create a user variable "Family Presence" and the following lines in a Lua Device Script.
I use this to switch timer plan when anyone of the family is at home. You can put room temperature setting.Code: Select all
commandArray = {} if (devicechanged['Life360 - Person1 Presence'] or devicechanged['Life360 - Person2 Presence'] or devicechanged['Life360 - Person 3 Presence']) then if (otherdevices['Life360 - Person Presence'] == 'On' or otherdevices['Life360 - Person Presence']== 'On' or otherdevices['Life360 - Person Presence']== 'On') then if uservariables['Family Presence'] == 'Away' then os.execute('curl -s "http://user:[email protected]:8084/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=4" &') commandArray['Variable:Family Presence'] = 'Home' print("Family is Home") end else os.execute('curl -s "http://user:[email protected]:8084/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=3" &') commandArray['Variable:Family Presence'] = 'Away' print("Family is Away") end end return commandArray
I changed to LUA and now it is working. I think I wiĺl change all my blockly scripts to LUA
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Who is online
Users browsing this forum: No registered users and 0 guests