Ok here is is the items file
and pretty much all my rules, I did change the gps location of my house…lol but other than that this is most of it. I really appreciate you guys helping like this! @rlkoshak I see you on a lot of threads lending your wisdom! and I must say you are an inspiration sir! Sorry @binderth I changed the name hope that’s ok…
//Thermostat
Number HVAC_HeatSetPoint "Heat Set [%.1f F]" <thermostat> (ALL,HVAC)
Number HVAC_CoolSetPoint "Cool Set [%.1f F]" <thermostat> (ALL,HVAC)
Number HVAC_Temperature "Thermostat temperature [%.1f °F]" <temperature> (ALL,HVAC,ff)
Number HVAC_Mode "Mode [MAP(thermostatMode.map):%s]" <climate> (ALL,HVAC)
Number HVAC_Fan_Mode "Fan Mode [MAP(thermostatFanMode.map):%s]" (ALL,HVAC)
Number HVAC_Operating_State "Operation State [MAP(thermostatOpState.map):%s]" (ALL,HVAC)
Number HVAC_Fan_State "Fan State [MAP(thermostatFanState.map):%s]" (ALL,HVAC)
Number HVAC_Battery "Thermostat battery [%d %%]" <battery> (ALL,HVAC,battery)
rule "Bedtime Temp"
when
Time cron "0 0 21 ? * * *"
then
if (Chase_iPhone_Home.state==ON || Tracy_iPhone_Home.state==ON || Cale_iPhone_Home.state==ON)
{
sendCommand(HVAC_HeatSetPoint,65)
sendCommand(HVAC_CoolSetPoint,73)
logInfo("HVAC Settings", "Someone is Home-Bedtime Rule "+ HVAC_HeatSetPoint.state + " " + HVAC_CoolSetPoint.state)
}
else
{
sendCommand(HVAC_HeatSetPoint,55)
sendCommand(HVAC_CoolSetPoint,80)
logInfo("HVAC Settings", "Someone is NOT Home-Bedtime Rule "+ HVAC_HeatSetPoint.state + " " + HVAC_CoolSetPoint.state)
}
end
rule "Wakeup Temp"
when
Time cron "0 20 5 ? * * *"
then
if (Chase_iPhone_Home.state==ON || Tracy_iPhone_Home.state==ON ||Cale_iPhone_Home.state==ON)
{
sendCommand(HVAC_HeatSetPoint,70)
sendCommand(HVAC_CoolSetPoint,74)
logInfo("HVAC Settings", "Someone is Home-Wakeup Rule "+ HVAC_HeatSetPoint.state + " " + HVAC_CoolSetPoint.state)
}
else
{
sendCommand(HVAC_HeatSetPoint,55)
sendCommand(HVAC_CoolSetPoint,80)
logInfo("HVAC Settings", "Someone is NOT Home-Wakeup Rule "+ HVAC_HeatSetPoint.state + " " + HVAC_CoolSetPoint.state)
}
end
rule "Away Temp"
when
Time cron "0 53 8 ? * * *"
then
if (Chase_iPhone_Home.state==ON || Tracy_iPhone_Home.state==ON || Cale_iPhone_Home.state==ON)
{
sendCommand(HVAC_HeatSetPoint,66)
sendCommand(HVAC_CoolSetPoint,76)
logInfo("HVAC Settings", "Someone is Home-Away Rule "+ HVAC_HeatSetPoint + " " + HVAC_CoolSetPoint)
}
else
{
sendCommand(HVAC_HeatSetPoint,55)
sendCommand(HVAC_CoolSetPoint,80)
logInfo("HVAC Settings", "Someone is NOT Home-Away Rule "+ HVAC_HeatSetPoint + " " + HVAC_CoolSetPoint)
}
end
rule "Afternoon Temp"
when
Time cron "0 0 17 ? * * *"
then
if (Chase_iPhone_Home==ON || Tracy_iPhone_Home==ON || Cale_iPhone_Home==ON)
{
sendCommand(HVAC_HeatSetPoint,66)
sendCommand(HVAC_CoolSetPoint,76)
logInfo("HVAC Settings", "Someone is Home-Afternoon "+ HVAC_HeatSetPoint + " " + HVAC_CoolSetPoint)
}
else
{
sendCommand(HVAC_HeatSetPoint,55)
sendCommand(HVAC_CoolSetPoint,80)
logInfo("HVAC Settings", "Someone is NOT Home-Afternoon "+ HVAC_HeatSetPoint + " " + HVAC_CoolSetPoint)
}
end
rule "Returning Home"
when
Item Chase_iPhone_Home changed from OFF to ON or Item Tracy_iPhone_Home changed from OFF to ON or Item Cale_iPhone_Home changed from OFF to ON
then
sendCommand(HVAC_HeatSetPoint,66)
sendCommand(HVAC_CoolSetPoint,76)
logInfo("HVAC Settings", "Someone is Home-Returning "+ HVAC_HeatSetPoint.state + " " + HVAC_CoolSetPoint.state)
end
rule "Sunset rule"
when
Channel 'astro:sun:local:set#event' triggered START
then
sunset.postUpdate(ON)
end
rule "Turn On lights-Chase"
when
Item Chase_iPhone_Home changed from OFF to ON
then
if (sunset.state==ON)
{
sendCommand(PorchLight, ON)
sendCommand(LED_Power,ON)
Light_Color.sendCommand("1,0,100") // White
}
end
rule "Turn On lights-Tracy"
when
Item Tracy_iPhone_Home changed from OFF to ON
then
if (sunset.state==ON)
{
sendCommand(PorchLight, ON)
sendCommand(LED_Power,ON)
Light_Color.sendCommand("1,0,100") // White
}
end
rule "Turn On lights-Cale"
when
Item Cale_iPhone_Home changed from OFF to ON
then
if (sunset.state==ON)
{
sendCommand(PorchLight, ON)
sendCommand(LED_Power,ON)
Light_Color.sendCommand("1,0,100") // White
}
end
rule "Bedtime rule"
when
Time cron "0 1 21 ? * *"
then
if (LED_Power.state==OFF)
{
sendCommand(LED_Power,ON)
Light_Color.sendCommand("1,100,5") //Red 5% Color,Saturation,Brightness
logInfo("LED_Power", "LED_Power if " + LED_Power.state)
}
Light_Color.sendCommand("1,100,5") //Red 5% Color,Saturation,Brightness
logInfo("LED_Power", "LED_Power " + LED_Power.state)
end
rule "Sunrise rule"
when
Channel 'astro:sun:local:rise#event' triggered START
then
sunset.postUpdate(OFF)
sendCommand(LED_Power, OFF)
// Light_Color.sendCommand("1,0,100")
// White
end
rule "Chase_iPhone Home"
when
Item Chase_iPhone_Location changed
then
val PointType home_location = new PointType(new DecimalType(1.0000000000), new DecimalType(2.000000000))
val PointType phone_location = Chase_iPhone_Location.state as PointType
val int distance = phone_location.distanceFrom(home_location).intValue()
// specify your preferred radius (in meters)
if ( distance < 8500)
{
Chase_iPhone_Home.postUpdate(ON)
// logInfo("Chase Distace", "Chase Distace " + distance)
}
else
{
Chase_iPhone_Home.postUpdate(OFF)
// logInfo("Chase Distace", "Chase Distace " + distance)
}
end