ioBroker.javascript
ioBroker.javascript copied to clipboard
Add own / custom Blockly Blocks
Hi, is there a way to add own Blockly Blocks with an js file? I don't want to write a whole Adapter just to include a custom Block.
Isn't that exactly what a JS-function block does?
I will Add them globaly to all Scripts not only to one Script. For Example when I have a MQTT Server and there are some Devices. There is no Adapter to Control them there are only Datapoints. So when I will for Example Control a Device I can add a Blockly Block wich controls the Datapoints for this. Next Example I have a Idea to Control Stuff like Lights with difrent hue and brightnes over the Day I can reuse this Block with the Logic in any other Script. And I can now reuse it in any Script I add. It should be just one Block with custom logic wich can be reused in any Script and shared with other people. Not a Complete standalone Script. Maybe when this will work there will be a Database with custom Blockly Blocks (or reusabe functions) where Everyone can search for Stuff. But first there must be an reusable function/Blockly Block