Events system thread (questions and feedback)
Moderator: leecollings
- mbliek
- Posts: 194
- Joined: Friday 12 July 2013 14:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the Netherlands
- Contact:
Re: Events system feedback thread
Is it possible to add support for taking a camera snapshot with lua?
Op zoek naar een Domoticz Start Set?
- CopyCatz
- Developer
- Posts: 123
- Joined: Thursday 11 July 2013 17:28
- Target OS: -
- Domoticz version:
- Location: Outer Heaven
- Contact:
Re: Events system feedback thread
Set a trigger to a dummy device in the cam setup and trigger the dummy in lua?
Re: Events system feedback thread
Hi,
I think it would be a good idea to have weekdays and weekends in the blocky
I think it would be a good idea to have weekdays and weekends in the blocky
-
- Posts: 12
- Joined: Tuesday 16 July 2013 18:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Belgium, Turnhout
- Contact:
Re: Events system feedback thread
Hi,
I'm trying to create a blockly script which detects if my server is down. With Lua a ping is performed every minute, when it's a succes it's switches "DUM Ping" on. If it's a fail, it's switches "DUM Ping" off.
The Lua part works perfectly. The blockly part however won't start and it has to do something with the time part. The time part's purpose is for not getting notifications at night when the server is turned off.
What's wrong?
I'm trying to create a blockly script which detects if my server is down. With Lua a ping is performed every minute, when it's a succes it's switches "DUM Ping" on. If it's a fail, it's switches "DUM Ping" off.
The Lua part works perfectly. The blockly part however won't start and it has to do something with the time part. The time part's purpose is for not getting notifications at night when the server is turned off.
What's wrong?
Re: Events system feedback thread
When having a time span over midnight use OR instead of AND (for time time part obviously)
Re: Events system feedback thread
Not sure OR statement in the time part would be ok, because you will EVER be >= 9 AM or <= 1 AM... So you'll be notified regardless of the time it is....gertjuhh wrote:When having a time span over midnight use OR instead of AND (for time time part obviously)
Regards
Re: Events system feedback thread
Nope, try it out and you'll see
Look at it like this: a day is from 00:00 - 23:59
This covers the time from 00:00 - 01:00
TIME <= 01:00
This covers the time from 09:00 - 23:59
TIME >= 09:00
So a time can't be >= 09:00 AND <= 01:00
Therefore, use OR
Look at it like this: a day is from 00:00 - 23:59
This covers the time from 00:00 - 01:00
TIME <= 01:00
This covers the time from 09:00 - 23:59
TIME >= 09:00
So a time can't be >= 09:00 AND <= 01:00
Therefore, use OR
-
- Posts: 12
- Joined: Tuesday 16 July 2013 18:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Belgium, Turnhout
- Contact:
Re: Events system feedback thread
That did the trick. Thanks!gertjuhh wrote:When having a time span over midnight use OR instead of AND (for time time part obviously)
-
- Posts: 63
- Joined: Sunday 14 July 2013 11:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Ipswich, UK
- Contact:
Re: Events system feedback thread
Some of this was discussed in the old forum. The problem is that weekends are not standard across the globe or in everyones working habits. My barber's weekend is Sunday and Monday, for example.anderssan wrote:I think it would be a good idea to have weekdays and weekends in the blocky
Domoticz application settings would need to have a setting that defined which days of the week constituted a weekend. The developers didn't take my suggestion so weekends can't really be used. It's a shame. It would be nice to just have to change what your weekends were in one place rather than everywhere if you did shift work, for example. Sigh.
Hmmm, just a thought. Why not have a virtual device called "Weekend" say, and knock up a script that turns it on on Friday evening and off on Monday morning. It's then a simple matter to test the device - simplez. You could also turn on the device by hand if you had a day at home midweek or switch it off if you had a weekend away.
Re: Events system feedback thread
I've learned something new, thanks !
obviously blocky logic is somehow...not that logic !
obviously blocky logic is somehow...not that logic !
- mbliek
- Posts: 194
- Joined: Friday 12 July 2013 14:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the Netherlands
- Contact:
Re: Events system feedback thread
A question about this blocky:
The alarm only needs to be deactivated when I press the switch "slapen" to off.
But when the dummy switch "licht/donker" (light/dark) change to off, the Alarm will also deactivated when "slapen" is off.
How can I make this happen?
The alarm only needs to be deactivated when I press the switch "slapen" to off.
But when the dummy switch "licht/donker" (light/dark) change to off, the Alarm will also deactivated when "slapen" is off.
How can I make this happen?
Op zoek naar een Domoticz Start Set?
-
- Posts: 1
- Joined: Friday 13 December 2013 16:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Events system feedback thread
Hi,
I tried this simple blocky, to test if i can use my X10 motion detector to switch on a lamp.
The X10 pir has status Motion / No Motion , i can't see this in the "blocky" selection screen.
Is there a way to get it working with blocky?
I tried this simple blocky, to test if i can use my X10 motion detector to switch on a lamp.
The X10 pir has status Motion / No Motion , i can't see this in the "blocky" selection screen.
Is there a way to get it working with blocky?
- mobisat
- Posts: 25
- Joined: Thursday 31 October 2013 17:21
- Target OS: Linux
- Domoticz version: 2020.1
- Location: Scotland
- Contact:
Re: Events system feedback thread
I have a LUA query for implementing a "Delay ON" function
commandArray = {}
if (devicechanged['Boiler on/off'] == 'Off' then
Wait 5 mins <<<<<<how do I do that part??
commandArray['Boiler off only']='On'
end
return commandArray
This way every time my boiler turns off via the device timer, it will wait say 5 mins then turn on my dummy switch to turn off the boiler, in case the first command wasn't sent/received
commandArray = {}
if (devicechanged['Boiler on/off'] == 'Off' then
Wait 5 mins <<<<<<how do I do that part??
commandArray['Boiler off only']='On'
end
return commandArray
This way every time my boiler turns off via the device timer, it will wait say 5 mins then turn on my dummy switch to turn off the boiler, in case the first command wasn't sent/received
Raspberry PI 3 model B running Domoticz. RFLink, Zigbee2MQTT,
Domoticz V2020.1, utilising 1 wire DS18B20 Digital Temperature Sensors. Running Domoticz Premium android app.
Domoticz V2020.1, utilising 1 wire DS18B20 Digital Temperature Sensors. Running Domoticz Premium android app.
- mbliek
- Posts: 194
- Joined: Friday 12 July 2013 14:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the Netherlands
- Contact:
Re: Events system feedback thread
mobisat wrote:I have a LUA query for implementing a "Delay ON" function
commandArray = {}
if (devicechanged['Boiler on/off'] == 'Off' then
Wait 5 mins <<<<<<how do I do that part??
commandArray['Boiler off only']='On'
end
return commandArray
This way every time my boiler turns off via the device timer, it will wait say 5 mins then turn on my dummy switch to turn off the boiler, in case the first command wasn't sent/received
You could try if you use domoticz on a raspberry:
commandArray = {}
if (devicechanged['Boiler on/off'] == 'Off' then
os.execute('sleep 300')
commandArray['Boiler off only']='On'
end
return commandArray
Op zoek naar een Domoticz Start Set?
- mobisat
- Posts: 25
- Joined: Thursday 31 October 2013 17:21
- Target OS: Linux
- Domoticz version: 2020.1
- Location: Scotland
- Contact:
Re: Events system feedback thread
@mbliek,
Thanks for the reply, unfortunately the os.execute('sleep 300') doesn't appear to be a usable option as the system basically froze for those 5 minutes. Surely there must be some sort of on delay after all we have off delays on the switches side. Seems a simple option but not so easy to implement
Thanks for the reply, unfortunately the os.execute('sleep 300') doesn't appear to be a usable option as the system basically froze for those 5 minutes. Surely there must be some sort of on delay after all we have off delays on the switches side. Seems a simple option but not so easy to implement

Raspberry PI 3 model B running Domoticz. RFLink, Zigbee2MQTT,
Domoticz V2020.1, utilising 1 wire DS18B20 Digital Temperature Sensors. Running Domoticz Premium android app.
Domoticz V2020.1, utilising 1 wire DS18B20 Digital Temperature Sensors. Running Domoticz Premium android app.
-
- Posts: 110
- Joined: Friday 20 September 2013 18:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Finland
- Contact:
Re: Events system feedback thread
Make another dummy switch with off delay. Switch this new dummy on when first dummy goes off. After delay new dummy goes off and send additional off command for boiler.
-Jussi-
-Jussi-
- l0gic
- Posts: 107
- Joined: Tuesday 08 October 2013 9:35
- Target OS: Linux
- Domoticz version: Latest
- Contact:
Re: Events system feedback thread
I'm using the command 'On For x' for randomly switching my lights on for while I'm away.
I've not checked but is there a Off in equivalent?
If I get a minute I'll take a look.
Kevin
I've not checked but is there a Off in equivalent?
If I get a minute I'll take a look.
Kevin
Non credus crepitus
- l0gic
- Posts: 107
- Joined: Tuesday 08 October 2013 9:35
- Target OS: Linux
- Domoticz version: Latest
- Contact:
Re: Events system feedback thread
OK, I knocked up a quick script to test it but it's a bit strange.
I set up a commandArray['myDevice'] = 'Off IN 5'
but it didn't trigger, the device remained on.
However the script did not error either.
Perhaps someone who has used scripting more than me will have an insight.....
Kevin
I set up a commandArray['myDevice'] = 'Off IN 5'
but it didn't trigger, the device remained on.
However the script did not error either.
Perhaps someone who has used scripting more than me will have an insight.....
Kevin
Non credus crepitus
- mongoose
- Posts: 42
- Joined: Friday 22 November 2013 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Events system feedback thread
Took me a while, I thought that the blocky system was not working for me, I wanted a light to come on when the door was open, little did I know that when you set the klik aan klik uit AMST 606 door sensor you have to use on / off in blocky instead of open / closed, hope this helps anyone else that is a bit stuck with this 

-
- Posts: 34
- Joined: Friday 12 July 2013 14:19
- Target OS: Windows
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Events system feedback thread
I've made a blocky event for security purposes.
So I've a couple of sensors and a dummy switch called alarm. If alarm is on and sensor is on then trigger the fire alarm (panic).
The only "problem" is that the fire alarm is on for a few seconds. What I would like to have the alarm on continuously until the dummy switch is turned off.
Thank you in advance!
Will
So I've a couple of sensors and a dummy switch called alarm. If alarm is on and sensor is on then trigger the fire alarm (panic).
The only "problem" is that the fire alarm is on for a few seconds. What I would like to have the alarm on continuously until the dummy switch is turned off.
Thank you in advance!
Will
Who is online
Users browsing this forum: No registered users and 0 guests