Math Libraries for Blockly

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
manwe
Posts: 12
Joined: Thursday 04 February 2016 14:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Switzerland
Contact:

Math Libraries for Blockly

Post by manwe »

It would be very nice to have some mathematical calculations in Blockly.

This is used in lots of other Blockly Examples but just outside of Domoticz
https://developers.google.com/blockly/
https://blockly-demo.appspot.com/static ... index.html
https://blockly-games.appspot.com/

For the beginning I wouldn't need some very complex Calculations but even easy stuff like "Increase User Variable", "Check for Temperature + x", "Multiply Numbers to convert units" would be very useful ;)
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Math Libraries for Blockly

Post by manjh »

I second that. Would be great for my "intelligent dimmer", which is controlled by the value of a user variable.
Example:
0 = off
1 = 25%
2 = 50%
3 = 75%
4 = full
A motion sensor would set the variable to 4, and start a timer.
Timer runs out: decrement variable and restart timer.
Variable reaches 0: dimmer to off, and cancel timer.
Last edited by manjh on Sunday 15 May 2016 17:50, edited 1 time in total.
Hans
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Math Libraries for Blockly

Post by gizmocuz »

Great idea !
Please submit a git pull request with the needed changes
Quality outlives Quantity!
User avatar
Marci
Posts: 531
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: Math Libraries for Blockly

Post by Marci »

In progress - will issue pull request once finished.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
velkrosmaak
Posts: 8
Joined: Friday 15 April 2016 23:45
Target OS: Linux
Domoticz version:
Contact:

Re: Math Libraries for Blockly

Post by velkrosmaak »

Can't wait for this - going to use it to compare the current energy usage with that from 5 minutes ago, and notify me if something has stopped using energy (such as the dishwasher) 8-)
CherAlban
Posts: 6
Joined: Tuesday 22 November 2016 20:18
Target OS: Windows
Domoticz version:
Contact:

Re: Math Libraries for Blockly

Post by CherAlban »

Hi,

is there any news on this topic? I would also highly appreciate basic math blocks.

CherAlban
User avatar
michaldobrotka
Posts: 50
Joined: Sunday 01 November 2015 17:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Math Libraries for Blockly

Post by michaldobrotka »

+1
Yes please math in Blockly
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
BigOpus
Posts: 3
Joined: Friday 06 November 2015 11:33
Target OS: Windows
Domoticz version: 4.97
Contact:

Re: Math Libraries for Blockly

Post by BigOpus »

Hello,

some news about this very helpful feature? I need somethig like.
e.g. if "actual temp" - 2 = "set temp" then...
tuxmartin
Posts: 11
Joined: Wednesday 06 September 2017 12:47
Target OS: Linux
Domoticz version:
Location: CZ
Contact:

Re: Math Libraries for Blockly

Post by tuxmartin »

Hi,

any news about this feature?

Try it: https://developers.google.com/blockly/
Attachments
blockly.png
blockly.png (12.49 KiB) Viewed 3163 times
Patricen
Posts: 108
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Math Libraries for Blockly

Post by Patricen »

Up ;)
TSkar
Posts: 29
Joined: Wednesday 20 June 2018 16:47
Target OS: Linux
Domoticz version: 2.13055
Location: Stavanger, Norway
Contact:

Re: Math Libraries for Blockly

Post by TSkar »

Did this suggestion get dropped, or are there any kind of progress on this?
Even basic math like addition and subtraction would help a lot.
Alain
Posts: 164
Joined: Sunday 26 April 2020 5:27
Target OS: Linux
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: Math Libraries for Blockly

Post by Alain »

I don't think there is much development in the Blockly side of things. Math functions would make life a little easier, for sure.
Hue | Zigbee2Mqtt | MQTT | P1 | Xiaomi | RFXCom | Modbus | Qlima | Solaredge
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
jvm1000
Posts: 4
Joined: Thursday 21 June 2018 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Math Libraries for Blockly

Post by jvm1000 »

+1
Yes please math in Blockly
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest