Difference between revisions of "Driver Object"

From Hubitat Documentation
Jump to: navigation, search
m (Cschwer moved page Driver to Driver Object)
Line 1: Line 1:
== <code>installed</code> ==
+
==<code>installed</code>==
  
 
This method is called when the device is first created.
 
This method is called when the device is first created.
Line 6: Line 6:
 
  void installed()
 
  void installed()
  
== <code>updated</code> ==
+
==<code>updated</code>==
  
 
This method is called when the preferences of a device are updated.
 
This method is called when the preferences of a device are updated.
Line 13: Line 13:
 
  void updated()
 
  void updated()
  
== <code>Additional to be documented</code> ==
+
==<code>sendHubCommand</code>==
 +
 
 +
Use this method to send a HubAction immediately.
 +
 
 +
'''Signature:'''
 +
void sendHubAction(HubAction hubAction)
 +
 
 +
==<code>Additional to be documented</code>==
 
  Map getState()
 
  Map getState()
 
  Zwave getZwave()
 
  Zwave getZwave()

Revision as of 20:26, 30 October 2018

installed

This method is called when the device is first created.

Signature:

void installed()

updated

This method is called when the preferences of a device are updated.

Signature:

void updated()

sendHubCommand

Use this method to send a HubAction immediately.

Signature:

void sendHubAction(HubAction hubAction)

Additional to be documented

Map getState()
Zwave getZwave()
Zigbee getZigbee()
Object getParent()
void updateDataValue(String name, String value)
String getDataValue(String name)
String getDeviceDataByName(String name)
HubAction response(String cmd)
HubAction response(hubitat.zwave.Command cmd)
HubMultiAction response(List cmds)
Short getZwaveHubNodeId()
void sendEvent(Map properties)
List<Event> eventsSince(Date startDate, Map options = null)
void telnetConnect(Map options, String ip, int port, String username, String password)
void telnetConnect(String ip, int port, String username, String password)
void telnetClose()
Map createEvent(Map options)
List<String> delayBetween(List<String> cmds, Long delay)
List<String> delayBetween(List<String> cmds)
ChildDeviceWrapper addChildDevice(String typeName, String deviceNetworkId, Map properties = [:])
ChildDeviceWrapper addChildDevice(String namespace, String typeName, String deviceNetworkId, Map properties = [:])
List<ChildDeviceWrapper> getChildDevices()
ChildDeviceWrapper getChildDevice(String deviceNetworkId)
void deleteChildDevice(String deviceNetworkId)