Skip to content

Create controller-based automations with ease to control your home devices and scenes.

License

Notifications You must be signed in to change notification settings

xaviml/controllerx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

733b25b · Feb 5, 2020

History

84 Commits
Feb 2, 2020
Feb 5, 2020
Feb 2, 2020
Feb 4, 2020
Jan 27, 2020
Feb 1, 2020
Jan 31, 2020
Jan 31, 2020
Nov 16, 2019
Jan 30, 2020
Jan 30, 2020
Feb 2, 2020
Feb 2, 2020
Feb 1, 2020
Jan 30, 2020

Repository files navigation

ControllerX

hacs_badge azure-pipelines-build azure-pipelines-coverage last-release

Breaking changes

⚠️ sensor and event_id are removed from the parameters, now there is a unique parameter called controller. So from v2.2.0 you will need to replace sensor and event_id for controller

⚠️ You will also need to add a new parameter integration to state how the controller is connected with. These are the supported integration, z2m, deconz and zha. This does not mean that there is support for all three integration for all controllers, some controllers do not have some integration due to the lack of the device and being still in development. If you possess a device that is not integrated, you can freely open an issue and I will be glad to help 😃

Bring full functionality to light and media player controllers. From turning devices on/off to changing the color lights.

This automation brings the following functionalities for different devices:

  • Turn on/Turn off light(s)
  • Toggle light(s)
  • Manual increase/decrease of brightness and color temperature
  • Smooth increase/decrease (holding button) of brightness and color temperature
  • Color loop changing if the light supports xy color.
  • Play/pause music
  • Volume up/down for a media player.

This project gives support now to controllers integrated with zigbee2mqtt, deCONZ and ZHA.

Installation

HACS

The easiest way to add this to your Homeassistant installation is using HACS with Appdaemon enabled. And then follow the instructions under Configuration below.

Manual

Download the controllerx directory from inside the apps directory here to your local apps directory, then add the configuration to enable the controllerx module.

Update

Note that AppDaemon will need to be restarted when installing a new version of ControllerX. This is due to AppDaemon not reimporting the modules again. If AppDaemon server is not restarted, then it will keep executing the old version.

Configuration

This is an example configuration template:

nameOfYourInstanceApp:
  module: controllerx
  class: <class of your controller>
  controller: <controller entity id>
  integration: <z2m | deconz | zha>
  light: <light, group entity id>

or:

nameOfYourInstanceApp:
  module: controllerx
  class: <class of your controller>
  controller: <controller entity id>
  integration: <z2m | deconz | zha>
  light:
    name: <light, group entity id>
    color_mode: auto | xy_color | color_temp

This is a real example for E1524/E1810 controller with z2m that controls all the livingroom lights.

livingroom_controller:
  module: controllerx
  class: E1810Controller
  controller: sensor.livingroom_controller_action
  integration: z2m
  light: group.livingroom_lights

This is a real example to control a media player with E1744 with deCONZ:

bedroom_speaker:
  module: controllerx
  class: E1744MediaPlayerController
  controller: symfonisk_controller
  integration: deconz
  media_player: media_player.bedroom_speaker

These are the generic app parameters for all type of controllers. You can see the rest in here

key optional type default example description
module False string - controllerx The Python module
class False string - E1810Controller The Python class. Check the classes for each controller on the supported controllers page.
controller False string | list - sensor.controller or hue_switch1, hue_switch2 This is the controller id. This will change depending on the integration. In case of z2m is the name of the sensor in HA, it normally finishes with _action. For deconz is the device name given on the phoscon app. And finally, for zha is the device IEEE.
integration False string - z2m, deconz or zha This is the integration that the device was integrated.
actions True list All actions This is a list of actions to be included and controlled by the app. To see which actions has each controller check the supported controllers page
action_delta True int 300 This is the threshold time between the previous action and the next one (being the same action). If the time difference between the two actions is less than this attribute, then the action won't be called. I recommend changing this if you see the same action being called twice.

Contributing

See CONTRIBUTING.md

Note: The code does not use any MQTT calls, just the Home Assistant API from AppDaemon.