# \[ANNOUNCE\] node-red-contrib-blockly : 2.0.0 betas (currently at beta 2)

**URL:** <https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092>\
**Category:** Share Your Nodes\
**Created:** [29 July 2021 19:14 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092 "2021-07-29T19:14:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [29 July 2021 19:14 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/1 "2021-07-29T19:14:08Z")

</div>

Hi folks,

After 3 years of inactivity, @cymplecy and myself are proud to present version _ **2.0.0-beta.1** _ of the [node-red-contrib-blockly](https://github.com/bartbutenaers/node-red-contrib-blockly) node 🥳 🥂 🍾

Every year around Christmas Simon asked me when we would start adding features to the Blockly node, but I never had time to support him. One of the problems was that I failed to show the Blockly workspace in full-screen mode, without nasty side-effects. Fortunately [Jeff](https://github.com/jsccjj) managed to solve this via `RED.tray`, which was the trigger for me to get started again with Blockly... So thanks a lot Jeff !!!!

This release has _ **LOTS** _ of new features, as you can read in our release notes:

> **[Releases · bartbutenaers/node-red-contrib-blockly](https://github.com/bartbutenaers/node-red-contrib-blockly/releases)**
>
> A Node Red node for visual programming a function using Blockly - bartbutenaers/node-red-contrib-blockly

So hopefully Simon has now enough toys, so he can forget all the christmas evenings that I left him alone with his old Blockly node 😉

Would be nice if some folks could test our new version, which can be installed like this (from within your .node-red folder):

```auto
npm install node-red-contrib-blockly@2.0.0-beta.1

```

As usual all _ **"constructive"** _ feedback is very welcome.!!

Don't forget to have a look at the existing Github [issues](https://github.com/bartbutenaers/node-red-contrib-blockly/issues) before reporting a new issue here.  
BTW The french and russian translations are not complete yet, and might even cause failures (due to missing field placeholders...).

Have fun !!!!!!  
Simon and Bart

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 July 2021 20:18 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/2 "2021-07-29T20:18:23Z")

</div>

> [@BartButenaers](#):
>
> RED.tray

??? What is that?

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [29 July 2021 20:22 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/3 "2021-07-29T20:22:08Z")

</div>

> [@TotallyInformation](#):
>
> ??? What is that?

Good question!!  
Jeff introduced it [here](https://github.com/bartbutenaers/node-red-contrib-blockly/blob/master/blockly.html#L795), but to be honest I didn't have time yet to investigate how it works.  
Perhaps create a dedicated Discourse topic about it...

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 July 2021 20:50 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/4 "2021-07-29T20:50:04Z")

</div>

It's a namespace in RED that is used by the node edit UI. It manages the stack of overlays etc.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 July 2021 22:05 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/5 "2021-07-29T22:05:15Z")

</div>

Ah, one to add to the list of things to investigate! Thanks.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 July 2021 09:24 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/6 "2021-07-30T09:24:17Z")

</div>

Oh Great One - you don't seem to have added in my contribution 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5a1376a17479048ce181b430d30e7ce5dee864d0.png)

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [30 July 2021 10:17 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/7 "2021-07-30T10:17:26Z")

</div>

> [@cymplecy](#):
>
> you don't seem to have added in my contribution 🙂

Aaaahhh I had forgotten that you had added your code changes in the issue, instead of a pull request...  
Don't take it personally 🤥  
Will fix it tonight. Short lunch break is over ...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 July 2021 10:19 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/8 "2021-07-30T10:19:25Z")

</div>

And which idiot said - just post code changes - don't do pull requests.........

🙂

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [30 July 2021 10:45 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/9 "2021-07-30T10:45:15Z")

</div>

Had forgotten to share a demo animation to show the _ **new timer blocks** _.  
It became a real fight to develop those timer blocks, but I'm very pleased with the result...

The demo shows how to resend the input message every (interval of) 1 second.

![blockly_timer_demo](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/689ba8c618ae7736758a8f6966b98251e5188d19.gif)

P.S. The stopInterval block is required to stop the current timer when a new input message arrives. Otherwise you end up with mutliple timers running in parallel ...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 July 2021 13:13 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/10 "2021-07-30T13:13:23Z")

</div>

> [@BartButenaers](#):
>
> P.S. The stopInterval block is required to stop the current timer when a new input message arrives. Otherwise you end up with mutliple timers running in parallel ...

I'm wondering if the JS of the interval block should automatically include the stop interval JS code.

Then, users wouldn't have to add the specific stop interval block unless they needed it later on as part of the logic of their code.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [30 July 2021 20:48 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/11 "2021-07-30T20:48:22Z")

</div>

> [@cymplecy](#):
>
> I'm wondering if the JS of the interval block should automatically include the stop interval JS code.

Yes I have been asking myself the same question when I started those nodes. Because the less blocks the users have to add, the better. And it would have saved me a lot of hours banging my head against the wall ...

But then we would decide that a lot of constructs aren't possible anymore. Suppose I want to delay every message 2 seconds. When a next message would arrive within 2 seconds, then the previous message would not be send. Which is not what we want...

Or you can stop a periodic interval sending only if certain conditions are met. E.g. you want to keep resend an input message (with payload ON) every second, until an input message (with payload OFF) arrives.

So it really depends on the case whether you want to stop the current timer or not. Therefore I think it is still better to have separate "stop" nodes...

---

<div class="post-metadata">

**Author:** ![Hypnos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hypnos/32/7566_2.png) [@Hypnos](https://discourse.nodered.org/u/Hypnos)\
**Post date:** [31 July 2021 11:13 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/12 "2021-07-31T11:13:19Z")

</div>

I understand that the stop nodes makes sense and also for the timeout node to be need for manual stop. But for the interval node the stop could be done automatically every time the interval is created to avoid duplicate intervals be running at the same time or to add a checkbox "stop already running interval/timeout", then the user could decide.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 July 2021 11:24 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/13 "2021-07-31T11:24:47Z")

</div>

@BartButenaers Can you show an example of when default stopping would not be appropriate?

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [31 July 2021 11:58 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/14 "2021-07-31T11:58:55Z")

</div>

> [@Hypnos](#):
>
> But for the interval node the stop could be done automatically every time the interval is created to avoid duplicate intervals be running at the

Hi @Hypnos,  
In that case you can only stop an interval by creating a new one. But you don't always want to start a new interval timer. Sometimes you just want to stop an existing active timer.

Simple example:

1. When somebody presses a button down, an input message with `msg.payload="down"` will arrive.
2. That input msg will start a new interval timer, which sends an output msg every 200 msec.
3. As long as the button stays down, no new input msg will arrive. So our timer will keep sending every 200 msec an output msg to a dimmer.
4. When the button is released, an input message with `msg.payload="up"` will arrive. Now the interval timer should be stopped, to stop sending output messages to the dimmer.

In step 4 we want to stop the timer. We don't want to start a new timer...

Hopefully that makes sense?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 July 2021 13:32 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/15 "2021-07-31T13:32:15Z")

</div>

I think this is that scenario  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/181c859ec48dfa3d154b6861b0fb123e63cefd01.jpeg)

in which case - no harm in generating the stop interval JS code when down is received

I can't come up with a case when it would be wrong to do so

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [31 July 2021 20:08 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/16 "2021-07-31T20:08:19Z")

</div>

> [@cymplecy](#):
>
> no harm in generating the stop interval JS code when down is received

Ah ok, seems I have misinterpreted the comment from @Hypnos...  
Thought you guys wanted to remove the "stop interval" block, and move the stopping code to the "start interval" block. But you want to keep the "stop\_interval" block (to use in conditons like in Simon's example), but as extra you want the "start\_interval" block also to stop the previous timer automatically.

Indeed that makes sense. I also cannot think of any examples. It is even a better solution. Otherwise users will be confused by multiple timers running in parallel. I will implement this change!

I still don't think we should also implement automatic stopping on the "set\_timeout" block, because of my example [above](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-beta-1/49092/11).

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [31 July 2021 20:50 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/17 "2021-07-31T20:50:53Z")

</div>

> [@BartButenaers](#):
>
> I will implement this change!

Automatic stopping of timer interval is now implemented on Github, and will be published as 2.0.0-beta.2 on NPM in a couple of days.

This demo demonstrates how the timer (which is resending the first message) will automatically be stopped, when the timer is again started (resending the second message):

![interval_automatic_stop](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/6/e62f680f8ef433e95074eba97cdb00eb66b733ee.gif)

So in those simple cases no stop-interval block is required anymore ...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 July 2021 22:18 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/18 "2021-07-31T22:18:47Z")

</div>

After 2 years of pleading and arguing - the byte block finally returns a byte 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/e/7e052c9b1c67ff164ac53efca7de9195b01cf96e.jpeg)

I'll never have to program in JavaScript ever again 🙂

🥂 🥂 🥂

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [31 July 2021 22:24 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/19 "2021-07-31T22:24:12Z")

</div>

> [@cymplecy](#):
>
> After 2 years of pleading and arguing - the byte block finally returns a byte

Now you can organize an entire conference about the Blockly byte block next year ...

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [1 August 2021 19:55 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092/20 "2021-08-01T19:55:58Z")

</div>

Version _ **2.0.0-beta.2** _ is available on NPM. All 'known' bugs have been fixed and all discussed features have been implemented. See the [release notes](https://github.com/bartbutenaers/node-red-contrib-blockly/releases/tag/v2.0.0-beta.2) for an overview.

For anybody that wants to help us by testing the node, you can install it like this (from within your .node-red folder):

```auto
npm install node-red-contrib-blockly@2.0.0-beta.2

```

At this point we have implemented all features that we had planned for this major release. We will now wait for feedback from other users (and for our french and russian translations).

This version also contains the buffer related requests from @cymplecy. This is the result of years of legal battle between our lawyers. But finally we came to an agreement (read: I gave up ...), so from now on we can hopefully walk through the same doorway together again 🤣

[Next page](https://discourse.nodered.org/t/announce-node-red-contrib-blockly-2-0-0-betas-currently-at-beta-2/49092.md?page=2)
