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

0 Members and 1 Guest are viewing this topic.

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>