Request: Possible Extension of Blockly functions?

Moderator: leecollings

Post Reply
Ricard1
Posts: 62
Joined: Saturday 07 November 2015 12:30
Target OS: Windows
Domoticz version: Beta
Location: Sweden
Contact:

Request: Possible Extension of Blockly functions?

Post by Ricard1 »

Hi!

I wonder if Blockly could be extended with more functions?
For example, I would like to introduce a delay before evaluating two states in a "Freeze warning function" on my Hot-tub circulation/filter pump system... (pump turns on if below freezing temp to avoid freeze damages).
I am monitoring my Fibaro Wall Plug power switch, controlling the circulating Pump, "On" state and the "power consumption" should be above 280W to indicate normal condition. (Pump consumes about 340W)
Alarm condition is If switch is "On" and power consumption is less 250W, however due to a second or two delay before power consumption is updated the alarm goes off as soon power switch on.
I tried to introduce a delay to wait for states to stabilize before checking, however that seems not straight forward possible with the current Blockly functions.

Any comments on this?

Thanks!
Ricard
whawhe
Posts: 3
Joined: Friday 20 January 2017 12:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Request: Possible Extension of Blockly functions?

Post by whawhe »

Think you can solve it using a combination of dummyswitch and user variable:

IF switch = On AND power < 250 AND uservariable = 0
{
dummy = On for 1 min
uservariable =1
}
ELSE IF switch = On AND power < 250 AND uservariable = 1 AND dummy = Off
{
Send your alarm message
uservariable = 0
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest