Blockly update possible?

Moderator: leecollings

Post Reply
hyeronimo
Posts: 75
Joined: Saturday 11 March 2023 8:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly update possible?

Post by hyeronimo »

Hi all,

Added a more complete Blockly would be a great way to make Domoticz attractive to a larger user base.
Blockly is an open source project on github: https://github.com/RaspberryPiFoundation/blockly and has had many more functions in later versions. As this seems to be a rather self contained system it seems that these added functions could be integrated in domoticz in the same way as the current Blockly version. The main thing would be that the interface to the domoticz system (devices) would remain unchanged. Or am I overly optimistic here?
domovincent
Posts: 30
Joined: Friday 18 March 2022 13:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.2
Contact:

Re: Blockly update possible?

Post by domovincent »

Interesting idea. Which specific improvements from newer Blockly versions are you looking for?

* More advanced logic/control blocks?
* Better variables and functions?
* Custom blocks/plugins?
* Improved UI/accessibility?

Understanding the desired benefits would help assess whether the upgrade effort is justified and what value it would bring to Domoticz users.
Domoticz (RPI 5), Z-Wave, 433, MQTT, ANWB-energy. Happy user since 2017
pfloryann
Posts: 251
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

Re: Blockly update possible?

Post by pfloryann »

would be very useful especially for more advanced logic/control blocks allowing for a wider range of conditions in blockly thus being able to create more complex automations without using code.
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
User avatar
waltervl
Posts: 7011
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Blockly update possible?

Post by waltervl »

You are aware there is a dzvents wizard now? So no need to program directly with dzvents. The blockly integrations has always been difficult to update/enhance. Even a simple mathmatics enhancement is not possible.
viewtopic.php?t=44611
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
imautohuttraeger
Posts: 393
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: Blockly update possible?

Post by imautohuttraeger »

waltervl wrote: Friday 10 July 2026 9:00 You are aware there is a dzvents wizard now? So no need to program directly with dzvents. The blockly integrations has always been difficult to update/enhance. Even a simple mathmatics enhancement is not possible.
viewtopic.php?t=44611
I agree, but although the wizard guides you through the initial creation of a dzvents script, you later have to dive deep into understanding the syntax if you want to make amendments.

And even if you’ve battled your way through it and somehow managed to get it done, you’re starting from scratch again after a year if it isn’t part of your daily experience. But with the help of AI, even I can handle it these days 😉
Stop, look and listen.
pfloryann
Posts: 251
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

Re: Blockly update possible?

Post by pfloryann »

Agree, I tested it but it has some limitations.
I'll give an example: we need an automation that will act when a text sensor has a certain value (not just on or off) and when a certain variable has a certain value. I couldn't do this in the wizard or maybe I didn't know how. And in certain situations you need the conditions "or" & "and" for multiple conditions. Finally getting to the code.
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
User avatar
imautohuttraeger
Posts: 393
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: Blockly update possible?

Post by imautohuttraeger »

pfloryann wrote: Friday 10 July 2026 11:24 Agree, I tested it but it has some limitations.
I'll give an example: we need an automation that will act when a text sensor has a certain value (not just on or off) and when a certain variable has a certain value. I couldn't do this in the wizard or maybe I didn't know how. And in certain situations you need the conditions "or" & "and" for multiple conditions. Finally getting to the code.
Yes. You can take the wizard for a basic code and then ask AI to finalise it. If you properly describe what you want, ther result is often really surprisingly perfect and even with very helpful comments.
Stop, look and listen.
pfloryann
Posts: 251
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

Re: Blockly update possible?

Post by pfloryann »

imautohuttraeger wrote: Friday 10 July 2026 12:26
pfloryann wrote: Friday 10 July 2026 11:24 Agree, I tested it but it has some limitations.
I'll give an example: we need an automation that will act when a text sensor has a certain value (not just on or off) and when a certain variable has a certain value. I couldn't do this in the wizard or maybe I didn't know how. And in certain situations you need the conditions "or" & "and" for multiple conditions. Finally getting to the code.
Yes. You can take the wizard for a basic code and then ask AI to finalise it. If you properly describe what you want, ther result is often really surprisingly perfect and even with very helpful comments.
I know, it was just an example. The idea from my point of view is to make it as easy to use as possible for a basic user because I've been reading on forums lately, it seems that there are many users migrating to another automation system, and the reasons are already listed in certain topics on the domoticz forum.
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
User avatar
waltervl
Posts: 7011
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Blockly update possible?

Post by waltervl »

The main reason to change to another system is not the DzVents implementation as that is one of the main differences with other systems. It is a reason that a lot of users still stay on Domoticz.
In Domoticz if Blockly is not working for your usecase you have to go to dzvents which in my opinion is fine.
The Dzvents automation wizard is created as a step to ease that switch to DzVents.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pfloryann
Posts: 251
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

Re: Blockly update possible?

Post by pfloryann »

@waltervl I don't want you to misunderstand, I'm not criticizing, I didn't say that because of dzvents which is a very good tool, I specified that there are several reasons that can be found in other topics, I just wanted to emphasize that users are looking to be able to do automations and other things more easily, in addition to the other known reasons, this is about the subject of this topic.
Personally, I like domoticz, I've been using it for 8-9 years, I have a base server, a test server and another one with that famous automation system used for various tests.
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
User avatar
gizmocuz
Posts: 3025
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Blockly update possible?

Post by gizmocuz »

We have a simple automation wizard that generates the script for you. how more easy do you want it?
Quality outlives Quantity!
pfloryann
Posts: 251
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

Re: Blockly update possible?

Post by pfloryann »

I think I explained above, the idea is the same as what the creator of this topic said, more precisely the development of blockly and I agreed with him and it was a constructive suggestion (I say).
Regarding the wizard, I responded exactly to the statement about the wizard in which I also gave an example of automation that cannot be achieved with it, except through code, that's why I considered that maybe the development of blockly would be a solution with more options in blockly like: count, repeat, play, if x.senzor=on for x minutes etc.

When I meant to make it as easy as possible to create an automation, I meant that a more complex automation could be achieved without code. Thank you!
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
User avatar
waltervl
Posts: 7011
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Blockly update possible?

Post by waltervl »

There is a change coming in beta that the wizard supports selector switches and alert devices. Also it is now possible to set a condition to check for selector switch states and user variable values.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
njlammerts
Posts: 170
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Blockly update possible?

Post by njlammerts »

I noticed that that CPU % increased when using DzVents in stead of Blockly.
CPU load of my RPI was between 0.7 and 1.6% during normal use and with some basic switching functions in Blockly (switch on when temp=X and switch of when temp >X and time is between 12:00-18:30 on weekdays) .
When I made this kind of script in DzVents, the CPU load went up to 4.6-5.7% (DzVents was made with help of ChatGPT)

Scherm­afbeelding 2026-08-14 om 13.07.40.png
Scherm­afbeelding 2026-08-14 om 13.07.40.png (331.99 KiB) Viewed 456 times
User avatar
waltervl
Posts: 7011
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Blockly update possible?

Post by waltervl »

It would help of you post the dzvents script (in a new thread in the dzvents subforum) because it looks like chatgpt did something wrong.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hyeronimo
Posts: 75
Joined: Saturday 11 March 2023 8:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly update possible?

Post by hyeronimo »

Sorry, I lost track of my own topic here, holiday and I forgot top check notify me.. What I meant was indeed something like more advanced logic/control blocks and Better variables and functions. If you look at the blockly ui it has all that. I was hoping Blockly could use inputs from domoticz and only call domoticz again when an action (like on /off or changing setpoint) is reached.
Image
Post Reply