Author Topic: Erkennung ob TV am HDMI aktiv ist  (Read 7357 times)

0 Members and 1 Guest are viewing this topic.

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Erkennung ob TV am HDMI aktiv ist
« on: October 09, 2013, 07:45:42 AM »
Hi,
ich möchte meinen TV an/aus schalten (Eventghost ).Da ich für meinen TV keine Diskreten Ir Codes finde, muss es wohl über eine abfrage laufen.

z.b. sage ich TV an und er prüft ob das Gerät schon am HDMI aktiv ist.Wenn ja gibt es ne Antwort TV bereits aktiv.Wenn nicht löst es ein Event aus .Beim Ausschalten natürlich das gleiche.

Danke im voraus  :)

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #1 on: October 09, 2013, 08:48:55 AM »
Hi Tecni, mit welchem Gerät/Controller sendest Du die IR Signale? Mit VC gibt es mehrere Möglichkeiten (z.B. mit map tables und einem logic block). Mit EG können dann events an VC geschickt werden und umgekehrt.
Wenn ich dich richtig verstanden habe, möchtest Du immer den aktuellen Power-Status deines TV's haben oder? Funktioniert aber nur "zuverlässig", wenn Du immer über VC oder EG deinen TV einschaltest.
Wie man die aktivität des HDMI ports abfragen kann weiß ich aber auch nicht.
VoxCommando kann aber in eine map den zuletzt gesetzten Status speichern.

In diesem video findest Du ein Beispiel wie VC den Status in einer map speichert. http://www.youtube.com/watch?v=CJRZWQdh0bs
« Last Edit: October 09, 2013, 09:20:51 AM by Kalle »
***********  get excited and make things  **********

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #2 on: October 09, 2013, 09:23:52 AM »
Hi , ich benutze Tira 2 ist ein Sender/Empfänger.Abgefragt soll nur wärend des An/Ausschaltens 1 mal.An/Aus ist leider 1 Code -.- .Im EG Forum gibts 2 Threads aber die Scripts  funktionieren nicht.Wie ich das verstanden habe lesen die wohl die aktuelle Windows Device id aus .

http://www.eventghost.net/forum/viewtopic.php?f=5&t=2839&start=15


Es gibt in VC ja schon sowas


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="406" name="suche Audioausgänge" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>AudioEndpoint.GetMatches</cmdType>
    <cmdString>{CR}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <cmdString>Found {#M} devices</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.AddText</cmdType>
    <cmdString>{i}: {Match.{i}}</cmdString>
    <cmdRepeat>{#M}</cmdRepeat>
  </action>
  <phrase>suche Audioausgänge</phrase>
</command>


Bei mir zeigt er dann 3+ Lg als Wiedergabe an was auch nur geht wenn er An ist .Kann man das nicht irgendwie benutzen z.b. wechsel Sound auf lg ,wenn ja TV ist an wenn nein TV starten.

Alternativ wär eine pinganfrage zum TV

Danke
« Last Edit: October 09, 2013, 11:37:54 AM by jitterjames »

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #3 on: October 09, 2013, 09:28:01 AM »
Hast du eine LG LED? Für den habe ich einen discreten ON/OFF code (welches Modell?)
« Last Edit: October 09, 2013, 09:32:49 AM by Kalle »
***********  get excited and make things  **********

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #4 on: October 09, 2013, 09:31:58 AM »
lg 55 lm 640s

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #5 on: October 09, 2013, 09:34:10 AM »
Die Codes hab ich auch schon versucht .EG sagt aber fehler ^^

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #6 on: October 09, 2013, 09:35:12 AM »
Cool, ich habe einen LG55LM860V - dann wird die pdf datei Oben dein problem lösen (hoffe ich zumindest  ::wiggle)

Upps, mmmh bei mir funktionieren die bestens  ::hmm
« Last Edit: October 09, 2013, 09:37:18 AM by Kalle »
***********  get excited and make things  **********

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #7 on: October 09, 2013, 09:37:59 AM »
Auch über EG? 14:36:38      Error in tira_transmit.

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #8 on: October 09, 2013, 09:41:21 AM »
Auch über EG? 14:36:38      Error in tira_transmit.
Ich nutze einen anderen controller, der keinen PC bzw. EG benötigt.
Funktionieren den andere codes aus der Liste?
***********  get excited and make things  **********

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #9 on: October 09, 2013, 09:47:04 AM »
Nein .Hier der code für an/aus .Die sind immer in 2er Blöcken

00 00 00 00 08 00 00 00 5F 04 00 00 32 02 00 00 41 00 00 00 D0 00 00 00 98 13 00 00 1A 01 00 00 F0 2E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 88 C4 07 00 00 00 00 00 00 00 00 02 00 00 00 0C 00 00 00 9C 63 00 00 00 00 00 00 4B 00 00 00 47 00 00 00 00 01 02 02 02 02 02 03 02 02 02 02 02 02 02 02 02 02 02 03 02 03 02 02 02 03 02 03 02 03 02 03 02 03 02 02 02 02 02 02 02 03 02 02 02 02 02 02 02 02 02 03 02 03 02 03 02 02 02 03 02 03 02 03 02 03 02 04 00 05 02 06 00 05 02


Der Code muss vieleicht umgewandelt werden nur ka in was ^^.
Bin mal Arbeiten .Schau später von der Arbeit mal rein.
« Last Edit: October 09, 2013, 09:50:30 AM by Tecni »

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #10 on: October 09, 2013, 09:52:42 AM »
sieht aus wie pronto ccf code ::hmm

Ich habe mal bei einem Freund angefragt, der uns bestimmt hierbei helfen kann. (Der hat meinen controller gebaut und mit dem funktioniert es  ;)  )
« Last Edit: October 09, 2013, 11:34:07 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #11 on: October 09, 2013, 01:49:00 PM »
It seems that you need to convert a pronto code to a format that the tira 2 can understand.  It might be as simple as changing the spaces, but probably not.

Unfortunately I am unable to find any decent documentation on what format the tira uses, and it seems to be design only to be used with girder.

Pronto codes look like this

Code: [Select]
0000 006d 0022 0157 ...
and tecni posted a code that looks like this

Code: [Select]
00 00 00 00 08 00 00 00 5F 04 ...
what happens if you put the pronto codes as groups of 2 instead of groups of 4 numbers?

Code: [Select]
00 00 00 6d 00 22 01 57 ...

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #12 on: October 09, 2013, 04:46:22 PM »
There are many convert tools available, but I have no idea which code this is. The pronto code is easy to read - the 0000 says it is a learned (raw) code, the 006d says it works with 38Khz frequence and so on but I found nothing for the tira2 code. Maybe xtermin8r can help  ::)

PS: Die Idee mit dem Audioendpoint könnte funktionieren, ich schau mir das morgen an.
« Last Edit: October 10, 2013, 08:24:00 AM by Kalle »
***********  get excited and make things  **********

xtermin8r

  • $upporter
  • Sr. Member
  • *****
  • Posts: 366
  • Karma: 9
  • Crunchie
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #13 on: October 09, 2013, 05:23:26 PM »
Nein .Hier der code für an/aus .Die sind immer in 2er Blöcken

00 00 00 00 08 00 00 00 5F 04 00 00 32 02 00 00 41 00 00 00 D0 00 00 00 98 13 00 00 1A 01 00 00 F0 2E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 88 C4 07 00 00 00 00 00 00 00 00 02 00 00 00 0C 00 00 00 9C 63 00 00 00 00 00 00 4B 00 00 00 47 00 00 00 00 01 02 02 02 02 02 03 02 02 02 02 02 02 02 02 02 02 02 03 02 03 02 02 02 03 02 03 02 03 02 03 02 03 02 02 02 02 02 02 02 03 02 02 02 02 02 02 02 02 02 03 02 03 02 03 02 02 02 03 02 03 02 03 02 03 02 04 00 05 02 06 00 05 02


Der Code muss vieleicht umgewandelt werden nur ka in was ^^.
Bin mal Arbeiten .Schau später von der Arbeit mal rein.

Hi everyone.

its definately not Pronto ccf format.
let me look into it. Can't promise anything.
Neural Net Based Artificial Intelligence.

xtermin8r

  • $upporter
  • Sr. Member
  • *****
  • Posts: 366
  • Karma: 9
  • Crunchie
    • View Profile
Neural Net Based Artificial Intelligence.

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #15 on: October 10, 2013, 04:38:37 AM »
First - Big Thanks to extermin8r for the protocol

Unfortunately, it is not possible for me to convert a pronto code to tira2 code  :bonk

The only way to learn discrete codes from a manufacturer (mostly as pronto ccf available) is to buy a Logitech Harmony or Phillips Pronto on ebay or a similar platform. In my case I use a Logitech Harmony 895 with which it is possible to download this special codes from the Logitech Database. If the codes are stored in the remote then you can learn it in to the Tira2.

example:  http://www.ebay.de/itm/Logitech-Harmony-895-Universal-Fernbedienung-IR-Extender-/231068777827
***********  get excited and make things  **********

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #16 on: October 10, 2013, 04:57:39 AM »
Quote
PS: Die Idee mit dem Audioendpoint könnte funktionieren, ich schau mir das morgen an.

Funktioniert nicht, da VC nur alle verfügbaren Eingänge auslesen kann, aber nicht welcher gerade aktiv ist. Für den Anfang empfehle ich dir die map-table Lösung, welche ich hier am Anfang beschrieben habe. Falls Du hierfür Hilfe brauchst, melde Dich.
***********  get excited and make things  **********

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #17 on: October 10, 2013, 08:53:00 AM »
Danke erstmal für die Hilfe.Hatte Gestern doch nicht wirklich Zeit ^^ .Das es mit dem Code nicht funktioniert ist schade.Selbst wenn ich mir so eine Harmony besorge steht es nicht 100% fest ob es Funktioniert oder ?Mach mich später mal über deinen Lösungsweg  schlau Kalle .

Kalle

  • Moderator
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #18 on: October 10, 2013, 08:58:14 AM »
Mit der Harmony sollte es funktionieren - da dein Tira2 ja codes lernen kann und dies dann intern in das eigene Tira2 format umwandelt.
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #19 on: October 10, 2013, 11:48:56 AM »
According to this document:

http://www.home-electro.com/download/tiraAPI.pdf

Tira can send CCF data.

Maybe you either entered the code incorrectly, or there is a problem with the eventGhost plugin...  It is hard to say without access to the hardware.

see page 4:

Code: [Select]
extern "C"   stdcall int tira_transmit (
int Repeat,
int Frequency,
const unsigned char* IRData, const DataSize );

Quote
This function transmits IR code.
Parameters:
Data points to a data previously received from get_captured_data.
DataSize is the size of the data. Again, the size of the data must be the same as received from
get_captured_data.

Alternatively Data can  point to a valid CCF strings. (CCF is format for IR codes widely used by
various remote controls).

Repeat indicates a number of times the IR code to be repeated. ( Some equipment will not react even
to a valid IR code if it is not repeated several times. Repeat == 0 means the code to be sent once,
Repeat == 1 means the code to be sent twice, and so on.

Note that in most cases you can not simply call tira_transmit several times to send repeat codes.
Repeated codes often differs from the initial ones. Plus delays between repeats must be strictly
observed. All this is handled by Tira.

Frequency refers to modulation frequency of the transmitted IR signal. Actual frequency of the IR
signal is embedded in  the  IR  data  returned  by tira_capture. You need  to  set this parameter
to –1.

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: Erkennung ob TV am HDMI aktiv ist
« Reply #20 on: October 11, 2013, 07:04:17 AM »
Ich habe es jetzt über eine Pinganfrage (EG) gelöst.
Geht auch noch anders .EG macht automatisch ein Event    11:02:37   System.DeviceAttached [u'\\\\?\\DISPLAY#YMH3172#4&1e7f6449&0&UID257#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']
und                                                                               10:46:00   System.DeviceRemoved [u'\\\\?\\DISPLAY#GSM0001#4&1e7f6449&0&UID257#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']
AV muss das HDMI Signal im Aus Zustand durchschleifen.

Das mit der Harmony werd ich nächsten Monat mal ausprobieren. ;D

Hier meine TV befehle
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1610">
    <Folder Name="TV" Expanded="True">
        <Macro Name="TV an">
            <Event Name="Main.TVwirdgestartet" />
            <Action>
                Tira.TransmitIR('\x00\x00\x00\x00\x08\x00\x00\x00_\x04\x00\x002\x02\x00\x00A\x00\x00\x00\xd0\x00\x00\x00\x98\x13\x00\x00\x1a\x01\x00\x00\xf0.\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x88\xc4\x07\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x9cc\x00\x00\x00\x00\x00\x00K\x00\x00\x00G\x00\x00\x00\x00\x01\x02\x02\x02\x02\x02\x03\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x03\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x02\x02\x02\x02\x02\x02\x03\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x03\x02\x03\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x04\x00\x05\x02\x06\x00\x05\x02', 1, -1)
            </Action>
        </Macro>
        <Macro Name="TV aus">
            <Event Name="Main.TVwirdausgeschaltet" />
            <Action>
                Tira.TransmitIR('\x00\x00\x00\x00\x08\x00\x00\x00_\x04\x00\x002\x02\x00\x00A\x00\x00\x00\xd0\x00\x00\x00\x98\x13\x00\x00\x1a\x01\x00\x00\xf0.\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x88\xc4\x07\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x9cc\x00\x00\x00\x00\x00\x00K\x00\x00\x00G\x00\x00\x00\x00\x01\x02\x02\x02\x02\x02\x03\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x03\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x02\x02\x02\x02\x02\x02\x03\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x03\x02\x03\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x04\x00\x05\x02\x06\x00\x05\x02', 1, -1)
            </Action>
        </Macro>
        <Macro Name="TV an abfrage">
            <Event Name="Broadcast.aktiviere TV" />
            <Action>
                PingPlugin.OnePing(u'192.168.178.28', u'LGTV', 200, True, u'TVistbereitsan', u'TVwirdgestartet')
            </Action>
        </Macro>
        <Macro Name="TV aus abfrage">
            <Event Name="Broadcast.deaktiviere TV" />
            <Action>
                PingPlugin.OnePing(u'192.168.178.28', u'LGTV', 200, True, u'TVwirdausgeschaltet', u'TVistbereitsaus')
            </Action>
        </Macro>
        <Macro Name="Tv bereits an">
            <Event Name="Main.TVistbereitsan" />
            <Action>
                Speech.TextToSpeech(u'ScanSoft Steffi_Dri40_16kHz', 0, u'TV bereits an', 0, 72)
            </Action>
        </Macro>
        <Macro Name="TV bereits aus">
            <Event Name="Main.TVistbereitsaus" />
            <Action>
                Speech.TextToSpeech(u'ScanSoft Steffi_Dri40_16kHz', 0, u'TV bereits aus', 0, 70)
            </Action>
        </Macro>
    </Folder>
</EventGhost>