FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: EnvyHH am 12 Mai 2016, 14:22:21

Titel: Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 12 Mai 2016, 14:22:21
Hallo zusammen,
ich arbeite derzeit an der Automatisierung meines Wohnzimmers, speziell der Steuerung von Licht und Leinwand bei unterschiedlichen Harmony Aktionen.

Sobald ich bei meiner Harmony Ultimate die Aktion "KINO" auswähle, wird auch alles korrekt geschaltet und die Leinwand fährt herunter.
Leider funktioert das hochfahren der Leinwand nicht wenn ich mit PowerOff auf der Harmony alles abschalten möchte.

Hier das Notify für das herunterfahren der Leinwand (funktioniert!):
define notify.leinwandrunter notify harmonyhub.currentActivity:.starting.Kino set WZ.Leinwand toggle

Das Hochfahren der Leinwand mit folgendem Notify funktioniert leider nicht (die Leinwand bleibt unten):
define notify.leinwandhoch notify DOIF ([harmonyhub:currentActivity] eq "PowerOff" and [harmonyhub:previousActivity] eq "Kino") (set WZ.Leinwand toggle)

Wäre nett, wenn mir jemand weiterhelfen könnte :)
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: mbruehl am 12 Mai 2016, 14:27:53
1. Was sagt denn der Eventmonitor bei PowerOff? Groß/Kleinschreiibung muss ja stimmen.
2. notify und DOIF halte ich für übertrieben....... entweder oder....
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: justme1968 am 12 Mai 2016, 14:29:21
ich kann dir nichts zu DOIF sagen, aber previousActivity erzeugt kein event. du musst direkt auf den wert des readings zugreifen.

schau dir mal an wie autocreate kommando im harmony modul funktioniert und wie du damit devices für deine geräte anlegen kannst. in den aller meisten fällen ist es besser und einfacher auf das power reading eines solchen devices zu triggern als auf den namen der activity. vor allem wenn ein gerät von dem etwas abhängt an mehreren activities beteiligt ist.

ich vermute bei dir wäre das der beamer.  wenn der beamer an ist -> leinwand runter, wenn der beamer aus ist -> leinwand hoch.

ein einfaches notify tut es in deinem fall vermutlich auch. aber das ist vielleicht geschmacksache :)

gruss
  andre
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 12 Mai 2016, 15:00:10
Ich konnte den Fehler bereits selbst finden, so funktioniert das DOIF:
define doif.leinwandhoch DOIF ([harmonyhub:currentActivity] eq "PowerOff" and [harmonyhub:previousActivity] eq "Kino") (set WZ.Leinwand toggle)

Da hatte sich ein kleiner Fehler mit großer Wirkung eingeschlichen nachdem ich es mit DOIF versucht habe nachdem ich mit Notify in dem Fall immer gescheitert bin.

Auch wenn es jetzt funktioniert, muss ich justme1968 Recht geben.
Ein Triggern der Leinwand unabhängig von der Activity, sondern abhängig vom Beamer macht mehr Sinn!
Ich war aber bisher der Meinung, dass die Verbindung FHEM <==> Harmony Hub nur über die Activities funktioniert. Ich schaue mir das mit dem Autocreate mal genauer an!

Danke erstmal für Eure Hilfe! 8) :D
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: mbruehl am 12 Mai 2016, 15:20:16
Ich habe die Logik umgedreht: ich frage die Leinwand ab (homematic Rolladenaktor) und starte wenn sie runterfährt Beamer und Receiver - und schalte wieder aus, wenn sie hochfährt. Damit ist es egal, woher der "Impuls" kam - Die Fernbedienung, der Schalter an der Wand, oder vom Menu des VDR - alle schalten einfach nur die Leinwand.
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 13 Mai 2016, 15:09:47
Habe mittlerweile per autocreate ein Device für den TV und auch den Beamer angelegt.
Leider wird der power state beim Beamer nicht auf "on" gesetzt obwohl er bei der Activity "KINO" gestartet wird.
Das Ganze funktioniert allerdings mit dem TV und der Activity "Fernsehen".

Hat jemand eine Idee?
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: justme1968 am 15 Mai 2016, 11:46:07
zeig mal ein activity detail und device detail.

gruss
  andre
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 17 Mai 2016, 18:18:01
Hier der Beamer:

CHANGED
ConnectionState
Initialized
DEF   
DEVICE 34431251
NAME
harmony_34431251
NOTIFYDEV
global
NR
107
NTFY_ORDER
50-harmony_34431251
STATE
off
TYPE
harmony
hub
harmonyhub
id
34431251

Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: justme1968 am 17 Mai 2016, 21:26:54
ich meine ein get hub activityDetail und get hub deviceDetail für die activity um die es geht und den beamer im hub.

gruss
  andre
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 17 Mai 2016, 21:46:52
Hallo Andre,

hier die Details der Activity "KINO":

[
  {
    'suggestedDisplay' => 'Default',
    'type' => 'PowerOff',
    'fixit' => {
                 '27595020' => {
                                 'id' => '27595020',
                                 'Power' => 'Off'
                               },
                 '34431251' => {
                                 'Power' => 'Off',
                                 'id' => '34431251'
                               },
                 '34869258' => {
                                 'id' => '34869258',
                                 'Power' => 'On',
                                 'isAlwaysOn' => 'true',
                                 'isRelativePower' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' )
                               },
                 '34694643' => {
                                 'id' => '34694643',
                                 'isManualPower' => $VAR1->
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 17 Mai 2016, 21:51:25
Und hier die Details des Beamers:

{
  'controlGroup' => [
                      {
                        'name' => 'Power',
                        'function' => [
                                        {
                                          'name' => 'PowerOff',
                                          'action' => '{"command":"PowerOff","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Power Off'
                                        },
                                        {
                                          'label' => 'Power On',
                                          'action' => '{"command":"PowerOn","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'PowerOn'
                                        }
                                      ]
                      },
                      {
                        'name' => 'Volume',
                        'function' => [
                                        {
                                          'action' => '{"command":"Mute","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Mute',
                                          'name' => 'Mute'
                                        },
                                        {
                                          'label' => 'Volume Down',
                                          'action' => '{"command":"VolumeDown","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'VolumeDown'
                                        },
                                        {
                                          'label' => 'Volume Up',
                                          'action' => '{"command":"VolumeUp","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'VolumeUp'
                                        }
                                      ]
                      },
                      {
                        'name' => 'NavigationBasic',
                        'function' => [
                                        {
                                          'action' => '{"command":"DirectionDown","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Direction Down',
                                          'name' => 'DirectionDown'
                                        },
                                        {
                                          'name' => 'DirectionLeft',
                                          'label' => 'Direction Left',
                                          'action' => '{"command":"DirectionLeft","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'name' => 'DirectionRight',
                                          'label' => 'Direction Right',
                                          'action' => '{"command":"DirectionRight","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'name' => 'DirectionUp',
                                          'label' => 'Direction Up',
                                          'action' => '{"command":"DirectionUp","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'name' => 'Select',
                                          'action' => '{"command":"Enter","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Select'
                                        }
                                      ]
                      },
                      {
                        'name' => 'TransportBasic',
                        'function' => [
                                        {
                                          'action' => '{"command":"Stop","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Stop',
                                          'name' => 'Stop'
                                        },
                                        {
                                          'label' => 'Play',
                                          'action' => '{"command":"Play","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'Play'
                                        },
                                        {
                                          'label' => 'Rewind',
                                          'action' => '{"command":"Rewind","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'Rewind'
                                        },
                                        {
                                          'name' => 'Pause',
                                          'label' => 'Pause',
                                          'action' => '{"command":"Pause","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'name' => 'FastForward',
                                          'label' => 'Fast Forward',
                                          'action' => '{"command":"FastForward","type":"IRCommand","deviceId":"34431251"}'
                                        }
                                      ]
                      },
                      {
                        'name' => 'TransportExtended',
                        'function' => [
                                        {
                                          'name' => 'SkipBackward',
                                          'label' => 'Skip Backward',
                                          'action' => '{"command":"SkipBack","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'label' => 'Skip Forward',
                                          'action' => '{"command":"SkipForward","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'SkipForward'
                                        }
                                      ]
                      },
                      {
                        'function' => [
                                        {
                                          'name' => 'Return',
                                          'action' => '{"command":"Esc","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Return'
                                        },
                                        {
                                          'name' => 'Menu',
                                          'label' => 'Menu',
                                          'action' => '{"command":"Menu","type":"IRCommand","deviceId":"34431251"}'
                                        }
                                      ],
                        'name' => 'NavigationDVD'
                      },
                      {
                        'function' => [
                                        {
                                          'action' => '{"command":"Aspect","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Aspect',
                                          'name' => 'Aspect'
                                        }
                                      ],
                        'name' => 'DisplayMode'
                      },
                      {
                        'name' => 'Miscellaneous',
                        'function' => [
                                        {
                                          'label' => '2D/3D',
                                          'action' => '{"command":"2D\\/3D","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => '2D/3D'
                                        },
                                        {
                                          'label' => '3DFormat',
                                          'action' => '{"command":"3DFormat","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => '3DFormat'
                                        },
                                        {
                                          'action' => '{"command":"A\\/VMute","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'A/VMute',
                                          'name' => 'A/VMute'
                                        },
                                        {
                                          'action' => '{"command":"ColorMode","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'ColorMode',
                                          'name' => 'ColorMode'
                                        },
                                        {
                                          'label' => 'Default',
                                          'action' => '{"command":"Default","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'Default'
                                        },
                                        {
                                          'action' => '{"command":"Fine\\/Fast","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'Fine/Fast',
                                          'name' => 'Fine/Fast'
                                        },
                                        {
                                          'action' => '{"command":"HdmiLink","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'HdmiLink',
                                          'name' => 'HdmiLink'
                                        },
                                        {
                                          'name' => 'InputComponent',
                                          'label' => 'InputComponent',
                                          'action' => '{"command":"InputComponent","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'action' => '{"command":"InputHdmi1","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'InputHdmi1',
                                          'name' => 'InputHdmi1'
                                        },
                                        {
                                          'name' => 'InputHdmi2',
                                          'action' => '{"command":"InputHdmi2","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'InputHdmi2'
                                        },
                                        {
                                          'name' => 'InputPC',
                                          'label' => 'InputPC',
                                          'action' => '{"command":"InputPC","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'name' => 'InputUSB/LAN',
                                          'action' => '{"command":"InputUSB\\/LAN","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'InputUSB/LAN'
                                        },
                                        {
                                          'label' => 'InputVideo',
                                          'action' => '{"command":"InputVideo","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'InputVideo'
                                        },
                                        {
                                          'action' => '{"command":"LinkMenu","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'LinkMenu',
                                          'name' => 'LinkMenu'
                                        },
                                        {
                                          'name' => 'Memory',
                                          'label' => 'Memory',
                                          'action' => '{"command":"Memory","type":"IRCommand","deviceId":"34431251"}'
                                        },
                                        {
                                          'label' => 'Pattern',
                                          'action' => '{"command":"Pattern","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'Pattern'
                                        },
                                        {
                                          'name' => 'P-in-P',
                                          'action' => '{"command":"P-in-P","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'P-in-P'
                                        },
                                        {
                                          'action' => '{"command":"RGBCMY","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'RGBCMY',
                                          'name' => 'RGBCMY'
                                        },
                                        {
                                          'action' => '{"command":"SuperResolution","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'SuperResolution',
                                          'name' => 'SuperResolution'
                                        },
                                        {
                                          'label' => 'User',
                                          'action' => '{"command":"User","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'User'
                                        },
                                        {
                                          'label' => 'WiHDInput',
                                          'action' => '{"command":"WiHDInput","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'WiHDInput'
                                        },
                                        {
                                          'name' => 'WiHDOutput',
                                          'action' => '{"command":"WiHDOutput","type":"IRCommand","deviceId":"34431251"}',
                                          'label' => 'WiHDOutput'
                                        },
                                        {
                                          'label' => 'WiHDP-in-P',
                                          'action' => '{"command":"WiHDP-in-P","type":"IRCommand","deviceId":"34431251"}',
                                          'name' => 'WiHDP-in-P'
                                        },
                                        {
                                          'name' => 'WiHDPowerToggle',
                                          'label' => 'WiHDPowerToggle',
                                          'action' => '{"command":"WiHDPowerToggle","type":"IRCommand","deviceId":"34431251"}'
                                        }
                                      ]
                      }
                    ],
  'label' => 'Epson-Projektor',
  'DongleRFID' => 0,
  'id' => 34431251,
  'deviceProfileUri' => 'svcs.myharmony.com/res/device/34431251-iu1rJ7uHizoCXX2ytdyCc/doHnpUL6RrIcbY3/vj+0o=',
  'isManualPower' => 'false',
  'model' => 'EH-TW6600',
  'IsKeyboardAssociated' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
  'icon' => '7',
  'manufacturer' => 'Epson',
  'ControlPort' => 7,
  'deviceTypeDisplayName' => 'Projector',
  'Capabilities' => [
                      1,
                      2,
                      8
                    ],
  'type' => 'Projector',
  'Transport' => 1,
  'suggestedDisplay' => 'DEFAULT'
}


OK
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: justme1968 am 18 Mai 2016, 16:10:11
bitte auch noch die ausgabe von get <hub> activities power

danke
andre
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 18 Mai 2016, 17:11:41
Hier die Ausgabe:

14467984 Fernsehen               
Denon-AV-Receiver: On
media center pc se: On
Jan's 2nd Fire TV: Manual
Microsoft-Media Player: On
Epson-Projektor: Off
Panasonic-Fernseher: On
Microsoft-Spielekonsole: Off
Samsung-Fernseher: Off
Intel Media Player: On
Sony PS4: Off
14601491 Xbox One               
Microsoft-Spielekonsole: On
Samsung-Fernseher: On
Intel Media Player: On
Sony PS4: Off
media center pc se: On
Denon-AV-Receiver: On
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
Epson-Projektor: Off
Panasonic-Fernseher: On
14468158 KODI                   
Samsung-Fernseher: On
Microsoft-Spielekonsole: Off
Sony PS4: Off
Intel Media Player: On
Denon-AV-Receiver: On
media center pc se: On
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
Panasonic-Fernseher: On
Epson-Projektor: Off
14468798 Fire TV                 
Epson-Projektor: Off
Panasonic-Fernseher: On
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
Denon-AV-Receiver: On
media center pc se: On
Intel Media Player: On
Sony PS4: Off
Microsoft-Spielekonsole: Off
Samsung-Fernseher: On
19066739 Kino                   
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
media center pc se: On
Denon-AV-Receiver: On
Epson-Projektor: Off
Panasonic-Fernseher: Off
Microsoft-Spielekonsole: Off
Samsung-Fernseher: Off
Intel Media Player: On
Sony PS4: Off
19066755 PS4                     
Denon-AV-Receiver: On
media center pc se: On
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
Panasonic-Fernseher: On
Epson-Projektor: Off
Samsung-Fernseher: Off
Microsoft-Spielekonsole: Off
Sony PS4: On
Intel Media Player: On
19383223 KODI TV                 
Samsung-Fernseher: Off
Microsoft-Spielekonsole: Off
Sony PS4: Off
Intel Media Player: On
Denon-AV-Receiver: On
media center pc se: On
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
Panasonic-Fernseher: On
Epson-Projektor: Off
-1 PowerOff
Panasonic-Fernseher: Off
Epson-Projektor: Off
Microsoft-Media Player: On
Jan's 2nd Fire TV: Manual
media center pc se: On
Denon-AV-Receiver: Off
Sony PS4: Off
Intel Media Player: On
Samsung-Fernseher: Off
Microsoft-Spielekonsole: Off

Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: justme1968 am 18 Mai 2016, 17:22:49
der beamer steht überall als off drin. d.h. fhem zeigt nur das an was der hub meldet.

ist der ganz normal mit power on und power off in der activity angelegt ?

gruss
  andre
Titel: Antw:Beamer Leinwand hoch bei Harmony PowerOff
Beitrag von: EnvyHH am 20 Mai 2016, 15:57:23
Funktioniert jetzt! Du hast mich auf die richtige Spur gebracht:
Der Beamer war zwar in der Activity vorhanden und wurde auch eingeschaltet, er war in der Activity aber nicht als Anzeigegerät eingestellt.

Nachdem ich diese Anpassung vorgenommen habe, war auch der power state des Beamers korrekt!

Ich benutze jetzt folgenden DOIFs um die Leinwand hoch bzw. runter zu fahren:
define doif.leinwandrunter DOIF ([harmony_34431251:power] eq "on") (set WZ.Leinwand off)
define doif.leinwandhoch DOIF ([harmony_34431251:power] eq "off") (set WZ.Leinwand on)


Ich werde jetzt auch die Steuerung der motorisierten TV-Halterung auf ein DOIF umstellen, welches bei einem power event vom TV auslöst.

Vielen Dank für den tollen Support!!