Math operators and Blocking

Moderator: leecollings

ebretteville
Posts: 39
Joined: Sunday 10 January 2016 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Cherbourg - Caen | France
Contact:

Re: Math operators and Blocking

Post by ebretteville »

misko903
Posts: 51
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Math operators and Blocking

Post by misko903 »

Thanks
Why it is not supported native in Dz? It is a must in a programming language!
ebretteville
Posts: 39
Joined: Sunday 10 January 2016 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Cherbourg - Caen | France
Contact:

Re: Math operators and Blocking

Post by ebretteville »

Yes, true, especially if you wan't to build a software thermostat and you need to make average and mathematical operations.
StasDemydiuk
Posts: 59
Joined: Saturday 14 January 2017 21:37
Target OS: Linux
Domoticz version: Beta
Location: Ukraine
Contact:

Re: Math operators and Blocking

Post by StasDemydiuk »

Math operators should became available by default in this PR (https://github.com/domoticz/domoticz/pull/2857)
dziadzi
Posts: 2
Joined: Monday 10 September 2018 23:24
Target OS: Linux
Domoticz version:
Contact:

Re: Math operators and Blocking

Post by dziadzi »

I still don't see Math operations in Blockly after update. My current version is Beta version: 4.10317 Build Hash: 2ccf9db7 Compile Date: 2019-01-05 15:54:06
domoticzag1
Posts: 10
Joined: Thursday 27 December 2018 22:08
Target OS: -
Domoticz version:
Contact:

Re: Math operators and Blocking

Post by domoticzag1 »

Bump! would also love to see this functionality in blockly!
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

Re: Math operators and Blocking

Post by salopette »

not with me either
microchip1974
Posts: 14
Joined: Friday 21 February 2020 8:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11774
Location: Italy
Contact:

Re: Math operators and Blocking

Post by microchip1974 »

please add math operations in blockly by default!
Pizigate Plugin version: 5.1.017
Firmware version: 0321
Pegozz
Posts: 1
Joined: Sunday 03 May 2020 11:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Math operators and Blocking

Post by Pegozz »

Please add math operations in block programming.
additions, subtractions and hysteresis with the result insertion in a variable or counter cell, would be a good starting point.
Last edited by Pegozz on Sunday 03 May 2020 11:57, edited 2 times in total.
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

Re: Math operators and Blocking

Post by salopette »

Please! Please! Please!
jvrr
Posts: 16
Joined: Monday 27 April 2020 12:53
Target OS: Windows
Domoticz version:
Contact:

Re: Math operators and Blocking

Post by jvrr »

Maybe it is not cool to use Blockly...

I'm a new to Domoticz and I just want to quit because the standard function of Domoticz was not great and I haven't got the time to learn a scripting language.
Then I found out there was Blockly , easy and fast to use.
So I sticked with Domoticz

I think if blocky was more power, more users will come.
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

Re: Math operators and Blocking

Post by salopette »

bei Iobroker people mainly use Blockly!
And that's really cool!
Patricen
Posts: 108
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Math operators and Blocking

Post by Patricen »

@ Gizmocuz

I'm also eager getting natively within domoticz for people who are not friendly with lua coding ! What about adding this ?
Patricen
Posts: 108
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Math operators and Blocking

Post by Patricen »

hello @ebretteville,

I tried adding toolbox.xml and eventsframe.xml in www folder but it looks like I've missed something. Can you please guide me through the setup procedure?

Thanks a lot!
Alain
Posts: 164
Joined: Sunday 26 April 2020 5:27
Target OS: Linux
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: Math operators and Blocking

Post by Alain »

I've added toolbox.xml and eventsframe.html to the www folder, restarted Domoticz and cleared browser cache, but not seeing anything show up. I would love to see Math functions too. I'm wanting to control devices by temperature setpoints. Even the big name building automation systems like Johnson Controls, Trend, Sauter, etc use function blocks to write software. They don't program in scripts.
Hue | Zigbee2Mqtt | MQTT | P1 | Xiaomi | RFXCom | Modbus | Qlima | Solaredge
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
mjray
Posts: 18
Joined: Wednesday 05 October 2022 2:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: Math operators and Blocking

Post by mjray »

I was looking for the math blocks to do some simple maths with temperatures too, so I found this discussion.

It looks from the end of https://github.com/domoticz/domoticz/issues/3724 that this is stuck because Domoticz needs code added to support the maths blocks. I think it might be to translate the math blocks into some scripting language. I'm not sure why that's needed because I thought Blockly already had translations for the core blocks like Math into Lua and Python which Domoticz can be scripted in, so I wonder if Domoticz is using Blockly to generate dzVents, but that seems like a lot of hard work and I'm not sure what benefit it would give.

Anyway, a naïve attempt to replace the blockly folder with a copy of the latest version of blockly fails messily, so I think we have to wait for the core devs to upgrade it.
ssk17051980
Posts: 112
Joined: Thursday 08 December 2022 22:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: ROMANIA
Contact:

Re: Math operators and Blocking

Post by ssk17051980 »

i want to do this
i do not have math on blocky.
if i gone change that xml file, i gone lose device TAB, etc
any ideea ?
Attachments
demo.jpg
demo.jpg (95.58 KiB) Viewed 1451 times
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Math operators and Blocking

Post by waltervl »

Math in blocky is not supported. Is too difficult to implement. If you need math switch over to dzvents scripting.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ssk17051980
Posts: 112
Joined: Thursday 08 December 2022 22:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: ROMANIA
Contact:

Re: Math operators and Blocking

Post by ssk17051980 »

i do not know dzvents
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Math operators and Blocking

Post by waltervl »

ssk17051980 wrote: Tuesday 29 August 2023 16:45 i do not know dzvents
check viewtopic.php?t=18143
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest