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.

Stand by of the screen

If you have a question or need help, this is the place to be.
themaster1
Experienced User
Posts: 133
Joined: Wed Feb 03, 2010 9:02 pm

Re: Stand by of the screen

Post by themaster1 »

FCB38 wrote:Hello,

Thank you Blaher.
You said:
... why do you want to press the button manually, and not have it happen automatically and why the toggle, instead of a button for monitor off, and monitor on?
First, I want the toggle function because my remote have not a lot of free button. That's with my Eventghost Macro have to read screen's state (On or Off) to change this state.
Second, If I want to Switch Off the screen exactily when I want, I have to push a button isn't it?

Example:
I want to ear music. I take my remote controller, start XBMC, choose my music, play it. No problem...
Now I want to Switch Off the screen by my remote controller. Then I press one button.
Utilises le plugin OS Menu ├ºa sera mieux et dans le menu tu pourras cr├®er 2 onglets un pour ├®teindre l'├®cran un pour le rallumer par exemple.
Ensuite tu assignes une touche à ce menu et qd tu appuieras dessus il s'affichera

voilà ce que ça donne chez moi: http://imageshack.us/photo/my-images/33/osmenu.png/

Tu peux t'inspirer de ma config ,voir ICI (marche avec win7 x64)
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

Hello,

I have the default XBMC2 plugin that comes with the eventghost installation.
Do you talk about this one or I have to install an other plugin?
I'm not front of my computer, can you give me some informations on the used function of this plugin?

Thank you very much.
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Stand by of the screen

Post by blaher »

FCB38 wrote:I have the default XBMC2 plugin that comes with the eventghost installation.
Do you talk about this one or I have to install an other plugin?
If you're referring to me, (I can't understand the post above yours), then I was talking about installing a newer XBMC2 plugin. The link in my previous post has the file and instructions.
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

Hello,

Yes I answer to you "blaher".
I'm sorry but I don't know how to install the new plugin. I follow the link here and it's not clear for me. Is it the "__init__.py" file ?
If yes where I have to put it?

Best regards.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Stand by of the screen

Post by jonib »

FCB38 wrote:I'm sorry but I don't know how to install the new plugin. I follow the link here and it's not clear for me. Is it the "__init__.py" file ?
If yes where I have to put it?
Yes it's the __init__.py file, you need to put it in "EventGhost install directory\plugins\XBMCRepeat\". As it's a test version you should backup both the old plugin and more importantly your EventGhost config.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

OK, I'll test this as soons as possible.
Tank you one more time.
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Stand by of the screen

Post by blaher »

If the other instructions are hard to follow, after you've copied the .py file, copy and paste the following into your EventGhost tree:

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1582">
<Folder Name="Json" Expanded="True">
<Macro Name="XBMC2: JSONRPCEventsConnect" Expanded="True">
<Event Name="Task.Created.XBMC" />
<Event Name="Task.Activated.XBMC" />
<Action>
XBMC2.JSONRPCEventsConnect()
</Action>
<Action>
XBMC2.HTTPAPI(u'SetBroadcast', u'2', 5, True)
</Action>
</Macro>
</Folder>
</EventGhost>
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

OK,
I have put the file __init__.py in the good folder.
I try to create a new xml file with the code that you give:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1582">
<Folder Name="Json" Expanded="True">
<Macro Name="XBMC2: JSONRPCEventsConnect" Expanded="True">
<Event Name="Task.Created.XBMC" />
<Event Name="Task.Activated.XBMC" />
<Action>
XBMC2.JSONRPCEventsConnect()
</Action>
<Action>
XBMC2.HTTPAPI(u'SetBroadcast', u'2', 5, True)
</Action>
</Macro>
</Folder>
</EventGhost>
But I have lot of errors:

Code: Select all

---> Welcome to EventGhost <---
Unhandled exception in WorkerThread <EventThread>:
Callers stack:
  File "wx\_core.pyc", line 8010, in MainLoop
  File "wx\_core.pyc", line 7306, in MainLoop
  File "wx\_core.pyc", line 14660, in <lambda>
Traceback (most recent call last) (1582):
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ThreadWorker.py", line 326, in __DoOneEvent
    self.HandleAction(action)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ThreadWorker.py", line 289, in HandleAction
    action()
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
    self.returnValue = self.func(*self.args, **self.kwargs)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\EventThread.py", line 142, in StartSession
    actionThread.Func(actionThread.StartSession, 120)(filename)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
    self.returnValue = self.func(*self.args, **self.kwargs)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ActionThread.py", line 39, in StartSession
    eg.document.Load(filename)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\Document.py", line 145, in Load
    root = self.RootItem(self, node)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\RootItem.py", line 55, in __init__
    ContainerItem.__init__(self, parent, node)
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ContainerItem.py", line 38, in __init__
    for childNode in node
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ContainerItem.py", line 38, in __init__
    for childNode in node
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ContainerItem.py", line 38, in __init__
    for childNode in node
  File "C:\Logiciels\Utilitaires\EventGhost\eg\Classes\ActionItem.py", line 69, in __init__
    plugin = getattr(eg.plugins, pluginStr).plugin
AttributeError: 'Bunch' object has no attribute 'XBMC2'
Anyway, I can use my previous xml file.
I'm looking in the XBMC2 plugin and I don't know where is the function which switch offthe screen when I play music.

Can you help me one more time?

Thank you
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Stand by of the screen

Post by blaher »

FCB38 wrote:OK,
I try to create a new xml file with the code that you give
No, copy and paste the code into your EventGhost tree, i.e. with EventGhost running with your .xml, right click on 'configuration tree' and paste.

I've attached my .xml if it helps. I use xbmc's events under my 'lights' folder for videos, if an example helps.

If you can't get it to work, attach your .xml here and I'll try. :)
Attachments
eg.xml
(170.86 KiB) Downloaded 199 times
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

Hello,

I give your xml file to my eventghost. I'ts working with errors but I have got the same hardware (remote, video card...).
It's hard for me to understand your "programm". I should send lot of time. To help me, can you say where I can find ,in you file, the function that switch off/on screen automatically?

Thank you very much.
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Stand by of the screen

Post by blaher »

It might be easier if you post your .xml, if you can't copy and paste the code in.

I use a program called nircmd http://www.nirsoft.net/utils/nircmd2.html to turn off the monitor because unlike EventGhost's built in 'set monitor into power off mode', it works when the screen is locked.
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

Hello,

You can find my xml file in attachement.
I hope you can understand it.
For me I use, the Eventghost function to turn off the screen.

See you later.
Attachments
2012-09-11 - XBMC.xml
(25.97 KiB) Downloaded 181 times
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Stand by of the screen

Post by blaher »

I needed to change my XBMC port to 8080, under XBMC's settings / network, because the default of 80 is blocked. To use my attached .xml you'll have to do the same:
http://i.imgur.com/5srbA.jpg

Hopefully you can see events in XBMC now. I've set it up to disable/enable the monitor on music playback.
Attachments
monitor.xml
(26.37 KiB) Downloaded 182 times
User avatar
FCB38
Experienced User
Posts: 50
Joined: Mon Nov 28, 2011 10:28 am

Re: Stand by of the screen

Post by FCB38 »

Hello,

We are near the solution but it does not functioning for the moment.
If I understand, to switch Off and On automatically the screen, Eventghost should send "Event items" called "XBMC2.Player.OnPlay.song", "XBMC2.Player.OnStop", "XBMC2.Player.OnPause.song" or "XBMC2.System.OnQuit"; it's not the case in my system :

Code: Select all

AtiRemoteWonder2.Play
   Play
      XBMC2: Play
XBMC2.JSONRPC.Player.OnPlay {u'item': {u'type': u'song', u'id': 30548}, u'player': {u'playerid': 0, u'speed': 1}}
XBMC2.Broadcast.OnAction.ACTION_PLAYER_PLAY
XBMC2.Broadcast.OnPlayBackStarted
AtiRemoteWonder2.Pause
   Pause
      XBMC2: Pause
XBMC2.JSONRPC.Player.OnPause {u'item': {u'type': u'song', u'id': 30548}, u'player': {u'playerid': 0, u'speed': 0}}
XBMC2.Broadcast.OnAction.ACTION_PAUSE
XBMC2.Broadcast.OnPlayBackPaused
AtiRemoteWonder2.Stop
   Stop
      XBMC2: Stop
XBMC2.JSONRPC.Player.OnPlay {u'item': {u'type': u'song', u'id': 30548}, u'player': {u'playerid': 0, u'speed': 1}}
XBMC2.JSONRPC.Player.OnStop {u'item': {u'type': u'song', u'id': 30548}}
XBMC2.Broadcast.OnAction.ACTION_STOP
XBMC2.Broadcast.OnPlayBackResumed
XBMC2.Broadcast.OnPlayBackStopped
Why?
Can you tell me if the plugin:XBMC2 is well configured?
Image

I use XBMC V11 Eden but with the direct show filter option :http://forum.xbmc.org/showthread.php?ti ... 9&page=134
I try with XBMC V11 Eden standard and it's the same.
M. Blaher, I hope that you are patient!

Thank you.
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Stand by of the screen

Post by blaher »

FCB38 wrote: If I understand, to switch Off and On automatically the screen, Eventghost should send "Event items" called "XBMC2.Player.OnPlay.song", "XBMC2.Player.OnStop", "XBMC2.Player.OnPause.song" or "XBMC2.System.OnQuit"; it's not the case in my system :
That's correct. You're getting different events. I'm guessing you haven't put the __init_.py here: viewtopic.php?f=9&t=1562&start=405#p21771 in the right folder, ("C:\Program Files (x86)\EventGhost\plugins\XBMCRepeat" on my system), or you're using an old version of eventghost. I'm using r1582.
Can you tell me if the plugin:XBMC2 is well configured?
Yes, that's all good.
]I try with XBMC V11 Eden standard and it's the same.
That's what I use.
M. Blaher, I hope that you are patient!

Thank you.
No worries, we'll get there in the end. :)

http://i.imgur.com/PFf8j.png is what it should look like.
Post Reply