Floorplan Scripts2

From XAP Automation
Revision as of 08:51, 13 October 2006 by Lehane (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Raw Devices

This example is linked to a "raw device". A raw device is one which xAPFloorplan doesn't automagically control so there needs (usually) for there to be some scripting which will make use of the values.

As with all things Floorplan, the AutoScripts can do some operations but usually for complex operations VBScript is needed. In this case the script is linked to the mi4 Weather application [1] from the Update drop down box

What the script does is get the current temperature and the time of the report using the xap.getfromraw function. It then checks the total time offset from UTC and calculates how old the report is. If it is a little over two hours old (140 minutes) then it changes what Floorplan displays to "Stale Report" using the SetDisplayValue function. Otherwise it displays the current value.

The values are stored in a GlobalVariable for use in other scripts, notably heating control.

The script is WeatherInfo.txt