Configuration#
This are the configuration settings for the /etc/unipi/control.yaml
.
Device#
Key |
Value |
|
---|---|---|
|
The device name for the subscribe and publish topics. Default is the hostname. This name must be unique. This is important if multiple Unipi devices are available. |
optionally |
|
Used as suggested area for the device in Home Assistant. |
optionally |
# control.yaml
device_info:
name: Unipi
suggested_area: Distribution Cabinet
MQTT#
Key |
Value |
---|---|
|
The hostname or IP address of the remote broker: Default is |
|
The network port of the server host to connect to. Defaults is |
|
Maximum period in seconds allowed between communications with the broker. If no other messages are being exchanged, this controls the rate at which the client will send ping messages to the broker. Default is |
|
Number of attempts to connect to the MQTT broker. Default to |
|
Time between connection attempts. Default is |
# control.yaml
mqtt:
host: localhost
port: 1883
connection:
keepalive: 15
retry_limit: 30
reconnect_interval: 10
Modbus#
TCP#
Key |
Value |
---|---|
|
The modbus TCP host. Default is |
|
The modbus TCP port. Default is |
# control.yaml
modbus_tcp:
host: localhost
port: 502
Serial#
Key |
Value |
---|---|
|
The modbus RTU device. Default is |
|
The baud rate for modbus RTU. Default is |
|
The parity for modbus RTU. Default is |
|
A list of all modbus RTU devices. |
|
The unique modbus RTU unit ID. |
|
Custom device name. Used for the Home Assistant UI. |
|
Used as entity area in Home Assistant. |
# control.yaml
modbus_serial:
port: /dev/extcomm/0/0
baud_rate: 9600
parity: N
units:
- unit: 1
device_name: Eastron SDM120M
identifier: Eastron_SDM120M
suggested_area: Workspace
Home Assistant#
Key |
Value |
---|---|
|
Enable Home Assistant MQTT Discovery. Default is |
|
The prefix for the discovery topic. Default is |
# control.yaml
homeassistant:
enabled: true
discovery_prefix: homeassistant
Features#
It’s possible to give the features friendly names. This names will be used for switches and binary sensors and sensors in Home Assistant.
Key |
Value |
|
---|---|---|
|
Used as entity ID in Home Assistant. |
optionally |
|
Used as entity name in Home Assistant. |
optionally |
|
Used as icon in Home Assistant. Any icon from materialdesignicons.com. Prefix name with mdi:, ie |
optionally |
|
Used for Device Class in Home Assistant. |
optionally |
|
Used for State Class in Home Assistant. Thid is only for sensors. |
optionally |
|
Used as measurement unit in Home Assistant. Only for sensors. |
optionally |
|
Invert the |
optionally |
# control.yaml
features:
di_3_02:
object_id: workspace_switch_up
friendly_name: Workspace - Switch up
di_3_03:
object_id: workspace_switch_down
friendly_name: Workspace - Switch down
active_power_1:
object_id: workspace_active_power
friendly_name: Workspace - Active Power
device_class: power
state_class: measurement
unit_of_measurement: W
Covers#
Warning: Driving both signals up and down at the same time can damage the motor. There are a couple of checks to prevent such situation. Use this software at your own risk! I do not take any responsibility for it!
The Home Assistant Discovery for the covers is optionally. Covers can be control with MQTT topics without Home Assistant.
Key |
Value |
|
---|---|---|
|
Used as entity ID in Home Assistant. |
|
|
Used as entity name in Home Assistant. |
optionally |
|
Device class can be “awning”, “curtain”, “door”, “garage”, “gate”, “shade”, “blind”, “shutter” or “window” |
optionally |
|
Define the time (in seconds) it takes for the cover to fully open or close. |
optionally |
|
Define the time (in seconds) that the tilt changes from fully open to fully closed state. Tilt is only available for device class “blind”. |
optionally |
|
Output circuit name from a relay or digital output. |
|
|
Output circuit name from a relay or digital output. |
# control.yaml
covers:
- id: workspace_1
friendly_name: "Workspace - Blind 1"
device_class: "blind"
cover_run_time: 35.5
tilt_change_time: 1.5
cover_up: ro_3_03
cover_down: ro_3_02
Calibration#
The covers save its cover and tilt position in a temporary file each time a stop command is executed. If the Unipi Control is interrupted, and a command (open/closing) is currently being executed, or the system is restarted, the calibration mode is enabled. When the Unipi Control starts in calibration mode, the cover fully open and disable calibration mode. This is required for the correct cover and tilt position.
Cover calibration mode is disabled when
persistent_tmp_dir
is enabled! To manualy reset the covers you must delete all files under/var/tmp/unipi
.
Advanced#
Key |
Value |
---|---|
|
Enable persistent temporary directory. All temporary files are written to |
# control.yaml
advanced:
persistent_tmp_dir: True
Logging#
Key |
Value |
---|---|
|
Set level to |
|
Show meter MQTT messages only for this log level or greater. Default is |
|
Show features MQTT messages only for this log level or greater. Default is |
|
Show covers MQTT messages only for this log level or greater. Default is |
# control.yaml
logging:
level: info
mqtt:
meters_level: error
features_level: info
covers_level: info
Donation#
We put a lot of time into this project. If you like it, you can support us with a donation.