Page 2 of 16

Re: Events system feedback thread

Posted: Sunday 14 July 2013 12:04
by CopyCatz
I have just implemented temperature, humidity and barometer values for testing (as of v1.841). A light just came on because the humidity in the room was > 0. :lol:

I have no barometer devices, so if someone could test those..

Re: Events system feedback thread

Posted: Sunday 14 July 2013 12:07
by CopyCatz
Jochen wrote:Hi,
i´m currently playing with the new Eventsystem. Until now everything i tried is working fine!
Realy good job.

But i´m also missing some things.
When I want to send a Notification (Prowl), i want to send the current status, like
Subject: Door is open
Message:
Door: Garden
Type: Open
Time: 12:48:55
My Problem is to include var´s to the strings.

Define Variable.
Blockly has the functions to create own Variables. Can you add this?

Thank you.
Good one, will add that at a later time.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 12:18
by capman
First of all a big applause for everyone who is in this project for the way it is now :D
Now my problem. I want to use the event system to control my blinds. When the temperature outside is greater then inside my blinds must go down.
I use domoticz latest version with windows os. When I program the blinds via the blocks events: If outside temperature is greater or
equal then temperature in the bedroom do blinds bedroom on (down). So this is working good the blinds go down but the event still working
after the execute. So it still send a on command to my blind as long as the temperature outside is greater than in my bedroom.
So my "coco" asun-650 receiver is still clicking. And with large blinds when they closing and the event send again a on command , they stop , until the event send another on command then they go
further closing. I hope you understand my problem here.

Again a big thank you for a great program.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 12:22
by fafe07
pierre4fun wrote:Hello,

The event can be saved under chrome: it works fine. in all configs :)

THANKS !
Hello Pierre4fun,

I still can't save the event, can you help on this one?
My configuration is:
Raspbian "Wheezy" + Domoticz
Raspberry PI vB
Rfxtrx
Firefox v22

Are there options to activate in the navigator?

Thanks
__________________________________________________
__________________________________________________

Update!
It is OK I resolved my problem!
I could not save because the events were not complete.

Thanks again for your support & work!

Re: Events system feedback thread

Posted: Sunday 14 July 2013 13:51
by Yihaaa
Today I have played with the event system and made an event just for testing with 2 lamps.

As it was just a test I deleted the event. But now somehow one of the lamps so every now and than switches on?!

Perhaps this is some kind of bug. Perhaps the event is not quite deleted from the memory of Domoticz?

Re: Events system feedback thread

Posted: Sunday 14 July 2013 14:13
by Jochen
I have found an error...

i tried to make a event that should do this:
1) When open the garage between (22:00 and 07:00) turn on the light in the garage and send an notification.
2) When garagedoor is closed (turn off the light)

PS: To test this, the garagedoor is a Switch-Device and the time is set to between 07:00 and 22:00
garage.PNG
garage.PNG (18.87 KiB) Viewed 7290 times
In the Log i found this Line after testing:

Code: Select all

Error: Sun Jul 14 14:07:02 2013 Lua script error: [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare nil with number
EDIT:
When i change the event to this:
garage2.PNG
garage2.PNG (23.17 KiB) Viewed 7286 times
There is now error in the log an an Message was send, the light turned on
But Nothing will happend when the garage is closing. No error in the log, no message an the light is still on.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 15:22
by meinetrashbox
hello

it is not possible to insert a value at the marked spot.

I miss the possibility for countdown timer and on / off delay

Re: Events system feedback thread

Posted: Sunday 14 July 2013 17:12
by CopyCatz
I'm going to disable having multiple if-then blocks after another. It is too complex for the moment, and I think each event should be saved as a single if-then statement. If you want complex rules use the scripts.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 17:23
by CopyCatz
For issues regarding temperature measurements, deleted events still running:

http://www.domoticz.com/wiki/Events#Usi ... nts_system

Consult the wiki page and check that you are on the version it is implemented/fixed in.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 19:52
by CopyCatz
meinetrashbox wrote:hello

it is not possible to insert a value at the marked spot.

I miss the possibility for countdown timer and on / off delay
The way you are structuring your logic isn't going to work. Look at jochen's examples, that way it should work, but only with one if/then block.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 20:06
by Jochen
CopyCatz wrote:I'm going to disable having multiple if-then blocks after another. It is too complex for the moment, and I think each event should be saved as a single if-then statement. If you want complex rules use the scripts.
It´s not fine but i can life with it!
I save the single if-then parts with different names and everything works great.

Is there any way to implement a function that fired a command after timeout?
Like:

Code: Select all

if(Device == On) {
   timeout(function(){}, 1000);
}
Another Idea:
What you think about an POST-Message like

Code: Select all

if(Device == On) {
   post(URL, PARAMETER);
}

Re: Events system feedback thread

Posted: Sunday 14 July 2013 20:38
by CopyCatz
Is there any way to implement a function that fired a command after timeout?
Like:

Code: Select all

if(Device == On) {
   timeout(function(){}, 1000);
}
I was thinking about a delay also but this will be very complex;

Time zero:
If lamp is off set lamp on with delay 10 minutes.
Time one minute: lamp is still off
If lamp is off set lamp on with delay 10 minutes.
...
After 10 minutes the lamp is switched on 10 times... I can implement a delay now but it would have to be less than a minute.

Another Idea:
What you think about an POST-Message like

Code: Select all

if(Device == On) {
   post(URL, PARAMETER);
}
You can do that with the lua scripts, make a nice example and post it here :) If people are smart enough to want to trigger http api's based on an event they are not the target audience for blockly I think.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 21:11
by Jochen
You are right...
in the next days i will try to develope a litte script what can post data to other api´s.
It could take some time. Currently i´m very busy. When i made this script i will post it.

Re: Events system feedback thread

Posted: Sunday 14 July 2013 21:14
by Jochen
CopyCatz wrote: I was thinking about a delay also but this will be very complex;

Time zero:
If lamp is off set lamp on with delay 10 minutes.
Time one minute: lamp is still off
If lamp is off set lamp on with delay 10 minutes.
...
After 10 minutes the lamp is switched on 10 times... I can implement a delay now but it would have to be less than a minute.
And when this events only triggerd by changing his status? Not every minute?
I think the you can add something like:
Device is switched on -> send Off in 10 Minutes (when device is still on)

Re: Events system feedback thread

Posted: Sunday 14 July 2013 22:08
by tommit01
Party has started too early...

Last two days event system sent me 490 Mails for deleted rule..
As I still use windows, can you please generate a new windows install file?

834 is currently last one for windows systems.

I will travel to this place tomorrow...

Thanks
Tommit

Re: Events system feedback thread

Posted: Sunday 14 July 2013 23:42
by CopyCatz
Sorry, I don't build the windows version..

Anyway, just implemented this:

Image

Use the minutes value only with the int value block as shown. The system determines:

- The device to switch, for instance to "On" and schedules that immediately
- Then finds the opposite action, in this case "Off" and schedules that when the number of minutes have passed.

I have no idea of the weird things you can do with this, so please test :) I guess you can also switch stuff off for a minute.

Sorry for the huge pic, retina screen & too lazy to resize each screenshot.

Re: Events system feedback thread

Posted: Monday 15 July 2013 0:05
by CopyCatz
Random timer also implemented.

Re: Events system feedback thread

Posted: Monday 15 July 2013 8:18
by Mike Thrussell
How do you set dimmer values in Blocky / Lua scripts?

Re: Events system feedback thread

Posted: Monday 15 July 2013 8:52
by CopyCatz
Mike Thrussell wrote:How do you set dimmer values in Blocky / Lua scripts?
"Set Level x" should work but haven't tested it as I have no dimmers...

Re: Events system feedback thread

Posted: Monday 15 July 2013 11:01
by Orangina_L
Hi,

Thanks it is very nice !

2 small problems :

- translation don't work for condition, ex : you have to put = "Closed" or "Open" even if the software is in French and normally it is "Fermer" or "Ouvrir" (see attached capture.jpg and Capture2.jpg)
- condition don't worl with Scene (or perhaps I missed something ?) : attachement capture.jpg work and attachement capture 3.jpg don't work.