Blockly youtube links (#1882)
* [blockly] finalize blockly docs for M3.3 Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> * [blockly docs] remove MD025 check Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> * [blockly] add topic specific youtube video links to documentation Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> * Update configuration/blockly/rules-blockly-standard-ext.md Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Update configuration/blockly/rules-blockly-standard-ext.md Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Update configuration/blockly/rules-blockly-logging.md Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Markdown fix Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Markdown fix Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Markdown fix Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * [blockly]move reference to top of page, link videos internally Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> Signed-off-by: Jerome Luckenbach <github@luckenba.ch> Co-authored-by: Jerome Luckenbach <github@luckenba.ch>pull/1886/head
parent
79428e52bd
commit
be6f32d6bd
|
@ -32,8 +32,9 @@ All of these provide general functionality that is not specific to openHAB itsel
|
|||
However, to leverage the full capabilities more than *50 specific blocks* have been provided that are tailored for easy access of openHAB's capabilities.
|
||||
|
||||
This section provides a detailed description of the specific blocks and provides examples on how to use them. Note that some of the blocks (like voice, streaming or notifications) need some special setup within openHAB - in these case links to the respective documentation is provided.
|
||||
Also see this ![youtube](../images/blockly/youtube-logo-small.png) [Intro](https://youtu.be/EdllUlJ7p6k?t=295) Quick Intro Blockly Rules
|
||||
|
||||
**Looking for help**
|
||||
## Looking for help
|
||||
|
||||
A special mention should go towards the **Help** entry in a block context menu [right click on any block](rules-blockly-before-using.html#block-context-menu) that links to a resource that is usually very helpful to understand the context of that particular block.
|
||||
To retrieve the particular help for a block right click on a block to open the context menu and click on the **help**-entry:
|
||||
|
@ -46,12 +47,68 @@ There is also a help-button available in each section that links to the document
|
|||
|
||||
Please read this information first before asking questions in the forum. *In case you ask for help please always post the respective code that is being generated.*
|
||||
|
||||
Also there is a good intro about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Various Help Documentation available in openHAB Blocky](https://youtu.be/EdllUlJ7p6k?t=1589)
|
||||
|
||||
## Before using blockly
|
||||
|
||||
Please visit [Getting started with openHAB Blocklies](rules-blockly-before-using.html) before asking questions in the forum
|
||||
|
||||
## Blockly Youtube Tutorials
|
||||
|
||||
Three Youtube tutorials have been made available via the [openHAB Youtube channel](https://www.youtube.com/c/OpenhabOrg):
|
||||
|
||||
- [Episode 1](https://www.youtube.com/watch?v=EdllUlJ7p6k)
|
||||
- [Introduction](https://www.youtube.com/watch?v=EdllUlJ7p6k)
|
||||
- [Quick Intro Blockly Rules](https://youtu.be/EdllUlJ7p6k?t=295)
|
||||
- [Debugging Rules with OpenHAB Developer Tools to watch Item-Status](https://youtu.be/EdllUlJ7p6k?t=325)
|
||||
- [Creating a Blockly Rule](https://youtu.be/EdllUlJ7p6k?t=429)
|
||||
- [Overview of the Blockly Sections](https://youtu.be/EdllUlJ7p6k?t=558)
|
||||
- [Logging](https://youtu.be/EdllUlJ7p6k?t=670)
|
||||
- [Working with Items](https://youtu.be/EdllUlJ7p6k?t=790)
|
||||
- [Working with Text-Blocks](https://youtu.be/EdllUlJ7p6k?t=975)
|
||||
- [Sending Commands](https://youtu.be/EdllUlJ7p6k?t=1077)
|
||||
- [Using Color-Blocks and HSB-Conversion](https://youtu.be/EdllUlJ7p6k?t=1366)
|
||||
- [Waiting in Rules](https://youtu.be/EdllUlJ7p6k?t=1600)
|
||||
- [Various Help Documentation available in openHAB Blockly](https://youtu.be/EdllUlJ7p6k?t=1589)
|
||||
- [Blockly as an ECMA-Script code generator](https://youtu.be/EdllUlJ7p6k?t=1739)
|
||||
- [Loops in Blockly](https://youtu.be/EdllUlJ7p6k?t=1947)
|
||||
- [Playing sounds on audio sinks](https://youtu.be/EdllUlJ7p6k?t=2035)
|
||||
- [Using Text-to-speach easily with blocks](https://youtu.be/EdllUlJ7p6k?t=2395)
|
||||
- [Streaming Music](https://youtu.be/EdllUlJ7p6k?t=2538)
|
||||
- [Episode 2](https://www.youtube.com/watch?v=hSRfooBKn9A)
|
||||
- [Introduction](https://youtu.be/hSRfooBKn9A)
|
||||
- [Functions](https://youtu.be/hSRfooBKn9A?t=60)
|
||||
- [Parameters](https://youtu.be/hSRfooBKn9A?t=170)
|
||||
- [Play Stream](https://youtu.be/hSRfooBKn9A?t=335)
|
||||
- [IF ELSE](https://youtu.be/hSRfooBKn9A?t=445)
|
||||
- [Timers](https://youtu.be/hSRfooBKn9A?t=630)
|
||||
- [Burglar Alarm Example](https://youtu.be/hSRfooBKn9A?t=1046)
|
||||
- [Disable Rules](https://youtu.be/hSRfooBKn9A?t=1668)
|
||||
- [Episode 3](https://www.youtube.com/watch?v=KwhYKy1_qVk)
|
||||
- [Datetimes and Cron-Triggers](https://youtu.be/KwhYKy1_qVk?t=45)
|
||||
- [Copy-Of, Datetime-Now with Math-Operations](https://youtu.be/KwhYKy1_qVk?t=375)
|
||||
- [Datetime - Temporal Units](https://youtu.be/KwhYKy1_qVk?t=410)
|
||||
- [Date comparison](https://youtu.be/KwhYKy1_qVk?t=520)
|
||||
- [Creating Datetimes and other datetime blocks](https://youtu.be/KwhYKy1_qVk?t=2010)
|
||||
- [Convert item states to Datetimes](https://youtu.be/KwhYKy1_qVk?t=570)
|
||||
- [Send Notifications to the openHAB mobile app](https://youtu.be/KwhYKy1_qVk?t=930)
|
||||
- [Using Ephemeris information](https://youtu.be/KwhYKy1_qVk?t=1275)
|
||||
- [Using Persistence data](https://youtu.be/KwhYKy1_qVk?t=1440)
|
||||
- [Wrap up and short overview on basic blocks](https://youtu.be/KwhYKy1_qVk?t=1680)
|
||||
- [Basic: Logic, Loops, Variables overview](https://youtu.be/KwhYKy1_qVk?t=1730)
|
||||
- [Basic: Math](https://youtu.be/KwhYKy1_qVk)
|
||||
- [Basic: Text](https://youtu.be/KwhYKy1_qVk?t=1835)
|
||||
- [Basic: Lists, Colors](https://youtu.be/KwhYKy1_qVk?t=1910)
|
||||
- [openHAB Blocks Wrap up](https://youtu.be/KwhYKy1_qVk?t=1945)
|
||||
- [Global Value Storage](https://youtu.be/KwhYKy1_qVk?t=2060)
|
||||
- [Run & Process blocks, transform](https://youtu.be/KwhYKy1_qVk?t=2110)
|
||||
- [Inline Scripts](https://youtu.be/KwhYKy1_qVk?t=2165)
|
||||
- [Outro](https://youtu.be/KwhYKy1_qVk?t=2257)
|
||||
|
||||
## Blocks Overview
|
||||
|
||||
Also view ![youtube](../images/blockly/youtube-logo-small.png) [Overview of the Blockly Sections](https://youtu.be/EdllUlJ7p6k?t=558)
|
||||
|
||||
### Items and Things
|
||||
|
||||
*Items* and *Things* are the [major entities of openHAB](https://www.openhab.org/docs/concepts/) to control and monitor the home.
|
||||
|
|
|
@ -68,6 +68,8 @@ All methods reveal the following folders
|
|||
|
||||
## Creating a blockly rule via the UI
|
||||
|
||||
Also view ![youtube](../images/blockly/youtube-logo-small.png) [Creating a Blockly Rule](https://youtu.be/EdllUlJ7p6k?t=429)
|
||||
|
||||
- go to Settings -> Rules
|
||||
- press ![plus](../images/blockly/blockly-plus-small.png) on bottom right
|
||||
- enter a unique id and rule name for your new blockly rule
|
||||
|
@ -84,8 +86,11 @@ All methods reveal the following folders
|
|||
- Drag and Drop the blocks to the white area
|
||||
- Press `Ctrl-s` (Windows) or `Command-s` (MacOS) to save your rule
|
||||
- Press `Ctrl-r` (Windows) or `Command-r` (MacOS) to directly run your rule with the trigger
|
||||
- Press `Ctrl-d` (Windows) or `Command-d` (MacOS) to disable / enable your rule
|
||||
- Click on ![showblock](../images/blockly/blockly-workspace-showblocks.png) on the lower right of the bottom toolbar to see the generated code and will transition to ![showcode](../images/blockly/blockly-workspace-showcode.png)(click again to come back to the blocks)
|
||||
- Press `Ctrl-d` (Windows) or `Command-d` (MacOS) to disable / enable your rule.
|
||||
See the following video on ![youtube](../images/blockly/youtube-logo-small.png) [How to disable Rules](https://youtu.be/hSRfooBKn9A?t=1668)
|
||||
- Click on ![showblock](../images/blockly/blockly-workspace-showblocks.png) on the lower right of the bottom toolbar to see the generated code and will transition to ![showcode](../images/blockly/blockly-workspace-showcode.png)(click again to come back to the blocks).
|
||||
|
||||
More about the topic of code generation can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Blockly as an ECMA-Script code generator](https://youtu.be/EdllUlJ7p6k?t=1739)
|
||||
|
||||
### Block context menu
|
||||
|
||||
|
@ -132,6 +137,13 @@ During development the log-block is lot very often which writes information into
|
|||
- After installation you can view your logs under [openhabian-config](http://myopenhab-server:9001) (adapt the server name)
|
||||
- **see [how to log](https://www.openhab.org/docs/administration/logging.html)**
|
||||
|
||||
More on that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Logging](https://youtu.be/EdllUlJ7p6k?t=670)
|
||||
|
||||
## Show an item status watch list besides the blockly rules
|
||||
|
||||
In the developer section there is the possibility to add a sidebar to the blockly rules development workspace that allows to watch live status of an item.
|
||||
View the chapter ![youtube](../images/blockly/youtube-logo-small.png) [Debugging Rules with OpenHAB Developer Tools to watch Item-Status](https://youtu.be/EdllUlJ7p6k?t=325) for more information
|
||||
|
||||
## Return to Blockly Reference
|
||||
|
||||
[return to Blockly Reference](index.html#before-using-blockly)
|
||||
|
|
|
@ -31,6 +31,8 @@ This can be directly done via the ["send command" / "post command" block](rules-
|
|||
|
||||
## Date Handling Blocks
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Datetimes and Cron-Triggers](https://youtu.be/KwhYKy1_qVk?t=45)
|
||||
|
||||
### Help
|
||||
|
||||
![help](../images/blockly/blockly-date-help.png)
|
||||
|
@ -98,6 +100,8 @@ In case parts of the date are not provided due to shorter pattern, the others ar
|
|||
|
||||
Tip: if you want to create a datetime with your time zone use the "copy of"-block and overwrite its values
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Creating Datetimes and other datetime blocks](https://youtu.be/KwhYKy1_qVk?t=2010)
|
||||
|
||||
### Datetime with date and time values
|
||||
|
||||
![today](../images/blockly/blockly-datetime-with-values.png)
|
||||
|
@ -119,6 +123,8 @@ Tip: if you want to create a datetime with your time zone use the "copy of"-bloc
|
|||
|
||||
since 3.3
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Copy-Of, Datetime-Now with Math-Operations](https://youtu.be/KwhYKy1_qVk?t=375)
|
||||
|
||||
![date-copy-of-overview](../images/blockly/blockly-date-copy-of-overview.png)
|
||||
|
||||
Type: *ZonedDateTime*
|
||||
|
@ -129,10 +135,12 @@ This block allows to create a new ZonedDateTime based on a given ZonedDateTime a
|
|||
- adds
|
||||
- or subtracts
|
||||
|
||||
parts (so called temporals) of that datetime:
|
||||
**Temporals:** parts of that datetime are called temporals
|
||||
|
||||
![date-copy-of-temporal1](../images/blockly/blockly-temporal1.png)![date-copy-of-temporal2](../images/blockly/blockly-temporal2.png)
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Datetime - Temporal Units](https://youtu.be/KwhYKy1_qVk?t=410)
|
||||
|
||||
It is therefore a bit more complex block which is on the other hand very flexible to use.
|
||||
It consists of the main "copy of"-block and the other two temporal-Blocks that can be added.
|
||||
|
||||
|
@ -207,6 +215,8 @@ This is a convenience block that retrieves the state of an item (at best of item
|
|||
|
||||
![datetime-item-example](../images/blockly/blockly-datetime-from-item-example.png)
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Convert item states to Datetimes](https://youtu.be/KwhYKy1_qVk?t=570)
|
||||
|
||||
### Get String representation of date ("text of")
|
||||
|
||||
![date-tostring](../images/blockly/blockly-get-date-string.png)
|
||||
|
@ -235,6 +245,8 @@ The output in the log will be.
|
|||
|
||||
since 3.3
|
||||
|
||||
An introduction to that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Date comparison](https://youtu.be/KwhYKy1_qVk?t=520)
|
||||
|
||||
![date-comparison](../images/blockly/blockly-date-comparison.png)
|
||||
|
||||
Checks if the instant of the first ZonedDateTime is before, after or equal to the second ZonedDateTime.
|
||||
|
|
|
@ -28,6 +28,8 @@ See the [Ephemeris configuration page](https://www.openhab.org/docs/configuratio
|
|||
|
||||
## Ephemeris Blocks
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Using Ephemeris information](https://youtu.be/KwhYKy1_qVk?t=1275)
|
||||
|
||||
### Holiday, weekend or weekday check
|
||||
|
||||
![ephemeris-is](../images/blockly/blockly-ephemeris-is.png)
|
||||
|
|
|
@ -39,6 +39,8 @@ The example below uses the *get state of item* block to retrieve the *MainSwitch
|
|||
|
||||
## Items
|
||||
|
||||
See a video introduction at ![youtube](../images/blockly/youtube-logo-small.png) [Working with Items](https://youtu.be/EdllUlJ7p6k?t=790)
|
||||
|
||||
### Item
|
||||
|
||||
![blockly-item](../images/blockly/blockly-item.png)
|
||||
|
@ -157,6 +159,8 @@ Function: Sends a command or posts an update to an **Item** or **Group**.
|
|||
|
||||
For the difference between *send command* and *post update* see ["Manipulating States"](https://www.openhab.org/docs/configuration/rules-dsl.html#manipulating-item-states) and ["Event Bus Actions"](https://www.openhab.org/docs/configuration/actions.html#event-bus-actions).
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Sending Commands](https://youtu.be/EdllUlJ7p6k?t=1077)
|
||||
|
||||
**Item-block examples**
|
||||
|
||||
**Example 1:**
|
||||
|
|
|
@ -25,6 +25,8 @@ These blocks enable arbitrary content to be published to the [openHAB log](https
|
|||
|
||||
![logging-overview](../images/blockly/blockly-logging-overview.png)
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Logging](https://youtu.be/EdllUlJ7p6k?t=670)
|
||||
|
||||
### Log Statement
|
||||
|
||||
![log-statement](../images/blockly/blockly-logging-log.png)
|
||||
|
|
|
@ -28,6 +28,8 @@ General information on cloud notification actions can be found [here](https://ww
|
|||
|
||||
## Notification Blocks
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Send Notifications to the openHAB mobile app](https://youtu.be/KwhYKy1_qVk?t=930)
|
||||
|
||||
### Send Notification to specific cloud email user
|
||||
|
||||
![notification-to-user](../images/blockly/blockly-notification-to-user.png)
|
||||
|
|
|
@ -33,6 +33,8 @@ For more information on persistence, the default service, and its configuration
|
|||
|
||||
The date-blocks shown in this section are described previously in [Date handling blocks](https://community.openhab.org/t/blockly-reference/128785#date-handling-blocks-31).
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Using Persistence data](https://youtu.be/KwhYKy1_qVk?t=1440)
|
||||
|
||||
### Get statistical value of an item
|
||||
|
||||
![statistical-value](../images/blockly/blockly-persistence-get-statistical-value.png)
|
||||
|
|
|
@ -33,6 +33,8 @@ A Script *is* a Rule too. It’s just a special type of rule that only has a sin
|
|||
|
||||
## Run & Process Blocks
|
||||
|
||||
See also the short video part about ![youtube](../images/blockly/youtube-logo-small.png) [Run & Process blocks, transform](https://youtu.be/KwhYKy1_qVk?t=2110)
|
||||
|
||||
### Call Script File
|
||||
|
||||
![run-script-file](../images/blockly/blockly-run-script.png)
|
||||
|
@ -170,6 +172,8 @@ Use with diligence.
|
|||
|
||||
![inline-script-example](../images/blockly/blockly-inline-script-example.png)
|
||||
|
||||
See also the short video part about ![youtube](../images/blockly/youtube-logo-small.png) [Inline Scripts](https://youtu.be/KwhYKy1_qVk?t=2165)
|
||||
|
||||
## Return to Blockly Reference
|
||||
|
||||
[return to Blockly Reference](index.html#run-process-rules-and-scripts)
|
||||
|
|
|
@ -19,10 +19,17 @@ This section explains only the blocks that have been added to the standard block
|
|||
|
||||
{: #blockly-standard-extension-overview}
|
||||
|
||||
## Logic
|
||||
|
||||
One of the most commonly used standard blocks are conditions blocks.
|
||||
More about conditions can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [How to use IF and ELSE](https://youtu.be/hSRfooBKn9A?t=445).
|
||||
|
||||
## Text
|
||||
|
||||
The Text section is the general section that allows text or string manipulation
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Working with Text-Blocks](https://youtu.be/EdllUlJ7p6k?t=975).
|
||||
|
||||
### CRLF
|
||||
|
||||
Since OpenHAB 3.3.0M6
|
||||
|
@ -39,6 +46,8 @@ CRLF stands for carriage-return / line-feed which is a technical term for adding
|
|||
|
||||
## Colors
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Using Color-Blocks and HSB-Conversion](https://youtu.be/EdllUlJ7p6k?t=1366)
|
||||
|
||||
The Colors section simplifies the selection of Color Values.
|
||||
Technically these color RGB values are provided as a hexadecimal combination of the three values for red, green and blue (hence RGB).
|
||||
Each of the individual colors can range from 0 - 255 or 0-FF (hexadecimal).
|
||||
|
@ -125,6 +134,16 @@ Example:
|
|||
|
||||
![dictionary-getkey-example](../images/blockly/blockly-lists-dictionary-getkey-example.png)
|
||||
|
||||
## Loops
|
||||
|
||||
Even though there a no specialized openHAB blocks provided, loops are used rather often.
|
||||
Therefore there is a good introduction to loops available which can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Loops in Blockly](https://youtu.be/EdllUlJ7p6k?t=1947)
|
||||
|
||||
## Functions
|
||||
|
||||
A more advanced feature for reusable blockly code is _functions_.
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Functions](https://youtu.be/hSRfooBKn9A?t=60) and [Parameters](https://youtu.be/hSRfooBKn9A?t=170).
|
||||
|
||||
## Return to Blockly Reference
|
||||
|
||||
[return to Blockly Reference](index.html#openhab-extensions-to-the-standard)
|
||||
|
|
|
@ -12,6 +12,8 @@ Timers and Delays are a little more complex but add important functionality to r
|
|||
Whilst the "Wait-For"-block is straightforward, the timer blocks should be well understood before being used - they may behave differently than expected.
|
||||
This chapter explains what these blocks do, sometimes displaying generated code to explain what is happening behind the scenes.
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Timers](https://youtu.be/hSRfooBKn9A?t=630).
|
||||
|
||||
- TOC
|
||||
{:toc}
|
||||
|
||||
|
@ -41,6 +43,8 @@ The following simple example uses a loop to implement a blinking light with a 1
|
|||
|
||||
![waifor-example](../images/blockly/blockly-waitfor-example.png)
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Waiting in Rules](https://youtu.be/EdllUlJ7p6k?t=1600)
|
||||
|
||||
### After *period of time* Do With Timer
|
||||
|
||||
![blockly-afterperiodtimer](../images/blockly/blockly-afterperiod-timer.png)
|
||||
|
|
|
@ -34,6 +34,8 @@ To check if a value is undefined, use the special "is undefined"-block
|
|||
|
||||
## Value Storage Blocks
|
||||
|
||||
See also the short video part about ![youtube](../images/blockly/youtube-logo-small.png) [Global Value Storage](https://youtu.be/KwhYKy1_qVk?t=2060)
|
||||
|
||||
### Store Value
|
||||
|
||||
![store-value](../images/blockly/blockly-value-store.png)
|
||||
|
|
|
@ -18,6 +18,8 @@ In general, this section deals with two topics
|
|||
It should be noted that both functionalities do not just work right out of the box because e.g for (1) the audio sinks need to be installed in openHAB and for (2) e.g. the whole Google API needs to be configured in particular with your own personal google account.
|
||||
Even though (2) is not trivial but after having done that the usage of the functionality with blockly is very easy and worth the effort.
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Playing sounds on audio sinks](https://youtu.be/EdllUlJ7p6k?t=2035)
|
||||
|
||||
{::options toc_levels="2..4"/}
|
||||
|
||||
- TOC
|
||||
|
@ -52,6 +54,8 @@ Even though (2) is not trivial but after having done that the usage of the funct
|
|||
- the audio file must reside in the sounds-folder of openHAB that can be found [here](https://community.openhab.org/t/blockly-reference/128785#openhab-configuration-files-7)
|
||||
- all available audio sinks are automatically provided by openHABs blocklies
|
||||
|
||||
Also view ![youtube](../images/blockly/youtube-logo-small.png)[Playing sounds on audio sinks](https://youtu.be/EdllUlJ7p6k?t=2035)
|
||||
|
||||
### Play Audio with Volume
|
||||
|
||||
![play-audio](../images/blockly/blockly-play-audio-with-volume.png)
|
||||
|
@ -82,6 +86,8 @@ In case this happens the more robust approach is as follows
|
|||
- All available audio sinks are automatically provided by openHAB's blocklies
|
||||
- Changing the volume needs to be done via the thing volume channel linked to the sink device by sending the respective volume level command to that item
|
||||
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Play Stream](https://youtu.be/hSRfooBKn9A?t=335)
|
||||
|
||||
### Stop Stream
|
||||
|
||||
![stop-stream](../images/blockly/blockly-stop-stream.png)
|
||||
|
@ -94,6 +100,6 @@ In case this happens the more robust approach is as follows
|
|||
|
||||
*Function:* Sends the given text to the sink by using the default Text-to-Speech-Service to translate the text based on the chosen language voice into a stream which is then played on that device sink.
|
||||
|
||||
## Return to Blockly Reference
|
||||
More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png)[Using Text-to-speach easily with blocks](https://youtu.be/EdllUlJ7p6k?t=2403)
|
||||
|
||||
[return to Blockly Reference](index.html#voice-and-multimedia)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
|
@ -14,6 +14,10 @@ Choosing either of those presents you with a choice of language to use.
|
|||
By default there are only three choices: Blockly, ECMAScript, and Rules DSL.
|
||||
If you've installed other automation add-ons, those might be listed as well.
|
||||
|
||||
This tutorial is not going to be a full tutorial on how to write code in Blockly.
|
||||
See the [**Blockly Reference**]({{base}}/configuration/blockly/index.html) for a detailed tutorial and reference for doing that.
|
||||
Instead it's a higher level example of building a rule step-by-step using Blockly.
|
||||
|
||||
![rule add script action dialog](images/rule-add-action-dialog.png)
|
||||
|
||||
For this part of the tutorial we will choose "Design with Blockly".
|
||||
|
@ -31,7 +35,7 @@ It even allows you to learn how write your own JavaScript by looking at the code
|
|||
If you have been around kids you may be familiar with [Scratch](https://scratch.mit.edu/).
|
||||
Blockly is a similar environment customized for writing openHAB scripts.
|
||||
|
||||
For those who do better with video, there is a video introducting Blockly on the openHAB [Youtube feed](https://www.youtube.com/watch?v=EdllUlJ7p6k).
|
||||
For those who do better with video, there are a few videos introducing Blockly on the openHAB [Youtube feed]({{base}}/configuration/blockly/index.html#blockly-youtube-tutorials)
|
||||
|
||||
A typical Blockly script might look something like this:
|
||||
|
||||
|
@ -56,10 +60,6 @@ These are where you'll access Items, call actions, get data from persistence, cr
|
|||
|
||||
The Library category is where Blockly Libraries installed from the Marketplace will appear (see below and the previous discussion on Rule Templates).
|
||||
|
||||
This tutorial is not going to be a full tutorial on how to write code in Blockly.
|
||||
See the [Blockly Reference]({{base}}/configuration/blockly/index.html) for a detailed tutorial and reference for doing that.
|
||||
Instead it's a higher level example of building a rule step-by-step using Blockly.
|
||||
|
||||
Some sections will be short.
|
||||
If you are missing details, see the previous section for details as most of the steps are the same for creating *all* rules in the UI.
|
||||
|
||||
|
|
Loading…
Reference in New Issue