Events system thread (questions and feedback)

Moderator: leecollings

User avatar
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

Post by mbliek »

Is it possible to add support for taking a camera snapshot with lua?
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

Set a trigger to a dummy device in the cam setup and trigger the dummy in lua?
anderssan
Posts: 2
Joined: Thursday 18 July 2013 18:21
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by anderssan »

Hi,

I think it would be a good idea to have weekdays and weekends in the blocky
davidw
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

Post by davidw »

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?
PingConroe.PNG
PingConroe.PNG (19.13 KiB) Viewed 12576 times
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

When having a time span over midnight use OR instead of AND (for time time part obviously)
bistoury
Posts: 35
Joined: Friday 12 July 2013 14:14
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by bistoury »

gertjuhh wrote:When having a time span over midnight use OR instead of AND (for time time part obviously)
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....


Regards
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

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
davidw
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

Post by davidw »

gertjuhh wrote:When having a time span over midnight use OR instead of AND (for time time part obviously)
That did the trick. Thanks!
commodore white
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

Post by commodore white »

anderssan wrote:I think it would be a good idea to have weekdays and weekends in the blocky
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.

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.
bistoury
Posts: 35
Joined: Friday 12 July 2013 14:14
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by bistoury »

I've learned something new, thanks !
obviously blocky logic is somehow...not that logic !
User avatar
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

Post by mbliek »

A question about this blocky:
Blocky_slapen.png
Blocky_slapen.png (43.66 KiB) Viewed 12472 times
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?
laugscom
Posts: 1
Joined: Friday 13 December 2013 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Events system feedback thread

Post by laugscom »

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?
Blocky
Blocky
Event sample.jpg (41.3 KiB) Viewed 12458 times
User avatar
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

Post by mobisat »

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
Raspberry PI 3 model B running Domoticz. RFLink, Zigbee2MQTT,
Domoticz V2020.1, utilising 1 wire DS18B20 Digital Temperature Sensors. Running Domoticz Premium android app.
User avatar
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

Post by mbliek »

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
User avatar
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

Post by mobisat »

@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 :(
Raspberry PI 3 model B running Domoticz. RFLink, Zigbee2MQTT,
Domoticz V2020.1, utilising 1 wire DS18B20 Digital Temperature Sensors. Running Domoticz Premium android app.
alfred_j_kwak
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

Post by alfred_j_kwak »

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-
User avatar
l0gic
Posts: 107
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Events system feedback thread

Post by l0gic »

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
Non credus crepitus
User avatar
l0gic
Posts: 107
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Events system feedback thread

Post by l0gic »

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
Non credus crepitus
User avatar
mongoose
Posts: 42
Joined: Friday 22 November 2013 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Events system feedback thread

Post by mongoose »

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 :)
willie-p
Posts: 34
Joined: Friday 12 July 2013 14:19
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Re: Events system feedback thread

Post by willie-p »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests