Jump to content

Block Heater - How can I make this program better?


Teken

Recommended Posts

Posted (edited)

Since my ISY meltdown a few weeks ago I decided to start from the beginning in terms of how I would manage some key devices in my home.

 

One of the programs is for the all mighty block heater!  :-P

 

Yes, I know you boys who live in the South can't relate and may not even know what a block heater is!  :mrgreen:

 

Yes, in the cold aszz north we snow men have to plug our vehicles in when the mercury dips to -45'C  :?

 

So, I am first looking for any new idea's or thoughts to craft, fine tune, or to over haul the program listed below.

 

Here are the requirements and hope to fill any blanks as your questions are posed.

 

- The program should turn on (true) when a temperature threshold has been met, or (is) colder. In this case I selected a random number of -20'C.

 

- I only need the program to be active from 4:00 AM to 8:00 AM each day (approx)

 

- The device should run no longer than 3 hours per cycle.

 

- Looking for any new idea's that would make this program smarter. While being energy efficient in its intended goal.

 

I have several resources and data points available now which I either did not use, or explore in the past. I now have the ability to measure the local temperature in any area in and around my home. I have two dedicated temperature sensor systems in place. Both systems monitor the garage interior, garage attic, and outside.

 

I also have the weather module which can provide today's temp, 24 hour weather for cast etc.

 

Any insight or feed back is greatly appreciated!

 

 If

        $s.Dash_Box_Garage_Interior_Temp >= -20
    And From     4:00:00AM
        To       8:00:00AM (same day)
 
Then
        Send Notification to 'GMX' content 'GEM - Block Heater - Active'
        Set Scene 'Appliance 10' On
        Wait  3 hours 
        Set Scene 'Appliance 10' Off
 
Else
   - No Actions - (To add one, press 'Action')
Edited by Teken
Posted

Pertinent topic :-)   Diesel tractors are particularly hard to start when the engine is frozen (diesel fuel actually turns into a gel below zero) -- I've a KPL button that turns on/off the tractor block heater, but I also have a weather station and it just never occurred to me to have that turn on/off automagically.

Posted (edited)

First thought - do you possibly mean <= instead of >= ?

OMG! No wonder I have been receiving alert notifications about the program turning on!

 

Doh!

Edited by Teken
Posted (edited)

Did you need a guaranteed 3 hours to defrost the thing?

 

If your temp drops below -20C at 7:55 am you will only get 5 minutes of defrost cycle.

 

Similarly if you had a deep cold cycle that warmed up at 4:05 am you would only get 5 minutes worth. That maybe OK depending how fast the engine block warms up to weather changes.

 

Perhaps a single time based decision that initiates a 3 hour cycle without any cycle cancelling logic?

Edited by larryllix
Posted (edited)

The fact that you are using a state variable means the program will re-trigger every time the temp changes.  So your 3 hour timer will keep resetting every time the temp drops or goes up by 1 degree.

 

Also, it will run false at 8am and stop the 3 hour wait, so the heater will never shut off (or at least not until the next day).  Similarly, if the temp rises above -20 while the 3 hour wait is running, it will end the wait and the heater will again just stay on. 

Edited by apostolakisl
Posted

Did you need a guaranteed 3 hours to defrost the thing?

 

If your temp drops below -20C at 7:55 am you will only get 5 minutes of defrost cycle.

 

Similarly if you had a deep cold cycle that warmed up at 4:05 am you would only get 5 minutes worth. That maybe OK depending how fast the engine block warms up to weather changes.

 

Perhaps a single time based decision that initiates a 3 hour cycle without any cycle cancelling logic?

 

 

The fact that you are using a state variable means the program will re-trigger every time the temp changes.  So your 3 hour timer will keep resetting every time the temp drops or goes up by 1 degree.

 

Also, it will run false at 8am and stop the 3 hour wait, so the heater will never shut off (or at least not until the next day).  Similarly, if the temp rises above -20 while the 3 hour wait is running, it will end the wait and the heater will again just stay on. 

 

 

This is why I come to the board to bounce off some ideas and hopefully come up with something robust and solid in application. What would be a solid program that would allow the basics I listed above?

 

- I would like the heater to be turned on only from 4-8:00 AM each day.

- It should only run for a maximum of three hours upon first turning on.

- What kind of watch dog safety time should be crafted to ensure the two conditions are true?

 

- I would not expect it to be a problem that it would trigger over and over at 4-8 AM since I am still in bed!  :mrgreen:

Posted (edited)

If 

time is 4 am to 8am

and 

state variable temp is below -20

Then

run program 2 then

Else

set heater off

 

Program 2

If

 time is not 8am (optional if you want heater to shut off at 8am no matter what)

Then

disable program 1

set heater on

wait 3 hours

enable program 1

run program 1 if 

Else

set heater off (optional if you want heater to shut off at 8am no matter what)

enable program 1 (only needed if you include the optional if line)

 

Not sure if this is exactly what you want.  It will turn the heater on anytime between 4 am and 8 am that the temp is below 20.  The heater will run for 3 hours no matter what else happens unless you include the optional lines listed..  If after 3 hours, program 1 is still true, it will leave the heater on for 3 more hours, if conditions are not met, it shuts the heater off.   If you include the optional lines listed, the heater shuts off at 8am no matter what.

Edited by apostolakisl
Posted (edited)

I was thinking more that the turn off time was just a complication to be avoided, although I do have my own 3 am shut-everything_off  program myself.

 

Some temp zones could be used to save energy somewhat too.

 

If

   time is 4 am

and

   temp is below -20

Then

   run program 2 (if)

Else

  -

 

Program 2 (disabled)

--------------

If

  temp is below -30

Then

   set heater on

   wait 4 hours

   turn heater off

Else

   wait 2 hours

   set heater on

   wait 2 hours

   turn heater off

Edited by larryllix
Posted

If 

time is 4 am to 8am

and 

state variable temp is below -20

Then

run program 2 then

Else

set heater off

 

Program 2

If

 time is not 8am (optional if you want heater to shut off at 8am no matter what)

Then

disable program 1

set heater on

wait 3 hours

enable program 1

run program 1 if 

Else

set heater off (optional if you want heater to shut off at 8am no matter what)

enable program 1 (only needed if you include the optional if line)

 

Not sure if this is exactly what you want.  It will turn the heater on anytime between 4 am and 8 am that the temp is below 20.  The heater will run for 3 hours no matter what else happens unless you include the optional lines listed..  If after 3 hours, program 1 is still true, it will leave the heater on for 3 more hours, if conditions are not met, it shuts the heater off.   If you include the optional lines listed, the heater shuts off at 8am no matter what.

 

 

This is what I have put together based on your feed back. I am unsure how to add in the if the time is NOT 8:00 AM? How is that done as I don't see an obvious choice to select in the schedule time area?

 

If
        From     4:00:00AM
        To       8:00:00AM (same day)
    And $s.Dash_Box_Garage_Interior_Temp <= -20
 
Then
        Send Notification to 'GMX' content 'GEM - Block Heater - Active'
        Run Program 'Block Heater - Watch Dog' (Then Path)
 
Else
        Set Scene 'Appliance 10' Off
 
 
 
If
        Time is  8:00:00AM
 
Then
        Disable Program 'Block Heater - Monitor'
        Set Scene 'Appliance 10' On
        Wait  3 hours 
        Enable Program 'Block Heater - Monitor'
        Run Program 'Block Heater - Monitor' (If)
 
Else
        Set Scene 'Appliance 10' Off
        Run Program 'Block Heater - Monitor' (If)
Posted

I was thinking more that the turn off time was just a complication to be avoided, although I do have my own 3 am shut-everything_off  program myself.

 

Some temp zones could be used to save energy somewhat too.

 

If

   time is 4 am

and

   temp is below -20

Then

   run program 2 (if)

Else

  -

 

Program 2 (disabled)

--------------

If

  temp is below -30

Then

   set heater on

   wait 4 hours

   turn heater off

Else

   wait 2 hours

   set heater on

   wait 2 hours

   turn heater off

 

 

Larry,

 

Your program you posted up is very similar to one I was using last year.

Posted (edited)

 

This is what I have put together based on your feed back. I am unsure how to add in the if the time is NOT 8:00 AM? How is that done as I don't see an obvious choice to select in the schedule time area?

 

If
        From     4:00:00AM
        To       8:00:00AM (same day)
    And $s.Dash_Box_Garage_Interior_Temp <= -20
 
Then
        Send Notification to 'GMX' content 'GEM - Block Heater - Active'
        Run Program 'Block Heater - Watch Dog' (Then Path)
 
Else
        Set Scene 'Appliance 10' Off
 
 
 
If
        Time is  8:00:00AM
 
Then
        Disable Program 'Block Heater - Monitor'
        Set Scene 'Appliance 10' On
        Wait  3 hours 
        Enable Program 'Block Heater - Monitor'
        Run Program 'Block Heater - Monitor' (If)
 
Else
        Set Scene 'Appliance 10' Off
        Run Program 'Block Heater - Monitor' (If)

 

Sorry I did this from memory and "is not" availability does not exist for times, So instead swapping the logic in the the then else clause does the same thing (put the then clause stuff in the else clause and vice-versa).

 

If 

time is 4 am to 8am

and 

state variable temp is below -20

Then

run program 2 else

Else

set heater off

 

Program 2

If

 time is 8am (optional if you want heater to shut off at 8am no matter what)

Then

set heater off (optional if you want heater to shut off at 8am no matter what)

enable program 1 (only needed if you include the optional if line)

Else

disable program 1

set heater on

wait 3 hours

enable program 1

run program 1 if 

 

So at 8am program 2 will be true and self trigger the then clause, a running else clause will terminate.

Edited by apostolakisl
Posted

 

Sorry I did this from memory and "is not" availability does not exist for times, So instead swapping the logic in the the then else clause does the same thing (put the then clause stuff in the else clause and vice-versa).

 

If 

time is 4 am to 8am

and 

state variable temp is below -20

Then

run program 2 else

Else

set heater off

 

Program 2

If

 time is 8am (optional if you want heater to shut off at 8am no matter what)

Then

set heater off (optional if you want heater to shut off at 8am no matter what)

enable program 1 (only needed if you include the optional if line)

Else

disable program 1

set heater on

wait 3 hours

enable program 1

run program 1 if 

 

So at 8am program 2 will be true and self trigger the then clause, a running else clause will terminate.

 

 

OK, I quickly crafted the program as out linedd above. Please check for any errors and I shall test this out once I am back from the gym.

 

Thank you very much for the insight and taking the time to craft this for me.

 

If
        From     4:00:00AM
        To       8:00:00AM (same day)
    And $s.Dash_Box_Garage_Interior_Temp <= -20
 
Then
        Send Notification to 'GMX' content 'GEM - Block Heater - Active'
        Run Program 'Block Heater - Watch Dog' (Else Path)
 
Else
        Set Scene 'Appliance 10' Off
 
 
================================
================================
 
 
If
        Time is  8:00:00AM
 
Then
        Set Scene 'Appliance 10' Off
        Enable Program 'Block Heater - Monitor'
 
Else
        Disable Program 'Block Heater - Monitor'
        Set Scene 'Appliance 10' On
        Wait  3 hours 
        Enable Program 'Block Heater - Monitor'
        Run Program 'Block Heater - Monitor' (If)
Posted (edited)

 

OK, I quickly crafted the program as out linedd above. Please check for any errors and I shall test this out once I am back from the gym.

 

Thank you very much for the insight and taking the time to craft this for me.

 

If
        From     4:00:00AM
        To       8:00:00AM (same day)
    And $s.Dash_Box_Garage_Interior_Temp <= -20
 
Then
        Send Notification to 'GMX' content 'GEM - Block Heater - Active'
        Run Program 'Block Heater - Watch Dog' (Else Path)
 
Else
        Set Scene 'Appliance 10' Off
 
 
================================
================================
 
 
If
        Time is  8:00:00AM
 
Then
        Set Scene 'Appliance 10' Off
        Enable Program 'Block Heater - Monitor'
 
Else
        Disable Program 'Block Heater - Monitor'
        Set Scene 'Appliance 10' On
        Wait  3 hours 
        Enable Program 'Block Heater - Monitor'
        Run Program 'Block Heater - Monitor' (If)

 

Looks good.  If you manually set the temp variable pretending it is a cold winter night, you can test it out.  Maybe you temporarily change the times to a more convenient hour of the day for the sake of not having to test it at 4am. 

Edited by apostolakisl
Posted

Looks good.  If you manually set the temp variable pretending it is a cold winter night, you can test it out.  Maybe you temporarily change the times to a more convenient hour of the day for the sake of not having to test it at 4am. 

 

OK, I have been playing with this program for a few hours to fine tune the expected behavior. Now, my only concern is the following and if there is some work around or extra program that can resolve what I see please do let me know.

 

As this is a state variable it requires a change of state to activate, no? I was able to confirm that the time, duration, and watch dog timer all functioned as expected.

 

But, if the temperature during the evening stabilizes at say (-20'C) and does not change state during the 4-8:00 AM window. Will it actually turn on and activate as expected?

 

I ask because doing a quick test did not result in the expected behavior I am looking for.

 

Example: The garage interior was already 24'C, I changed the value to something lower (20'C) and I was with in the time schedule range.

 

Yet the timer program did not activate? 

Posted

OK, I have been playing with this program for a few hours to fine tune the expected behavior. Now, my only concern is the following and if there is some work around or extra program that can resolve what I see please do let me know.

 

As this is a state variable it requires a change of state to activate, no? I was able to confirm that the time, duration, and watch dog timer all functioned as expected.

 

But, if the temperature during the evening stabilizes at say (-20'C) and does not change state during the 4-8:00 AM window. Will it actually turn on and activate as expected?

 

I ask because doing a quick test did not result in the expected behavior I am looking for.

 

Example: The garage interior was already 24'C, I changed the value to something lower (20'C) and I was with in the time schedule range.

 

Yet the timer program did not activate? 

 

4am itself is a trigger.  So if the temp is already below 20 when the clock hits 4am, that will trigger the program and your heater block will start.  If the temp stays put (below 20), 3 hours later the program will re-trigger (because of the "run if" in program 2), it will still be true, and the timer will start again for 3 more hours.  However, 1 hour later, at 8am, the program will trigger and turn the heater off.

 

If the temp is not below 20 at 4am but later drops below 20, then the change in the state variable will serve as your trigger.  Your program will run for 3 hours unless 8am happens first.

Posted

OK, I appreciate the break down of the theory of operations.

 

I am going to program my Axis PTZ camera to watch the light bulb this evening to confirm the final operation.

 

Much Thanks!

Posted

I've attached an export of my "Car Heater" folder of about a dozen programs I've tweaked over the years in case it gives you some new ideas. Sorry, I don't have time to cut and paste them all out individually for easier readability but here's a summary of what the programs provide:
 

  1. When I press a keypadlinc button near my garage between 5 PM and 5AM, it "arms" the block heater to go on the next morning at 6AM then turns the keypad button OFF
  2. If I press the button a second time between 5PM and 5 AM, it turns the block heater on right away. (Could have used fast on - and am now thinking I may add that as an additional option - but I like this approach better for this application because there's no visual cue if the "double click" failed for any reason, which does happen, especially to my wife :shock: )
  3. If I press the button before 5 PM, the block heater goes on right away
  4. if the temp outside is greater than -6 Celcius and the block heater has been on for 2 hours, the block heater cycles OFF-ON (3 mins / 6 mins) - the outdoorlinc only, not the KPL button
  5. if the hydro rate is medium or high (which happens after 7AM weekdays in Ontario) and the block heater has been on for 1 hour the block heater cycles OFF-ON as above (same program)
  6. the block heater turns off after 4 hours

As an aside I had a automobile customization shop perform the following mod to my van plus run a suitable wire/outlet into the van cabin to plug an inside-the-car (120V) heater. http://www.thedieselstop.com/contents/getitems.php3?Marinco%20Block%20Heater%20Plug%20Mod.


Car Heater.v4.2.8__Sat 2014.08.16 09.52.41 AM.isy

Posted

 

As an aside I had a automobile customization shop perform the following mod to my van plus run a suitable wire/outlet into the van cabin to plug an inside-the-car (120V) heater. http://www.thedieselstop.com/contents/getitems.php3?Marinco%20Block%20Heater%20Plug%20Mod.

 

 

attachicon.gifCar Heater.v4.2.8__Sat 2014.08.16 09.52.41 AM.isy

Where's the induction coil in the garage floor? We all hate dragging extension cords to work behind our cars.  :-P

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...