Events system thread (questions and feedback)

Moderator: leecollings

gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

I think you misunderstood me, my proposition is actually not that complex.
Events already have a boolean/checkbox "Event active", all I'm suggesting is being able to toggle that boolean from within a (nother) event.

Another valid example of where this could be used:
Event A: Rain sensor (not sure if these work yet) current rainfall > 1mm AND bedroom windows sensor = open --> Send notification + disable "Event A"
Event B: Rain sensor current rainfall = 0mm OR bedroom window senor = closed --> enable "Event A"
This way you wouldn't get a notification each time the rain sensor checks in.
willie-p
Posts: 34
Joined: Friday 12 July 2013 14:19
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Blockly gives a LUA error

Post by willie-p »

ls,

I've made a blockly event which should work in my opinion but I look at my log I see:
Error: Wed Aug 07 14:43:22 2013 Lua script error: [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'

What am I doing wrong?
Attachments
turnoff.png
turnoff.png (8.27 KiB) Viewed 3883 times
User avatar
Dynamic
Posts: 109
Joined: Friday 12 July 2013 14:50
Target OS: -
Domoticz version:
Location: Enschede
Contact:

Re: Events system feedback thread

Post by Dynamic »

+1 for gertjuhh's idea!
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 »

ls,

Could still use some help on the post above.
Any idea anyone?

Cheers,
Will
macaidwin
Posts: 28
Joined: Saturday 13 July 2013 9:36
Target OS: -
Domoticz version:
Location: Harderwijk
Contact:

Re: Events system feedback thread

Post by macaidwin »

You can use a 'fake' lightswitch for this. This switch tells the event if it should check the rainfall or not.
Event A: If rain > 1mm AND window = open AND lightswitch=ON then send mail AND switch lightswitch=OFF
Event B: If rain < 1mm OR window = closed then lightswitch=OFF
Something like that
Only thing is, that something has to reset the situation. You have to play with it until it is right.
maxtrash
Posts: 106
Joined: Tuesday 06 August 2013 1:31
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by maxtrash »

I've made some basic blocky script to interface with Eventghost. Eventghost can receive events and payloads using the webserver plugin. I can send them this way, but I would like the payload to be a dim-value (e.g. create a virtual dimmer device).
Image
would this be possible in blockly?

if not, what is the corresponding LUA-statement for Open URL? If I understand correctly internally domoticz changes blockly into lua, right?
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

macaidwin wrote:You can use a 'fake' lightswitch for this. This switch tells the event if it should check the rainfall or not.
Event A: If rain > 1mm AND window = open AND lightswitch=ON then send mail AND switch lightswitch=OFF
Event B: If rain < 1mm OR window = closed then lightswitch=OFF
Something like that
Only thing is, that something has to reset the situation. You have to play with it until it is right.
The whole point of my suggestion is not having to create a fake switch for such events.
That way you don't clutter up your whole system with fake switches, and as an extra bonus the events system will be (theoretically) faster.
macaidwin
Posts: 28
Joined: Saturday 13 July 2013 9:36
Target OS: -
Domoticz version:
Location: Harderwijk
Contact:

Re: Events system feedback thread

Post by macaidwin »

gertjuhh wrote:
macaidwin wrote:You can use a 'fake' lightswitch for this. This switch tells the event if it should check the rainfall or not.
Event A: If rain > 1mm AND window = open AND lightswitch=ON then send mail AND switch lightswitch=OFF
Event B: If rain < 1mm OR window = closed then lightswitch=OFF
Something like that
Only thing is, that something has to reset the situation. You have to play with it until it is right.
The whole point of my suggestion is not having to create a fake switch for such events.
That way you don't clutter up your whole system with fake switches, and as an extra bonus the events system will be (theoretically) faster.

Okay and you can't manage to make 1 complex event with every check in it, you want?
I made these events: http://www.domoticz.com/forum/viewtopic ... t=20#p1118
With checks that prevent the events from repeating itself because of values that keep steady for hours.
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

macaidwin wrote:
gertjuhh wrote:
macaidwin wrote:You can use a 'fake' lightswitch for this. This switch tells the event if it should check the rainfall or not.
Event A: If rain > 1mm AND window = open AND lightswitch=ON then send mail AND switch lightswitch=OFF
Event B: If rain < 1mm OR window = closed then lightswitch=OFF
Something like that
Only thing is, that something has to reset the situation. You have to play with it until it is right.
The whole point of my suggestion is not having to create a fake switch for such events.
That way you don't clutter up your whole system with fake switches, and as an extra bonus the events system will be (theoretically) faster.

Okay and you can't manage to make 1 complex event with every check in it, you want?
I made these events: http://www.domoticz.com/forum/viewtopic ... t=20#p1118
With checks that prevent the events from repeating itself because of values that keep steady for hours.
Sure you can solve a problem multiple ways, my addition would give you one more, one i myself happen to prefer.
But you seem to be missing the point here...
I'm merely making a suggestion which could improve the events system.

I shared my thoughts, given my argumentation, let's just leave it at that.
macaidwin
Posts: 28
Joined: Saturday 13 July 2013 9:36
Target OS: -
Domoticz version:
Location: Harderwijk
Contact:

Re: Events system feedback thread

Post by macaidwin »

It's okay, I get your point to switch events on and of using another event.
I am not a programmer, but I think it is not easy to programm this. So that's why I tried to help with other ideas.
asjmcguire
Posts: 71
Joined: Saturday 13 July 2013 2:45
Target OS: Linux
Domoticz version: 3.5877
Location: Scotland
Contact:

Re: Events system feedback thread

Post by asjmcguire »

willie-p wrote:ls,

Could still use some help on the post above.
Any idea anyone?

Cheers,
Will
Will - unless I have missed an announcement somewhere (which is quite possible with so much activity happening across the forum) I don't think the Blockly editor supports working with scenes yet?
AEOTEC ZStick, 11 ZWave Nodes, RFXCOMM, 50ish Byron Sockets.. HE851 (PIR), 2x HE852 (DoorContact)
WS2300, CM180, CC128, 2xTHGR122NX, 2xPiZeroW w/DS18B20, 8Ch 1W Relay Board.
8 Panasonic IP Cams, 1 16ch CCTV DVR + 15 CCTV Cams
bistoury
Posts: 35
Joined: Friday 12 July 2013 14:14
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by bistoury »

I can confirm blocky works with scene

to run a scene named "SCENE1" you have to add a block such as : set SCENE1 = ON

et voila !

cheers,

bistoury.
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: Events system feedback thread

Post by Skippiemanz »

I'am experimenting with the event system.

Looking very promising. But when i try to get my foscam fi9821 PTZ cam to a default preset when a door sensor is triggerded using the follwoing url:

192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Kamer&usr=xxxxx&pwd=xxxxxx

I get an error when trying to save the event. if i shorten the url in halve i can save the event without problems.

the url after the saving atempt looks like this: 192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi?

Is this a setting in the database or something else?
hemmelot
Posts: 2
Joined: Saturday 10 August 2013 20:14
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by hemmelot »

Hi Guys, first of all my compliments for this great piece of software.

I ran into a problem with the following:
I have a virtual switch (controlled via XBMC, this works) and a dimmer (also works).

Code: Select all

IF virtualswitch=ON AND dimmer=ON
DO set dimmer level to 30%
ELSE IF virtualswitch=OFF AND dimmer=ON
DO set dimmer level to 80%
This won't work.
Losing the "AND dimmer=ON" makes it work, but i only want XBMC to control the light if the dimmer/lamp is on because during daytime i don't want it on (dimmer is on a after sunset timer).

Any ideas?
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Events system feedback thread

Post by pepijn »

I'am trying to create a nice presence simulation in Blockly, some questions

1) Is it possible to start a sequence (turn of the lights, turn on dimmer hallway, turnoff dimmer hallway, turn on bathroom etc) on a random time? I know you can do this for one switch but is would be nice if this can be done for a bunch actions.

2) Can you add a wait/delay block? So Switch 1 --> Wait 1 min --> Switch 2 etc?
sebquid
Posts: 2
Joined: Wednesday 07 August 2013 12:31
Target OS: -
Domoticz version:
Location: France
Contact:

Re: Events system feedback thread

Post by sebquid »

I'am experimenting with the event system.

Looking very promising. But when i try to get my foscam fi9821 PTZ cam to a default preset when a door sensor is triggerded using the follwoing url:

192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Kamer&usr=xxxxx&pwd=xxxxxx

I get an error when trying to save the event. if i shorten the url in halve i can save the event without problems.

the url after the saving atempt looks like this: 192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi?

Is this a setting in the database or something else?
I have got the same issue (see my post http://www.domoticz.com/forum/viewtopic.php?f=15&t=246) and I think It is because blocky doesnt' accept "&" symbol in the URL... Let me know if you managed to save your event without the "&"
User avatar
robpow
Posts: 38
Joined: Friday 19 July 2013 19:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta :)
Location: .se
Contact:

Re: Events system feedback thread

Post by robpow »

what happens if you change

Code: Select all

192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Kamer&usr=xxxxx&pwd=xxxxxx
to

Code: Select all

192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint%26name=Kamer&26usr=xxxxx%26pwd=xxxxxx
?

Matt
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: Events system feedback thread

Post by Skippiemanz »

The link works ok when i try it in my chrome browser.

But unfortunetly i still cant save the event.

Still get the same error and the link is shortened at the same place
User avatar
robpow
Posts: 38
Joined: Friday 19 July 2013 19:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta :)
Location: .se
Contact:

Re: Events system feedback thread

Post by robpow »

What if you urlencode all the special characters like this?

Code: Select all

192.168.xxx.xx:xxxxxx/cgi-bin/CGIProxy.fcgi%3Fcmd%3DptzGotoPresetPoint%26name%3DKamer%26usr%3Dxxxxx%26pwd%3Dxxxxxx
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: Events system feedback thread

Post by Skippiemanz »

Hmm still not saving.

Also the url doesnt work an gives me a 404 error.

Any more ideas?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest