xaviml / controllerx Goto Github PK
View Code? Open in Web Editor NEWCreate controller-based automations with ease to control your home devices and scenes.
Home Page: https://xaviml.github.io/controllerx/
License: MIT License
Create controller-based automations with ease to control your home devices and scenes.
Home Page: https://xaviml.github.io/controllerx/
License: MIT License
I have a light that I do not want to go under a specific value. I use a Lovelace slider that gives me a range of 5-255 in steps of 5, but while ControllerX does support setting the step size, the minimal value is always 1.
An extra configuration parameter min_value
(?), and for symmetry maybe also max_value
, that is used in the constructor of MinMaxStepper
.
I have considered using the new brightness_increase/_descrease
actions, but I would rather keep using ControllerX.
none
I'm connecting LED1624G9 and E1524/E1810 via Zigbee2mqtt 1.70. Toggling light and switching brightness works ok, but when I'm trying to change color it fails:
2019-12-01 13:39:00.355232 WARNING AppDaemon: ------------------------------------------------------------
2019-12-01 13:39:00.359574 WARNING AppDaemon: ------------------------------------------------------------
2019-12-01 13:39:00.359790 WARNING AppDaemon: Unexpected error in worker for App smallroom_light:
2019-12-01 13:39:00.360030 WARNING AppDaemon: Worker Ags: {'name': 'smallroom_light', 'id': UUID('2e48a534-872d-4309-adb9-9a96315ab91d'), 'type': 'attr', 'function': <bound method IkeaController.state of <z2m_ikea_controller.E1810Controller object at 0x7fc7f82df748>>, 'attribute': 'state', 'entity': 'sensor.0x90fd9ffffedc7ddd_action', 'new_state': 'arrow_right_click', 'old_state': 'arrow_right_click', 'kwargs': {'handle': UUID('05ae5341-804c-40ce-aba9-d777a16f787e')}}
2019-12-01 13:39:00.360199 WARNING AppDaemon: ------------------------------------------------------------
2019-12-01 13:39:00.360612 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 595, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/conf/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 70, in state
self.turn_on_light(attribute, value, sign, self.manual_steps)
File "/conf/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 96, in turn_on_light
new_state_attribute = old + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
2019-12-01 13:39:00.360769 WARNING AppDaemon: ------------------------------------------------------------
apps.yaml:
/conf/apps/apps.yaml
hello_world:
module: hello
class: HelloWorld
smallroom_light:
module: z2m_ikea_controller
class: E1810Controller
sensor: "sensor.0x90fd9ffffedc7ddd_action"
light: "light.0x90fd9ffffef3826c_light"
Use of Sonos SINGLE speaker works with current beta without need for any 'tweaks' ๐๐
But as Sonos group behaviour is somewhat unique, control of grouped speakers will only work with use of extra controllers (apps)
Volume control of Sonos speakers is individual - EVEN if grouped !
So changing one grouped speakers volume, won't change volume for remaining speakers in group.
A manual created Sonos speakers group in HA can overcome this issue. But then ControllerX app has no way of reading a source_list and hence can't change in between these with left/right_arrow_hold key.
A source_list (Favourites. Could be playlists, radio stations, podcasts etc.) is present for each single entity in HA. First entry in this list is always the 'master' speaker, followed by the 'slave' speakers. This list is dynamic and will update if changes are made in Sonos app or throught HA's Sonos integration (join/unjoin service calls). If no group is active (all single speakers) then source_list will contain the individual speakers entity only. If group contains two speakers out of three, then the speaker not grouped will still contain own entity in source_list.
Change to new source from source_list on one grouped speaker, will affect ALL grouped speakers. It doesn't matter whether it's the 'master' or any 'slave' speakers that the change has been made on.
So this sums up to:
ControllerX needs to know a speaker entity in order to read the source_list. So if single Sonos entity is used as media_player in eg. class E1810MediaPlayerController, then source_list can be changed. But volume changes will ONLY affect that single speaker and NOT the whole group.
If HA Sonos group is used instead, then volume will be applied to all speakers in group. But ControllerX can't change inbetween entries in source_list, as list is not exposed through the manual HA Sonos group. One downside of this is also if speakers in group are changed, then volume changes will still be applied to the 'original' static HA Sonos group. This could be solved in HA though, as changes to groups can be made via group service calls.
For now I've overcome this issue, by separating the source_list changes (left/right clicks in my setup) from a MediaPlayerController to a CustomMediaPlayerController (see below).
This way I can (through MediaPlayerController) control volume for whole group (group is still a 'static' HA group) and use pause/play. Flipping back/forth in source_list is handled by the CustomMediaPlayerController.
Wish:
Pheeww, hopefully the above description makes sence ?? ๐
Devices involved:
Model: IKEA E1810 as MediaPlayerController
Integration: z2m
AppDaemon version: v4.0.1
ControllerX version: v2.3.0b6
HACS version: v0.21.5
Home Assistant Core version: v0.105.3
sonos_media:
module: controllerx
class: E1810MediaPlayerController
controller: sensor.0x90fd9ffffe0cbd69_action
integration: z2m
volume_steps: 20
media_player: group.sonos_all
actions:
- toggle
- brightness_up_click
- brightness_down_click
# - arrow_left_click
# - arrow_right_click
# - arrow_left_hold
# - arrow_right_hold
- brightness_up_hold
- brightness_up_release
- brightness_down_hold
- brightness_down_release
sonos_source:
module: controllerx
class: CustomMediaPlayerController
controller: sensor.0x90fd9ffffe0cbd69_action
integration: z2m
media_player: media_player.stue
mapping:
arrow_left_click: previous_source
arrow_right_click: next_source
Tried to activate smooth_power_on feature but it seems not working (after press and hold dim up button I expect the lights to turn on). Lights do nothing and logs below appear.
Other functions are working.
AppDaemon: 4
hass-core: 0.105.2
Device: Ikea Control E1810 and E1743
Integration: zha
Logs (if applicable):
2020-02-07 22:34:54.185691 WARNING hall_controller: ------------------------------------------------------------
2020-02-07 22:34:54.187746 WARNING hall_controller: Unexpected error in worker for App hall_controller:
2020-02-07 22:34:54.189194 WARNING hall_controller: Worker Ags: {'id': '70a0b38623c543cc979ebc08af76b188', 'name': 'hall_controller', 'objectid': 'b503df8f82424d5aaddb12c918204000', 'type': 'event', 'event': 'zha_event', 'function': <bound method ZHAIntegration.callback of <core.integration.zha.ZHAIntegration object at 0x74f673a0>>, 'data': {'unique_id': '14:b4:57:ff:fe:7b:8b:f2:1:0x0008', 'device_ieee': '14:b4:57:ff:fe:7b:8b:f2', 'endpoint_id': 1, 'cluster_id': 8, 'command': 'move_with_on_off', 'args': [0, 83]}, 'pin_app': True, 'pin_thread': 3, 'kwargs': {'device_ieee': '14:b4:57:ff:fe:7b:8b:f2', '__thread_id': 'MainThread'}}
2020-02-07 22:34:54.190399 WARNING hall_controller: ------------------------------------------------------------
2020-02-07 22:34:54.193131 WARNING hall_controller: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 725, in async_worker
await funcref(args["event"], data, args["kwargs"])
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/integration/zha.py", line 22, in callback
await self.controller.handle_action(action)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/controller.py", line 108, in handle_action
await action(*args)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/controller.py", line 28, in _action_impl
await method(self, *args, **kwargs)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/type/light_controller.py", line 318, in hold
await super().hold(attribute, direction)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/controller.py", line 28, in _action_impl
await method(self, *args, **kwargs)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/controller.py", line 179, in hold
stop = await self.hold_loop(*args)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/type/light_controller.py", line 321, in hold_loop
return await self.change_light_state(
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/type/light_controller.py", line 348, in change_light_state
new_state_attribute, exceeded = stepper.step(old, direction)
File "/config/appdaemon/apps/controllerx/apps/controllerx/core/stepper/minmax_stepper.py", line 21, in step
new_value = value + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
2020-02-07 22:34:54.194219 WARNING hall_controller: ------------------------------------------------------------
After installing controllerx via HACS and restarting my appdaemon installation (running in hass.io), I see this error listed below.
bathroom_controller:
module: controllerx
class: HueDimmerController
controller: 0d74e3aef3bb4f569e40eb8da7d20555
integration: deconz
light: light.bulb_bathroom```
## Logs
```text
2020-02-22 17:52:00.328668 WARNING bathroom_controller: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 820, in check_app_updates
await self.init_object(app)
File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 271, in init_object
modname = await utils.run_in_executor(self, __import__, app_args["module"])
File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 276, in run_in_executor
response = future.result()
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/appdaemon/apps/controllerx/controllerx.py", line 7, in <module>
from devices.ikea import *
ModuleNotFoundError: No module named 'devices'
Add any other context or screenshots about the bug here.
I love the smooth_power_on feature.
It would be great if you could extent the functionality to all 4 outer buttons on the E1524 with the following or similar mapping if pushed while the light is off:
That would be great. Maybe you could define new actions from this like "brightness_up_from_off".
It would be even greater, if this mapping was also user configurable. For example like:
brightness_up_from_off:
brightness: 1
mireds: 327
brightness_down_from_off:
brightness: 255
mireds: previous
arrow_left_from_off:
brightness: previous
mireds: 153
and so on.
This would maybe tie in with issue #12.
Thanks a lot!
In the controller device pages (e.g. https://xaviml.github.io/controllerx/controllers/E1766) we have 1 section for each device support (light, switch, cover or media player). Each of them has an example configuration and right now for any device support different than light, we see examples like:
example_app:
module: controllerx
class: E1766CoverController
controller: < controller_id >
integration: < deconz >
light: < light_entity >
which light: < light_entity >
should be: cover: < cover_entity >
Hello
i tryed your controller and ran into some errors.
If i only control one light (tryed different HUE Gos, Stripes aso) it nearly runs fine.
On/Off and dimming works. Only the "arrow_right_click" and "arrow_left_click" has no function.
Is there a way to loop through colors?
But if im trying to run this on a group only ON/OF Works. No dimming.
group:
office_light:
module: z2m_ikea_controller
class: E1810Controller
sensor: sensor.switch_office_ikea_action
light: group.grp_office2
manual_steps: 10
automatic_steps: 10
delay: 350
groups.yaml
grp_office2:
name: grp_office2
entities:
- light.hue_go_2
- light.buro_stribe_oben
- light.buro_stripe_fenster
- light.hue_go_1
- light.buro_lampe
- light.buro_stripe_schreibtisch
Errors:
[14:06:40] INFO: Starting AppDaemon...
2020-01-03 14:06:42.391978 INFO AppDaemon Version 3.0.5 starting
2020-01-03 14:06:42.392427 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
2020-01-03 14:06:42.396381 INFO AppDaemon: Starting Apps
2020-01-03 14:06:42.404093 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2020-01-03 14:06:42.618902 INFO AppDaemon: HASS: HASS Plugin Initializing
2020-01-03 14:06:42.619654 INFO AppDaemon: HASS: HASS Plugin initialization complete
2020-01-03 14:06:42.620232 INFO Dashboards are disabled
2020-01-03 14:06:42.620495 INFO API is disabled
2020-01-03 14:06:42.634363 INFO AppDaemon: HASS: Connected to Home Assistant 0.103.5
2020-01-03 14:06:42.735547 INFO AppDaemon: Got initial state from namespace default
2020-01-03 14:06:44.844279 INFO AppDaemon: Reading config
2020-01-03 14:06:44.855316 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2020-01-03 14:06:44.855630 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2020-01-03 14:06:44.855902 INFO AppDaemon: App 'office_light' added
2020-01-03 14:06:44.856149 INFO AppDaemon: App 'check_config' added
2020-01-03 14:06:44.856669 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2020-01-03 14:06:44.857126 INFO AppDaemon: Adding /config/appdaemon/apps/z2m_ikea_controller to module import path
2020-01-03 14:06:44.857558 INFO AppDaemon: Adding /config/appdaemon/apps/check-config to module import path
2020-01-03 14:06:44.858481 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py
2020-01-03 14:06:44.874622 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/check-config/checkconfig.py
2020-01-03 14:06:44.875876 INFO AppDaemon: Initializing app office_light using class E1810Controller from module z2m_ikea_controller
2020-01-03 14:06:44.876422 INFO AppDaemon: Initializing app check_config using class CheckConfig from module checkconfig
2020-01-03 14:06:44.995844 INFO AppDaemon: App initialization complete
2020-01-03 14:07:10.481449 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:10.481865 WARNING AppDaemon: Unexpected error in worker for App office_light:
2020-01-03 14:07:10.482249 WARNING AppDaemon: Worker Ags: {'name': 'office_light', 'id': UUID('4a21da2f-adf5-49df-a74b-92e586893d82'), 'type': 'attr', 'function': <bound method IkeaController.state of <z2m_ikea_controller.E1810Controller object at 0xb4b79850>>, 'attribute': 'state', 'entity': 'sensor.switch_office_ikea_action', 'new_state': 'brightness_up_click', 'old_state': '', 'kwargs': {'handle': UUID('28768823-559e-4409-8f57-a6d81887fa26')}}
2020-01-03 14:07:10.482491 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:10.490500 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:10.496304 WARNING AppDaemon: Unexpected error in worker for App office_light:
2020-01-03 14:07:10.497154 WARNING AppDaemon: Worker Ags: {'name': 'office_light', 'id': UUID('4a21da2f-adf5-49df-a74b-92e586893d82'), 'type': 'attr', 'function': <bound method IkeaController.state of <z2m_ikea_controller.E1810Controller object at 0xb4b79850>>, 'attribute': 'state', 'entity': 'sensor.switch_office_ikea_action', 'new_state': 'brightness_up_click', 'old_state': 'brightness_up_click', 'kwargs': {'handle': UUID('28768823-559e-4409-8f57-a6d81887fa26')}}
2020-01-03 14:07:10.497394 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:10.516978 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/appdaemon/appdaemon.py", line 595, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 70, in state
self.turn_on_light(attribute, value, sign, self.manual_steps)
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 96, in turn_on_light
new_state_attribute = old + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'2020-01-03 14:07:10.517844 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/appdaemon/appdaemon.py", line 595, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 70, in state
self.turn_on_light(attribute, value, sign, self.manual_steps)
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 96, in turn_on_light
new_state_attribute = old + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'2020-01-03 14:07:10.518100 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:10.518330 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:46.204777 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:46.205412 WARNING AppDaemon: Unexpected error in worker for App office_light:
2020-01-03 14:07:46.206014 WARNING AppDaemon: Worker Ags: {'name': 'office_light', 'id': UUID('4a21da2f-adf5-49df-a74b-92e586893d82'), 'type': 'attr', 'function': <bound method IkeaController.state of <z2m_ikea_controller.E1810Controller object at 0xb4b79850>>, 'attribute': 'state', 'entity': 'sensor.switch_office_ikea_action', 'new_state': 'arrow_right_click', 'old_state': '', 'kwargs': {'handle': UUID('28768823-559e-4409-8f57-a6d81887fa26')}}
2020-01-03 14:07:46.206571 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:46.215012 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/appdaemon/appdaemon.py", line 595, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 70, in state
self.turn_on_light(attribute, value, sign, self.manual_steps)
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 96, in turn_on_light
new_state_attribute = old + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'2020-01-03 14:07:46.215758 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:46.216676 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:46.217146 WARNING AppDaemon: Unexpected error in worker for App office_light:
2020-01-03 14:07:46.217968 WARNING AppDaemon: Worker Ags: {'name': 'office_light', 'id': UUID('4a21da2f-adf5-49df-a74b-92e586893d82'), 'type': 'attr', 'function': <bound method IkeaController.state of <z2m_ikea_controller.E1810Controller object at 0xb4b79850>>, 'attribute': 'state', 'entity': 'sensor.switch_office_ikea_action', 'new_state': 'arrow_right_click', 'old_state': 'arrow_right_click', 'kwargs': {'handle': UUID('28768823-559e-4409-8f57-a6d81887fa26')}}
2020-01-03 14:07:46.218539 WARNING AppDaemon: ------------------------------------------------------------
2020-01-03 14:07:46.225092 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/appdaemon/appdaemon.py", line 595, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 70, in state
self.turn_on_light(attribute, value, sign, self.manual_steps)
File "/config/appdaemon/apps/z2m_ikea_controller/z2m_ikea_controller.py", line 96, in turn_on_light
new_state_attribute = old + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'2020-01-03 14:07:46.225878 WARNING AppDaemon: ------------------------------------------------------------
System | Raspbian GNU/Linux 10 (buster)
with manually installed zigbee2mqtt, mqtt broker and hass.io on top
latest versions
Hi' Xavi.
HA automation for single button switches to do dimming is not impossible but quite complicated ๐
As Xiaomi Aqara/Mija switches are of good quality and extremely well priced, you should consider to include dimming support for these as well. I believe that the Xiaomi buttons are widely known and used in the HA/Z2M community.
Typical single button Xiaomi devices are:
Xiaomi Aqara wireless switch WXKG12LM and Xiomi Mija wireless switch WXKG01LM
(I have both and can test code if needed ๐)
Both types supports single, double, long click etc. Both, I believe, up to quadruple clicks and the Aqara also supports shake control. So plenty of possibilities to do special actions on lights as well.
Let me know if you find this interesting and need help beta testing ๐
Regards
Henning
Hi' Xavi
There's an issue with toggle
function for Ikea bulbs on z2m
integration (perhaps also other integrations as well. Haven't had time yet to check Hue bridge behaviour)
If lights are turned off with any transition period specified, then lights will only come on again at lowest brightness. HA state has correct brightness, but bulb has not !!
Example: Automation for a hallway sensor to turn off a group of hallway lights after a certain period with no movement. This is done with a transition period for eg. 1 seconds
If lights afterwards are turned on again via ControllerX app (toggle button), then previous brightness is not restored to bulbs - only HA states.
Solution: Always call toggle
event with transition attribute set
@action
async def off(self, **attributes):
if "transition" not in attributes:
attributes["transition"] = self.transition / 1000
self.call_service("homeassistant/turn_off", entity_id=self.light["name"], transition=attributes["transition"])
@action
async def toggle(self, **attributes):
if "transition" not in attributes:
attributes["transition"] = self.transition / 1000
self.call_service("homeassistant/toggle", entity_id=self.light["name"], transition=attributes["transition"])
Above change to lightcontroller.py should handle this nicely.
Can't think of any other problems above change would do to other aspects of app ?
I've included transition to turn_off
function as well, just to make it turn off nicely with a transition - if specified ๐
Tested for now with both Ikea WS (White Spectrum) and Ikea color bulbs on z2m.
Not tested yet: Ikea and Hue bulbs behavior on Hue bridge.
z2m
office_test:
module: controllerx
class: E1810Controller
controller: sensor.0xec1bbdfffe1b99e8_action #Ikea 5 button remote
integration: z2m
#transition: 1000 #transition attribute works on Hue bridge
smooth_power_on: true
light: light.0x90fd9ffffe838cb3_light # Color bulb office
actions:
- arrow_left_hold
- arrow_left_release
- arrow_right_hold
- arrow_right_release
- arrow_right_click
- arrow_left_click
- brightness_up_click
- brightness_down_click
- brightness_up_release
- brightness_down_release
- brightness_up_hold
- brightness_down_hold
- toggle
- toggle_hold
Hi' Xavi.
I'm currently in the proces of 'Tasmotizing' all my in wall/ceiling outlets with Shelly's flashed with Tasmota.
With latest Tasmota release, Switchmode 11 has been introduced. This gives me the opportunity to refit all my wall switches with a spring, so they'll act like a one button switch.
Switchmode 11 gives the user ability to toggle and dim the lights with only one button ๐ Lights to be dimmed, of course needs to be smart bulbs ๐
Reference to pull request: arendst/Tasmota#7603
I've already set up one switch and are using ControllerX for controlling toggle and dimming.
But with a hijacked 'pseudo' virtual Aqara switch, I can't eg. control 'HOLD FROM OFF' function. As there's only one button and nothing to be mapped :-) I would like to have SYNC function called instead of SMOOTH POWER ON on the wall switches. Also the implementation of the dimming in Tasmota sends continuous HOLD commands until RELEASE is send. This issue needs to be dealt with in some way as well (filtered out).
For now I've one MQTT sensor in HA that's get's all the switch commands from Tasmota and acts directly as 'virtual' controller in the ControllerX app ๐
All MQTT calls could be done directly from the Tasmota rules. But with my current setup I'm using HA automations as well to 'filter out' the continuous HOLD commands.
Tasmota sw switch with dimming capability
Tasmota switch - Push button mode with Switchmode 11
Tasmota v8.2.0
MQTT commands from Tasmota to HA sensor are all easily handled in Tasmota RULES.
RULES can also automatically handle if MQTT server is unavailable and then switch light via relay instead.
Four states in total are send from Tasmota (read as direct MQTT commands or state from HA sensor)
States are not 'cleared' as with normal Zigbee switches after first MQTT call.
ControllerX don't seem to mind this. Except with the continuous HOLD calls)
Switchstate=2 = toggle (Normal TOGGLE function. One single pres)
Switchstate=4 = inc-dec (HOLD function. But HOLD is sent continuously until RELEASE is send !)
Switchstate=5 = inv (INVERSE dim direction fuction. Not needed in ControllerX, as
ControllerX handles this internally)
Switchstate=6 = clear (Normal RELEASE function. Send when button is released)
I can provide current set-up if needed and I'll make the documentation to explain how to implement ๐ This way people can make they 'dumb' switches smart and experience extremely easy setup via ControllerX ๐๐๐
Hello. I'm not sure if problem is up to ControllerX, HA or Z2M and I don't know how to find out, so I'm starting from here. The problem is controlling the brightness level of gq8b1uv dimmer, while the simple turn on/off works fine. I'm trying to control it's brightness using IKEA E1524's color buttons (and therefore using CustomLightController
) because I want brightness buttons to control other Tradfri bulb. The controllerX throws an error, as given below. The exact same config works if I just replace the light
attribute with Tradfri bulb.
Please try to point me in the right direction.
Using latest versions of everything as of today
livingroom_controller3:
module: controllerx
class: CustomLightController
controller: sensor.0x90fd9ffffef5c2dd_action
integration: z2m
light: light.0xec1bbdfffec3e6d1_light
mapping:
arrow_right_hold: hold_brightness_up
arrow_right_release: release
arrow_left_hold: hold_brightness_down
arrow_left_release: release
2020-04-25 10:29:36.242690 INFO livingroom_controller3: ๐ฎ Button event triggered: `arrow_left_hold`
2020-04-25 10:29:36.251647 INFO livingroom_controller3: ๐ Running `hold_brightness_down` now
2020-04-25 10:29:36.284769 WARNING livingroom_controller3: ------------------------------------------------------------
2020-04-25 10:29:36.286975 WARNING livingroom_controller3: Unexpected error in worker for App livingroom_controller3:
2020-04-25 10:29:36.289458 WARNING livingroom_controller3: Worker Ags: {'id': '41e5a0fb0e0f476bb4415e62d3bf588f', 'name': 'livingroom_controller3', 'objectid': '01625a3a198c4a96bd0d13e9d1fc10ca', 'type': 'state', 'function': <bound method StateIntegration.callback of <core.integration.z2m.Z2MIntegration object at 0x7f296587a0a0>>, 'attribute': 'state', 'entity': 'sensor.0x90fd9ffffef5c2dd_action', 'new_state': 'arrow_left_hold', 'old_state': '', 'pin_app': True, 'pin_thread': 3, 'kwargs': {'__thread_id': 'MainThread'}}
2020-04-25 10:29:36.291992 WARNING livingroom_controller3: ------------------------------------------------------------
2020-04-25 10:29:36.295965 WARNING livingroom_controller3: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 709, in async_worker
await funcref(entity, attr, old_state, new_state, self.AD.state.sanitize_state_kwargs(app, args["kwargs"]))
File "/config/appdaemon/apps/controllerx/core/integration/state.py", line 15, in callback
await self.controller.handle_action(new)
File "/config/appdaemon/apps/controllerx/core/controller.py", line 141, in handle_action
await self.call_action(action_key)
File "/config/appdaemon/apps/controllerx/core/controller.py", line 159, in call_action
await self.action_timer_callback({"action_key": action_key})
File "/config/appdaemon/apps/controllerx/core/controller.py", line 170, in action_timer_callback
await action(*args)
File "/config/appdaemon/apps/controllerx/core/controller.py", line 31, in _action_impl
await method(self, *args, **kwargs)
File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 383, in hold
await super().hold(attribute, direction)
File "/config/appdaemon/apps/controllerx/core/controller.py", line 31, in _action_impl
await method(self, *args, **kwargs)
File "/config/appdaemon/apps/controllerx/core/controller.py", line 260, in hold
stop = await self.hold_loop(*args)
File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 386, in hold_loop
return await self.change_light_state(
File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 419, in change_light_state
new_state_attribute, exceeded = stepper.step(old, direction)
File "/config/appdaemon/apps/controllerx/core/stepper/minmax_stepper.py", line 21, in step
new_value = value + sign * step
TypeError: can only concatenate str (not "float") to str
2020-04-25 10:29:36.301402 WARNING livingroom_controller3: ------------------------------------------------------------
2020-04-25 10:29:40.550613 INFO livingroom_controller3: ๐ฎ Button event triggered: `arrow_left_release`
2020-04-25 10:29:40.558527 INFO livingroom_controller3: ๐ Running `release` now
Firstly, light is turned on using brightness_down_click
and then I try to turn the brightness down using arrow_left_hold
zigbee2mqtt:info 2020-04-25 10:28:50: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'brightness_down_click'
zigbee2mqtt:info 2020-04-25 10:28:50: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":55,"battery":47,"action":"brightness_down_click"}'
zigbee2mqtt:info 2020-04-25 10:28:50: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":55,"battery":47,"action":""}'
zigbee2mqtt:info 2020-04-25 10:28:53: MQTT publish: topic 'zigbee2mqtt/0xec1bbdfffec3e6d1', payload '{"state":"ON","linkquality":68,"brightness":"254.00","level":1000}'
zigbee2mqtt:info 2020-04-25 10:29:49: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":47,"battery":34}'
zigbee2mqtt:info 2020-04-25 10:29:49: MQTT publish: topic 'homeassistant/device_automation/0x90fd9ffffef5c2dd/action_arrow_left_hold/config', payload '{"automation_type":"trigger","type":"action","subtype":"arrow_left_hold","payload":"arrow_left_hold","topic":"zigbee2mqtt/0x90fd9ffffef5c2dd/action","device":{"identifiers":["zigbee2mqtt_0x90fd9ffffef5c2dd"],"name":"0x90fd9ffffef5c2dd","sw_version":"Zigbee2mqtt 1.12.2","model":"TRADFRI remote control (E1524/E1810)","manufacturer":"IKEA"}}'
zigbee2mqtt:info 2020-04-25 10:29:49: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":47,"battery":34,"action":"arrow_left_hold"}'
zigbee2mqtt:info 2020-04-25 10:29:49: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":47,"battery":34,"action":""}'
zigbee2mqtt:info 2020-04-25 10:29:49: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'arrow_left_hold'
zigbee2mqtt:info 2020-04-25 10:29:53: MQTT publish: topic 'homeassistant/device_automation/0x90fd9ffffef5c2dd/action_arrow_left_release/config', payload '{"automation_type":"trigger","type":"action","subtype":"arrow_left_release","payload":"arrow_left_release","topic":"zigbee2mqtt/0x90fd9ffffef5c2dd/action","device":{"identifiers":["zigbee2mqtt_0x90fd9ffffef5c2dd"],"name":"0x90fd9ffffef5c2dd","sw_version":"Zigbee2mqtt 1.12.2","model":"TRADFRI remote control (E1524/E1810)","manufacturer":"IKEA"}}'
zigbee2mqtt:info 2020-04-25 10:29:53: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":44,"battery":34,"action":"arrow_left_release","duration":4.78}'
zigbee2mqtt:info 2020-04-25 10:29:54: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":44,"battery":34,"action":""}'
zigbee2mqtt:info 2020-04-25 10:29:54: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'arrow_left_release'
I'm having a problem with CustomLightController
while controlling IKEA tradfri bulb with E1524 controller. While toggle
and on_full_brightness
work fine, automatic brightness changing does not. Namely, holding the brightness down button does start automatic dimming, but releasing it does not stop. Lamp continues dimming to "brightness":1
and is locked there until AppDaemon restart. The same applies for brightness up and color changing - release does not stop the process and the lamp gets stuck in the extreme state. Please observe z2m logs and see that a button was released, but the lamp continued dimming.
This happens only if using CustomLightController
. The E1810Controller
works fine.
livingroom_lights:
module: controllerx
class: CustomLightController
controller: sensor.0x90fd9ffffef5c2dd_action
integration: z2m
light: light.0xd0cf5efffe1f06e5_light
mapping:
toggle: toggle
brightness_up_click: on_full_brightness
# brightness_down_click: on_min_brightness
brightness_up_hold: hold_brightness_up
brightness_down_hold: hold_brightness_down
# arrow_right_click: on_full_color_temp
# arrow_left_click: on_min_color_temp
arrow_right_hold: hold_color_up
arrow_left_hold: hold_color_down
info 2020-03-23 13:25:52: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'toggle'
info 2020-03-23 13:25:52: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":"toggle"}'
info 2020-03-23 13:25:52: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":""}'
info 2020-03-23 13:25:52: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"OFF","brightness":255,"color_temp":249}'
info 2020-03-23 13:25:54: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'toggle'
info 2020-03-23 13:25:54: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":"toggle"}'
info 2020-03-23 13:25:54: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":""}'
info 2020-03-23 13:25:54: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":255,"color_temp":249}'
info 2020-03-23 13:25:59: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'brightness_down_hold'
info 2020-03-23 13:25:59: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":"brightness_down_hold"}'
info 2020-03-23 13:25:59: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":""}'
info 2020-03-23 13:25:59: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":229,"color_temp":249}'
info 2020-03-23 13:26:00: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":204,"color_temp":249}'
info 2020-03-23 13:26:00: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'brightness_down_release'
info 2020-03-23 13:26:00: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":"brightness_down_release"}'
info 2020-03-23 13:26:00: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":""}'
info 2020-03-23 13:26:00: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":178,"color_temp":249}'
info 2020-03-23 13:26:01: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":153,"color_temp":249}'
info 2020-03-23 13:26:01: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":127,"color_temp":249}'
info 2020-03-23 13:26:01: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":102,"color_temp":249}'
info 2020-03-23 13:26:02: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":77,"color_temp":249}'
info 2020-03-23 13:26:02: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":51,"color_temp":249}'
info 2020-03-23 13:26:02: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":26,"color_temp":249}'
info 2020-03-23 13:26:03: MQTT publish: topic 'zigbee2mqtt/0xd0cf5efffe1f06e5', payload '{"state":"ON","brightness":1,"color_temp":249}'
info 2020-03-23 13:26:12: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'brightness_up_hold'
info 2020-03-23 13:26:12: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":"brightness_up_hold"}'
info 2020-03-23 13:26:12: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":""}'
info 2020-03-23 13:26:14: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd/action', payload 'brightness_up_release'
info 2020-03-23 13:26:14: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":"brightness_up_release"}'
info 2020-03-23 13:26:14: MQTT publish: topic 'zigbee2mqtt/0x90fd9ffffef5c2dd', payload '{"linkquality":39,"battery":34,"action":""}'
It would be nice to create issue templates for better managing and organizing bug reports and feature requests in the future.
The different issue types could be:
Each of the templates would include info regarding the specific issue e.g. for New device support type we could include a placeholder for device name, device manufacturer and mappings for the controller.
@xaviml if you think that's a good idea I'd be happy to help with it and work on the templates.
Controllerx: 2.0.0
HA: 0.104.3
Deconz: 5.1
I have connected two E1810 controllers without problems.
Now I want to add a E1743 controller, but it doesn't work.
As I understand it, the E1743 is the small square one with 'I' and 'O' printed on it.
The app I've created for this looks like this:
bathroom:
module: controllerx
class: E1743Controller
event_id: bathroom_dimmer
light: light.bathroom_mirror
If I move one of the E1810 controllers to this, then it works.
I actually need it to control a group, but for simplicity, I've changed it to a single light.
Hi there!
Great plugin, thank you - saved me a lot of time and frustration. I just wanted to report that the Symfonisk controller, E1744, works quite well with this automation. It's not quite perfectly smooth dimming, but it's close enough for my purposes.
I think you could update your table to include the following; bearing in mind that the E1744 doesn't have the same 'rotate_x_quick' actions that the ICTC-G-1 has:
Model | Controller type | Class | Actions
ICTC-G-1 | Light | ICTCG1Controller | rotate_left, rotate_right, rotate_stop
You could optionally update the code to differentiate the Controller class, however the E1744 controller works fine with the ICTC-G-1 class.
Thanks again!
Right now, the app alows to link specific devices to lights or media player. However, it does not allow to add a custom controller through yaml configuration.
Describe the bug
Well, it appdaemon just dumps a lot of warnings in the logfile
Other than that it works great :-)
Device:
Integration: deconz
Logs (if applicable):
020-02-07 21:10:48.356177 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/const.py - ignoring
2020-02-07 21:10:48.358735 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/controllerx/controllerx.py
2020-02-07 21:10:48.431266 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/controller.py - ignoring
2020-02-07 21:10:48.434196 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/__init__.py - ignoring
2020-02-07 21:10:48.437083 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/minmax_stepper.py - ignoring
2020-02-07 21:10:48.440097 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/circular_stepper.py - ignoring
2020-02-07 21:10:48.443183 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/__init__.py - ignoring
2020-02-07 21:10:48.446287 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/zha.py - ignoring
2020-02-07 21:10:48.450829 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/z2m.py - ignoring
2020-02-07 21:10:48.453846 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/__init__.py - ignoring
2020-02-07 21:10:48.456788 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/deconz.py - ignoring
2020-02-07 21:10:48.459360 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/type/light_controller.py - ignoring
2020-02-07 21:10:48.462449 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/type/__init__.py - ignoring
2020-02-07 21:10:48.466531 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/type/media_player_controller.py - ignoring
2020-02-07 21:10:48.470419 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/philips.py - ignoring
2020-02-07 21:10:48.480015 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/aqara.py - ignoring
2020-02-07 21:10:48.485823 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/__init__.py - ignoring
2020-02-07 21:10:48.489147 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/ikea.py - ignoring
Trying to add repo (https://github.com/xaviml/controllerx) to HACS but it fails.
An error ocoured while processing
Exception: HacsException
Message: Repostitory structure for v2.3.1 is not compliant
Could not add this repository, make sure it is compliant with HACS.
HACS 0.23.1
Whenever on
and off
keywords are specified in app configuration, ControllerX won't work as expected.
I experienced this bug while working on a custom light controller with an IKEA E1743 configured with the z2m integration, which exposes on
and off
actions for the controller, but this issue is related to every use of the on
and off
keywords in yaml configuration.
I discovered this is due to the fact that, according to YAML specification, on
and off
are interpreted as True
and False
respectively.
One of the possible solutions is to always specify these 2 values wrapped in single quotes ('on'
and 'off'
). Therefore they will be treated as strings and won't evaluate to boolean values.
z2m
This is an example of a faulty configuration. Observe on
and off
keys and values not wrapped in single quotes.
example_app:
module: controllerx
class: CustomLightController
controller: sensor.mycontroller
integration: z2m
light: light.mylight
mapping:
brightness_up: hold_brightness_up
brightness_down: hold_brightness_down
brightness_stop: release
on: on
off: off
The solution is to wrap on
and off
keywords in single quotes.
example_app:
module: controllerx
class: CustomLightController
controller: sensor.mycontroller
integration: z2m
light: light.mylight
mapping:
brightness_up: hold_brightness_up
brightness_down: hold_brightness_down
brightness_stop: release
'on': 'on'
'off': 'off'
This issue could be solved by asking users to always wrap these values when writing the configuration (adding an entry in the docs), or doing some sort of pre-processing whenever on
or off
are expected to be passed to ControllerX but True
or False
are received instead.
button_X_single
: 1 clickbutton_X_double
: 2 clicksbutton_X_triple
: 3 clicksbutton_X_hold
: hold buttonbutton_X_release
: release buttonfor WXCJKG11LM, X goes from 1 to 2 (1 is left; 2 is right)
for WXCJKG12LM, X goes from 1 to 4 (1 is top left; 2 is top right; 3 is bottom left; 4 is bottom right)
This information came from @DasLetzteEinhorn from here
yes
The switch emits an event if you press the main button for around 4 to 5 seconds. Its id is 1001
. Could we add support for that, as well?
None
Add any other context or screenshots about the feature request here.
If possible, provide the event mappings for the different actions that can be performed on the controller. Specify the integration.
If you can provide mappings for multiple integrations, copy the section below as many times as needed.
button_z_press (up)
: 1002button_z_hold (up)
: 1003button_z_press (down)
: 2002button_z_hold (down)
: 2003(Optional) Additional notes for the integration, eg. known bugs, issues or limitations of the device for the specified integration.
Describe the bug
I use a Ikea round dimmer for my kitchen lights, 4 off the same type of light bulb and this works fine.
Now I had 2 new lights bulbs in the living room e14 and e27, whit the smal dimmer. They works fine in ha and I can dim the lights together whit a light card entetie . The switch works fine on both lamps, but when I group the lights I can only set them on and off.
Is this right of are I am doing somting wrong.
Device:
Integration: Choose from z2m
Logs (if applicable):
Hi Xavi -
I have a SmartThings button that I have hanging around that I use with NodeRED and I thought, now that custom controller support is added, I should integrate it into ControllerX. Anyway, I found that the zha.py
integration does not play nice as the args
structure is different with this controller vs. the Ikea ones.
I added a samin.py
file to cover the controller for light and media, but it didn't work as expected when using zha. After looking at the integration it appears that it was getting confused with the args. I'm hoping you can think of a way to make processing of ZHA args more robust to encompass a broad range of controllers, using this one as an example.
I've made a PR that works around it by excluding the commands from args processing, but it's a total hack and needs a better solution.
zha
N/A
These are the three events fired for the Samjin Button so you can see the structure
Single Press
{
"event_type": "zha_event",
"data": {
"unique_id": "28:6d:97:00:01:04:4a:a9:1:0x0500",
"device_ieee": "28:6d:97:00:01:04:4a:a9",
"endpoint_id": 1,
"cluster_id": 1280,
"command": "button_single",
"args": {
"press_type": "single",
"command_id": 0,
"args": [
1,
0,
0,
0
]
}
},
"origin": "LOCAL",
"time_fired": "2020-02-22T02:02:08.079362+00:00",
"context": {
"id": "3aa8b5d8183240eabea80082b46729d9",
"parent_id": null,
"user_id": null
}
}
Double Press
{
"event_type": "zha_event",
"data": {
"unique_id": "28:6d:97:00:01:04:4a:a9:1:0x0500",
"device_ieee": "28:6d:97:00:01:04:4a:a9",
"endpoint_id": 1,
"cluster_id": 1280,
"command": "button_double",
"args": {
"press_type": "double",
"command_id": 0,
"args": [
2,
0,
0,
0
]
}
},
"origin": "LOCAL",
"time_fired": "2020-02-22T02:02:09.849708+00:00",
"context": {
"id": "28fe8cd893c4441cbb4ee07fb9220c8f",
"parent_id": null,
"user_id": null
}
}
Long Press/Hold
{
"event_type": "zha_event",
"data": {
"unique_id": "28:6d:97:00:01:04:4a:a9:1:0x0500",
"device_ieee": "28:6d:97:00:01:04:4a:a9",
"endpoint_id": 1,
"cluster_id": 1280,
"command": "button_hold",
"args": {
"press_type": "hold",
"command_id": 0,
"args": [
3,
0,
0,
0
]
}
},
"origin": "LOCAL",
"time_fired": "2020-02-22T02:02:11.973167+00:00",
"context": {
"id": "dd74314b28e6438b8a02a9dba4ff75ff",
"parent_id": null,
"user_id": null
}
}
I've filed a PR (#34) so you can see what I've done.
The device has 2 buttons, each one with 2 states:
day/night
: either sun
or moon
full/low
: either full
or low
(30%) (only for E1745)timer
: any value between 60 and 600, represents the time in seconds the light should remain on (only for E1525)Two type of events can be sent:
Command : on_with_timed_off
, args:
[0, xx, 0]
: Sent when a movement has been detected and the light needs to be turned on (either because day/night == sun
or day/night == moon
and not enough light)[1, xx, 0]
: Sent when a movement has been detected and the light does not need to be turned on (because day/night == moon
and there is enough light)See the notes for the xx
value.
When full/low == low
, before sending the turn on the light event
(on_with_timed_off
with [0, xx, 0]
), another event is sent:
command: move_to_level_with_on_off
, args: [76, 1]
To replicate the behavior when paired with the IKEA gateway:
on_with_timed_off
with [1, xx, 0]
, do nothing.on_with_timed_off
with [0, xx, 0]
, turn on the light at the desired level and start a timer for 1800s to turn off the light if there hasn't been any other movement.move_to_level_with_on_off
with [76, 1]
, set brightness
to 76
for the next turn on (or change the brightness if light is on) (only for E1745).on_with_timed_off
with [0, xx, 0]
during the timer, reset the timer.The E1745 is a newer version. From what I observed, it sends events on a less regular basis (once every ~100 seconds vs once every second).
The E1525 does not support low light but supports a customizable timer on the back of the device (between 60 and 600 seconds). This value will be reflected in the second argument. The value is always 1800 for E1745 which does not support customizing the timer.
E1745 docs: https://www.ikea.com/fr/fr/manuals/tradfri-detecteur-de-mouvement-sans-fil__AA-2145280-2_pub.pdf
Since the E1745 does not support customizing the "on" duration, the adapter should be configurable to use either the 1800s from the payload or an override from the configuration. Since the E1745 only sends events once every ~100s, we might want to either restrict the override value or at least log a warning when setting a value lower than this threshold: the light might blink.
If possible, provide the event mappings for the different actions that can be performed on the controller. Specify the integration.
If you can provide mappings for multiple integrations, copy the section below as many times as needed.
button_1_single
: Sent when button 1 is pressedbutton_1_double
: Sent when button 1 is pressed twicebutton_1_hold
: Sent when button 1 is pressed and holdbutton_1_release
: Sent when button 1 release from holdbutton_2_single
: Sent when button 2 is pressedbutton_2_double
: Sent when button 2 is pressed twicebutton_2_hold
: Sent when button 2 is pressed and holdbutton_2_release
: Sent when button 2 release from holdbutton_3_single
: Sent when button 3 is pressedbutton_3_double
: Sent when button 3 is pressed twicebutton_3_hold
: Sent when button 3 is pressed and holdbutton_3_release
: Sent when button 3 release from holdbutton_4_single
: Sent when button 4 is pressedbutton_4_double
: Sent when button 4 is pressed twicebutton_4_hold
: Sent when button 4 is pressed and holdbutton_4_release
: Sent when button 4 release from holdbutton_5_single
: Sent when button 5 is pressedbutton_5_double
: Sent when button 5 is pressed twicebutton_5_hold
: Sent when button 5 is pressed and holdbutton_5_release
: Sent when button 5 release from holdbutton_6_single
: Sent when button 6 is pressedbutton_6_double
: Sent when button 6 is pressed twicebutton_6_hold
: Sent when button 6 is pressed and holdbutton_6_release
: Sent when button 6 release from holdFor now i don't have access to z2m, but i got the button mapping from my friend. Till today Deconz integrations with Opple isn`t working, but when it will be a will update this issue.
The Opple has 2, 4 and 6 switch i only have the 6, but button mapping probably is the same like 6 version.
I have a couple of Hue Dimmer switches. I would like to detect a double press on a button which is not natively supported.
For example, in the bathroom, I have motion sensor which cannot see inside the shower. Thus, I'd like to activate a shower mode where the motion sensor is disabled.
Have composite events like double press that are not natively supported.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
Hello - I'm trying to use the E1744 controller with ZHA and ran into the following issue. This is my first use of AppDaemon so I could have done something wrong, and I had to setup the appdaemon.yaml and apps.yaml manually, I believe because I installed the AppDaemon hass.io (home assistant now) plugin after I had installed controllerx via HACS. Here is the log & apps.yaml config:
2020-02-08 16:20:40.115178 INFO AppDaemon: Initializing app test_controller using class E1744LightController from module controllerx
2020-02-08 16:20:40.116050 WARNING test_controller: ------------------------------------------------------------
2020-02-08 16:20:40.116359 WARNING test_controller: Unexpected error initializing app: test_controller:
2020-02-08 16:20:40.116629 WARNING test_controller: ------------------------------------------------------------
2020-02-08 16:20:40.117096 WARNING test_controller: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 820, in check_app_updates
await self.init_object(app)
File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 279, in init_object
"object": app_class(
File "/usr/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/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'
test_controller:
module: controllerx
class: E1744LightController
controller: (ieee address)
integration: zha
light: light.hue_color_lamp_1
I'd like to control outlets as easily as lights
Meaning the config snippet should be as small as possible if I just want to map the on/off buttons of my remote to the outlet.
Though I haven't tried yet, I guess this can be achieved more verbosely with a custom controller calling services.
The IKEA smart outlet (fr: https://www.ikea.com/fr/fr/p/tradfri-prise-connectee-20364476/) is cheap and can be bought with a E1743 switch.
It's exposed as a switch in home assistant.
It would be nice to load all these devices in ZHA and pair them with controllerx.
I don't know how hard it would be, but I'm willing to contribute, if someone could point me in the right direction for where to start! ๐
If a controller has 10 actions and we want to use all of them except one, we need to add all of them in the actions
except for the one that we do not want to use. Here is an example of a configuration where we do not want to use the toggle
action.
livingroom_light:
module: controllerx
class: E1810Controller
controller: sensor.livingroom_controller_action
integration: z2m
light: light.livingroom
smooth_power_on: true
actions:
- toggle_hold
- brightness_up_click
- brightness_down_click
- arrow_left_click
- arrow_right_click
- brightness_up_hold
- brightness_up_release
- brightness_down_hold
- brightness_down_release
- arrow_left_hold
- arrow_left_release
- arrow_right_hold
- arrow_right_release
What I would like is to have an option of adding the excluded actions, so the opposite of what we have now. The previous configuration would look like:
livingroom_light:
module: controllerx
class: E1810Controller
controller: sensor.livingroom_controller_action
integration: z2m
light: light.livingroom
smooth_power_on: true
excluded_actions:
- toggle
Also, when this feature is added, actions
and excluded_actions
won't be able to coexist in the same configuration, so we would be able to use one or the other or none, but not both at the same time.
I'm not sure but, looking at the code, this app doesn't seem to support events coming from deconz: am I right?
If it is not supported, this could be considered a feature request.
Thanks.
My Ikea E1743 is not working while I think I've setup everything correct. If someone could help me out that would be appreciated!
configuration.yaml
system_packages: []
python_packages:
- PyMySQL
init_commands: []
appdaemon.yaml
appdaemon:
latitude: ...
longitude: ...
elevation: 2
time_zone: Europe/Amsterdam
plugins:
HASS:
type: hass
http:
url: http://192.168.1.5:5050
hadashboard:
admin:
api:
apps.yaml
slaapkamer_switch_x:
module: controllerx
class: E1743Controller
controller: sensor.slaapkamer_switch_click
integration: z2m
light: light.slaapkamer_spots
actions:
- on
- off
- on
- off
- brightness_up
- brightness_down
- brightness_stop
eetkamer_switch_x:
module: controllerx
class: E1743Controller
controller: sensor.eetkamer_switch_click
integration: z2m
light: light.eetkamer_verlichting
actions:
- on
- off
- brightness_up
- brightness_down
- brightness_stop
AppDaemon
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: AppDaemon 4
Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
Add-on version: 0.2.3
You are running the latest version of this add-on.
System: HassOS 3.12 (amd64 / qemux86-64)
Home Assistant Core: 0.106.6
Home Assistant Supervisor: 209
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] appdaemon.sh: executing...
Looking in links: https://wheels.hass.io/alpine-3.11/amd64/
Collecting PyMySQL
Downloading https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl (47kB)
Installing collected packages: PyMySQL
Successfully installed PyMySQL-0.9.3
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[cont-init.d] appdaemon.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[01:14:34] INFO: Starting AppDaemon...
2020-03-15 01:14:35.461525 INFO AppDaemon: AppDaemon Version 4.0.3 starting
2020-03-15 01:14:35.461749 INFO AppDaemon: Python version is 3.8.2
2020-03-15 01:14:35.461883 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2020-03-15 01:14:35.462049 INFO AppDaemon: Added log: AppDaemon
2020-03-15 01:14:35.462240 INFO AppDaemon: Added log: Error
2020-03-15 01:14:35.462497 INFO AppDaemon: Added log: Access
2020-03-15 01:14:35.462710 INFO AppDaemon: Added log: Diag
2020-03-15 01:14:35.485416 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2020-03-15 01:14:35.513329 INFO HASS: HASS Plugin Initializing
2020-03-15 01:14:35.513592 INFO HASS: HASS Plugin initialization complete
2020-03-15 01:14:35.514007 INFO AppDaemon: Initializing HTTP
2020-03-15 01:14:35.514334 INFO AppDaemon: Using 'ws' for event stream
2020-03-15 01:14:35.527207 INFO AppDaemon: Starting API
2020-03-15 01:14:35.530988 INFO AppDaemon: Starting Admin Interface
2020-03-15 01:14:35.531492 INFO AppDaemon: Starting Dashboards
2020-03-15 01:14:35.552255 INFO HASS: Connected to Home Assistant 0.106.6
2020-03-15 01:14:35.591179 WARNING AppDaemon: File '/config/appdaemon/apps/controllerx/apps.yaml' duplicate app: slaapkamer_switch_x - ignoring
2020-03-15 01:14:35.591633 WARNING AppDaemon: File '/config/appdaemon/apps/controllerx/apps.yaml' duplicate app: eetkamer_switch_x - ignoring
2020-03-15 01:14:35.592205 INFO AppDaemon: App 'slaapkamer_switch_x' added
2020-03-15 01:14:35.592645 INFO AppDaemon: App 'eetkamer_switch_x' added
2020-03-15 01:14:35.593316 INFO AppDaemon: Found 2 total apps
2020-03-15 01:14:35.593879 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2020-03-15 01:14:35.595487 INFO AppDaemon: Running on port 5050
2020-03-15 01:14:35.600957 INFO HASS: Evaluating startup conditions
2020-03-15 01:14:35.617340 INFO AppDaemon: Got initial state from namespace default
2020-03-15 01:14:35.681348 INFO AppDaemon: New client Admin Browser connected
2020-03-15 01:14:37.604382 INFO AppDaemon: Scheduler running in realtime
2020-03-15 01:14:37.608925 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2020-03-15 01:14:37.609425 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx to module import path
2020-03-15 01:14:37.609835 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/devices to module import path
2020-03-15 01:14:37.610164 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/core to module import path
2020-03-15 01:14:37.610500 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/core/type to module import path
2020-03-15 01:14:37.610832 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/core/stepper to module import path
2020-03-15 01:14:37.611267 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/core/integration to module import path
2020-03-15 01:14:37.648994 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/controllerx/controllerx.py
2020-03-15 01:14:37.679926 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/const.py - ignoring
2020-03-15 01:14:37.681888 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/smartthings.py - ignoring
2020-03-15 01:14:37.683638 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/aqara.py - ignoring
2020-03-15 01:14:37.685075 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/ikea.py - ignoring
2020-03-15 01:14:37.686822 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/trust.py - ignoring
2020-03-15 01:14:37.688637 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/__init__.py - ignoring
2020-03-15 01:14:37.690622 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/philips.py - ignoring
2020-03-15 01:14:37.692422 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/devices/lutron.py - ignoring
2020-03-15 01:14:37.694121 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/light_features.py - ignoring
2020-03-15 01:14:37.695724 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/controller.py - ignoring
2020-03-15 01:14:37.697302 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/__init__.py - ignoring
2020-03-15 01:14:37.698923 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/custom_controller.py - ignoring
2020-03-15 01:14:37.700969 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/type/light_controller.py - ignoring
2020-03-15 01:14:37.702690 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/type/__init__.py - ignoring
2020-03-15 01:14:37.704390 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/type/media_player_controller.py - ignoring
2020-03-15 01:14:37.706143 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/minmax_stepper.py - ignoring
2020-03-15 01:14:37.707567 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/__init__.py - ignoring
2020-03-15 01:14:37.708985 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/stepper/circular_stepper.py - ignoring
2020-03-15 01:14:37.710066 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/z2m.py - ignoring
2020-03-15 01:14:37.713264 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/state.py - ignoring
2020-03-15 01:14:37.715584 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/deconz.py - ignoring
2020-03-15 01:14:37.717264 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/zha.py - ignoring
2020-03-15 01:14:37.718702 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/core/integration/__init__.py - ignoring
2020-03-15 01:14:37.719939 INFO AppDaemon: Initializing app slaapkamer_switch_x using class E1743Controller from module controllerx
2020-03-15 01:14:37.721845 INFO AppDaemon: Initializing app eetkamer_switch_x using class E1743Controller from module controllerx
2020-03-15 01:14:37.737896 INFO AppDaemon: App initialization complete
Z2M
zigbee2mqtt:info 2020-03-15 01:15:49: MQTT publish: topic 'zigbee2mqtt/eetkamer_switch', payload '{"update_available":true,"linkquality":60,"battery":87,"click":"off"}'
zigbee2mqtt:info 2020-03-15 01:15:49: MQTT publish: topic 'zigbee2mqtt/eetkamer_switch', payload '{"update_available":true,"linkquality":60,"battery":87,"click":""}'
The counter in AppDaemon counts up on a button press and I do see the topic being posted in Z2M. I've verified the entity used of the light I'm trying to switch and that entity also shows up in the web interface of AppDaemon.
https://i.gyazo.com/fa7c2ad8748f1e0f50560201d422f17e.png
https://i.gyazo.com/86f1231aca98f0968ddec92b1fa2a08e.png
https://i.gyazo.com/71f22fef96fe2ebd0e371fd67aacdc19.png
I just found out that brightness functionality does work, it's just the on and off not working
'Single tap' on button volume up/down only changing volume on device by 0.02
(Very slow. Need 50 'single taps' to get from zero volume to full volume).
When volume button (up/down) is pressed and held, volume only changes 7 or 8 'steps' (of 0.02) and then stops - Eg. from 0.16 to 0.30 (No continuous volume up/down).
Info: HA range for Sonos volume: 0.00 to 1.00 (with 2 decimals).
HA direct service call also adjust volume with same amount (0.02) as ControllerX.
AppDaemon: 4
Hass-core: 0.105.2
Device: Ikea remote E1810 / Sonos One/Play:5/Play:1 speakers. Only tested with single Sonos speakers (no groups)
Integration: z2m
Logs: None (No errors. Only slow volume adjusting ๐)
When I go to bed, I'd like to have a light on for 5 mins. So I'd like to have an option in controllerx to fire the action only after a period of time has expired after the event occurred.
Maybe an activate_after
option with its value in seconds.
An alternative could be a timer configured in HA but I somehow would prefer to configure it in one place.
Add any other context or screenshots about the feature request here.
If possible, provide the event mappings for the different actions that can be performed on the controller. Specify the integration.
If you can provide mappings for multiple integrations, copy the section below as many times as needed.
Button | Sensor Value
No buttons pressed = 0 | **ON** (top button) = 1 | **FAVORITE** (middle round) = 2 | **OFF** (bottom) = 4 | **RAISE** (up arrow) = 8 | **LOWER** (down arrow) = 16
With the above integration the remote becomes a 'sensor' for home assistant. I tried to edit your py file to work with the Pico Remotes but I'm not a skilled python programmer and could not get it to work.
If you could do this that would be great, or if you could tell me how I could update my version of the app.
Thank you for the time and the app is great.
Hello,
I can't see the project in HACS (searching for z2m ikea).
Also can't add the custom repo manually (xaviml/z2m_ikea_controller).
I think is because it's looking for this URL:
https://api.github.com/repos/xaviml/z2m_ikea_controller/contents/custom_components
Smoth power on does not work with Zigpy and E1810.
Brightness long press does not increase/decrease brightness with E1810
Both features works with E1473 on the same lighs
Sorry for report this again, I finally had sometime to try various combinations and try sort this out.
This is same as #24 but now, I have more information.
Smooth power on does not work with E1810 controller. I have two of them, assigned to two different set of lights but both do not work with smooth power on.
Behavior:
all single press works (toggle lighs, bright up/down and change color temp).
All long press does not work.
With controller E1743:
Notice that light.kitchen_master
is a light group. We already talked about that light.group
might not work, but it works with E1473 controller. I also changed the above to a single light device and group of lights (instead light group). All configurations presented same behavior.
zha
with bellows
for radio interfacekitchen1_controller:
module: controllerx
class: E1810Controller
controller: cc:cc:cc:xx:xx:xx
integration: zha
smooth_power_on: true
light: light.kitchen_master
kitchen2_controller:
module: controllerx
class: E1743Controller
controller: 14:b4:57:xx:xx:xx
integration: zha
smooth_power_on: true
light: light.kitchen_master
2020-02-28 16:27:09.144879 WARNING AppDaemon: ------------------------------------------------------------
2020-02-28 16:27:10.149001 WARNING AppDaemon: ------------------------------------------------------------
2020-02-28 16:27:10.150253 WARNING AppDaemon: Unexpected error in scheduler loop
2020-02-28 16:27:10.151342 WARNING AppDaemon: ------------------------------------------------------------
2020-02-28 16:27:10.152895 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/scheduler.py", line 421, in loop
next_entries = self.get_next_entries()
File "/usr/lib/python3.8/site-packages/appdaemon/scheduler.py", line 335, in get_next_entries
next_exec = datetime.datetime.now(pytz.utc).replace(year=3000)
ValueError: day is out of range for month
This log started to happen today, don't think it is related to the problem.
There are no logs from the ZHA when long presses are done with lights off.
With lights on, ZHA emits:
2020-02-28 16:30:19 WARNING (MainThread) [zigpy.zcl] Data remains after deserializing ZCL frame
2020-02-28 16:30:22 WARNING (MainThread) [zigpy.zcl] Data remains after deserializing ZCL frame
One at the start of the long press, another on the release. Nothing more (I set log leve for debug).
Thanks for your good work. If you need any other information, I will gladly provide.
Best regards.
Yes. According to [1], deconz reports long and short presses for that switch. I would like to make use of that in my automations.
[1] https://www.home-assistant.io/integrations/deconz/#remote-control-devices
A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
When brightning the light up to full brightness, it changes quick rather than with a small transition.
I propose to add a new attribute transition
for the light controller that will take by default 300ms, but the user will be able to change through yaml. Any change to the light it will include this transition. So if changing the light to full brightness, you will see a smooth change rather than a quick transition.
However, this transition won't be used when holding brightness up/down, it will use the delay as it was now.
Nothing.
Not needed.
Hi!
It's not clear to me if it's possible with the E1810Controller
to controll the different light colors from the IKEA lamps. Nothing happens when pushing the right and left arrow with the following configuration. I tried to manually config actions on the buttons but I havent been able to get anything working. It can turn the light off/on and dim the lights which is great but the last bit is missing - thanks.
2.0.022
deconz
v4.0.3
v2.4.2
v0.23.2
livingroom_controller:
module: controllerx
class: E1810Controller
controller: tradfri_remote_control
integration: deconz
light: light.stue
I really love the log messages created by the automoli
app. I would love to see something similar in controllerx, maybe only for the debug log level.
I might have a look on how to improve this on controllerx if desired.
2020-03-29 12:04:35.701286 INFO livingroom_automoli: ๐ก AutoMoLi - Wohnzimmer
2020-03-29 12:04:35.703831 INFO livingroom_automoli:
2020-03-29 12:04:35.705986 INFO livingroom_automoli: room: Wohnzimmer
2020-03-29 12:04:35.708520 INFO livingroom_automoli: delay: 1:40min โ 100sec
2020-03-29 12:04:35.710670 INFO livingroom_automoli: daytimes:
2020-03-29 12:04:35.713301 INFO livingroom_automoli: day:
2020-03-29 12:04:35.715607 INFO livingroom_automoli: starttime: 06:00
2020-03-29 12:04:35.718332 INFO livingroom_automoli: light: 100
2020-03-29 12:04:35.720528 INFO livingroom_automoli: evening:
2020-03-29 12:04:35.723246 INFO livingroom_automoli: starttime: 20:30
2020-03-29 12:04:35.725549 INFO livingroom_automoli: light: 90
2020-03-29 12:04:35.728295 INFO livingroom_automoli: night:
2020-03-29 12:04:35.730711 INFO livingroom_automoli: starttime: 23:30
2020-03-29 12:04:35.733409 INFO livingroom_automoli: light: 40
2020-03-29 12:04:35.735516 INFO livingroom_automoli: illuminance:
2020-03-29 12:04:35.738006 INFO livingroom_automoli: - sensor.lightlevel_45
2020-03-29 12:04:35.740461 INFO livingroom_automoli: illuminance_threshold: 40
2020-03-29 12:04:35.742604 INFO livingroom_automoli: motion_state_on: on
2020-03-29 12:04:35.744880 INFO livingroom_automoli: motion_state_off: off
2020-03-29 12:04:35.747639 INFO livingroom_automoli: lights:
2020-03-29 12:04:35.749825 INFO livingroom_automoli: - switch.treppe
2020-03-29 12:04:35.751973 INFO livingroom_automoli: active_daytime: day
2020-03-29 12:04:35.754049 INFO livingroom_automoli: sensors_illuminance:
2020-03-29 12:04:35.756582 INFO livingroom_automoli: - sensor.lightlevel_45
2020-03-29 12:04:35.758608 INFO livingroom_automoli: event listeners:
2020-03-29 12:04:35.760512 INFO livingroom_automoli: - binary_sensor.motionlivingroom
2020-03-29 12:04:35.762530 INFO livingroom_automoli:
...
2020-03-29 12:07:19.202544 INFO kitchen_automoli: ๐ก Kรผche turned on โ brightness: 100%
2020-03-29 12:10:20.123854 INFO livingroom_automoli: ๐ no motion in Wohnzimmer since 100s โ turned off
2020-03-29 12:07:19.202544 INFO kitchen_automoli: ๐ก Kรผche turned on โ brightness: 100%
2020-03-29 12:10:20.123854 INFO livingroom_automoli: ๐ no motion in Wohnzimmer since 100s โ turned off
A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
Hi @xaviml
So HA 0.104.3, ControllerX 2.1.0.
Deconz integration.
Buttons for Controller E1743 from IKEA are reversed.
i'm getting this error when i add to HACS:
An error ocoured while prosessing
['Repostitory structure not compliant']
Could not add this repository, make sure it is compliant with HACS.
Any way to resolve it?
thanks!
The sync
action only changes the brightness to the maximum level, however, we also want the light to be set at 2700K or in a white colour
Firstly, thanks for this very cool project!
I see that you recently added Deconz support and I was just wondering if you would consider zha support as well.
Seems like you already have some framework for event listening for Deconz.
Zha puts out events on zha_event with a device_ieee (instead of event_id) issues commands with args as necessary.
For example, for a ICTC-G-1 an event is this:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:0b:57:ff:fe:2c:37:f0:1:0x0008",
"device_ieee": "00:0b:57:ff:fe:2c:37:f0",
"endpoint_id": 1,
"cluster_id": 8,
"command": "move_with_on_off",
"args": [
0,
195
]
},
"origin": "LOCAL",
"time_fired": "2020-01-22T01:14:32.409810+00:00",
"context": {
"id": "0bc078cec3c34adcb9d0a3d11b9629ac",
"parent_id": null,
"user_id": null
}
}
Not sure how much work this would be, but thanks for considering it!
Hi
I'm trying to assign multiple lights to a single controller.
I know I can group them, but I'd like to avoid that.
Are dictionaries as light:
supported?
And if so, how do I define them
Thanks :)
IKEA 1810
as Controller
deconz
v4.0.2.3
v2.3.1
v0.22.1
v0.106.4
N/A
N/A
As pr. the documentation, the key
can either be string
or dictionary
. And furthermore, if lights is a dictionary, I should provide a name
.
I assume a config like this would be valid:
awesome_controller:
module: controllerx
class: E1810Controller
controller: mah_remote
integration: deconz
light:
- name: light.greatest
- name: light.awesomest
I looked at code too, and it seems to be aware of using dics
controllerx/apps/controllerx/core/type/light_controller.py
Lines 242 to 250 in 1809f2f
But this bit confuses me. Doesn't seem to account for string/dic.
controllerx/apps/controllerx/core/type/light_controller.py
Lines 74 to 76 in 1809f2f
I'm trying to use the example in the docs, as the E1810 is already paired to the bulbs directly, I would like for it to handle the color cycling.
deconz
kitchen_dinnertable:
module: controllerx
class: E1810Controller
controller: dinnertable_control
integration: deconz
light: group.dinnertable
actions:
- arrow_left_hold
- arrow_left_release
- arrow_right_hold
- arrow_right_release
- arrow_right_click
- arrow_left_click ```
## Logs
```text
For some reason the colous doesn't change, I can't figure out what I did wrong?
The controller name is fetched from deconz_event.
HI
Is there any possibility that you can add Xiaomi Aqara devices? like the Double rocker etc.
Would be greate. having problem with the "dimming" control and if it would work like the ikea trรฅdfri controllers i would be very glad
//Christoffer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.