ControllerX. Bring full functionality to light and media player controllers

Hello @xaviml,

thanks a lot for your response, and congratulations for your work.

What i was trying to say is if that is a simple way that i can do something like that:

I am in the living-room and i use my my E-1810 to control the lights, then i go to the bed-room and then i use some other switch to triggers an automation that make the same E-1810 to disable the control of living-room lights and enable the control of bed-room lights.

Hope you understand.

Congrats!

Hi @finipini

I understand now, sorry. There is a thing in AppDaemon called Callback constrains and the Hass plugin provides one called constrain_input_boolean where an input boolean can be passed and it can turn on or off the callbacks. I have never tried this, but I guess this would work in your case. You can find the info in here https://appdaemon.readthedocs.io/en/latest/APPGUIDE.html?highlight=constraint#hass-plugin-constraints

Hey @finipini, I quickly try this callback constrain with a HA switch, it does work with any entity that has on/off as state I imagine. What you are saying it is a really good idea, one controller could be used for different things depending on you are. In fact, you can use an input_select instead of input_boolean. The config in apps.yaml would look something like this:

controller_livingroom:
  module: controllerx
  class: E1810Controller
  sensor: <your sensor id>
  light: light.livingroom
  constrain_input_select: input_select.where_am_I, livingroom

controller_bedroom:
  module: controllerx
  class: E1810Controller
  sensor: <your sensor id>
  light: light.bedroom
  constrain_input_select: input_select.where_am_I, bedroom

In this case you will need a way to update the input_select.where_am_I accordingly. Anyway, thanks for the idea, I think itā€™s really cool!

2 Likes

Hello xaviml,
I wake up just now, i was working late night and i saw your awnser earlier and was going to try it out.

I was reading the library of what you posted, and is really just what i want, and you are wright that input select is even better.

I am going to try it now, i feedback you about the result.

1 Like

Sorry @xaviml,
but how do make input-select to appear in Ha frontend?

You can create a manual card (or entities) in lovelace with the following config:

entities:
  - entity: input_select.your_input_select
show_header_toggle: false
title: Title
type: entities

My problem is that the input_select that i create in apps.yaml, for HA frontend doesnt exist.
Maybe i need something in the configuration of appDaemon.

input_select should be created on HA end, so the the configuration.yaml, this is a template you can use:

input_select:
  your_name:
    name: Your name
    options:
      - option1
      - option2
      - option3
    initial: option2
    icon: mdi:format-list-bulleted

input_select is something from Home Assistant and not from AppDaemon

Sorry men, my bad.
I thought it would appear automatically, i guess you,ve done all the work.

Ha is rebooting, i keep you updated when it works.

1 Like

Wow youā€™re fast! I spent some time looking for my HUSBZB-1 as itā€™s been awhile since Iā€™ve used it. Will test as soon as I can and give you some feedback.

Side question, I have a Surface Dial and was also wondering if that would be possible to integrate. Iā€™m guessing it doesnā€™t make sense for this component since itā€™s Bluetooth but thought Iā€™d ask anyway.

Thanks again for setting up the ZHA support, looking forward to using it!

How does the surface dial communicate with HA? Through state/state attributes or events? It does no matter the technology that uses behind, controllerx it connects only to Home assistant, so if home assistant is able to detect, it should be easy to integrate. However, I would need more details for that. If you are interested, please open an issue and we can discuss in there.

@xaviml , don,t know what i have wrong, but it is not working for me :frowning_face:

Many thanks for this :slight_smile:

I am doing something wrong and after trying every combination I can think of, perhaps you can point me in the right direction!?

Iā€™m running the latest Hassio with Appdaemon on a Pi 4 using the DeConz add-on with a Conbee II.

Everything runs normally.

Iā€™m trying to connect the Ikea Tradfri Remote Control E1810 with an Ikea color temperature light.

Where Iā€™m stuck is finding the correct ā€˜sensorā€™ for the apps.yaml entry.

The only sensor entry I can see for the tradfri remote is the battery reading:

sensor.tradfri_remote_control_battery_level

Iā€™ve tried that entry appending: _action, plus _click. The same with ā€˜tradfri_remote_controlā€™. I also used the deconz_event unique id is both forms.

I see the same message in the logs

WARNING livingroom_controller: livingroom_controller: Entity sensor.tradfri_remote_control_click not found in namespace default

Where am I going wrong and / or not looking?

Thanks again!

What you are doing wrong is that you are looking for sensor, but the deCONZ integration works with events, so you will need the id for the device. You can find it by going to developer tools > events and down the bottom type deconz_event and start listening. Then, you can click any button and you will see a JSON and you will find a field id inside data. That is the value you should add in the event_id parameter.

2 Likes

Superstar :smiley:

Thank you!!!

1 Like

Apologies for the off topic question, but do you have any tips on pairing the Ikea dial with HUSBZB-1? I tried several combos of 4 taps on the dial and hitting the add device button in the ZHA config but with no luck. The red light on the dial blinks a couple of times after the first few presses, is it supposed to turn solid red?

Sorry, I do not have any of the 2 devices, but the only advice I can give you is to approach the device the HUSBZB-1.

v2.2.0 is now released :partying_face:

:warning: This minor change contains breaking changes. Check README.md or here

:pencil2: Features

  • Support to add ZHA devices
  • Internal refactor (classes split into files)
  • Tests added for robustness
  • sensor and event_id removed from parameters and replaced with controller
  • New parameter: integration. Currently supported integration z2m, deconz and zha.
  • Each controller type has its own list of actions.
  • New documentation page

:video_game: New devices

  • E1743 for ZHA integration
  • E1810 (light and media player) for ZHA integration
  • E1744 (symfonisk) for ZHA integration
  • Aqara double key switch for Z2M
  • ICTC-G-1 for ZHA integration @sreknob

Thank you to everyone who have helped me for this release.

Where is apps folder on hass.io?

It should be in: /config/appdaemon/apps, but you need AppDaemon installed.