Emulating a toggle action with a Macro

| No Comments | No TrackBacks

My central heating is currently controlled by Cortex using an SRH in parallel with the normal thermostat. Actually, it's not quite in parallel, I've got a switchover control so I can select the SRH or the thermostat.

In any case, I wanted the SRH LED to illuminate when it closed the relay (ie heating demand) - this is the default function, so no problem there. I also wanted to use the SRH button as an override to off, either because I knew that heating was futile due to open windows or perhaps for boiler servicing. During this state I wanted the LED to flash to indicate the override condition.

The first issue was how to get a toggling override action from the button. The boiler object attached to the relay has an "Off" and an "Automatic" modes but no triggers to allow these to be selected, there is also no toggle action as is found on objects like lights. The "All HVAC" object does have enable and disable connections though, so it was apparent the scheme would need to be based around this.

In the end I came up with a scheme using a macro to track the override state. The macro can be seen below:

boiler macro

As can be seen, it cycles through the two states, with the second state reached when a button press is detected. I then set the button action to "continue" the macro, this also starts it if it is not already running.

button behaviour

You can also see the yellow ring around the LED, this indicates that the normal automatic LED control via Cortex has been replaced by explicit controls - click on the LED icon in the dialog to set this mode.

The final step is to restore the normal indications by setting actions on the LED from the boiler connections panel. I have a suspicion that these are incorrectly coloured, since they look like Trigger Outputs to me.

boiler connections

No TrackBacks

TrackBack URL: http://www.gumbrell.com/cgi-bin/mt4/mt-tb.cgi/22

Leave a comment

About this Entry

This page contains a single entry by David published on December 7, 2007 12:41 AM.

Internet Time and Cortex was the previous entry in this blog.

Using GU10 energy saving lights is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.