Add Google Blockly to Home Assistant

I just getting to know HA and came across this announcement from Google. Its a programming environment like MIT Scratch. It’s called Google Blocky and it generates Pytrhon code as well as others. It woul be great to add to HA

I also think that this would be the nicer integration for the automation UI as long as it could create the same yaml output. I often have ideas on what I could automate, but do not always have my notebook with me. I would love to have an easy way to create the automations on my phone or tablet.

1 Like

+1 - that’s the only thing from Domoticz (except from Charts) that I miss in HASS

So easy to do automation, when you actually see it.

1 Like

This would lower the entry level substantially for diginoobs!!

1 Like

+1 would love to have blockly. It would make automation a lot easier (at least for me).

2 Likes

+1 would be supergreat!

3 Likes

This has also been requested in Blocky style flow-based visual editor UI for automations & scripts using graphical blocks included by default

1 Like

Having blocking support would really be awesome.

I don’t like the native automation editor, it’s hard to keep good overview of all your logic.

Since one year I’m using Node Red, overview is great, but I’m still not any fan of it and I think this will never happen. Programming with messages is not intuitive.

Nobody interested in implementing this feature?

At the moment there is so much discussion regarding UX, this would be a good point to improve. Logic functionality is a core element of home automation. Openhab, domotics, iobroker, etc. are supporting blocky.

3 Likes

Blockly looks a ferry nice feature !

1 Like

Please add blockly, it will be very useful

1 Like

Please add blocky

Can HA’s UI have a built-in block-style graphical flow-based visual editor for automations & scripts?

Blockymonday

I have this feature request for Home Assistant and hope there is the right place for an open discussion, (have seen that there are a few similar discussions here but none that I could find as specific as this).

To make the programming of automations & scripts easier and more accessible to new users and beginners I would like to suggest that a simple and easy to use a web-based flow-based visual editor to allow drag-and-drop manipulating elements and conditions in automations & scripts was included by default in Home Assistant’s web-UI.

Wishing for an official ‘first-party’ visual editor of automations & scripts included as the default standard inside Home Assistant’s GUI (graphical user interface) for web-browsers that was specifically customized for Home Assistant and primarily designed for home automation enthusiast, meaning it should not only be designed for power-users and developers.

Simple web-based editor for visual drag-and-drop coding (using so-called graphical programming blocks) automation flows via the web-GUI would make it much easier for average home automation enthusiast who may be completely new to scripting automations to get started and get a visual overview of their automations & scripts from inside in Home Assistant’s web-GUI.

I want to highlight that my main point here is to express that a stong wish that some type of simple drag-and-drop flow-based visual editor for automations & scripts were included not just an option that can be installed but that an official first-party one was always included by default with Home Assistant and that it preferable was even pre-installed by default in Hass.io

As most here probably already know, there are several editor frameworks and libraries that could be used to achieve this; Node-RED perhaps being the most popular today (and it already have a plugin for Hass.io, but it is not built-in by default) though I personally prefer the interlocking-blocks style of “Blockly” and “Scratch Blocks” which makes coding look simple even to those new to scripting.

Blockly specifically is already used to create small scripts and elements for automation in some other home automation systems like Domoticz, ioBroker, Pulse Station, and Fibaro.

Back in 2017 there was a project to implement Blocky in Home Assistant but it has been abandoned:

https://github.com/bdurrer/home-assistant-blockly

Examples of an open-source home automation software that well know for using Blockly to enable simply programming of automations and scripting via drag-and-drop in its web-GUI is Domoticz (see Blockly - Domoticz and Automation - Domoticz )

Blockly (Blockly technology) upstream code is maintained by Google:

https://developers.google.com/blockly

Scratch Blocks by MIT builds on Google’s Blockly technology though aim to simplify its use further

https://scratch.mit.edu/developers

1 Like

FYI, learned that HABMin for OpenHAB does also contained a Blocky based Graphical Rule Designer:

https://github.com/openhab/org.openhab.ui.habmin/wiki/Graphical-Rule-Designer

A graphical rule designer is provided within HABmin . It provides a drag and drop interface to produce rule files - it may not support really complex rules (time will tell!), but the idea is that it provides a simple interface to produce the majority of rules that a user may want.

The image above shows the rule designer. On the left is a list of rules that have been developed with the interface, in the middle is the toolbox, and on the right is the rule workspace. To add blocks, drag them from the toolbox to the workspace. To delete blocks, simply drag them into the bin in the bottom left of the workspace.

Information on their block types for rules can be found here:

https://github.com/openhab/org.openhab.ui.habmin/wiki/Rule-Designer%3A-Building-Blocks

When you create and save a rule it generated a file you could use as conditions for automation.

Its graphical rules editor in HABmin for OpenHAB is however no longer activly maintained.

https://github.com/cdjackson/openhab-blockly

OpenHAB has today also a new rule engine with an experimental “Paper UI (PaperUI)” graphical UI:

https://www.openhab.org/docs/configuration/paperui.html

3 Likes

+1 from me. I’ve been using blockly on ioBroker bevore and it’s a beautiful intuitive way to create scripts or automations.

3 Likes

OpenHAB 3.0 now have Blockly visual graphical user interface for automation scripts logic as standard:

The new user interface also features a brand new way of designing your automation scripts using Blockly (opens new window), a tool to make your program visually by assembling blocks. Just beware that your kids do not take over your home automation with it!

This has also been requested in Add Google Blockly to Home Assistant

1 Like

I am actually interested in implementing this feature. I would like to get some feedback to see if it’s worth well.

My idea is to create a static webpage, where users can update the blueprint/script and the webpage will generate blocks that allow users to edit. Finally, output a new blueprint for users to download and consume.

TLDR:

  • independent static webpage (e.g. hosted on Github)
  • user import and export home assistance blueprint

If there is interest, I will continue to share my thought as I develop this idea

11 Likes

Yes there is definitely interest!

1 Like

It’s great to hear some interests. Can’t promise anything yet (busy with my day job && figuring out the best way to structure this).
I will update here when I made some progress.

Merry Christmas and happy new year to you all :slight_smile:

7 Likes

Hi @Ben3 … wondering if this ever went anywhere? Would love it too.

3 Likes