Page 3 of 3

Re: Event when TV is connected - possible?

Posted: Wed Sep 26, 2012 7:33 am
by krambriw
It seems that the copy of the event data is recognized as a list. You could try to change two lines in the script like this
eg.event.payload_copy = str(eg.event.payload)
eg.event.suffix_copy = str(eg.event.suffix)

Re: Event when TV is connected - possible?

Posted: Wed Sep 26, 2012 10:53 am
by blaher
That works, thanks. It is quite similar in functionality to mine, except that with yours you can specify any string you like for the trigger. Hopefully with 3 separate options, the OP will be sorted. :)

Re: Event when TV is connected - possible?

Posted: Sun Oct 07, 2012 5:50 am
by Livin
Blather,
Can you post the code you are using? I'm interested to see what you are using and your opinion of how well it works? I'm considering moving back to a dual display and due to the delays in my TV's HDMI handshake with the Onkyo I've been using a delayed start for XBMC/WMC of 4 seconds but considering going back to detecting the actual connection.

Re: Event when TV is connected - possible?

Posted: Tue Oct 09, 2012 3:04 am
by blaher
Livin wrote:Blather,
Can you post the code you are using? I'm interested to see what you are using and your opinion of how well it works? I'm considering moving back to a dual display and due to the delays in my TV's HDMI handshake with the Onkyo I've been using a delayed start for XBMC/WMC of 4 seconds but considering going back to detecting the actual connection.
I don't actually use a TV connecting or disconnecting event in my setup, because when I turn on my prepro without the TV, (and thus a connection event is recorded), I don't always want to launch XBMC.

Instead I use the pre-pro's inputs as my triggers, to do various things like dimming the monitor, enabling HDMI or S/PDIF, setting the volume level, etc., and I only launch XBMC when I press start on the remote. Like you, I use a delay to make sure that the displays have time to change from one to the other, before launching XBMC.

If you do want to use a TV disconnect/connect trigger, I found your script was the best option. I compared them on the previous page. I've attached my.xml anyway in case it helps.

Re: Event when TV is connected - possible?

Posted: Tue Oct 09, 2012 5:23 am
by Livin
thx, i'll check it out.

Re: Event when TV is connected - possible?

Posted: Mon Nov 12, 2012 2:07 pm
by TRIROG
Hey guys ... can anybody explain why the following happens:

when i turn ON my LG 60PZ575S tv i get the following events in EG
System.DeviceAttached [u'\\\\?\\DISPLAY#GSM0001#4&fb70c6a&0&UID52630272#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']
System.DeviceRemoved [u'\\\\?\\DISPLAY#GSM0001#4&fb70c6a&0&UID52630272#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']

The problem is when i turn TV off i get nothing...

With Marantz i normally get System.DeviceAttached when i turn it on, and System.DeviceRemoved when i turn it off. But not with the LG.

It seems on power on i get the removed event and immediately after attached event?

Why is that?

Any ideas?

I'm trying to use these events to monitor the status of these devices, but with such behaviour it's not possible.

Re: Event when TV is connected - possible?

Posted: Fri Nov 16, 2012 3:54 am
by Livin
TRIROG wrote:Hey guys ... can anybody explain why the following happens:

when i turn ON my LG 60PZ575S tv i get the following events in EG
System.DeviceAttached [u'\\\\?\\DISPLAY#GSM0001#4&fb70c6a&0&UID52630272#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']
System.DeviceRemoved [u'\\\\?\\DISPLAY#GSM0001#4&fb70c6a&0&UID52630272#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']

The problem is when i turn TV off i get nothing...

With Marantz i normally get System.DeviceAttached when i turn it on, and System.DeviceRemoved when i turn it off. But not with the LG.

It seems on power on i get the removed event and immediately after attached event?

Why is that?

Any ideas?

I'm trying to use these events to monitor the status of these devices, but with such behaviour it's not possible.
Total guess: It might still be providing a signal - like a low power mode.
... to test this, while the TV is on, physically unplug your HDMI and see if you get the Removed event in your log.

Re: Event when TV is connected - possible?

Posted: Fri Dec 28, 2012 7:34 am
by jang430
Has there been any progress or success from people on this thread? I have Sharp LCD TV connected to my Harman Kardon Receiver via HDMI. I have my Microsoft IR transceiver connected to Harman Kardon via Stereo cable.

I'm a newbie here. I've also want to set it up in such a way that when TV is switched to HDMI, receiver turns on, xbmc fires up at the big screen (extended display).

Hope there has been positive results since the last post. Care to share?

Re: Event when TV is connected - possible?

Posted: Fri Dec 28, 2012 4:38 pm
by Livin
jang430 wrote:Has there been any progress or success from people on this thread? I have Sharp LCD TV connected to my Harman Kardon Receiver via HDMI. I have my Microsoft IR transceiver connected to Harman Kardon via Stereo cable.

I'm a newbie here. I've also want to set it up in such a way that when TV is switched to HDMI, receiver turns on, xbmc fires up at the big screen (extended display).

Hope there has been positive results since the last post. Care to share?
Spread across several forum threads is posted a few ways to make what you want work since you are asking for several Actions to happen and exactly how you do it will depend on your exact equipment and its capabilities (CEC, serial, etc). You might want to start a new thread if you need help getting it all working since this thread needs to stay focused on the TV portion itself.

For just detecting TV... I use the simple method of detecting my Receiver connecting/disconnecting since my TV goes through my receiver. After DeviceAttached happend, EG launches XBMC. Here's the base code for detecting it attached/removed:

Code: Select all

                <Macro Name="Onkyo Removed">
                    <Event Name="System.DeviceRemoved [u'\\\\?\\DISPLAY#ONK0781#5&30f4f1ad&3&UID1057568#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']" />
                </Macro>
                <Macro Name="Onkyo Attached">
                    <Event Name="System.DeviceAttached [u'\\\\?\\DISPLAY#ONK0781#5&30f4f1ad&3&UID1057568#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']" />
                </Macro>
... you'll need to copy/paste the payload, part inside the [], manually into the Macro/Event you make since it will not drag'n'drop properly with EG.

Re: Event when TV is connected - possible?

Posted: Fri Dec 28, 2012 5:47 pm
by jang430
How do you manually paste the payload? I tried right click, but doesn't give me the option to change anything. I assume this is to change the event?

Re: Event when TV is connected - possible?

Posted: Sun Dec 30, 2012 4:08 pm
by jang430
I created a macro wherein when harman is attached, xbmc starts. I just dragged the item on the log pane on the left to the macro on the right. But what happens now is aside fom xbmc turning on when receiver is turned on, when I connect a USB drive to the pc, xbmc is also started. Is this correct behavior? Is there a way to distinguished whether it's a receiver that's detected or a thumb drive that's being connected?

On another almost related topic, what actions there to close xbmc when device detached is detected?

Thanks

Re: Event when TV is connected - possible?

Posted: Thu Jan 03, 2013 12:28 am
by blaher
jang430 wrote:I created a macro wherein when harman is attached, xbmc starts. I just dragged the item on the log pane on the left to the macro on the right. But what happens now is aside fom xbmc turning on when receiver is turned on, when I connect a USB drive to the pc, xbmc is also started. Is this correct behavior? Is there a way to distinguished whether it's a receiver that's detected or a thumb drive that's being connected?
Yes, you can try the .xml here to see a couple of ways of doing just that:
viewtopic.php?f=5&t=2839&start=15#p23032
On another almost related topic, what actions there to close xbmc when device detached is detected?
It's the same method as the connect.