I have a TV Lift. The lift needs 20s to reach the end position.
The lift are controlled over a relay board with rs232 which works fine, but
EG can┬┤t react to other commands until the 20s are up.
I have only a simple wait command between the two relay commands.
I like to start the lift and perhaps start a timer. Then can
EG react to other commands like music control.
When the timer is up, the relay off command is send.
How can i do this ?
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.
Start macro, do other things and stop macros after 20s
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Start macro, do other things and stop macros after 20s
Add action EventGhost - Clear Pending Events.
Pako
Pako
Re: Start macro, do other things and stop macros after 20s
The problem is the wait command which blocks EG from processing other things while it waits. Unlike the wait command the delay for TriggerEvent is non-blocking, you can use it to achieve the same end result. (it's actually a timer)
So, split your macro into two - first one with the "start lift" command and second one with the "stop lift" command. In the first macro instead of using Wait for 20sec, use TriggerEvent with a 20sec delay. Use this delayed event to trigger the second macro.
So, split your macro into two - first one with the "start lift" command and second one with the "stop lift" command. In the first macro instead of using Wait for 20sec, use TriggerEvent with a 20sec delay. Use this delayed event to trigger the second macro.