@hainesy - no problem!
Just because there isn’t a quirk for zha, doesn’t mean one can’t be made, it just requires some work.
Check in on the zha devices thread. I know that there has been mention of that controller some time ago but nothing recent.
If you are so inclined, information about making a quirk can be found in the device handlers repo under contributing.md.
Good luck!
Thanks for the pointer - will have a read and see whether it’s beyond my level of geekery at this point!
Cheers
Hi xaviml, great work indeed. I’ve just started with home assistant and I was really struggling to find a “clean” solutions for remote.
I have a 2 buttons ikea controlling 3 color GU10 spots using the ZHA protocol.
The default setting (E1743Controller) works like a charm (on/off dimm). However I wanted to expand the functionality using the CustomLightController with sometimg like this:
bedroom_lights2:
module: controllerx
class: CustomLightController
controller: cc:cc:cc:ff:fe:58:yy:xx
integration: zha
light: light.hue_color_gu10_2
mapping:
on: toggle
move_with_on_off_0_83: hold_brightness_toggle
stop: release
but it doesn’t work. Instead, if I make a new class like:
class E1743TEMPController(LightController):
# Different states reported from the controller:
# on, off, brightness_up, brightness_down, brightness_stop
def get_zha_actions_mapping(self):
return {
"on": Light.TOGGLE,
"off": Light.SET_HALF_COLOR_TEMP,
"move_with_on_off_0_83": Light.HOLD_COLOR_TEMP_TOGGLE,
"move_1_83": Light.HOLD_BRIGHTNESS_TOGGLE,
"stop": Light.RELEASE,
}
It does what I want. is the ZHA protocol able to use the CustomLightController, or do I need some additional configuration?
Thanks for the great work!!
@ffavero - for zha I believe you need to wrap the mapping in quotes, like:
mapping:
"toggle": "toggle"
Try that with your custom controller and see if it solves the issue.
EDIT: Looking further at your class that works, this should give you the desired effect. The mappings of what you want should directly be the functions you desire. With custom controllers you need to map every function you desire, it won’t take the defaults of the controller.
bedroom_lights2:
module: controllerx
class: CustomLightController
controller: cc:cc:cc:ff:fe:58:yy:xx
integration: zha
light: light.hue_color_gu10_2
mapping:
"on": toggle
"off": set_half_color_temp
"move_with_on_off_0_83": hold_colortemp_toggle
"move_1_83": hold_brightness_toggle
"stop": release
Hi @ffavero,
@sreknob is right. The problem that “on” and “off” are mapped as boolean variable (true and false). So they need to be mapped between the quotes. As far as I knowz the rest do not need to be wrapped between quotes, but doing it so makes sure the mapping is a string variable.
Thanks @sreknob and @xaviml, it was just silly of me not to try that in the first place :-).
That’s really awesome, it really offer almost full cutomization in a very logical and tidy way. I find it not really intuitive that by default the switches need to be implemented as automations… And that the native implementation doesn’t offer at least an user friendly (I mean do it in few lines and not 50 lines of code) dimm as you hold feature…
I hope that with an actual useful implementation of zigbee groups in zha I’ll also be able to reduce duplications in the app.yaml, but for now it’s just perfect. Cheers
@xaviml
Before all, please, have my appologies for late reply. I haven’t noticed I’ve been logged out and did not received note on Your reply ther in git-hub.
Here, this is content of my /config/appdaemon/apps/apps.yaml file, (it is HASSIO platform on RPI3)
> Dnevni_controller: (Dnevni stands for "livingroom" in my language=
> module: controllerx
> class: E1810Controller
> controller: 90:fd:9f:ff:fe:53:1d:c8
> integration: zha
> light: light.dne1 (this is light mapped from ZHA just for this purpose)
Other than this, here is my configuration.yaml
Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: example.duckdns.org:8123
Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yamlclimate:
- platform: generic_thermostat
name: dnevni
heater: switch.ikea_of_sweden_tradfri_control_outlet_802a20fe_on_off
target_sensor: sensor.lumi_lumi_weather_08f82203_temperature
min_temp: 15
max_temp: 30
ac_mode: false
target_temp: 17
cold_tolerance: 0.3
hot_tolerance: 0
min_cycle_duration:
seconds: 5
keep_alive:
minutes: 3
away_temp: 18
initial_hvac_mode: “off”
precision: 0.1- platform: generic_thermostat
name: spavaca
heater: switch.ikea_of_sweden_tradfri_control_outlet_80d4f6fe_on_off
target_sensor: sensor.lumi_lumi_weather_32ee4c03_temperature
min_temp: 15
max_temp: 30
ac_mode: false
target_temp: 17
cold_tolerance: 0.3
hot_tolerance: 0
min_cycle_duration:
seconds: 5
keep_alive:
minutes: 3
away_temp: 18
initial_hvac_mode: “off”
precision: 0.1 `
Besides this, I don’t know if appdaemon is running at all and have no idea how to get log from
@branitelj91 won’t be able to get very far until you’ve verified appdaemon is up and running.
How are you installing it and what platform are you using? You can find the doc on the installing it here.
If using HASS.IO, it’s pretty straightforward and you can see here for details.
Once you an confirm it’s up and running, then more troubleshooting can be done!
Thank You. Today I stumbled, (following links from this thread), upon appdaemon4, where I have installed, (funny, but I tought it was the one), “some kind of appdaemon”, and had no clue how to make it work.
Now, in this very momment, I am installing appdaemon4. Thank You for the notification, though.
I will give it a try and, after I have it up and running, will go on further.
I can’t get deconz and the Hue Dimmer to work with this at all. This is an example of the deconz_event:
{
"event_type": "deconz_event",
"data": {
"id": "dimmer_switch",
"unique_id": "00:17:88:01:10:5f:0c:4f",
"event": 1000
},
"origin": "LOCAL",
"time_fired": "2020-03-10T13:41:34.846224+00:00",
"context": {
"id": "7dd4b4b9c7a04a24bd2d7a1a3e6ed3fe",
"parent_id": null,
"user_id": null
}
}
Here is my controllerx config for this, the light is a Hue color spot.
master_bath_dimmer:
module: controllerx
class: HueDimmerController
controller: 00:17:88:01:10:5f:0c:4f
integration: deconz
light: light.master_bathroom_bath_overhead
Any ideas?
Hi @pashdown
I see that you put the device IEEE on the controller
attribute. However, for the deconz integration you need the device id, so:
master_bath_dimmer:
module: controllerx
class: HueDimmerController
controller: dimmer_switch
integration: deconz
light: light.master_bathroom_bath_overhead
Let me know if this was the problem. If this did not solve the problem, could you share the AppDaemon logs with us?
Thank you
Hi @pashdown
The color cycle with that controller works with holding the “I” and “O”, one to go to one direction and the other to the other one.
I am glad it worked
v2.4.0 is now released
This minor change does not contain breaking changes.
Features
- Add new predefined action (
sync
) to set light(s) in default mode. For the moment it sets the light into full brightness. This action is called when the center button of E1810 controller is held.
Fixes
- Invert E1744LightController deCONZ rotations. Rotate left is to dim and rotate right is to brighten.
- Support for ZHA args ZigBee 3.0 firmware for E1810 (#45)
New devices
Can you please add deCONZ mapping for WXKG11LM?
- 1002 – 1 click
- 1004 – 2 clicks
- 1001 – Hold the button
- 1003 – Release the button
v2.4.1 is now released
This minor change does not contain breaking changes.
Fixes
- Fix bug for
sync
action. Now it also changes the color. (#54)
v2.4.2 is now released
New devices
- Support for WXKG11LM (deCONZ)
Hi… I Think I did everything correctly but still not working. This is my conf in apps.yaml
(two spaces for indentation)
mando1_controller:
module: controllerx
class: HueDimmerController
controller: sensor.mando_hue_1_action
integration: z2m
light: light.salon7_mesa_light
Appdaemon 4 working with this final logs…
2020-03-15 19:02:50.370964 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/circular_stepper.py - ignoring
2020-03-15 19:02:50.372938 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/init.py - ignoring
2020-03-15 19:02:50.374762 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2020-03-15 19:02:50.377568 INFO AppDaemon: Initializing app mando1_controller using class HueDimmerController from module controllerx
HACS 0.23.2
I double checked the light and the controller id’s…
Any hints?
Thanks in advance…