Author Topic: Delayed events not working  (Read 6579 times)

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Delayed events not working
« on: June 05, 2015, 08:41:53 am »
Hey,

For several lights, I built in an event that delayed some minutes, and power off the lights. (fe cellar, attick, outside lights triggered by sonar...).
But with version 14.04 / 12.04, it seems that the delay isn't working anymore? I inserted the exact same command as in 8.10, but my lights keep on.
Any idea how/where I could solve this?
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Delayed events not working
« Reply #1 on: June 05, 2015, 09:33:33 am »
Delayed events?  We have those?  ???  I didn't think we actually had those.  Provide some more specifics about the event, how you set it up, and your expected/actual behaviour.

Thanks brononius!  We haven't changed anything in regards to how events are handled so I'm lost atm.

J.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Delayed events not working
« Reply #2 on: June 05, 2015, 09:48:04 am »
Hey,

What i do fe to let my lights turn on for 3 minutes:

Create an advanced event.

My criteria:
Code: [Select]
PK_device = Sensor1
PK_EvenParameter = Tripped
State = Light1 = OFF/0
Time of Day = NIGHT

My commands:
Code: [Select]
command1: Light1 = ON
command2: Light2 = ON
command3: DCEROUTER = delay = 180
command4: Light1 = OFF
command5: Light2 = OFF

My lights come on, so command 1,2 is working, but afterwards, nothing...

Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Delayed events not working
« Reply #3 on: June 05, 2015, 10:25:11 am »
The delay event is problematic. iirc it stops the whole event engine for that amount of time.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Delayed events not working
« Reply #4 on: June 05, 2015, 10:28:19 am »
The delay event is problematic. iirc it stops the whole event engine for that amount of time.

Does it stops - stops, or holds for the amount of time?
Shouldn't the event 'go on' after the amount of time?
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Delayed events not working
« Reply #5 on: June 05, 2015, 10:34:19 am »
The event might continue after the amount of time, but during the delay, no other event is processed. Again, this is how I remember it being in the past. It might be that sambuca has changed stuff in that area.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Delayed events not working
« Reply #6 on: June 05, 2015, 11:24:04 am »
The event might continue after the amount of time, but during the delay, no other event is processed.

I confirm that this worked in 8.10.
But in 14.04, it seems to get stuck somewhere.  :-[
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: Delayed events not working
« Reply #7 on: June 05, 2015, 08:03:24 pm »
I haven't intentionally changed anything regarding delayed events.. or rather delayed commands. Because it is the command that is delayed not the event  :)

br,
sambuca

RayBe

  • Guru
  • ****
  • Posts: 315
    • View Profile
Re: Delayed events not working
« Reply #8 on: June 05, 2015, 10:45:32 pm »
I can confirm that the delay command is still working in 12.04.
Its being used in my install every day.
I attached a screenshot from one of those events.

br,
Raymond
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Delayed events not working
« Reply #9 on: June 08, 2015, 07:32:27 am »
Damned, guess I've got another problem. It seems that some events work, some don't.
Strange thing is that most of the events are rather simple once, and exactly the same. So it's not linked with the eib convertion, or with a 'complex' event. When i check the eib log file, it seems to enters when sensors are pushed. But for some events, it works, for others it don't.



ps RayBe, nice to see that other dutch speaking people are also using LinuxMCE. ;)
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Delayed events not working
« Reply #10 on: June 30, 2015, 02:26:03 pm »
Not sure why, but this isn't working 100% correctly in my case.  :'(

I've noticed in my logs, that the events keeps on being triggered. When I tried to write my own script for this, I've noticed that my bash script also kept on running. After the exit command, it just reopens a new process. So i can image that after pushing a few time the sensor, a lot of process where shutting down my lights.

I've solved this with following script (notice the pkill):
Quote from: AutoUIT_Kelder.sh
#! /bin/sh
sleep 180
groupswrite ip:127.0.0.1 4/1/11 0
pkill AutoUIT_Kelder
exit
And I run this script with the event 'App Server' and Spawn Application...
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE