Consume less energy

Hi, I am new to the system. I have a Veralite which I am using with Schlage locks. But, I have a question regarding a house that I have for rent.

This is the scene:

My tenants turn on the air conditioning every day and then, leave the house so that when they arrive they find the room cold. Please recomend me a method or some kind of sensor that can capture the movements in the room. I have no problem with them turning on the A/C during the day if there are people in the room. If they are going out I can’t have the A/C on so that the room can be cold when they arrive hours later. This uses alot of electricty and the bills are high.

Please inform me of anything that I may use to conserve more energy in the house.

Thanks for your help in this matter.

Miguel Columna

There are several ways to handle your needs. There are several motion sensors, including Aeon’s 4 in 1 Motion and temperature device. I have it, but have not installed it yet. However, what I suggest may depend entirely on your thermostat and existing wiring and how your vera is going to control it. Without knowing that, I would suggest that you install a NEST thermostat, which has a motion sensor, humidity sensor and is remotely controlable. Possibly with this thermostat by itself, which hooks up to your existing wiring and wireless internet connection, you may not need anything further. It is programmable for schedules so if the user turns the temp up or down too much, your schedule can revert it back to whatever your setting are. You can min or max out the temperature they can set it to. It can also communicate directly with the Vera unit if you want to further perform any other automation control. As long as the Nest is located in an area that captures the motion you want, then possibly an additional motion sensor is not required, but it could still be added for more, better coverage.

I had a similar problem with family staying in our guest house. I wrote the following Scene with Lua so that the thermostat would reset itself after allowing 30 minutes at the temperature the thermostat was manually set to.

-Create an AirCon Saver Virtual Switch
-write down your desired temperatures and times.
-Create a scene that is triggered by the thermostat set point going below your desired set point (77F in my guest house)
-Add a delay in the scene to set the thermostat back to your desired set point, I use 30 minutes because it is enough time to cool the rooms and not too short as -to ‘confuse’ the A/C unit
-Add the Lua below if you want to cancel the scene if you have the virtual switch ‘off’ (this allows you to control it if you are staying there!)

You can pull out what you need to do this if you like. It is a lot cheaper than buying another sensor! Alternatively, you don’t even need the Lua if you don’t care about creating the virtual switch.

– Test to see if the AirCon Saver Virtual Switch is OFF
– I can turn the AirCon Saver off and on depending on what’s happening in the guesthouse
local SaverStatus = luup.variable_get(“urn:micasaverde-com:serviceId:VSwitch1”, “Status”, 98)

– Test to see if the Vacation Mode Virtual Switch is ON
– This is here to prevent the thermostat resetting during a dryout scene that runs once a week to lower the humidity accumulated in the house
local VacationStatus = luup.variable_get(“urn:micasaverde-com:serviceId:VSwitch1”,“Status”, 66)

if (SaverStatus == “0”) then
return false
elseif (VacationStatus ==“1”) then
return false
else
return true
end

I don;t think you are allowed to do that, since you let your house for rent you cannot command them to turn the air conditioning off if they have a reason for it, try asking them nicely instead of tricking them, they might get annoyed

With the help of many in this forum, I created a scene which shuts off my AC if any of my doors or windows (with armed sensor) is open for more than 60 seconds or if non of my motion detectors detect motion for more than 20 min between hours of 9 AM and 5 PM. I run this scene every 5 minutes. See below:
_________________________________________________________________________________________________________-
– Begin user input variables

– Table of window and door sensors ID# with descriptor
local wdSensorIdPair = {
[35]=“LwHall_D”,[38]=“UpBed_W”, [41]=“GR_Lanai_D”, [49]=“GRFrnt_D”, [51]=“LwHall_W”, [60]=“LwFrtBRDr”, [61]=“LwBkBR_D”, [81]=“LW_MastBR_D”, [75]=“LwFtBR W”, [80]=“UPHall_W”
}

– Table of motion sensors ID# with descriptor
local motionSensors = {
[58]=“GR_Foyer_MD”, [59]=“LH_MD”, [63]=“GR_TV_MD”, [64]=“Up_Mstr_BR_MD”,
[65]=“Lw_Mstr_BR_MD”
}

– Table of thermostats ID# with descriptor
local thermostats = {[4]=“GRThermostat”, [20]=“LHThermostat”}

– End user input variables

– Check if there are tripped sensors. If there are, then turn the thermostats off.
function checkForTrippedSensors()
– Assume that no sensors are still tripped.
local wdSensorTripped = false

for k, v in pairs(wdSensorIdPair) do
    local tripped = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", k) or "0"
    if (tripped == "0") then
        luup.log("Sensor '" .. v .. "' is not tripped.")
    else
        luup.log("Sensor '" .. v .. "' IS TRIPPED!")
        wdSensorTripped = true
        break
    end
end

if (wdSensorTripped) then
    for k, v in pairs(thermostats) do
        luup.log("Turning thermostat '" .. v .. "' OFF.")
        luup.call_action("urn:upnp-org:serviceId:HVAC_UserOperatingMode1", "SetModeTarget", {NewModeTarget = "Off"}, k)
    end
end

end

local now = os.date(“*t”)
– If it’s between 9 AM and 7 PM then check the motion sensors.
if (now.hour >= 9 and now.hour <= 19) then

-- Assume that no motion sensor has been tripped in the last 20 minutes.
local motionSensorTripped = false

-- Check when was the last time each motion sensor was tripped.
for k, v in pairs(motionSensors) do
    local lastTrip = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", k)
    lastTrip = tonumber(lastTrip, 10) or os.time()
    if (((os.time() - lastTrip) / 60) < 1200) then
        motionSensorTripped = true
        break
    end
end

--  If no motion sensor has been tripped in the last 20 minutes (1200 seconds), then turn off the AC.
if (not motionSensorTripped) then
    for k, v in pairs(thermostats) do
        luup.log("Turning thermostat '" .. v .. "' OFF.")
        luup.call_action("urn:upnp-org:serviceId:HVAC_UserOperatingMode1", "SetModeTarget", {NewModeTarget = "Off"}, k)
    end

    return -- AC has been turned off: don't check motion sensors anymore.
end

end

– Assume that no sensors are tripped.
local wdSensorTripped = false

– If any sensor is tripped, set the global variable for tripped status.
for k, v in pairs(wdSensorIdPair) do
local tripped = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, k) or “0”
if (tripped == “0”) then
luup.log(“Sensor '” … v … “’ is not tripped.”)
else
luup.log(“Sensor '” … v … “’ IS TRIPPED!”)
wdSensorTripped = true
break
end
end

– If there was any tripped sensor, check again in 1 minute if there still are tripped sensors.
if (wdSensorTripped) then
luup.call_delay(“checkForTrippedSensors”, 90, “”)
end
______________________________________________________________________________________________________________-

I recommend that you make your parameter tables global - by removing the local tag. Otherwise there will be times when the delayed callback function checkForTrippedSensors() cannot access them.

The callback happens in a global context. It will only be able to access the calling code’s local variables if they are still on the top of the stack. If another scene runs between the call and the callback, they will not be there and the function will fail.