bartbutenaers / node-red-contrib-blockly

A Node Red node for visual programming a function using Blockly
Apache License 2.0
89 stars 22 forks source link

multiple block libarys #48

Closed DRUMNICORN closed 3 years ago

DRUMNICORN commented 5 years ago

Hey I want to have 2 different nodes, one for blockly default blocks (and yours included) and one node with only my own blocks.

I just tried to change the file path but I seem like, that it is saved globally. So one of them get overwritten. In my case I got than in both nodes my own blocky, but I want to have 2 differnets.

bartbutenaers commented 5 years ago

Hi Robin,

Perhaps we should offer a standard mechanism for users to allow to install their custom blocks somewhere, without having to mess with the internals of this node. Will discuss this with @cymplecy, because we have planned a new release of this node in the near future.... Bart

jsccjj commented 3 years ago

Hi Bart,

I am experimenting with adding new kinds of blocks by editing the source code directly. I would look forward to the mechanism... or maybe try to realize it in my fork and create a pull request.

Thanks,

Jeff

cymplecy commented 3 years ago

Hi Jeff Bart might be busy with other stuff at the moment In the meantime, can you post some info on your new blocks?

Simon

jsccjj commented 3 years ago

Hi Simon,

I am working on creating blocks of simple control functions that building automation integrators would use.

Meanwhile, I created a block "Javascript Expression" that has an output image

By using the block, I can easily custom input.... please see below: image image I view the block as a derivative from the Javascript Statement node.

Thanks,

Jeff

cymplecy commented 3 years ago

JFI You can just set your variable directly

image

jsccjj commented 3 years ago

Simon,

Yes, I could. Just that the statement would not work well with blocks that require inputs.

For example, when I want to use "if" block with a relative complicated condition, the statement block could not fit into the input slots.

Thanks,

Jeff

bartbutenaers commented 3 years ago

Hi @jsccjj , Due to a surgery, I'm not able to develop for a couple of months. I will get back to you afterwards! Meanwhile you can discuss your new blocks here with @cymplecy, because he is the approval master for this node ;-) Just to avoid that you spend a lot of time on developing stuff that will never be merged. Just show some mock images to Simon, before you start coding! And keep in mind that this node only contains basic blocks, to help people who don't have enough programming skills to work with the Function node. We won't merge blocks which could be implemented as separate Node-RED nodes (see here)! Bart

jsccjj commented 3 years ago

Hi Bart,

Best wishes to you! Hope you will get recovered soon!. This node is tremendously useful and I find it has the potential to solve fundamental problems in smart building industry. So, I plan to create another node as a derivative work from this node while to contribute back to the node.

Best wishes,

Jeff

jsccjj commented 3 years ago

JFI You can just set your variable directly

image

Hi Simon,

Please see another example: image I could use the Javascript Statement block for the same action but I found it handy (personal opinion) to use my block...

Thanks,

Jeff

bartbutenaers commented 3 years ago

Jeff, Is the only difference between your node and ours, that yours contains extra libraries with blocks? If so, then I would really like to stick to a single node!!! Two nodes makes it hard to choose for users, makes it harder for the both of us to keep them in sync, ... If you can wait a few months, then I will add dynamically library loading for you (once I'm healthy again)...

jsccjj commented 3 years ago

Bart,

I really look forward to the dynamically library loading! I am working on building 20+ blocks that are very useful in the smart building industry.. And, I have no intention to replace or compete with the blockly node. My intention is to build a set of tools based on the node so that eventually a specific block may represent a specific piece of real world equipment.

Thanks,

Jeff

bartbutenaers commented 3 years ago

Hey guys, In the upcoming release it will be possible to load custom libraries and customize the existing libraries. See here for more info.
So I am going to close this issue, to make it easier for me to follow the TODO's.