Extending Blockly with new openHAB commands

Announcement

A new major addition to Blockly has been contributed to the lastest version 3.3M6. It contains the following

Auto-Expansion of openHAB section

From now on the openHAB section is automatically expanded (on non-mobile devices)

image

A new Help Button

From now on, each openHAB section contains a “button” that sends you directly to the documentation page of that section by clicking on the grey “Help” button. For example this Help button

opens the page https://www.openhab.org/docs/configuration/blockly/rules-blockly-timers-and-delays.html

I hope that this will allow learning the blocks even faster because more people will know that there is comprehensive documentation without having to search for it (thanks Tweini from the blockly community for helping me here)

Comprehensive Extension to Datetime

Based on @deibich 's block library many new blocks are now available in openHABs Blockly and have been made even more flexible (note that it is not completely the same). Here is a visual representation of the blocks available:


image

As this is part of 3.3 which is not released yet, you can find the new documentation only at next.openhab.org for the time being:

https://next.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html

(thanks Tweini from the blockly community for helping me on some of the really tricky things here)

Logging

The log block has become more flexible. Previously you were only able to attach string blocks. Now you can attach any block returning a value and it tries to do its best to print out the blocks return value.

CRLF block

In some cases it is necessary to insert a line feed into a string. This can now be achieved via the CRLF block like in the following example (thanks to @Confectrician for requesting it). It can be found in the text section:

2 Likes