Hi, and Merry Christmas!
I hope I can make you understand, english is not my cop of tea.
I have a macro named, "Kamera". In "Kamera" I have the action, "EventGhost.PythonCommand(u"urllib.urlopen('http://localhost:65109/bringonline?ot=2&oid=1')")".
The action is triggered by the event, "TellStickDuo.R├â┬ÂrelseSensor.ON". No problem so far, everything works great.
Here's what I need help to accomplish. If the event, "TellStickDuo.D├âãÆ├é┬Ârr Knapp 1.ON", occurs within 5 seconds of the event, "TellStickDuo.R├â┬ÂrelseSensor.ON",
I don't want the action to be run.
How do I do this?
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1640">
<Macro Name="Kamera" Expanded="True">
<Event Name="TellStickDuo.R├â┬ÂrelseSensor.ON" />
<Event Name="TellStickDuo.D├âãÆ├é┬Ârr Knapp 1.ON" />
<Action>
EventGhost.PythonCommand(u"urllib.urlopen('http://localhost:65109/bringonline?ot=2&oid=1')")
</Action>
</Macro>
</EventGhost>
Thanks!
/Jonas
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Prevent action from beeing executed
Re: Prevent action from beeing executed
This will disable the action for 5 seconds after "TellStickDuo.D├âãÆ├é┬Ârr Knapp 1.ON" but I don't know if that's exactly the behavior you're looking for.
If that's not what you're going for then give me more details of what you mean by "within 5 seconds of the event".
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1640">
<Macro Name="Kamera" id="2" Expanded="True">
<Event Name="TellStickDuo.R├ÂrelseSensor.ON" />
<Action>
EventGhost.PythonCommand(u"urllib.urlopen('http://localhost:65109/bringonline?ot=2&oid=1')")
</Action>
</Macro>
<Macro Name="Disable: Kamera" Expanded="True">
<Event Name="TellStickDuo.D├â┬Ârr Knapp 1.ON" />
<Action>
EventGhost.DisableItem(XmlIdLink(2))
</Action>
<Action>
EventGhost.TriggerEvent(u'enableKamera', 5.0)
</Action>
</Macro>
<Macro Name="Enable: Kamera" Expanded="True">
<Event Name="Main.enableKamera" />
<Action>
EventGhost.EnableItem(XmlIdLink(2))
</Action>
</Macro>
</EventGhost>
Last edited by pearbear on Mon Jun 05, 2017 10:02 am, edited 1 time in total.
Re: Prevent action from beeing executed
Hello!
Thank you for your help! Sorry to say that, what you suggested didn't do what I want.
When I enter my apartment there is motion detector (=R├ÂrelseSensor), and a button (=D├â┬Ârr Knapp 1).
The motion detector, detects movement and starts my security camera (=urllib.urlopen('http://localhost:65109/bringonline?ot=2&oid=1').
What I want is: If I press the button less than 5 seconds after the motion has been detected, I don't
want the camera to start.
Did that make it understandable?
Best regards
Jonas
Thank you for your help! Sorry to say that, what you suggested didn't do what I want.
When I enter my apartment there is motion detector (=R├ÂrelseSensor), and a button (=D├â┬Ârr Knapp 1).
The motion detector, detects movement and starts my security camera (=urllib.urlopen('http://localhost:65109/bringonline?ot=2&oid=1').
What I want is: If I press the button less than 5 seconds after the motion has been detected, I don't
want the camera to start.
Did that make it understandable?
Best regards
Jonas
Re: Prevent action from beeing executed
OK, the attached file should do it.
By the way, 0.4.0.r1640 is a pretty ancient version of EventGhost.
By the way, 0.4.0.r1640 is a pretty ancient version of EventGhost.
- Attachments
-
- Lilak.xml
- (1.01 KiB) Downloaded 114 times
Re: Prevent action from beeing executed
Thank you very much for your help. Now it works perfectly!
Thanks for notice my old version of EG, will fix it asap.
Best regards
Jonas
Thanks for notice my old version of EG, will fix it asap.
Best regards
Jonas