Blockly Events
Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM
Blockly Events
No matter how good they are, i'm unhappy with rules in ESPEasy. Rules are a compromise between extensibility and easy-of-use, making it neither.
I have implemented Scripts in uPyEasy (in Beta-1) and this wil give you full extensibility of uPyEasy firmware on the fly. There's no limitations what you can do to alter the behavior of uPyEasy, except off course the size of the Flash drive.
However it does require that you understand something about Python to make full use of it.
For those who don't want or can program Python, i'm thinking about another solution. I'm wondering if it is not better to use Blockly to program the events?
It would look something like this: Please let me know what you think about Blockly or possible alternatives.
I have implemented Scripts in uPyEasy (in Beta-1) and this wil give you full extensibility of uPyEasy firmware on the fly. There's no limitations what you can do to alter the behavior of uPyEasy, except off course the size of the Flash drive.
However it does require that you understand something about Python to make full use of it.
For those who don't want or can program Python, i'm thinking about another solution. I'm wondering if it is not better to use Blockly to program the events?
It would look something like this: Please let me know what you think about Blockly or possible alternatives.
Re: Blockly Events
I don't have program skills so rules and blocky are a good alternative for me.
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: Blockly Events
Great Lisa !
Programming is soooo 1980
Programming is soooo 1980

30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: Blockly Events
Hi Lisa,
I'd not come across Blockly before but the ability to 'program' graphically is attractive. I don't know whether it would impose any limitations (memory etc, or more restricted functionality).
Hmmm, That's triggered another thought- I believe that NodeRED uses Python (presumably full python), wonder if it could be used sonehow. l don't know how "heavy" it is.
Anyway, worth exploring Blockly further.
I'd not come across Blockly before but the ability to 'program' graphically is attractive. I don't know whether it would impose any limitations (memory etc, or more restricted functionality).
Hmmm, That's triggered another thought- I believe that NodeRED uses Python (presumably full python), wonder if it could be used sonehow. l don't know how "heavy" it is.
Anyway, worth exploring Blockly further.
Re: Blockly Events
Blocky is completely running on the client side, it's probably only feasible if the (javascript) library is stored locally on your own pc and only the result is loaded and saved to uPyEasy (similar to load/save settings). That way it won't take up valuable space in your SOC, while still benefiting from the GUI. Programming is mostly done from a single pc anyway, so this downside might be acceptable.AndrewJ wrote: ↑20 Jan 2018, 22:56 Hi Lisa,
I'd not come across Blockly before but the ability to 'program' graphically is attractive. I don't know whether it would impose any limitations (memory etc, or more restricted functionality).
Hmmm, That's triggered another thought- I believe that NodeRED uses Python (presumably full python), wonder if it could be used sonehow. l don't know how "heavy" it is.
Anyway, worth exploring Blockly further.
https://developers.google.com/blockly/guides/overview
Re: Blockly Events
Ah, I realise now, it's not on the SOC. It does look interesting. Thanks for the link.
- budman1758
- Normal user
- Posts: 303
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: Blockly Events
Well, it seems Rules no longer rulez.
No problem ... I have to go the python way anyway, but for getting things done quickly, Blockly is a nice alternative.
Having said that, one of the powerfull things in Rules is the handling of the output of the devices.
No problem ... I have to go the python way anyway, but for getting things done quickly, Blockly is a nice alternative.
Having said that, one of the powerfull things in Rules is the handling of the output of the devices.
Re: Blockly Events
Rules are still there, they are hidden by default just like in ESPEasy. Tools -> Switch on Rules checkbox and it's back!
Links to rules topic: viewtopic.php?f=23&t=4732
But... just like in ESPEasy, they are limited in functionality (they will grow a little bit until they have the same functionality as in ESPEasy.
Scripts are the full force, Blockly is more like rules. For all something to choose from.
Ps. Python is also used in ESPEasy, but only as supporting tool.
- budman1758
- Normal user
- Posts: 303
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: Blockly Events
As a non-programmer its ESPEasy that allowed me to be able to get anything done that I wanted to do. Rules may be limiting but they do allow folks like me to get things working. There are any number of firmwares and program languages out there but ESPEasy is the only one I have found that's actually EASY. Rules are limiting but they are about as complex as I can understand. I'm just and old half broke down heavy equipment mechanic\welder with enough electronics know how to bash some hardware together and make it work. I would hate to see ESPEasy fall by the wayside. I understand that at some point it will reach a plateau where it cannot be extended anymore. Just hope it gets there.
Having said all that I'm all for uPyEasy too. Mebbe this ole broke down welder can figger it out.
Just my 2 cents worth.
Having said all that I'm all for uPyEasy too. Mebbe this ole broke down welder can figger it out.

Just my 2 cents worth.

"The glass is twice as big as it needs to be".
Re: Blockly Events
Rules are also present in uPyEasy now, viewtopic.php?f=23&t=4732, but... Blockly can do the same thing, graphically and distributed (meaning client-server).budman1758 wrote: ↑01 Feb 2018, 03:51 As a non-programmer its ESPEasy that allowed me to be able to get anything done that I wanted to do. Rules may be limiting but they do allow folks like me to get things working. There are any number of firmwares and program languages out there but ESPEasy is the only one I have found that's actually EASY. Rules are limiting but they are about as complex as I can understand. I'm just and old half broke down heavy equipment mechanic\welder with enough electronics know how to bash some hardware together and make it work. I would hate to see ESPEasy fall by the wayside. I understand that at some point it will reach a plateau where it cannot be extended anymore. Just hope it gets there.
Having said all that I'm all for uPyEasy too. Mebbe this ole broke down welder can figger it out.![]()
Just my 2 cents worth.![]()
If an 'old half broke down heavy equipment mechanic\welder with enough electronics' no longer can work with uPyEasy, i have failed. Extending it means more complex possibilities, not less easy ways of programming uPyEasy.

- budman1758
- Normal user
- Posts: 303
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: Blockly Events
Blocky looks pretty cool. Looks like a bit of a chore to get it setup though.
"The glass is twice as big as it needs to be".
Re: Blockly Events
It's a javascript library, no need for setup.budman1758 wrote: ↑01 Feb 2018, 20:08 Blocky looks pretty cool. Looks like a bit of a chore to get it setup though.
Re: Blockly Events
@Lisa
What exactly do you mean with client/server here?
Doe the blockly made script reside in, let's say, Domoticz and control functions from there in a upyEasy of does the upyEasy download the script and run it locally?
What exactly do you mean with client/server here?
Doe the blockly made script reside in, let's say, Domoticz and control functions from there in a upyEasy of does the upyEasy download the script and run it locally?
Re: Blockly Events
It's a client-server based setup based on http communication:
- Client (browser on web, ios, android), containing the blockly library residing locally so the blockly library is NOT downloaded from uPyEasy
- Server (uPyEasy on SOC), containing the blockly 'rule' in XML. When editing the blockly rule, the xml is send from server to client and then stored again in uPyEasy for future editing. Or everything is done locally, blockly xml rule stored local, which is also possible. When everything is done locally, only the generated python rule is send to the server,
The blockly (xml based) rule has an option to generate python code from the blockly rule, this must be send to the server to run. The generated python code is identical to the current uPyEasy python based rules.
Re: Blockly Events
Really? Looking back, my days in Assembler were the best....
Re: Blockly Events
Must say, I feel a bit disconnected too.
Re: Blockly Events
Assembler? OMG!

At work i've banned programming for about 80%!
We make models and computers are generating most efficient application code for us (with certified quality and traceability). No need for programming, unless it is something quite special (which doesn't happen a lot). Work is shifting towards the real intelligent work: how does the application need to function? Logical thinking instead of typing in code.
Re: Blockly Events
Sure, keep dreaming. How do you think the compilers were built? Or even the firmware? Treasure what you have today, but donot deny what lies at the base...LisaM wrote: ↑03 Feb 2018, 19:40Assembler? OMG!![]()
At work i've banned programming for about 80%!
We make models and computers are generating most efficient application code for us (with certified quality and traceability). No need for programming, unless it is something quite special (which doesn't happen a lot). Work is shifting towards the real intelligent work: how does the application need to function? Logical thinking instead of typing in code.
Re: Blockly Events
Wonder why so many programs are so unlogical and often need so many hotfixes ...LisaM wrote: ↑03 Feb 2018, 19:40Assembler? OMG!![]()
At work i've banned programming for about 80%!
We make models and computers are generating most efficient application code for us (with certified quality and traceability). No need for programming, unless it is something quite special (which doesn't happen a lot). Work is shifting towards the real intelligent work: how does the application need to function? Logical thinking instead of typing in code.
But okay, i am a bit of a Dinosaur.
Re: Blockly Events
True that there is still need for those kind of programming techniques and people to maintain them.
But the fact is that such knowledge is quite a specialism and often too complicated for most.
And if it is done right, abstraction will help people making less mistakes and achieve results with less work.
I've been programming in C++ a lot, but still find it a real burden sometimes to see how much effort it takes to do a simple task.
Working with ESPeasy makes me appreciate the -sometimes bloated- libraries available at my daytime job

Re: Blockly Events
I fully agree. The key is: use the proper technique for the job.
in most cases, using methods like Blockly is OK.
But when programming for the ISS (the Space Station, that is!) or one of the new medical operation robots, let's make sure we understand the code all the way down to the last bit...
Can you imagine an astronaut (during a spacewalk) or a surgeon (while doing open-heart surgery) reading on the screen: "unknown error. Please reboot." ...
Having said that, I still maintain my original statement about having lots of fun when writing Assembler code...
Also, I think we should end this discussion as it is very much off-topic...
in most cases, using methods like Blockly is OK.
But when programming for the ISS (the Space Station, that is!) or one of the new medical operation robots, let's make sure we understand the code all the way down to the last bit...
Can you imagine an astronaut (during a spacewalk) or a surgeon (while doing open-heart surgery) reading on the screen: "unknown error. Please reboot." ...

Having said that, I still maintain my original statement about having lots of fun when writing Assembler code...
Also, I think we should end this discussion as it is very much off-topic...

Who is online
Users browsing this forum: No registered users and 15 guests