platform_driver.interfaces.bacnet module¶
-
class
platform_driver.interfaces.bacnet.
Interface
(**kwargs)[source]¶ Bases:
platform_driver.interfaces.BaseInterface
-
configure
(config_dict, registry_config_str)[source]¶ Configures the
Interface
for the specific instance of a device.- Parameters
This method must setup register representations of all points on a device by creating instances of
BaseRegister
(or a subclass) and adding them to the Interface withBaseInterface.insert_register()
.
-
establish_cov_subscription
(point_name, lifetime, renew=False)[source]¶ Asks the BACnet proxy to establish a COV subscription for the point via RPC. If lifetime is specified, the subscription will live for that period, else the subscription will last indefinitely. Default period of 3 minutes. If renew is True, the the core scheduler will call this method again near the expiration of the subscription.
-
get_point
(point_name, get_priority_array=False)[source]¶ Get the current value for the point name given.
- Parameters
point_name (str) – Name of the point to retrieve.
kwargs – Any interface specific parameters.
- Returns
Point value
-
scrape_all
()[source]¶ Method the Platform Driver Agent calls to get the current state of a device for publication.
- Returns
Point names to values for device.
- Return type
-
set_point
(point_name, value, priority=None)[source]¶ Set the current value for the point name given.
Implementations of this method should make a reasonable effort to return the actual value the point was set to. Some protocols/devices make this difficult. (I’m looking at you BACnet) In these cases it is acceptable to return the value that was requested if no error occurs.
- Parameters
point_name (str) – Name of the point to retrieve.
value – Value to set the point to.
kwargs – Any interface specific parameters.
- Returns
Actual point value set.
-