Unipi Control - Control you binary sensors, switches and covers over MQTT

Hello,

I wrote for my personal use a python script to control binary sensors, switches and covers over MQTT discovery with the Unipi Neuron. I publish my code for everyone on GitHub.

I can detect if a button is pressed (binary sensors) and than control the cover.
For the cover control with the binary sensor i wrote a automation blueprint (you can find it in the extras folder in the GitHub project)

For easy install i make a python package than can be found on pypi.

2 Likes

Hi, does it works also with Extensions connected to Neuron?

Hello Superbox,

I am trying to setup unipi-control on my patron L207 and I was able to follow all steps in your documenation, but somehow the control.yaml file is accepted.
Would you please be able to guide me in the right direction? My control.yaml file is located in /etc/unipi and has below listed content.

And this is the error that Iā€™m getting:

root@L207-sn370:/home/unipi# unipi-control
2024-11-06 22:03:04,953 | CRITICAL | [CONFIG] No valid YAML definition found for this device!

control.yaml

device_info:
  name: Unipi
mqtt:
  host: 192.168.1.15
  port: 1883
  connection:
    keepalive: 15
    retry_limit: 30
    reconnect_interval: 10
modbus_tcp:
  host: localhostnan
  port: 502
homeassistant:
  enabled: true
  discovery_prefix: homeassistant
features:
  di_3_02:
    object_id: sensor_garage
    friendly_name: sensor garage
  di_3_03:
    object_id: switch_garage
    friendly_name: switch_garage
  ro_3_12:
    object_id: light_garage
    friendly_name: light garage
  ro_3_13:
    object_id: light_hall
    friendly_name: light hall
covers:
  - object_id: rol_badkamer
    friendly_name: badkamer - rol
    device_class: blind
    cover_run_time: 20.5
    tilt_change_time: 1.5
    cover_up: ro_3_08
    cover_down: ro_3_09
  - object_id: rol_slaapkamer
    friendly_name: slaapkamer - rol
    device_class: blind
    cover_run_time: 20.5
    tilt_change_time: 1.5
    cover_up: ro_3_10
    cover_down: ro_3_11
logging:
  level: info
  mqtt:
    meters_level: error
    features_level: info
    covers_level: info