Blocky programming not working as expect

Moderator: leecollings

Post Reply
nitro
Posts: 11
Joined: Sunday 27 October 2019 13:42
Target OS: -
Domoticz version:
Contact:

Blocky programming not working as expect

Post by nitro »

Hello,

Hopefully you can help me with something, I have made the following Blockly program:
Lampen Woonkamer Uit.png
Lampen Woonkamer Uit.png (17.25 KiB) Viewed 1296 times
But what happend is, that within the minut the PowerOff function is on that the lights "Lampen" will go off but jump back on.

It seems that Domoticz checked every minut the cycle or something.

The lights is sent with KAKU 433 in combination of RFXCOM.
The PowerOff is a scene in Logitech Harmony Hub when I shutdown the TV I want 5 minutes later that the light will go off and stay off.
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Blocky programming not working as expect

Post by solarboy »

You cannot set 2 lamps with 1 command, it must be..

set Lamp Links = Off after 300 seconds
set Lamp Rechts = Off after 300 seconds

2 separate commands.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
nitro
Posts: 11
Joined: Sunday 27 October 2019 13:42
Target OS: -
Domoticz version:
Contact:

Re: Blocky programming not working as expect

Post by nitro »

Thanks for the reply, do u also know what the following mean. Can't find it anywhere:

Triggers:
All
Device
Security
Time
User Variable
Trigger.png
Trigger.png (4.22 KiB) Viewed 1262 times
Time Variable:
time.png
time.png (2.08 KiB) Viewed 1262 times
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Blocky programming not working as expect

Post by jvdz »

The Trigger field sets the type of "Trigger for the Event".
Device-> Trigger an event when a device changes
Time-> Trigger an event each minute
User Variable-> Trigger an event when a user variable changes
Security> Trigger an event when the security settings changes (Armed Home/Armed Away/Disarmed)
All-> When any of the above happen.

In your case it should be a Device Event as you want the act on the change of device "PowerOff".
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Blocky programming not working as expect

Post by solarboy »

I started out with Blockly and I never found it required to use anything other than "All" in the trigger field although I am sure it has it's uses. I think it has it's roots in the lua (and dzvents) language underpinning the eventsystem.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
nitro
Posts: 11
Joined: Sunday 27 October 2019 13:42
Target OS: -
Domoticz version:
Contact:

Re: Blocky programming not working as expect

Post by nitro »

Is it also possible to set the time between 22:00 and 07:00 ? or later then 23:59.
I have the feeling that Domoticz reset at 00:00 so if i stay up till 00:20 and i go to bed, the lights won't go off or is this incorrect ?

My scripting skills is horrible, but can you tell me if i do this in lua script how to write it ?

The thing i want is as follow:

When the device PowerOff is 'On' and it is between 22:00 and 03:00 in the night, turn Lamp Links and Right 'Off' after 300 seconds.
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Blocky programming not working as expect

Post by solarboy »

if time > 22:00 or time < 07:00...
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
nitro
Posts: 11
Joined: Sunday 27 October 2019 13:42
Target OS: -
Domoticz version:
Contact:

Re: Blocky programming not working as expect

Post by nitro »

Thx, that is working indeed :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest