-
Notifications
You must be signed in to change notification settings - Fork 2
Software configuration
To recreate all the functionality available in the current Dobiss software, quite a few configuration files and objects are needed.
One of the core classes is the DobissEntity class. This class represents all entities that can be manipulated by the software. The following types of entity exist and have their own child class:
- DobissDimmer: This represents a dimmable output of a Dobiss module.
- DobissRelays: This represents a binary output of a Dobiss module.
- DobissShade: This represents an automated window shade that can be moved up or down.
- DobissScene: This is an entity that allows to bundle a collection of entities that can be manipulated simultaneously.
This class holds an entity object with an action that will be taken on that entity. There are a limited number of possible actions:
- Switch: Change the status of the entity to the opposite of the current status (off->on)
- Turn on: Change the status to on.
- Turn off: Change the status to off.
- Schedule: Change the status of the entity with a delay. Both the delay as well as the action to be taken needs to be provided in the optional "named_arguments".
- Cycle dimmer: Adjust the brightness of the DimmerEntity progressively up and down. Created to allow adjusting the brightness by holding down a lighting switch.
This class represents a physical DobissModule with its associated characteristics.
This class is used to bundle all relevant information provided by the One Wire Reader. It also validates this input and drops corrupt messages.
This class represents an event assosciated with a lightings switch. It can be a button has just been pressed, one that is being held down or one that has just been released.
The configuration files are bundled in the module/folder config.
The file dobiss_entity_config.py mainly holds the information to create the different DobissEntity objects.
This dict contains an entry for every lighting output of the system. The key of the dict is the name of the Entity, which needs to be unique across all Entity objects of all types. Every entry contains:
- The module number of the physical Dobiss module onto which the lighting point is connected.
- The number of the output on that module.
- The type of output it is (dimmable or not)
- The value "ha_type", currently not used, but will be used to generate the necessary Home Assistant config.
- (Optional) Maximum Brightness: A maximum that can be used for dimmable leds that do not become brighter after a certain brightness value within Dobiss.
- (Optional) Minimum Brightness: A minimum for lights that cut off below a certain brightness value.
This dict contains an entry for every electric shade. The dict contains the information of the ouput entities used to control the up and down movement of the shades.
This dict contains an entry for every scene that should be available in the system. A scene consists of a list of tuples, where every tuple contains the necessary information to create an EntityAction that will be triggered upon activation the scene.
This dict is used to create the objects representing the physical modules. The key of the dict is the module_number, as it is configured in the Dobiss software. This key is used within the CAN bus messages. The attributes are:
- module_number: Identical to the key of the dict.
- type: Dimmer outputs or not.
- id: The arbitration ID used for the CAN bus protocol.
- nr_response_messages: The number of messages the module uses to communicate the status of all its outputs.