Library: discovery

From Yombo
Jump to: navigation, search
Commonly Used Yes
Status Active

Auto device discovery management.


Offloads much of the work for managing auto discovered devices. Allows the user to quickly add new devices using information already provided by a module.

Modules can supply configuration variable information when the device is discovered so that the user can enter minimal information to setup the new device.


No hooks registered.


The primary method to call is new(). This quickly creates a new discovered device, see examples for complete usage information.


id_hash = "%s:%s" % (serial, address) # create a unique ID for this device.
device_type = self._DeviceTypes['zwave_dimmer']**{
    'source': "Zwave",
    'device_id': id_hash,
    'display_description': 'Zwave - %s %s' % (node.manufacturer_name, node.product_name),
    'description': '%s %s' % (node.manufacturer_name, node.product_name),
    'mfr': node.manufacturer_name,
    'model': node.product_id,
    'serial': "%s:%s" % (network.home_id, node.node_id),
    'label': '',
    'machine_label': '',
    'device_type': device_type,
    'variables': {
        'poll_intensity': 5,
        'home_id': str(network.home_id),
        'node_id': str(node.node_id),
    'yombo_device': yombo_device,
    'notification_title': 'New Zwave device found',
    'notification_message': 'The Zwave module found a new Zwave device. <p>Type: %s<br>Node Id: %s<br>Manufacturer: %s<br>Product ID: %s<br>' %
               (node.product_name, node.node_id, node.manufacturer_name, node.product_id),

This page was last edited on 28 March 2018.