Device
class will be created and a device tile will be shown in the interface. Every Device
class is associated with a Driver
class. All Driver
classes of your app will be instantiated when your app is started, even if there are no devices of that type paired with Homey. This allows the driver to be responsible for pairing new devices and defining Flow cards.drivers/
directory which will look like this:/drivers/<driver_id>/driver.js
file contains the Driver
class. This class is responsible for pairing devices and describes the functionality for the devices belonging to the driver such as Flow cards.onPairListDevices
is a heavily simplified example. Learn more about pairing in the Pairing documentation./drivers/<driver_id>/device.js
file contains the Device
class. This class implements the device's functionality such as its capabilities and Flows./drivers/<driver_id>/driver.compose.json
file is the driver manifest, when building your app all the driver.compose.json
files will be bundled into your App Manifest. A basic driver manifest looks like this:/drivers/<driver_id>/assets/icon.svg
. Read the app store guidelines for more information about the driver icon."platforms": ["local", "cloud"]
"class": "light"
socket
, light
, lock
etc. When a specific device is not supported by Homey, you can use the class other
."capabilities": ["onoff", "dim"]
onoff
which allows users to toggle the light on or off. It can also support the dim
capability which would allow the user to change the lights brightness.onoff
capability has the type boolean
and can thus be either true
or false
. The capability dim
is of type number
and can be any number between 0 - 1
, as defined in the capability's definition."energy": {...}
"settings": [ ... ]
Device#setSettings
)."pair": [ ... ]
pair
property of the device manifest describes the steps necessary to add the device to Homey."deprecated": true
"deprecated": true
to your driver in your App Manifest. It will still work, but won't show up anymore in the 'Add Device' list."connectivity": [ ... ]
[ "infrared", "lan" ]
for a TV that is turned on by Infrared, and then controlled over Wi-Fi LAN.lan
cloud
ble
zwave
zigbee
infrared
rf433
rf868
data
property. This property contains a unique identifier for the device. This object cannot be changed after pairing. This data
property is an object containing any properties of the types String, Number or Object. Homey uses this object to identify your device, together with the driver's ID. Read more in the Device pairing documentation.Device#setUnavailable()
. This shows to the user that they cannot interacting with the device for example because the device is offline.Device#setAvailable()
to mark the device as available./assets/
folder contains the icon and images for that driver. These images should be clean marketing pictures of the device that this driver implements, these are shown in the Homey App Store.