Blockly examples

Moderator: leecollings

Ron
Posts: 82
Joined: Friday 27 December 2013 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2284
Location: Nederland, Den Bosch
Contact:

Re: Blockly examples

Post 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
Badkamer verlichting met standen.jpg (85.47 KiB) Viewed 2944 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
Badkamer verlichting met sensor en standen.jpg (152.71 KiB) Viewed 2944 times
teo1966
Posts: 33
Joined: Saturday 18 November 2017 12:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: Blockly examples

Post 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
Screenshot 2023-10-06 at 09-57-21 Domoticz.png (34.42 KiB) Viewed 2573 times
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: Blockly examples

Post 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?
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
teo1966
Posts: 33
Joined: Saturday 18 November 2017 12:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: Blockly examples

Post by teo1966 »

I come from the south-east of the Netherlands
Screenshot 2023-10-06 at 16-25-09 Domoticz.png
Screenshot 2023-10-06 at 16-25-09 Domoticz.png (34.58 KiB) Viewed 2537 times
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: Blockly examples

Post 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.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
teo1966
Posts: 33
Joined: Saturday 18 November 2017 12:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: Blockly examples

Post by teo1966 »

does not work
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: Blockly examples

Post by Treve »

I send you a PB.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Blockly examples

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Loekie63
Posts: 9
Joined: Thursday 28 January 2021 9:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly examples

Post 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
Attachments
blockly.jpg
blockly.jpg (53.78 KiB) Viewed 1405 times
fjuppe
Posts: 42
Joined: Thursday 14 September 2023 19:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 16341
Location: Stockholm
Contact:

Re: Blockly examples

Post 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
Blockly.png (15.59 KiB) Viewed 804 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests