HomeSeer uses constants for many of the device and event properties. For convenience, some of these constants are provided here should you wish to use the same named constants in your plug-in.
Public Const USER_GUEST As Integer = 1 ' user can view web pages only, cannot make changes
Public Const USER_ADMIN As Integer = 2 ' user can make changes
Public Const USER_LOCAL As Integer = 4 ' this user is used when logging in on a local subnet
Public Const USER_NORMAL As Integer = 8 ' Not guest, not admin, just NORMAL!
Public Const TRIG_UI_DROP_LIST As Integer = 1 ' present user with drop down list of trigger options
Public Const TRIG_UI_TEXT_BOX As Integer = 2 ' present user with a text box
Public Const TRIG_UI_CHECK_BOX As Integer = 3 ' present user with a check box
Public Const TRIG_UI_BUTTON As Integer = 4 ' button for custom dialog
Public Const TRIG_UI_LABEL As Integer = 5 ' label for display purposes only
Public Const CATTR_NO_EDIT As Integer = &H1S ' bit=1 control cannot be edited by user
Public Const CATTR_ALLOW_TEXT_ENTRY As Integer = &H2S ' bit=2 user can edit text in drop list control
Public Const CATTR_HEADING As Integer = &H4S ' large text for label headings
Public Const CATTR_HIDE_WINUI As Integer = &H8S ' do not display this control in the windows UI (Obsolete in 2.0)
Public Const OUT_INTERFACE_AUTO As Integer = 0 ' command is transmitted out interface defined in device for HC/UC
Public Const OUT_INTERFACE_X10 As Integer = 1 ' send out X10 interface
Public Const OUT_INTERFACE_ZWAVE As Integer = 2 ' send out zwave interface
Public Const CA_X10 As Integer = 1 ' supports X10
Public Const CA_IR As Integer = 2 ' supports infrared
Public Const CA_IO As Integer = 4 ' supports I/O
Public Const CA_SEC As Integer = 8 ' supports security (Obsolete in 2.0)
Public Const CA_THERM As Integer = 16 ' Indicates a thermostat plug-in.
Public Const MISC_PRESET_DIM As Integer = 1 ' supports preset dim if set
Public Const MISC_EXT_DIM As Integer = 2 ' extended dim command
Public Const MISC_SMART_LINC As Integer = 4 ' smart linc switch
Public Const MISC_NO_LOG As Integer = 8 ' no logging to event log for this device
Public Const MISC_STATUS_ONLY As Integer = &H10 ' device cannot be controlled
Public Const MISC_HIDDEN As Integer = &H20 ' device is hidden from views
Public Const MISC_THERM As Integer = &H40 ' device is a thermostat. Copied from dev attr
Public Const MISC_INCLUDE_PF As Integer = &H80 ' if set, device's state is restored if power fail enabled
Public Const MISC_SHOW_VALUES As Integer = &H100 ' set=display value options in win gui and web status
Public Const MISC_AUTO_VC As Integer = &H200 ' set=create a voice command for this device
Public Const MISC_VC_CONFIRM As Integer = &H400 ' set=confirm voice command
Public Const MISC_COMPOSE As Integer = &H800 ' compose protocol
Public Const MISC_ZWAVE As Integer = &H1000 ' zwave device
Public Const MISC_DIRECT_DIM As Integer = &H2000 ' Device supports direct dimming.
' for compatibility with 1.7, the following 2 bits are 0 by default which disables SetDeviceStatus notify
and SetDeviceValue notify
Public Const MISC_SETSTATUS_NOTIFY As Integer = &H4000 ' if set, SetDeviceStatus calls plugin SetIO
(default is 0 or not to notify)
Public Const MISC_SETVALUE_NOTIFY As Integer = &H8000 ' if set, SetDeviceValue calls plugin SetIO
(default is 0 or to not notify)
Public Const MISC_ON_OFF_ONLY As Integer = &H10000 ' if set, device actions are ON and OFF only
Public Const MISC_NO_STATUS_TRIG As Integer = &H20000 ' if set, the device will not appear in the device status
change trigger list or the device conditions list.
Public Const IOTYPE_INPUT As Integer = 0
Public Const IOTYPE_OUTPUT As Integer = 1
Public Const IOTYPE_ANALOG_INPUT As Integer = 2
Public Const IOTYPE_VARIABLE As Integer = 3
Public Const IOTYPE_CONTROL As Integer = 4 ' device is a control device, no type display in device prop
Public Const MISC_SEND_EMAIL As Integer = 1
Public Const MISC_SMART_ON As Integer = 2
Public Const MISC_ALL_MAIL As Integer = 4 ' all recieved mail causes trigger
Public Const MISC_VOICE_COMMAND As Integer = 8 ' event name is voice command
Public Const MISC_DEL_AFTER_TRIG As Integer = &H10 'Delete the event after it triggers
Public Const MISC_DISABLED As Integer = &H20 ' 1=event is disabled
Public Const MISC_DOWNLOADABLE As Integer = &H40 '(Obsolete in 2.0)
Public Const MISC_APPLY_COND As Integer = &H80 ' 1=apply conditions settings to trigger
Public Const MISC_ANY_X10 As Integer = &H100 ' 1=any x10 command caused trigger if trig type is x10
Public Const MISC_SMART_GROUP As Integer = &H200 ' 1=groups devices together when sending X10 commands
Public Const MISC_REC_REF_HOUR As Integer = &H400 ' 1=recurring minutes references the hour
Public Const MISC_GUESTS_CAN_TRIGGER As Integer = &H800 ' 1=users logged in as guest can trigger
Public Const MISC_SECURITY As Integer = &H1000 ' 1 = vary trigger time (security mode)
Public Const MISC_NO_RETRIGGER As Integer = &H2000 ' 1 = event cannot retrigger within time period.
Public Const MISC_EVNO_LOG As Integer = &H4000 ' 1= do not log for this event
Public Const MISC2_VOICE_PHONE_COMMAND As Integer = 1 ' voice command works on the phone
Public Const MISC2_VOICE_CONFIRM As Integer = 2 ' voice command requires confirmation
Public Const MISC2_CHECK_CONDITIONS As Integer = 4 ' when triggering other events, check conditions
Public Const MISC2_SCRIPT_SINGLE_INSTANCE As Integer = 8 ' do not allow multiple copies of this script to run
Public Const MISC2_DELAYED_ACTION As Integer = &H10 ' set if event was created as a delayed event
Public Const MISC2_REC_REF_HOUR_ONCE As Integer = &H20 ' only trigger once after the hour
Public Const MISC2_SPEAK_ASYNC As Integer = &H40 ' speak in background (Obsolete in 2.0)
Public Const MISC2_INCLUDE_PF As Integer = &H80 ' include in powerfail recovery
' For HSEvent callbacks
Public Const EV_TYPE_X10 As Integer = 1
Public Const EV_TYPE_LOG As Integer = 2
Public Const EV_TYPE_STATUS_CHANGE As Integer = 4
Public Const EV_TYPE_AUDIO As Integer = 8
Public Const EV_TYPE_X10_TRANSMIT As Integer = &H10S
Public Const EV_TYPE_CONFIG_CHANGE As Integer = &H20S
Public Const EV_TYPE_STRING_CHANGE As Integer = &H40S
Public Const EV_TYPE_SPEAKER_CONNECT As Integer = &H80S
Public Const EV_TYPE_CALLER_ID As Integer = &H100
Public Const EV_TYPE_ZWAVE As Integer = &H200
Public Const EV_TYPE_VALUE_CHANGE As Integer = &H400
Public Const EV_TYPE_STATUS_ONLY_CHANGE As Integer = &H800
Public Const EV_TYPE_GENERIC As Integer = &H8000
Public Const DIMTO_RELATIVE As Integer = 0
Public Const DIMTO_ABSOLUTE As Integer = 1
Public Const DIMTO_ABSOLUTE_BRIGHT As Integer = 2
Public Const LINE_IDLE As Integer = 0
Public Const LINE_OFFERING As Integer = 1
Public Const LINE_RINGING As Integer = 2
Public Const LINE_CONNECTED As Integer = 3
Public Const LINE_INACTIVE As Integer = 4
Public Const LINE_BUSY As Integer = 5
Public Const LINE_INUSE As Integer = 6
Public Const LINE_TIMEOUT As Integer = 7 ' for calling
Public Enum TRIGGER_TYPE
TYPE_TIME = 0
TYPE_SUNRISE = 1
TYPE_SUNSET = 2
TYPE_X10 = 3
TYPE_CONDITION = 4
TYPE_POP_MAIL = 5
TYPE_RECURRING = 6
TYPE_MANUAL = 7
TYPE_IRMATCH = 8
TYPE_SECURITY = 9
TYPE_PHONE = 10
TYPE_STATUS_CHANGE = 11
TYPE_VALUE_CHANGE = 12
TYPE_PLUGIN = 13
End Enum
Public Enum VALUE_CHANGE
VALUE_EQUAL = 0
VALUE_NOT_EQUAL = 1
VALUE_GREATER = 2
VALUE_LESS = 3
VALUE_ANY = 4
VALUE_SET_TO = 5
VALUE_SET_TO_ANY = 6
VALUE_IN_RANGE = 7
End Enum
Public Enum HSDAY
Monday = &H1
Tuesday = &H2
Wednesday = &H4
Thursday = &H8
Friday = &H10
Saturday = &H20
Sunday = &H40
End Enum
Public Enum DEVICE_COMMAND
All_Units_Off = 0
All_Lights_On = 1
UOn = 2
UOff = 3
UDim = 4
UBright = 5
All_Lights_Off = 6
Extended_Code = 7
Hail_Request = 8
HAil_Ack = 9
Preset_Dim1 = 10
Preset_Dim2 = 11
Ex_Data_Xfer = 12
Status_On = 13
Status_Off = 14
Status_Request = 15
Dim_To_Off = 16
No_Cmd = 17
Stat_Unknown = 17
Any_Cmd = 18
Value_Set = 19
Value_Increment = 20
Set_On = 21
Set_Off = 22
Set_Any = 23
Value_Decrement = 24
End Enum