Help with car heater!

Would need some help making a better car heater in PLEG.

I have a switch controlling my car heater (lets call the device “car heater”), turning it on and off.

I also have a outside temperature sensor (“outside temp”). If the temp goes below 0?C I want the car heater to switch on.

So far, so good.

However, I only want the car heater to turn on (if the temp drops below 0) between 07:00-09:00. I also want the car heater to switch off if the temp goes above 0?C during this time OR the time passes 09:00. In a perfect world I could also choose certain week days when this would be active (e.g. not in the weekends).

I have made several attempts using PLEG and miscellaneous apps. Nothing quite works and I often come out to a freezing car (or notice the car heater is still running in the evening).

I also tried to make a ordinary scene, with outside temp below 0?C as a trigger, with the LUUP code from http://forum.micasaverde.com/index.php/topic,18679.msg141962.html#msg141962 . This should “control the time periods during which a scene may run”, but the scene never triggered.

Any kind soul that could explain using a time range with PLEG or have a good example of car heater code?

PLEG Inputs:

Schedule:
HeaterTime ON (Specific Days of Week at 7:00), OFF Interval 2Houts
Optional:
GarageDoorOpen When Garage door is open
GarageHeaterOn When the Heater is on

Conditions:
StartHeater HeaterTime
StopHeater GarageHeaterOn and (!HeaterTime or (GarageHeaterOn; GarageDoorOpen))

The above will also turn off the Heater if you leave early when the Garage door is opened.
Without the optional stuff:

StopHeater !HeaterTime

Thanks, but this doesn’t seem to take into consideration the outside temp? I only want the heater to turn on if the outside temperature sensor is below 0. Or am I missing something?

That was left as an exercise for the user :slight_smile:

Input Trigger:
ColdOutside Outdoor Temp < 0

Updated Condition:
StartHeater HeaterTime and ColdOutSide

:wink:

Thanks for the help! Let’s see if I need to manually de-ice the car tomorrow morning!

As a learning experience, could you spell out the “GarageHeaterOn and (!HeaterTime or (GarageHeaterOn; GarageDoorOpen))” syntax?

Is it “GarageHeaterOn AND (NOT HeaterTime OR (GarageHeaterOn; GarageDoorOpen))”? What does the “;” represent?

You should read:
http://forum.micasaverde.com/index.php/topic,21603.0.html

! is the same as NOT

(GarageHeaterOn; GarageDoorOpen)

Is a sequence expression … it is true if the listed inputs or conditions become true in the specified order …
In this case if the GarageHeater is turned on … followed by the GarageDoorOpen

The ideas is to turn off the heater in less than 2 hours if you are going to be leaving anyway.