šŸ’” Awesome HA Blueprints: A curated list of blueprints + easily create controller-based automations (remotes, switches,...) for controlling lights, media players, and more

Emphasis mine.

I agree, I think this is a great idea.

1 Like

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.

1 Like

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. :+1:

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.

1 Like

Hi there! :fire:

As suggested by @oncleben31 Iā€™ve built a static site for the curated blueprint collection, which is available here:

Awesome HA Blueprints website

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! :fire:

What are your thoughts on it guys?

Thank you for the feedback and suggestions you gave me so far!

2 Likes

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. :tada:

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. :+1:

Happy automating to everyone! :fire:

7 Likes

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 :frowning: . 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. :slight_smile:

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? :confused:

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!

Here is the screenshot:

JSON:

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. :slight_smile:

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. :tada:

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. :+1:

Thank you for your patience, and happy automating!