DeCONZ Hue Dimmer Switch app with smooth dimming functionality

Hi, my apologies for the delay. the code are as follows

Short press on - 1002
long press on - 1001
long press on release - 1003

short press off - 2002
long press off - 2001
long press off release - 2003

in this switch there are only two buttons “on” & “off” and wile playing around to find all the codes these are all i could generate.

hope this helps and thank you for your time and help.

Robin

That’s perfect. Shouldn’t be a problem to integrate this. I’m going to provide you with something to test very soon

1 Like

I have something ready for you to test :slightly_smiling_face: Did you manage to install AppDaemon yet?

1 Like

Thank you :grinning: what’s the easiest way for you to send it over?

I managed to get it installed but when I try to open the web UI I get connection refused, haven’t found the cause yet but I’ve been out all day today and still out now,so will try again tomorrow night.

I’ll send you a PM with the code and some instructions tomorrow.

Looks a lot like ControllerX. Bring full functionality to light and media player controllers

Maybe it could be a joined effort :slight_smile:

@Burningstone thanks for sharing your solution and also thanks to @KennethLavrsen for his solution.

I was looking for the dimming functionality that works with holding a button for a while now. I ended up making my own appDaemon script. I have not yet tried your solution. I will let you know when I do.

1 Like

Hi @hfm, you could check this out. It supports deCONZ as well for the Hue Dimmer Switch and it supports dimming and color changing.

Thanx @xaviml, I’ve looked at your solution, it seems more complex than my current solution. Sure it have more functionality than mine, but the concept of dimming seems the same (sending increment/decrement for each iteration and doing sleep in between).

@Burningstone + @KennethLavrsen solution works a little bit different.

1 Like

Hello,

I was searching for some smart plugin to setup the philips hue dimmers. I saw this app deamon and it looks like everything i need is in it. But…I have no experience with appdaemon at all. I’m using home assistant for several months now but most of the things i do is in de UI. I’m still new to all de configs in the yaml files. alright.

  • I have download this app with hacs.
  • I have download the Appdaemon 4 add-on.
  • I have made a Appdaemon.yaml file.
secrets: /config/secrets.yaml
appdaemon:
  latitude: *******
  longitude: ******
  elevation: 2
  time_zone: Europe/Amsterdam
  plugins:
    HASS:
      type: hass
http:
  url: http://127.0.0.1:5050
hadashboard:
admin:
api:

And now i’m stuck. When i start the add on i get the following warning:

2020-03-25 13:24:00.267743 INFO AppDaemon: Scheduler running in realtime
2020-03-25 13:24:00.280264 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2020-03-25 13:24:00.282280 INFO AppDaemon: Adding /config/appdaemon/apps/Hue_Dimmer_Deconz to module import path
2020-03-25 13:24:00.289610 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/Hue_Dimmer_Deconz/hue_dimmer_switch_deconz.py - ignoring
2020-03-25 13:24:00.293640 INFO AppDaemon: App initialization complete

What is the next step to do to make it run? And where do i make the config for the philips hue dimmers?

Hope someone will take time to explain to me.

Kind regards,
Dennis

You need to create a yaml file in the same directory as hue_dimmer_switch_deconz.py which holds the configuration for the Dimmers.
There should be some examples on my page.

Have you thought about implementing a double click event? The trick is you have to suppress the the first btn down and up event if another down happens quickly enough. This would introduce a slight delay in reacting to a single click but give a dbl click event we could handle as well.

I tried to and got something to work more or less but it’s just an ugly workaround and I also don’t have a use for it. For the Dimmer Switch there are 8 different actions (short/long press ON,OFF,UP,DOWN) I can define, which is more than enough for one remote in my opinion.

Hello,

could someone explain me how to get this app with appdaemon running?

Here is what i did so far in the following order:

  1. I set up HAACS

  2. Then i realised that i need the HAACS Appdaemon support.

  3. I removed the HAACS Integration and re added it with Appdaemon support.

  4. I installed the Hue Dimmer Switch app with HACCS.

  5. Then i realised that i still ne the Appdaemon addon.

  6. I Installed Appdaemon4 from the Supervisor add on store.

  7. I created a file in the appdaemon folder called appdaemon.yaml (i read it should be there for configuration purposes, anyhow i also read that the appdaemon4 addon is configured by it self?)

  8. How to get this charming app to work?

Could you guys please help me in this jungle?

Thx Max

Hi Max what did you put inside the appdaemon.yaml file? Can you please post the log of the AppDaemon addon?

i didn’t add anything, i thought that file is only to configure appdaemon to work with HA, wich is not necessary according to the HA AD documentation.

Is that the part that has to go in there?

dimmer_test:
  module: hue_dimmer_switch
  class: HueDimmerSwitch
  entities:
    switch: dimmer_switch_bedroom (required)
    light: light.bedroom (required)

No, this needs to be in a separate file, e.g. bedroom.yaml, and it needs to be in the “apps” folder. What does the log of the add-on show? Did you already download my app through HACS?

yes i did in step 4.

ok,

I think this was the part that was unclear to me, where configuration goes.

I’ll try it now and post my log after if it doesn’t work.

Can you please post the logs of the AppDaemon add-on? Wanna make sure that AppDaemon works.

[09:56:09] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:11] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:12] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:14] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:16] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:17] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:19] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:21] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:23] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:24] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:26] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[09:56:28] INFO: Starting AppDaemon...