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

Update: please read this annoucement post. :rocket:

Hi there!

First of all, I’d like to express my appreciation to the community for the effort and energy put into making Home Assistant the absolute best home automation hub out there. :fire:

I was amazed by the new Blueprints feature which was introduced in the latest release; I think this could be a game-changing feature to help many new users getting started quickly with Home Assistant, but I found the need for a place where the community could share high quality curated blueprints, which can benefit from the power of open-source for constant improvement.

That’s why I decided to kick-start this repository:

This project aims to build a curated list of automation blueprints for Home Assistant, which can then be easily imported and updated in any Home Assistant instance. Each blueprint included in the collection will be:

  • Highly customizable and flexible to user needs, but still hiding the complexity of their internal working to the user;
  • Reliable on most situations and corner cases;
  • Fully maintained , collaboratively developed and tested by the community .

One of the main focuses of the project is on Reliability. With more and more people looking into home automation every day, it’s important that our smart homes run on reliable software. This includes not only server OSs, home automation hubs, and general services, but also the automations we use throughout the day.

The ultimate goal is to develop an highly valuable resource for Home Assistant newcomers who would like to include complex automations in their home automation setups with just a few clicks, without even touching a single line of code.

I’ve added a single example blueprint and I’ll add more in the next days, but to reach the goal of building a collection of reliable, high quality blueprints for empowering smart homes I need to ask for your help guys! :mega:

So if you’d like to step into this journey, adding your own blueprints, improving existing ones or simply submitting blueprint ideas which will then be built by the community, you’re welcome! Any contribution is highly appreciated. :fire:

Moreover, if you’ve any feedback or suggestion, I’d be really happy to hear your voice.

What do you think guys of this project?

Thank you very much for your time!

14 Likes

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!