BAC0.core.devices.mixins package

Submodules

BAC0.core.devices.mixins.CommandableMixin module

Rebuilt Commandable

class BAC0.core.devices.mixins.CommandableMixin.AccessDoorObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.AccessDoorObject

class BAC0.core.devices.mixins.CommandableMixin.AnalogOutputObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.AnalogOutputObject

class BAC0.core.devices.mixins.CommandableMixin.AnalogValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.AnalogValueObject

class BAC0.core.devices.mixins.CommandableMixin.BinaryOutputObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, BAC0.core.devices.mixins.CommandableMixin.MinOnOff, bacpypes.object.BinaryOutputObject

class BAC0.core.devices.mixins.CommandableMixin.BinaryValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, BAC0.core.devices.mixins.CommandableMixin.MinOnOff, bacpypes.object.BinaryValueObject

class BAC0.core.devices.mixins.CommandableMixin.BitStringValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.BitStringValueObject

class BAC0.core.devices.mixins.CommandableMixin.ChannelObjectCmd(**kwargs)[source]

Bases: bacpypes.object.ChannelObject

properties = [<BAC0.core.devices.mixins.CommandableMixin.ChannelValueProperty object>]
class BAC0.core.devices.mixins.CommandableMixin.ChannelValueProperty[source]

Bases: bacpypes.object.Property

WriteProperty(obj, value, arrayIndex=None, priority=None, direct=False)[source]
class BAC0.core.devices.mixins.CommandableMixin.CharacterStringValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.CharacterStringValueObject

BAC0.core.devices.mixins.CommandableMixin.Commandable(datatype, presentValue='presentValue', priorityArray='priorityArray', relinquishDefault='relinquishDefault')[source]
class BAC0.core.devices.mixins.CommandableMixin.DatePatternValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.DatePatternValueObject

class BAC0.core.devices.mixins.CommandableMixin.DateTimePatternValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.DateTimePatternValueObject

class BAC0.core.devices.mixins.CommandableMixin.DateTimeValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.DateTimeValueObject

class BAC0.core.devices.mixins.CommandableMixin.DateValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.DateValueObject

class BAC0.core.devices.mixins.CommandableMixin.IntegerValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.IntegerValueObject

class BAC0.core.devices.mixins.CommandableMixin.LargeAnalogValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.LargeAnalogValueObject

class BAC0.core.devices.mixins.CommandableMixin.LightingOutputObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.LightingOutputObject

class BAC0.core.devices.mixins.CommandableMixin.LocalAnalogValueObjectCmd(**kwargs)[source]

Bases: bacpypes.local.object.CurrentPropertyListMixIn, BAC0.core.devices.mixins.CommandableMixin.AnalogValueObjectCmd

class BAC0.core.devices.mixins.CommandableMixin.LocalBinaryOutputObjectCmd(**kwargs)[source]

Bases: bacpypes.local.object.CurrentPropertyListMixIn, BAC0.core.devices.mixins.CommandableMixin.BinaryOutputObjectCmd

class BAC0.core.devices.mixins.CommandableMixin.LocalDateValueObjectCmd(**kwargs)[source]

Bases: bacpypes.local.object.CurrentPropertyListMixIn, BAC0.core.devices.mixins.CommandableMixin.DateValueObjectCmd

class BAC0.core.devices.mixins.CommandableMixin.MinOnOff(**kwargs)[source]

Bases: object

class BAC0.core.devices.mixins.CommandableMixin.MinOnOffTask(binary_obj)[source]

Bases: bacpypes.task.OneShotTask

present_value_change(old_value, new_value)[source]
process_task()[source]
class BAC0.core.devices.mixins.CommandableMixin.MultiStateOutputObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.MultiStateOutputObject

class BAC0.core.devices.mixins.CommandableMixin.MultiStateValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.MultiStateValueObject

class BAC0.core.devices.mixins.CommandableMixin.OctetStringValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.OctetStringValueObject

class BAC0.core.devices.mixins.CommandableMixin.PositiveIntegerValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.PositiveIntegerValueObject

class BAC0.core.devices.mixins.CommandableMixin.TimePatternValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.TimePatternValueObject

class BAC0.core.devices.mixins.CommandableMixin.TimeValueObjectCmd(**kwargs)[source]

Bases: BAC0.core.devices.mixins.CommandableMixin._Commando, bacpypes.object.TimeValueObject

BAC0.core.devices.mixins.read_mixin module

read_mixin.py - Add ReadProperty and ReadPropertyMultiple to a device

class BAC0.core.devices.mixins.read_mixin.DiscoveryUtilsMixin[source]

Bases: object

Those functions are used in the process of discovering points in a device

read_objects_list(custom_object_list=None)[source]
rp_discovered_values(discover_request, points_per_request)[source]
class BAC0.core.devices.mixins.read_mixin.RPMObjectsProcessing[source]

Bases: object

class BAC0.core.devices.mixins.read_mixin.RPObjectsProcessing[source]

Bases: object

class BAC0.core.devices.mixins.read_mixin.ReadProperty[source]

Bases: BAC0.core.devices.mixins.read_mixin.ReadUtilsMixin, BAC0.core.devices.mixins.read_mixin.DiscoveryUtilsMixin, BAC0.core.devices.mixins.read_mixin.RPObjectsProcessing

poll(command='start', *, delay=120)[source]

Poll a point every x seconds (delay=x sec) Can be stopped by using point.poll(‘stop’) or .poll(0) or .poll(False) or by setting a delay = 0

Parameters:
  • command (str) – (str) start or stop polling
  • delay (int) – (int) time delay between polls in seconds
Example:

device.poll() device.poll(‘stop’) device.poll(delay = 5)

read_multiple(points_list, *, points_per_request=1, discover_request=(None, 6))[source]

Functions to read points from a device using the ReadPropertyMultiple request. Using readProperty request can be very slow to read a lot of data.

Parameters:
  • points_list – (list) a list of all point_name as str
  • points_per_request – (int) number of points in the request

Using too many points will create big requests needing segmentation. It’s better to use just enough request so the message will not require segmentation.

Example:

device.read_multiple([‘point1’, ‘point2’, ‘point3’], points_per_request = 10)

read_single(request, *, points_per_request=1, discover_request=(None, 4))[source]
class BAC0.core.devices.mixins.read_mixin.ReadPropertyMultiple[source]

Bases: BAC0.core.devices.mixins.read_mixin.ReadUtilsMixin, BAC0.core.devices.mixins.read_mixin.DiscoveryUtilsMixin, BAC0.core.devices.mixins.read_mixin.RPMObjectsProcessing

poll(command='start', *, delay=10)[source]

Poll a point every x seconds (delay=x sec) Can be stopped by using point.poll(‘stop’) or .poll(0) or .poll(False) or by setting a delay = 0

Parameters:
  • command (str) – (str) start or stop polling
  • delay (int) – (int) time delay between polls in seconds
Example:

device.poll() device.poll(‘stop’) device.poll(delay = 5)

read_multiple(points_list, *, points_per_request=25, discover_request=(None, 6), force_single=False)[source]

Read points from a device using a ReadPropertyMultiple request. [ReadProperty requests are very slow in comparison].

Parameters:
  • points_list – (list) a list of all point_name as str
  • points_per_request – (int) number of points in the request

Requesting many points results big requests that need segmentation. Aim to request just the ‘right amount’ so segmentation can be avoided. Determining the ‘right amount’ is often trial-&-error.

Example:

device.read_multiple([‘point1’, ‘point2’, ‘point3’], points_per_request = 10)

read_single(points_list, *, points_per_request=1, discover_request=(None, 4))[source]
class BAC0.core.devices.mixins.read_mixin.ReadUtilsMixin[source]

Bases: object

Handle ReadPropertyMultiple for a device

exception BAC0.core.devices.mixins.read_mixin.TrendLogCreationException[source]

Bases: Exception

BAC0.core.devices.mixins.read_mixin.batch_requests(request, points_per_request)[source]

Generator for creating ‘request batches’. Each batch contains a maximum of “points_per_request” points to read. :params: request a list of point_name as a list :params: (int) points_per_request :returns: (iter) list of point_name of size <= points_per_request

BAC0.core.devices.mixins.read_mixin.create_trendlogs(objList, device)[source]
BAC0.core.devices.mixins.read_mixin.retrieve_type(obj_list, point_type_key)[source]
BAC0.core.devices.mixins.read_mixin.to_float_if_possible(val)[source]

Module contents