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.

Action only active a certain times

If you have a question or need help, this is the place to be.
Post Reply
Supersevereid
Posts: 11
Joined: Mon Apr 01, 2013 11:26 am

Action only active a certain times

Post by Supersevereid »

Hi,

I'm looking for a way to make an action active only at certain times.

I want to be able to make play, pause, stop etc. trigger the lights at home with switchking/telldus, but only between 19:00-02:00 as the tv is in the living room and wife does not approve of this 24/7 :)

Is this possible and how?
..I'm very new to eventghost and I haven't yet found anything on making activites work only during specific time intervalls
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Action only active a certain times

Post by jonib »

Supersevereid wrote:I'm looking for a way to make an action active only at certain times.
I haven't used it but SchedulGhost plugin seems to be what your looking for.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Supersevereid
Posts: 11
Joined: Mon Apr 01, 2013 11:26 am

Re: Action only active a certain times

Post by Supersevereid »

Thanks, I might give that a shot.
Currently using this code i found in a different thread

Code: Select all

import time
timeStamp = str(
    time.strftime("%H", time.localtime())
)

if int(timeStamp) >= 20 or int(timeStamp) < 3:
    #Stop macro execution
    print 'Flaps do not open'
    eg.StopMacro()
But I'm not quite sure where in the configuration tree I should put the script?
Image
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Action only active a certain times

Post by jonib »

Supersevereid wrote:But I'm not quite sure where in the configuration tree I should put the script?
Looks like you need to put it first in any macro you want to time control.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Supersevereid
Posts: 11
Joined: Mon Apr 01, 2013 11:26 am

Re: Action only active a certain times

Post by Supersevereid »

Looks like I've been way off from the beginning :oops:

I need to get the player state from XBMC on my HTPC to check if a video is playing - Is there a way to get EG to listen for this?
I've looked up xbmceventviewer, but that doesn't seem to have been updated for frodo.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Action only active a certain times

Post by jonib »

Supersevereid wrote:I need to get the player state from XBMC on my HTPC to check if a video is playing - Is there a way to get EG to listen for this?
With my latest test version of the XBMC2 plugin here (I have unfortunately not released a proper release that supports Frodo yet ), you can either get events from XBMC when video is playing and/or using the Experimental\JSONRPC commands to query if a video is playing (and any other info you need).

Edit: Please post any XBMC2 (or XBMC) related questions to the XBMC2 support thread.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply