Zone Temp Sensor rules

fleetz

Active Member
Have just installed M1ZTS into a bedroom and want to use this to turn an AC unit on when it gets to 27C and off at 24C.

The AC is switched on and off by a momentary closure of a relay. I didn't realise until I installed the ZTS that they can not be used as a trigger (whenever).

Can't seem to find a trigger that is appropriate that will work.

I realise that I need two rules one to turn the AC on when it hits 27C and another rule switch it off when it hits 24C. I was going to set the set point on the AC unit to 23C so the M1 system does the differential control.

Any suggestion would be appreciated.

Regards,

Fleetz
 
Have just installed M1ZTS into a bedroom and want to use this to turn an AC unit on when it gets to 27C and off at 24C.

The AC is switched on and off by a momentary closure of a relay. I didn't realise until I installed the ZTS that they can not be used as a trigger (whenever).

Can't seem to find a trigger that is appropriate that will work.

I realise that I need two rules one to turn the AC on when it hits 27C and another rule switch it off when it hits 24C. I was going to set the set point on the AC unit to 23C so the M1 system does the differential control.

Any suggestion would be appreciated.

Regards,

Fleetz

This might be a better spot to repost this as it is relavent to my original post....

QUOTE (Spanky @ Sep 21 2008, 04:41 AM)
You have several options for temperature detection with the ELK M1.

1. M1ZTS temperature sensor connects to one of the first 16 zones on the M1.

2. M1KAM module allows for 1 wire temperature sensors connected to the M1.

3. A temperature sensor set for 20F that provides a contact closure connected to the M1.

Write a M1 Rule so that Whenever the temperature sensor's temperature is below 20F, then turn on an output relay connected to your 120VAC device or use a powerline appliance module that can switch 120 VAC. Write another Rule to turn everything off when the temperature warms up.


Hi Spanky,

This reply has confused the hell out of me which is easily done. I just installted some M1ZTS assuming that you can use the zone temp to trigger an event but found out you can not use a M1ZTS as a trigger. Your post here clearly states that you can use it as a trigger which is what I was lead to believe.

Am I missing something? Not having the temperatures of the M1ZTS to trigger an event based on a temp in rules make the unit as useful as tits on a bull IMO.

Regards,

Fleetz
 
To write a Rule for an analog level such as a temperature sensor, you have to fire the Rule with a timed event and use an AND statement for the temperature compare.



WHENEVER every 60 seconds
AND the temperature of zone 16 is greater than 22C
THEN turnon output 100

WHENEVER every 60 seconds
AND the temperature of zone 16 is less than 20C
THEN turnoff output 100

Make sure you have defined the zone (1 to 16) as a temperature zone definition.
 
To write a Rule for an analog level such as a temperature sensor, you have to fire the Rule with a timed event and use an AND statement for the temperature compare.



WHENEVER every 60 seconds
AND the temperature of zone 16 is greater than 22C
THEN turnon output 100

WHENEVER every 60 seconds
AND the temperature of zone 16 is less than 20C
THEN turnoff output 100

Make sure you have defined the zone (1 to 16) as a temperature zone definition.


Hi Spanky,

Problem I have is my AC units are switched on and off with a momentary contact closure. So what I am trying to achieve is the higher temperature will turn the AC until it reaches the lower temp and swich off. Then when the temp rises back to the higher then it swtches back on and the cycle continues.

Using the Whenever every xx seconds doesn't work in this situation as all you do is switch the AC on and off every XX seconds.

This why it would be nice to have the temperature from a TZS as the trigger for a rule. Why could the temperature from TZ sensors not be included in the trigger rule options???

Regards,

Fleetz
 
I think you are missing the point of Spanky's example.

Every X seconds you DO get a trigger. Use this trigger(output 100) in this case to trigger your momentary contact.

For example:

Whenever Output 100 turns on
Turn output 101 on for 1 sec

Whenever Output 100 turns off
Turn output 102 on for 1 sec
 
I think you are missing the point of Spanky's example.

Every X seconds you DO get a trigger. Use this trigger(output 100) in this case to trigger your momentary contact.

For example:

Whenever Output 100 turns on
Turn output 101 on for 1 sec

Whenever Output 100 turns off
Turn output 102 on for 1 sec

Hi icellama21,

Thanks for the reply...you will need to talk slower I am an Aussie! ;)

Yes but every 60 seconds or XX seconds the AC will turn on the off etc etc . U could have modied Spanky's "Then" instruction to turn relay on for 1 second. Using the "WHENEVER every XX seconds" will fire the relay every XX seconds. I have tried the rule and it fires the relay every XX seconds...I must be missing the point..ever XX seconds when the temp has been reached either way it will just switch the AC continually on and of every XX seconds,

Regards,

Fleetz
 
You need to leverage your state that knows the current AC operation:

Code:
# output 99 is !mains power (so it starts on)
# output 100 is AC unit status
# output 101 is AC unit turn on (1-sec)
# output 102 is AC unit turn off (1-sec)

# turn on AC when too hot (and not already on)
WHENEVER every 60 seconds
AND output 99 is off
AND output 100 is off
AND the temperature of zone 16 is greater than 22C
THEN turnon output 100

# turn off AC whenever too cold (and it is on)
WHENEVER every 60 seconds
AND output 100 is on
AND the temperature of zone 16 is less than 20C
THEN turnoff output 100

# actually control the AC unit
WHENEVER output 100 turns on
THEN turnon output 101 for 1 sec

WHENEVER output 100 turns off
THEN turnon output 102 for 1 sec

# mains failures mean AC is off
WHENEVER power failure
THEN turnon output 99
AND turnoff output 100

# power restored
WHENEVER power restored
THEN turnoff output 99

In my experience, a panel starting up with mains off will see a power failure condition once initialization finishes and output99 will be off. So these rules should work with the boundary conditions. All this confounding of state is problematic; I have built a DSL rules compiler to help untangle it. But, cut-and-paste through ElkRP is clunky; as I've complained to Brad.
 
You need to leverage your state that knows the current AC operation:

Code:
# output 99 is !mains power (so it starts on)
# output 100 is AC unit status
# output 101 is AC unit turn on (1-sec)
# output 102 is AC unit turn off (1-sec)

# turn on AC when too hot (and not already on)
WHENEVER every 60 seconds
AND output 99 is off
AND output 100 is off
AND the temperature of zone 16 is greater than 22C
THEN turnon output 100

# turn off AC whenever too cold (and it is on)
WHENEVER every 60 seconds
AND output 100 is on
AND the temperature of zone 16 is less than 20C
THEN turnoff output 100

# actually control the AC unit
WHENEVER output 100 turns on
THEN turnon output 101 for 1 sec

WHENEVER output 100 turns off
THEN turnon output 102 for 1 sec

# mains failures mean AC is off
WHENEVER power failure
THEN turnon output 99
AND turnoff output 100

# power restored
WHENEVER power restored
THEN turnoff output 99

In my experience, a panel starting up with mains off will see a power failure condition once initialization finishes and output99 will be off. So these rules should work with the boundary conditions. All this confounding of state is problematic; I have built a DSL rules compiler to help untangle it. But, cut-and-paste through ElkRP is clunky; as I've complained to Brad.


Hi Chris,

Thanks very much for doing this for me.....appreciated!

Sat down and worked through your logic and said yep, yep, yep, yep and bugger the actual control where there is

WHENEVER output 100 turns on
THEN turnon output 101 for 1 sec

WHENEVER output 100 turns off
THEN turnon output 102 for 1 sec

it came unstuck as I only have one relay that turns the AC on or off on a momentary contact closure.

Just wondering any thoughts?

Regards,
Fleetz
 
This should work then:

Code:
# output 99 is !mains power (so it starts on)
# output 100 is AC unit status
# output 101 is AC unit turn on/off (toggles with 1-sec)

# turn on AC when too hot (and not already on)
WHENEVER every 60 seconds
AND output 99 is off
AND output 100 is off
AND the temperature of zone 16 is greater than 22C
THEN turnon output 100

# turn off AC whenever too cold (and it is on)
WHENEVER every 60 seconds
AND output 100 is on
AND the temperature of zone 16 is less than 20C
THEN turnoff output 100

# actually control the AC unit
WHENEVER output 100 turns on
THEN turnon output 101 for 1 sec

WHENEVER output 100 turns off
THEN turnon output 101 for 1 sec

# mains failures mean AC is off
WHENEVER power failure
THEN turnon output 99
AND turnoff output 100

# power restored
WHENEVER power restored
THEN turnoff output 99
 
Back
Top