No announcement yet.

[include] Device Properties (index, ref, thermostat script, INI settings, etc.)

  • Filter
  • Time
  • Show
Clear All
new posts

    [include] Device Properties (index, ref, thermostat script, INI settings, etc.)

    This is a simple script meant to be used as an include file. It centralizes functions for getting information about devices that you can't get with a simple HomeSeer object call. All functions can be used by device code or by name. The information available via this file's functions includes:<UL TYPE=SQUARE>

    <LI>device index for passing to GetDevice()
    <LI>device ref for building URLs and other purposes
    <LI>device type (e.g., "Appliance Module")
    <LI>thermostat script associated with device (used to make scripts and ASPs independent of what specific thermostat or script you're using)
    <LI>settings saved in the devices.ini INI file
    <LI>functions to save those INI file settings[/list]

    Note: previous versions of this script were described as being about the thermostat script name, but that's only one of several purposes, and no longer the most important one. I've updated the description to better refer to what you'd really want to use this script for.

    Further Note: With HomeSeer v1.6, the thermostat script name is no longer necessary. Instead, use hs.ControlThermostat. Eventually I'll take that function out of this script entirely.

    A note on the INI settings: these require HomeSeer v1.5.39 or later, and conform to the standard I proposed on this thread for storing and organizing user-defined information for devices. I highly encourage script-writers to use these functions to save and retrieve device-keyed information, to ensure compatability with future versions of HomeSeer and with the work of other script-writers.

    Version History:
    2002-01-27: v1.0 first upload to new Script Library.
    2002-04-04: v1.1 updated to use config directory introduced in HS 1.5.37 or so.
    2002-04-07: v1.2 added INI functions GetDeviceINI(), GetDeviceINIByName(), SetDeviceINI(), SetDeviceINIByName(), and as a bonus, GetDeviceRef() and GetDeviceRefByName().

    Just put it in your scripts or include library, then #include it from other scripts.

    Nucleus Home Automation

    [This message was edited by Hunter Green on Sunday, 07 April 2002 at 05:24 PM.]

    [This message was edited by Hunter Green on Friday, 09 August 2002 at 12:21 PM.]
    Attached Files
    News, support, and updates for Rover, Network Monitor, TimeIcons, and more