Hi, i am complety novise on this script thing and i have start to setup Domoticz on a Raspberry with some switches and have try this scripts and its seems to work but is it correct?
First i found this example and i created a virtual switch if its night or not
Then i want to start lightgroup at time 05:05 but only if there is night, then i want to switch of at 05:35 so i create this:
Is this correct way to do this?
My first blockly script
Moderator: leecollings
-
- Posts: 265
- Joined: Monday 05 February 2018 8:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12467
- Location: Netherlands, near Haarlem
- Contact:
Re: My first blockly script
What also is possible is switching 'Natt' with a timer in the switch itself. I found out that this is working more reliable.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
Re: My first blockly script
I think this will do the job after making a variabele called 'Natt'
- 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
- 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
-
- Posts: 10
- Joined: Sunday 01 November 2020 20:48
- Target OS: Windows
- Domoticz version: 2024.4
- Location: Sweden
- Contact:
Re: My first blockly script
Ok i do a test whitout the virtual switch and use variable instead, thanks for help so far 

- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
My first blockly script
With use of a variable you can’t accidentally press the button.
There will be only a problem when Sunrise time is between 05:05 and 05:35. But you have a few months to find a solution for that.
For example: if Time is > 05:05 and < 05:35
There will be only a problem when Sunrise time is between 05:05 and 05:35. But you have a few months to find a solution for that.
For example: if Time is > 05:05 and < 05:35
- 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
- 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
Who is online
Users browsing this forum: No registered users and 1 guest