Events system thread (questions and feedback)

Moderator: leecollings

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 »

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..
Last edited by CopyCatz on Sunday 14 July 2013 12:10, edited 1 time in total.
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 »

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.
User avatar
capman
Posts: 153
Joined: Friday 12 July 2013 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Belgium
Contact:

Re: Events system feedback thread

Post 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.
fafe07
Posts: 2
Joined: Friday 12 July 2013 21:55
Target OS: -
Domoticz version:
Location: Ardèche - France
Contact:

Re: Events system feedback thread

Post 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!
Last edited by fafe07 on Sunday 14 July 2013 14:43, edited 1 time in total.
Yihaaa
Posts: 23
Joined: Sunday 14 July 2013 10:31
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Netherlands

Re: Events system feedback thread

Post 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?
User avatar
Jochen
Posts: 11
Joined: Saturday 13 July 2013 10:37
Target OS: -
Domoticz version:
Location: Germany / NRW
Contact:

Re: Events system feedback thread

Post 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 6772 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 6768 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.
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
User avatar
meinetrashbox
Posts: 1
Joined: Friday 12 July 2013 18:02
Target OS: -
Domoticz version:
Location: germany
Contact:

Re: Events system feedback thread

Post 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
Attachments
event.png
event.png (38.1 KiB) Viewed 6766 times
greetz

wood
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 »

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.
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 »

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.
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 »

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.
User avatar
Jochen
Posts: 11
Joined: Saturday 13 July 2013 10:37
Target OS: -
Domoticz version:
Location: Germany / NRW
Contact:

Re: Events system feedback thread

Post 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);
}
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
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 »

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.
User avatar
Jochen
Posts: 11
Joined: Saturday 13 July 2013 10:37
Target OS: -
Domoticz version:
Location: Germany / NRW
Contact:

Re: Events system feedback thread

Post 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.
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
User avatar
Jochen
Posts: 11
Joined: Saturday 13 July 2013 10:37
Target OS: -
Domoticz version:
Location: Germany / NRW
Contact:

Re: Events system feedback thread

Post 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)
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
User avatar
tommit01
Posts: 39
Joined: Friday 12 July 2013 14:08
Target OS: Raspberry Pi / ODroid
Domoticz version: multiple
Location: Germany / SL
Contact:

Re: Events system feedback thread

Post 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
1 x RPi3
4 x RPI
3 x RPi2
1 x RPI2 + Win 10 IoT (experimental device)
2 x RPI2 Raspbian "Jessie" + Domoticz (for tenants)
2 x RPI OSMC @ 1GHz
1 RPi Zero W + Cam NOIR
1 RPi Zero W + Cam
RFXtrx 433 FW 1015
RFXtrx 433 E FW 1020
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 »

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.
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 »

Random timer also implemented.
Mike Thrussell
Posts: 3
Joined: Friday 12 July 2013 14:07
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by Mike Thrussell »

How do you set dimmer values in Blocky / Lua scripts?
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 »

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...
Orangina_L
Posts: 3
Joined: Monday 15 July 2013 10:11
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post 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.
Attachments
don't work
don't work
Capture3.JPG (27.79 KiB) Viewed 6717 times
"Fermer" ou Ouvrir"
"Fermer" ou Ouvrir"
Capture2.JPG (15.73 KiB) Viewed 6717 times
Closed or Open
Closed or Open
Capture.JPG (24.57 KiB) Viewed 6717 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest