Discovery and Metadata
Drivers the system can access are represented by database entries. To simplify the creation of these entries available drivers can be scanned for and made available as a searchable list.
You can click scan from the Backoffice UI:
Metadata used to describe the drivers, is defined as part of the driver. For Example:
1
class Clipsal::CBus
2
include ::Orchestrator::Constants
3
include ::Orchestrator::Transcoder
4
5
# Discovery Information
6
tcp_port 10001
7
descriptive_name 'Lighting Gateway'
8
generic_name :Lighting
9
10
# Communication settings
11
tokenize delimiter: "\x0D"
12
wait_response false
13
delay between_sends: 100
14
15
# ...
16
end
Copied!
The discovery methods are made available to the driver by the line include ::Orchestrator::Constants. Without any discovery methods the driver is listed by its class name.

Discovery Methods

Method
Arguments
Description
descriptive_name
String
Used to describe the driver. This is what will be displayed in backoffice
generic_name
Symbol
The default generic name value
implements
Symbol
Defines the driver type, one of :ssh, :device, :service or :logic
description
String
A default description for the driver, supports markdown formatting
default_settings
Hash
Default settings that will be saved as JSON
tcp_port
Integer
Sets the default port and calls implements :device or implements :ssh if the port is 22
udp_port
Integer
Sets the default port and calls implements :device
uri_base
String
Expects a URI origin, such as http://overclockers.com.au:8080 and calls implements :service
makebreak!
Indicates that the TCP connection should not be held open
Copy link