JavaScript API

From MiOS
(Difference between revisions)
Jump to: navigation, search
(New page: == Variables == == Functions == ==== get_device_state(deviceID, service, variable, dynamic) ==== ===== Input: ===== * deviceID (number) * service (string) * variable (string) * dynamic (...)
 
Line 8: Line 8:
 
* service (string)
 
* service (string)
 
* variable (string)
 
* variable (string)
* dynamic (number): if ''1'' the variable value is taken from ''lu_status'', else the variable value is taken from ''user_data''.
+
* dynamic (number): if '''1''' the variable value is taken from ''lu_status'', else the variable value is taken from ''user_data'' (recommended). ''user_data'' is read at Luup startup, so for variables that change their value frequently (like Watts, Temperature, etc.) ''dynamic'' should be '''1'''.

Revision as of 12:14, 31 March 2011

Contents

Variables

Functions

get_device_state(deviceID, service, variable, dynamic)

Input:
  • deviceID (number)
  • service (string)
  • variable (string)
  • dynamic (number): if 1 the variable value is taken from lu_status, else the variable value is taken from user_data (recommended). user_data is read at Luup startup, so for variables that change their value frequently (like Watts, Temperature, etc.) dynamic should be 1.
Personal tools