Page 36 of 36
Re: Blockly examples
Posted: Tuesday 29 March 2022 22:07
by Ron
This works for me
(but my wife doesn't like it so it is now switched off)
Only dim values depending on the "dark on" and "dark off" value.

- Badkamer verlichting met standen.jpg (85.47 KiB) Viewed 3737 times
Dim value depending on the "dark on" and "dark off" value and use of a motion sensor:

- Badkamer verlichting met sensor en standen.jpg (152.71 KiB) Viewed 3737 times
Re: Blockly examples
Posted: Friday 06 October 2023 9:53
by teo1966
I have an Aeotec ZWA005 TriSensor+ here and would like the motion sensor to switch on my LED lamp when I enter my office and, for example, if I am away for 10 minutes, to switch it off again.
it is not possible to get this working

- Screenshot 2023-10-06 at 09-57-21 Domoticz.png (34.42 KiB) Viewed 3366 times
Re: Blockly examples
Posted: Friday 06 October 2023 10:04
by Treve
teo1966 wrote:I have an Aeotec ZWA005 TriSensor+ here and would like the motion sensor to switch on my LED lamp when I enter my office and, for example, if I am away for 10 minutes, to switch it off again.
it is not possible to get this working
Screenshot 2023-10-06 at 09-57-21 Domoticz.png
Is every function separate visual in Domoticz? Or just only PIR function?
Where you from?
Re: Blockly examples
Posted: Friday 06 October 2023 16:28
by teo1966
I come from the south-east of the Netherlands

- Screenshot 2023-10-06 at 16-25-09 Domoticz.png (34.58 KiB) Viewed 3330 times
Re: Blockly examples
Posted: Friday 06 October 2023 16:32
by Treve
Ok, will you Try the command ‘on’ in stead of ‘motion’ if you can switch the lamp on.
I will think about it and send you a PB after your replay for the next answer.
Re: Blockly examples
Posted: Friday 06 October 2023 16:40
by teo1966
does not work
Re: Blockly examples
Posted: Friday 06 October 2023 19:32
by Treve
I send you a PB.
Re: Blockly examples
Posted: Friday 06 October 2023 20:52
by waltervl
In the event editor there you can see all the devices with the current state they have. Check the state change and see what you have to use in your Blockly statement.
https://www.domoticz.com/wiki/Events#De ... states_Tab
Re: Blockly examples
Posted: Monday 22 April 2024 16:05
by Loekie63
I made the folowing script but get an error in my logging and the script does not work:
I tried with: if day= Saturday or day=Sunday instead of the Variable but that gives the same error.
The error in my log :
Error: EventSystem: Lua script error (Blockly), Name: Rolluik voor Open weekend_3 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare string with number
Re: Blockly examples
Posted: Thursday 17 October 2024 10:25
by fjuppe
Hello,
This Blockly block updates a parameter (0219) with fixed value = 100 and works OK. But I want to use an existing user variable instead of the fixed value in the URL. Is this possible in Blockly and what would I write as "val=" ???

- Blockly.png (15.59 KiB) Viewed 1597 times