ControllerX. Bring full functionality to light and media player controllers

Hi @MrGinos,

As I already mentioned in the issue, the LED1624G9 does not have support for “color_temp” attribute and that is the attribute that is meant to use for the arrows on the E1524/E1810. My solution was to provide a xy_color attribute for the lights that do not have the color_temp attribute, but I don’t currently own a lightbulb with xy_color to test it out. I saw that lorek123 offered to try some code, so once I get back to it I will give you both some code to try out.

I can assure you that the app works with the lightbulb LED1732G11 from IKEA, since it does support color_temp. You can also get any lightbulb with brightness and color_temp support, you can check it out in here.

v1.3.0 is now released :partying_face:

This minor change does not contain any breaking changes

:pencil2: Features

  • Color support (#2) @xaviml
  • New attribute: action (#4) @xaviml
  • Code refactor for easier controller integrations @xaviml

:video_game: New devices

  • Ikea ICTC-G-1 (#6) @EPMatt

v1.4.0 is now released :partying_face:

This minor change does not contain any breaking changes

:pencil2: Features

  • New type of controller: Media player @xaviml
  • Individual default delay per device @xaviml
  • New white color to the list of colors (#2) @xaviml

:video_game: New devices

  • E1744 as media player and light controller (#8) @xaviml
  • Philips Hue dimmer switch @xaviml

I just released v1.4.0 with support to the Symfonisk controller for light and media player. Check it out and let me know.

v2.0.0 is now released :partying_face:

:warning: This major change contains breaking changes. Check README.md

:pencil2: Features

  • deConz support (with events) (#10) @xaviml
  • Turning on light with minimum brightness when brightness up is clicked or hold. (#9) @EPMatt
  • Support for AD 4.x with async/await features @xaviml
  • No more support for AD 3.x @xaviml

:video_game: New devices

  • Philips Hue dimmer switch support for deConz @xaviml
  • E1810 support for deConz @mario-tux
  • E1744 support for deConz @mario-tux
  • E1810 as a media player controller @EPMatt

Hi @swiftlyfalling,

Thanks for the information you gave me long time ago. In came in handy to get rid off the time.sleep and instead use the self.sleep with async features with AD 4.x

2 Likes

Thankyou, this works really well with my deconz and my ikea remote and WLED light.
Not sure about the color transition yet, can’t find info about the wled integration supports it properly.

1 Like

Do you get an error on the color transition? Does the WLED light supports xy_color attribute?

Yes I do, and I don’t know, I’m trying to find some info on that :slight_smile:

Can you enlighten us @frenck?

@fribse maybee a good idea to share your error code here?

v2.1.0 is now released :partying_face:

This minor change does not contain any breaking changes

:video_game: New devices

  • Added support for deCONZ in E1743Controller @kalkih
1 Like

how do I get started.

I have HCAS and AppDeamon installed I loaded controllerX.

  1. Do I need “appdaemon: true” in the standard HA configuration.yaml file
  2. Do I need a apps.yaml if so where does this go under appdeaon/apps/controllerx/ and should it contain
bedroom_speaker:
  module: controllerx
  class: E1744MediaPlayerController
  sensor: sensor.symfonisk_controller_action
  media_player: media_player.bedroom_speaker

Does it support skip and previous track?

  1. Do I need “appdaemon: true” in the standard HA configuration.yaml file

Yes, you need to activate appdaemon to HACS configuration. Either through yaml configuration or through GUI.

  1. Do I need a apps.yaml if so where does this go under appdeaon/apps/controllerx/ and should it contain

Yes, when installing AppDaemon and running it for the first time, you will see an apps.yaml in /config/appdaemon/apps/apps.yaml

Does it support skip and previous track?

Yes, it does. 1 click resumes/pauses. 2 clicks skips forward. 3 clicks skips backward. The same as the original implementation with IKEA hub.

2020-01-30 20:52:09.570310 INFO AppDaemon: Initializing app tv_sonos_speaker using class E1744MediaPlayerController from module
 controllerx                                                                                                                   
2020-01-30 20:52:09.572473 WARNING AppDaemon: ------------------------------------------------------------                     
2020-01-30 20:52:09.572718 WARNING AppDaemon: Unexpected error initializing app: tv_sonos_speaker:                             
2020-01-30 20:52:09.572877 WARNING AppDaemon: ------------------------------------------------------------                     
2020-01-30 20:52:09.573328 WARNING AppDaemon: Traceback (most recent call last):                                               
  File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 2051, in check_app_updates                        
    self.init_object(app)                                                                                                      
  File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 1567, in init_object                              
    modname = __import__(app_args["module"])                                                                                   
  File "/conf/apps/controllerx/controllerx.py", line 14, in <module>                                                           
    import hassapi as hass                                                                                                     
ModuleNotFoundError: No module named 'hassapi'                                                                                 
                                                                                                                               
2020-01-30 20:52:09.573629 WARNING AppDaemon: ------------------------------------------------------------   

Any ideas? No HASC just plain old drop files and folders into Appdaemon/conf/

appdeamon.yaml =

log:
  logfile: STDOUT
  errorfile: STDERR
appdaemon:
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_url: https://ha.bertybassett.synology.me
      token: XXXXXXXXXXXXXXXXXXXXremovedForSecutityReasonsXXXXXXXXXXXXXXXXXXXX

You need at least AppDaemon 4.0.0 for this app, from your config it looks like you are still using version 3.x.x.

2 Likes

https://registry.hub.docker.com/r/acockburn/appdaemon/builds?page=1

Is what I loaded, thought it would be version 4?? How do I double check?

Which one exactly? There are quite a few there.

In version 4.0.0 and higher latitude, longitude, time_zone and elevation are mandatory config options in the appdaemon.yaml file.

2 Likes

I loaded the latest ones as of 2 days ago

appdaemon:
  threads: 10
  plugins:
  ha_url: REDACTED
  ha_key: REDACTED
  time_zone: America/Los_Angeles
  latitude: REDACTED
  longitude: REDACTED
  elevation: 116
hadashboard:
  dash_url: http://192.168.0.21:5050
  dashboard_dir: /conf/dashboards
2020-01-30 18:06:14.403976 INFO AppDaemon: Removing module /conf/apps/hello.py                                                 
2020-01-30 18:06:14.405260 INFO AppDaemon: Removing module /conf/apps/controllerx/controllerx.py                               
2020-01-30 18:06:14.405907 INFO AppDaemon: Terminating tv_sonos_speaker                                                        
2020-01-30 18:06:42.521834 INFO AppDaemon: Loading App Module: /conf/apps/controllerx/controllerx.py                           
2020-01-30 18:06:42.537387 INFO AppDaemon: Initializing app tv_sonos_speaker using class E1744MediaPlayerController from module
 controllerx                                                                                                                   
2020-01-30 18:06:42.539179 WARNING tv_sonos_speaker: ------------------------------------------------------------              
2020-01-30 18:06:42.539960 WARNING tv_sonos_speaker: Unexpected error initializing app: tv_sonos_speaker:                      
2020-01-30 18:06:42.540770 WARNING tv_sonos_speaker: ------------------------------------------------------------              
2020-01-30 18:06:42.541613 WARNING tv_sonos_speaker: Traceback (most recent call last):                                        
  File "/usr/local/lib/python3.8/site-packages/appdaemon/app_management.py", line 820, in check_app_updates                    
    await self.init_object(app)                                                                                                
  File "/usr/local/lib/python3.8/site-packages/appdaemon/app_management.py", line 279, in init_object                          
    "object": app_class(                                                                                                       
  File "/usr/local/lib/python3.8/site-packages/appdaemon/plugins/hass/hassapi.py", line 46, in __init__                        
    adbase.ADBase.__init__(self, ad, name, logging, args, config, app_config, global_vars)                                     
  File "/usr/local/lib/python3.8/site-packages/appdaemon/adbase.py", line 75, in __init__                                      
    self.dashboard_dir = self.AD.http.dashboard_dir                                                                            
AttributeError: 'NoneType' object has no attribute 'dashboard_dir'                                                             
                                                                                                                               
2020-01-30 18:06:42.542050 WARNING tv_sonos_speaker: ------------------------------------------------------------              
2020-01-30 18:06:42.542900 WARNING AppDaemon: Unable to find module tv_sonos_speaker - initialize() skipped