Emphasis mine.
I agree, I think this is a great idea.
Emphasis mine.
I agree, I think this is a great idea.
Interesting ideas.
Warning on the target population of the awesome list. Blueprints are very useful for newcomers. But a serious part of those newcomer are not at all confortable with GitHub.
On the contrary it will be very useful for Blueprints developers and advanced HA users.
A mitigation for the newcomers could be to generate from the awesome list a static website as done by Frenck for the HA awesome list.
Thatās a good point @oncleben31. I was considering it at first but then decided to start without setting up a static website. But thatās a tricky point, especially for newcomers, and an easy to use and browse content website would be much more user-friendly.
Iāll definitely implement this and keep you posted about its status here.
I also agree that, as you pointed out, using GitHub for managing the development of blueprints will be amazingly useful for anyone who would like to contribute.
Thank you very much for your feedback!
Definitely a great idea. The plans will be centrally located and for beginners certainly beneficial that they will not be scattered throughout the forum.
Emphasis on quality and functional plans is the most important thing.
Great and thank you.
Hi there!
As suggested by @oncleben31 Iāve built a static site for the curated blueprint collection, which is available here:
The site is still very basic and thereās certainly room for improvement but it already allows to browse and import blueprints with ease.
On the website you can browse blueprints organized by category (only automation blueprints are supported but if more categories are added, weāll easily add support for them).
In every blueprint specific page, thereās a button on the top right which allows you to copy to clipboard the URL for the blueprint YAML file. So no need to copy it manually, just click the button, then jump to Home Assistant and import the blueprint as usual!
What are your thoughts on it guys?
Thank you for the feedback and suggestions you gave me so far!
Hi there!
Iād like to inform you on the status of the Awesome HA Blueprints project.
In the last month Iāve been able to develop a few blueprints, with a huge help from the community which many times helped with debugging and suggested new features and enhancements.
In the last weeks Iāve noticed an interesting trend in the Community Forum: many of the proposed blueprints are used to create controller-based automations, like for example to control a light with a wireless switch. The main issue is that many of them essentially try to accomplish the same task, but with different controller models (IKEA, Aqara, etc.), integrations used to setup the controller (ZHA, Zigbee2MQTT, deCONZ, ZWave, etc.) and even type of objects to control (RGB lights, lights with white temperature control etc.). The result is a large collection of similar blueprints with a lot of duplicate code across the whole Blueprint Exchange category.
While thinking on how to tackle this issue, Iāve tried to come up with a solution to group all these similar blueprints in a blueprint ecosystem which would maximize flexibility and scalability. The idea is to only have a blueprint for each controller model, which should be able to handle events raised by the controller despite the integration used to connect it to HA, and a blueprint for each common use-case, such as light or media player control. Blueprints from these categories should then be able to ātalkā to each other and accomplish the task of building a controller-based automation.
Thatās why today Iām adding to the project two new categories of blueprints in addition to the existing Automations category: Controllers and Hooks.
Controllers are blueprints which allow to easily integrate a wide range of controllers (wall switches, remotes, dimmers, etc.) and use them to run a set of actions when interacting with them. They consist of a practical abstraction layer for easily building controlled-based automations without worrying about the handling of raw controller events, and the integration used to connect controllers to Home Assistant (Zigbee2MQTT, ZHA, deCONZ, ZWave, proprietary hubs, etc.).
Some of them also extend controller functionality by implementing virtual events not natively supported by the hardware (eg. double button press events).
Most importantly, beside providing action sequences to Controller blueprints to build a custom controller-based automation, you can connect Controllers with Hooks.
Hooks are blueprints which seamlessly integrate with Controllers to enable control of lights, media players and much more, without you ever writing a single line of code.
While Controllers are responsible for integrating the hardware and exposing an abstract interface to the user, Hooks can, as the name suggests, link to this interface and listen for events fired by a controller. Hooks take care of providing the actual control functionality for common use cases.
If you want to build a controller-based automation with Hooks, first create an automation with a Controller blueprint. You can then create an automation with the desired Hook blueprint, making sure that you provide the same controller device or entity used in the corresponding Controller blueprint. This key step will link the two automations and ensure the Hook will respond to events fired by the Controller.
For more flexibility, you can link multiple Hooks to the same Controller: just create a Controller automation, then build as many Hook automations as needed. Moreover, if you need to customize certain actions or extend a Hook functionality, you can provide custom actions to the Controller blueprint, which will be run when a certain event is raised.
The ultimate goal here is to build a blueprint ecosystem which would significantly reduce the effort required for building controller-based automations.
For now only two IKEA Controllers, light and media player Hooks are implemented but Iād like to expand the list of supported Controllers and available Hooks in the nearby future.
As always, if you have any feedback or suggestion on this Iād be really happy to hear your voice.
Happy automating to everyone!
Hi Matteo,
Firstly thanks for creating such a simple tool to help add devices. Iāve successfully added my IKEA 1734 (dimmer switch) so thought Iād try the Symfonisk rotary dial. However when I tried the Symfonisk, no luck at all . Iām not sure what Iāve done wrong, but I canāt get it to work.
It seems like itās receiving the Deconz event but then it just say āChoose: Error: undefinedā at the first ājunctionā.
Not sure what youād need to help me but hereās the YAML for the Blueprint, Iāve kept it simple to the one action:
alias: Controller - IKEA E1744 SYMFONISK Rotary Remote
description: ''
use_blueprint:
path: EPMatt/ikea_e1744.yaml
input:
integration: deCONZ
controller_device: 2b693812fe27c7423c4b4a40866fb814
action_rotate_left: []
action_rotate_right: []
action_click_short:
- type: toggle
device_id: dfca3eb0bd644a519ecde6b66352a9cb
entity_id: light.esperance_lamp
domain: light
rotate_left_loop: true
rotate_right_loop: true
Hi @AndrewF6, thank you for reporting here.
The automation config you posted looks good to me.
Weāre in the process of updating the E1744 blueprint, adding debouncing and some safety measures to prevent endless loops, in case the rotation stop events are not received. You can follow the discussion in the related Pull Request.
I hope weāll be able to complete tests and make the update publicly available in the next days. For now you can test the updated blueprint by importing it with the following link:
Please make sure to provide a valid text input entity for the helper_last_controller_event
input, since it will be required starting from the next blueprint version. If your issue is not solved with the update weāll proceed investigating it in detail.
Thank you for your patience.
I have setup a ācontrollerā blueprint with ZHA and pointed Controller Device to my philips hue dimmer.
I have no actions set in the controller.
I have then setup a āhookā pointed to the same philips hue dimmer and a light.group selected as light.
When I press any button on the dimmer nothing happens. In the automation page I can see ālast triggeredā updates on the ācontrollerā but NOT the āhookā.
Am I not getting how to setup this correctly or what?
Hi @maskfaen, thank you for reporting.
The procedure you followed to setup the controller and hook looks good to me.
Just to make sure everything is configured correctly, could you please post here the YAML for the two automations youāve setup? You can grab it by navigating to Configuration->Automations->Edit Automation (the pencil icon part of the automation row), then clicking on the 3 dots on the top right->Edit as YAML.
Thanks!
Thanks for helping me out. Here they are:
alias: Kontor controller dimmerswitch
description: ''
use_blueprint:
path: EPMatt/philips_324131092621.yaml
input:
integration: ZHA
controller_device: 3650af3c4f7da75b9062b2f3f71d2afb
action_button_on_short: []
helper_last_controller_event: input_text.kontor_last_controller_event
button_on_double_press: false
button_off_double_press: false
button_up_double_press: false
button_down_double_press: false
alias: Kontor hook light
description: ''
use_blueprint:
path: EPMatt/light.yaml
input:
light_color_mode: Hue - Saturation
controller_device: 3650af3c4f7da75b9062b2f3f71d2afb
controller_model: Philips Hue Dimmer switch
light: light.kontor
Hi @maskfaen, thank you for reporting.
The YAML config for your automations looks great to me. Do you notice any entries in the Home Assistant logs related to these blueprints?
Thanks for trying to help me!
In the logbook it only says " [Kontor controller dimmerswitch] has been triggered by event āzha_eventā "
And in the configuration ā Logs I canāt find anything related to any of the automations.
I also renamed the switch to kontor_dimmerswitch and restarted HA without any luck. The hook just wont fire.
Everything is on the latest update.
Switch in ZHA - device info:
RWL021
by Philips
Zigbee Coordinator
Firmware: 0x42006f9d
#### Zigbee info
IEEE: 00:17:88:01:04:e7:01:f5
Nwk: 0xc5f5
Device Type: EndDevice
LQI: 255
RSSI: -40
Last Seen: 2021-05-10T08:47:22
Power Source: Battery or Unknown
Quirk: zhaquirks.philips.rwlfirstgen.PhilipsRWLFirstGen
I now managed to turn on all logging and this is what I get when I press āonā
2021-05-12 11:48:40 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140539319689280] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "automation.kontor_controller_dimmerswitch", "old_state": {"entity_id": "automation.kontor_controller_dimmerswitch", "state": "on", "attributes": {"last_triggered": "2021-05-12T09:48:40.782401+00:00", "mode": "restart", "current": 1, "id": "1620547882828", "friendly_name": "Kontor controller dimmerswitch"}, "last_changed": "2021-05-12T09:47:05.833820+00:00", "last_updated": "2021-05-12T09:48:40.782449+00:00", "context": {"id": "bb3237639b060eae5167e92f78e2712f", "parent_id": "dcfa7d93fce927405a2bd2795db39434", "user_id": null}}, "new_state": {"entity_id": "automation.kontor_controller_dimmerswitch", "state": "on", "attributes": {"last_triggered": "2021-05-12T09:48:40.782401+00:00", "mode": "restart", "current": 0, "id": "1620547882828", "friendly_name": "Kontor controller dimmerswitch"}, "last_changed": "2021-05-12T09:47:05.833820+00:00", "last_updated": "2021-05-12T09:48:40.784337+00:00", "context": {"id": "bb3237639b060eae5167e92f78e2712f", "parent_id": "dcfa7d93fce927405a2bd2795db39434", "user_id": null}}}, "origin": "LOCAL", "time_fired": "2021-05-12T09:48:40.784337+00:00", "context": {"id": "bb3237639b060eae5167e92f78e2712f", "parent_id": "dcfa7d93fce927405a2bd2795db39434", "user_id": null}}}
2021-05-12 11:48:40 DEBUG (MainThread) [homeassistant.components.automation.kontor_controller_dimmerswitch] Automation triggered by event 'zha_event'
2021-05-12 11:48:40 INFO (MainThread) [homeassistant.components.automation.kontor_controller_dimmerswitch] Kontor controller dimmerswitch: Restarting
2021-05-12 11:48:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Kontor controller dimmerswitch, entity_id=automation.kontor_controller_dimmerswitch, source=event 'zha_event'>
2021-05-12 11:48:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.kontor_controller_dimmerswitch, old_state=<state automation.kontor_controller_dimmerswitch=on; last_triggered=2021-05-12T11:48:40.782401+02:00, mode=restart, current=0, id=1620547882828, friendly_name=Kontor controller dimmerswitch @ 2021-05-12T11:47:05.833820+02:00>, new_state=<state automation.kontor_controller_dimmerswitch=on; last_triggered=2021-05-12T11:48:40.787809+02:00, mode=restart, current=1, id=1620547882828, friendly_name=Kontor controller dimmerswitch @ 2021-05-12T11:47:05.833820+02:00>>
2021-05-12 11:48:40 INFO (MainThread) [homeassistant.components.automation.kontor_controller_dimmerswitch] Kontor controller dimmerswitch: Running automation actions
2021-05-12 11:48:40 INFO (MainThread) [homeassistant.components.automation.kontor_controller_dimmerswitch] Kontor controller dimmerswitch: Executing step setting variables
2021-05-12 11:48:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.kontor_controller_dimmerswitch, old_state=<state automation.kontor_controller_dimmerswitch=on; last_triggered=2021-05-12T11:48:40.787809+02:00, mode=restart, current=1, id=1620547882828, friendly_name=Kontor controller dimmerswitch @ 2021-05-12T11:47:05.833820+02:00>, new_state=<state automation.kontor_controller_dimmerswitch=on; last_triggered=2021-05-12T11:48:40.787809+02:00, mode=restart, current=0, id=1620547882828, friendly_name=Kontor controller dimmerswitch @ 2021-05-12T11:47:05.833820+02:00>>
2021-05-12 11:48:40 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140539490028512] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "automation.kontor_controller_dimmerswitch", "old_state": {"entity_id": "automation.kontor_controller_dimmerswitch", "state": "on", "attributes": {"last_triggered": "2021-05-12T09:48:40.782401+00:00", "mode": "restart", "current": 0, "id": "1620547882828", "friendly_name": "Kontor controller dimmerswitch"}, "last_changed": "2021-05-12T09:47:05.833820+00:00", "last_updated": "2021-05-12T09:48:40.784337+00:00", "context": {"id": "bb3237639b060eae5167e92f78e2712f", "parent_id": "dcfa7d93fce927405a2bd2795db39434", "user_id": null}}, "new_state": {"entity_id": "automation.kontor_controller_dimmerswitch", "state": "on", "attributes": {"last_triggered": "2021-05-12T09:48:40.787809+00:00", "mode": "restart", "current": 1, "id": "1620547882828", "friendly_name": "Kontor controller dimmerswitch"}, "last_changed":
Does that give any clues?
Cheers!
Hi @maskfaen, sorry for my late response.
Thank you so much for your detailed feedback. Your log confirms that the Hook is not activating at all.
I think we should check whether the Controller automation is correctly firing the event which triggers the Hook.
Please navigate to Developer Tools ā Events, then in the Listen for events form type ahb_controller_event
and click on Start Listening. Press the āonā button on the remote, then you should instantly see the event fired by the Controller automation. Please post the event here too, so we can check the correctness of data sent within it.
Thank you!
Thank you for the support!
When typing in āahb_controller_eventā i get nothing. But I typed in * and when pressing āonā I get:
{
"event_type": "state_changed",
"data": {
"entity_id": "automation.kontor_controller_dimmerswitch",
"old_state": {
"entity_id": "automation.kontor_controller_dimmerswitch",
"state": "on",
"attributes": {
"last_triggered": "2021-05-14T08:12:41.079807+00:00",
"mode": "restart",
"current": 1,
"id": "1620547882828",
"friendly_name": "Kontor controller dimmerswitch"
},
"last_changed": "2021-05-13T07:51:21.319442+00:00",
"last_updated": "2021-05-14T08:12:41.079945+00:00",
"context": {
"id": "87382eaaf6dc5a236a0e972150d9d125",
"parent_id": "052308eac9c246c9f1e8a7a1a4102874",
"user_id": null
}
},
"new_state": {
"entity_id": "automation.kontor_controller_dimmerswitch",
"state": "on",
"attributes": {
"last_triggered": "2021-05-14T08:12:41.079807+00:00",
"mode": "restart",
"current": 0,
"id": "1620547882828",
"friendly_name": "Kontor controller dimmerswitch"
},
"last_changed": "2021-05-13T07:51:21.319442+00:00",
"last_updated": "2021-05-14T08:12:41.088485+00:00",
"context": {
"id": "87382eaaf6dc5a236a0e972150d9d125",
"parent_id": "052308eac9c246c9f1e8a7a1a4102874",
"user_id": null
}
}
},
"origin": "LOCAL",
"time_fired": "2021-05-14T08:12:41.088485+00:00",
"context": {
"id": "87382eaaf6dc5a236a0e972150d9d125",
"parent_id": "052308eac9c246c9f1e8a7a1a4102874",
"user_id": null
}
}
Hi @maskfaen,
thank you for your feedback. The issue is the Controller blueprint not firing the ahb_controller_event
, which is used to trigger the Hook.
Could you please share screenshots and JSON from the Home Assistant automation trace tool, when you short press the āonā button?
You can access the trace tool by navigating to Configuration ā Automations, then clicking the clock icon on the automation you want to trace.
Thanks!
Hi @maskfaen, Iām sorry for my late response.
Could you please check which model is your Philips Hue Dimmer Switch?
This blueprint is for the older version of this controller (model no.324131092621).
Instead, we still donāt have a controller blueprint specifically for the newer device version (model no.929002398602) even though Iām planning to add it in the future.
By the way, If you own a newer Philips Hue Dimmer Switch I might prioritize the development of the related blueprint, so you can then start using the remote with the Controllers-Hooks ecosystem.
Thank you for your feedback!
Hi @AndrewF6
Iād like to inform you that Iāve published an update for the E1744 Controller blueprint which adds support for debouncing.
Debouncing allows to filter duplicate events which might be fired by this controller. This unexpected behaviour was reported for devices connected with the ZHA integration.
If you plan to update this blueprint, please read carefully the changelog and documentation, which also provides guidance on how to enable debouncing.
This update might solve the issue you were experiencing with this blueprint as well. If something is still not working as intended after the update, please let me know.
Thank you for your patience, and happy automating!