Panasonic VIERA: Abfrage Status TV (ON / OFF)?

Begonnen von 9zehn75, 07 Februar 2016, 09:42:12

Vorheriges Thema - Nächstes Thema

9zehn75

Guten Morgen,

ich habe gestern mit dem VIERA-Modul rum gespielt, um damit meinen Panasonic TX-50CXW704 zu steuern. Das klappt auch sehr gut. Das einzige, was ich nicht hinbekommen, ist über das Modul herauszufinden, ob der TV gerade ein- oder ausgeschaltet ist.

Sowohl die Readings "Power" als auch "State" stehen immer auf "ON".

Gibt es eine andere Möglichkeit herauszufinden, ob er an oder aus ist?

Vielen Dank und schönen Sonntag!
VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

TeeVau

Hi, vielleicht verhält sich der Fernseher anders im Netzwerk.
Per Intervall wird Lautstärke und der mute Zustand abgefragt. Wenn der Fernseher darauf antwortet, wird das als in erkannt. Antwortet er nicht, wird das Off interpretiert.
FHEM 5.8 dev (virtualisiert) / FBF 7390 (CUL 868MHz V 1.51 / panStick (AVR1))
FS20: fs20di,fs20pira,fs20sm8,fs20st2,fs20tfk,fs20ue1,fs20ws1
panStamp (AVR1): RGB Multi von ext23, 1W-DSxxxx, I/O Sketch, Spritzpumpe
Multimedia: Panasonic TV (VIERA), Kodi, Yamaha RX-V781, LMS
Sonstiges: XiaomiFlowerSen

franky08

#2
Da ist scheinbar wirklich etwas nicht OK.
Mit der Version
# $Id: 70_VIERA.pm 10463 2016-01-11 18:03:07Z teevau $

wird IMMER absent gemeldet, obwohl der TV online ist und on ist

Mit der vorherigen Version:
70_VIERA.pm               6347 2014-08-02 16:25:27Z teevau

ist das Verhalten normal und es wird zwischen absent und present unterschieden.
Habe eben mal die alte Version zurück kopiert und alles funktioniert wie gehabt. Problem mit non Blocking Umbau??

VG
Frank
Debian Wheezy auf ZBOX nano/ Debian Bullseye auf 2.ter ZBOX nano F2F an 2x RaspiB
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu ,fhem5.8, CCU2,
ECMD an AVR-NET-IO mit DAC u. ADC an Junkers Stetigregelung, Siemens LOGO!8, JeeLink uvm...

TeeVau

Hallo,

Stellt das VIERA Device bitte auf verbose 5.
Ich vermute, dass der Child prozess in den Time out läuft.

Tobias
FHEM 5.8 dev (virtualisiert) / FBF 7390 (CUL 868MHz V 1.51 / panStick (AVR1))
FS20: fs20di,fs20pira,fs20sm8,fs20st2,fs20tfk,fs20ue1,fs20ws1
panStamp (AVR1): RGB Multi von ext23, 1W-DSxxxx, I/O Sketch, Spritzpumpe
Multimedia: Panasonic TV (VIERA), Kodi, Yamaha RX-V781, LMS
Sonstiges: XiaomiFlowerSen

9zehn75

Zitat von: TeeVau am 08 Februar 2016, 13:30:45
Stellt das VIERA Device bitte auf verbose 5.
Ich vermute, dass der Child prozess in den Time out läuft.

Habe ihn einmal ein- und wieder ausgeschaltet. State und Power blieben auf "ON". Das steht im Logfile:

2016.02.08 16:23:45 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.08 16:23:45 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407


Und das gleich mehrfach. Hilft das?
VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

9zehn75

Hier der komplette Log:


2016.02.08 16:32:19 3 : VIERA: Set off
2016.02.08 16:32:19 5 : VIERA[NonBlocking-VIERA_connection()]: Send Data to 192.168.178.32:55000: POST /nrc/control_0 HTTP/1.1 Host: 192.168.178.32:55000 SOAPACTION: "urn:panasonic-com:service:p00NetworkControl:1#X_SendKey" Content-Type: text/xml; charset="utf-8" Content-Length: 315 <?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:X_SendKey xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"><X_KeyEvent>NRC_POWER-ONOFF</X_KeyEvent></u:X_SendKey></s:Body></s:Envelope>
2016.02.08 16:32:19 5 : VIERA[NonBlocking-VIERA_connection()]: 192.168.178.32 buffer response: HTTP/1.1 200 OK CONTENT-LENGTH: 301 Content-Type: text/xml; charset="utf-8" EXT: SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER CONNECTION: close <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:X_SendKeyResponse xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"></u:X_SendKeyResponse> </s:Body> </s:Envelope>
2016-02-08 16:32:19 VIERA Wohnzimmer_TV off
2016.02.08 16:32:20 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.08 16:32:20 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.08 16:32:36 3 : VIERA: Set off
2016.02.08 16:32:36 5 : VIERA[NonBlocking-VIERA_connection()]: Send Data to 192.168.178.32:55000: POST /nrc/control_0 HTTP/1.1 Host: 192.168.178.32:55000 SOAPACTION: "urn:panasonic-com:service:p00NetworkControl:1#X_SendKey" Content-Type: text/xml; charset="utf-8" Content-Length: 315 <?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:X_SendKey xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"><X_KeyEvent>NRC_POWER-ONOFF</X_KeyEvent></u:X_SendKey></s:Body></s:Envelope>
2016.02.08 16:32:36 5 : VIERA[NonBlocking-VIERA_connection()]: 192.168.178.32 buffer response: HTTP/1.1 200 OK CONTENT-LENGTH: 301 Content-Type: text/xml; charset="utf-8" EXT: SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER CONNECTION: close <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:X_SendKeyResponse xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"></u:X_SendKeyResponse> </s:Body> </s:Envelope>
2016-02-08 16:32:36 VIERA Wohnzimmer_TV off
2016.02.08 16:32:50 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.08 16:32:50 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 340
VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

TeeVau

Hi,

aus irgendeinem Grund läuft das Polling nicht. In dem Log sehe ich keine Abfrage von Mute und Lautstärke.
Poste mal bitte ein List von dem Device.

Alternativ kannst du per Attr auch wieder die blocking Methode aktivieren, als Übergang.
FHEM 5.8 dev (virtualisiert) / FBF 7390 (CUL 868MHz V 1.51 / panStick (AVR1))
FS20: fs20di,fs20pira,fs20sm8,fs20st2,fs20tfk,fs20ue1,fs20ws1
panStamp (AVR1): RGB Multi von ext23, 1W-DSxxxx, I/O Sketch, Spritzpumpe
Multimedia: Panasonic TV (VIERA), Kodi, Yamaha RX-V781, LMS
Sonstiges: XiaomiFlowerSen

9zehn75

Hier ein List meines VIERA:

Internals:
   DEF        192.168.178.32
   NAME       Wohnzimmer_TV
   NR         42
   STATE      Initialized
   TYPE       VIERA
   Readings:
     2016-02-06 10:29:43   mute            off
     2016-02-07 20:36:02   power           on
     2016-02-07 20:36:02   presence        present
     2016-02-08 16:22:44   state           Initialized
     2016-02-06 10:29:43   volume          20
   Helper:
     HOST       192.168.178.32
     INTERVAL   30
     PORT       55000
     Running_pid_get:
       abortFn    VIERA_GetAbortFn
       finishFn   VIERA_GetDone
       fn         VIERA_GetDoIt
       pid        3407
       Abortarg:
Attributes:
   devStateIcon off:it_television@red on:it_television@green
   room       Multimedia,Wohnzimmer
   stateFormat power
   verbose    5
   webCmd     off
VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

9zehn75

Zitat von: TeeVau am 08 Februar 2016, 18:12:45
Alternativ kannst du per Attr auch wieder die blocking Methode aktivieren, als Übergang.

Blocking steht auf "1". Ist es damit nicht aktiviert?
VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

TeeVau

Genau. Blocking 1 verwendet wieder die blockierende Methode. Ansonsten wird non blocking verwendet.

Ich verstehe nur nicht wieso die Funktion nicht non blocking aufgerufen wird. Das Polling alle 30 Sekunden fehlt.

Wird denn das Reading für Lautstärke und Mute aktualisiert?
FHEM 5.8 dev (virtualisiert) / FBF 7390 (CUL 868MHz V 1.51 / panStick (AVR1))
FS20: fs20di,fs20pira,fs20sm8,fs20st2,fs20tfk,fs20ue1,fs20ws1
panStamp (AVR1): RGB Multi von ext23, 1W-DSxxxx, I/O Sketch, Spritzpumpe
Multimedia: Panasonic TV (VIERA), Kodi, Yamaha RX-V781, LMS
Sonstiges: XiaomiFlowerSen

franky08

Hier mal die Logausgabe mit verbose 5 von mir. Anfangs mit non Blocking und am Ende mit blocking 0.

2016.02.08 20:37:03 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.08 20:37:03 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7397
2016.02.08 20:39:03 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.08 20:39:03 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7397
2016.02.08 20:39:26 3: CUL_HM set Kueche_Heizung burstXmit
2016.02.08 20:39:26 3: CUL_HM set myVirtualHM_Btn1 postEvent closed
2016.02.08 20:41:03 4: VIERA[VIERA_GetStatus]: Using blocking...
2016.02.08 20:41:03 5: VIERA[Blocking-VIERA_connection()]: Send Data to 192.168.2.20:55000:
POST /dmr/control_0 HTTP/1.0
Host: 192.168.2.20:55000
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"
Content-Type: text/xml; charset="utf-8"
Content-Length: 379

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:GetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
<InstanceID>0</InstanceID>
<Channel>Master</Channel>
<DesiredVolume></DesiredVolume>
</u:GetVolume>
</s:Body>
</s:Envelope>

2016.02.08 20:41:03 5: VIERA[Blocking-VIERA_connection()]: 192.168.2.20 buffer response:
HTTP/1.1 200 OK
CONTENT-LENGTH: 343
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER
CONNECTION: close

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
  <u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
   <CurrentVolume>30</CurrentVolume>
  </u:GetVolumeResponse>
</s:Body>
</s:Envelope>

2016.02.08 20:41:03 5: VIERA[VIERA_GetStatus]: Vol-Request returned: HTTP/1.1 200 OK
CONTENT-LENGTH: 343
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER
CONNECTION: close

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
  <u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
   <CurrentVolume>30</CurrentVolume>
  </u:GetVolumeResponse>
</s:Body>
</s:Envelope>

2016.02.08 20:41:03 5: VIERA[Blocking-VIERA_connection()]: Send Data to 192.168.2.20:55000:
POST /dmr/control_0 HTTP/1.0
Host: 192.168.2.20:55000
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#GetMute"
Content-Type: text/xml; charset="utf-8"
Content-Length: 371

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:GetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
<InstanceID>0</InstanceID>
<Channel>Master</Channel>
<DesiredMute></DesiredMute>
</u:GetMute>
</s:Body>
</s:Envelope>

2016.02.08 20:41:03 5: VIERA[Blocking-VIERA_connection()]: 192.168.2.20 buffer response:
HTTP/1.1 200 OK
CONTENT-LENGTH: 334
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER
CONNECTION: close

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
  <u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
   <CurrentMute>0</CurrentMute>
  </u:GetMuteResponse>
</s:Body>
</s:Envelope>

2016.02.08 20:41:03 5: VIERA[VIERA_GetStatus]: Mute-Request returned: HTTP/1.1 200 OK
CONTENT-LENGTH: 334
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER
CONNECTION: close

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
  <u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">
   <CurrentMute>0</CurrentMute>
  </u:GetMuteResponse>
</s:Body>
</s:Envelope>

2016.02.08 20:41:03 4: VIERA[VIERA_GetStatus]: Set reading volume to 30
2016.02.08 20:41:03 4: VIERA[VIERA_GetStatus]: Set reading mute to off


VG
Frank
Debian Wheezy auf ZBOX nano/ Debian Bullseye auf 2.ter ZBOX nano F2F an 2x RaspiB
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu ,fhem5.8, CCU2,
ECMD an AVR-NET-IO mit DAC u. ADC an Junkers Stetigregelung, Siemens LOGO!8, JeeLink uvm...

9zehn75

Zitat von: TeeVau am 08 Februar 2016, 20:13:44
Wird denn das Reading für Lautstärke und Mute aktualisiert?

Nein, wird es nicht.
VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

9zehn75

VG, 9zehn75

FHEM seit 02.02.2016: Raspberry Pi 2, ZME_UZB1, Fibaro WallPlugs, Fibaro Fenstersensoren, Aeon Indoor Sirene, Greenwave WallPlugs, Qubino Dimmer

franky08

Ich hab bei mir wieder auf Blocking umgestellt und da funktioniert Alles wie gewohnt.

VG
Frank
Debian Wheezy auf ZBOX nano/ Debian Bullseye auf 2.ter ZBOX nano F2F an 2x RaspiB
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu ,fhem5.8, CCU2,
ECMD an AVR-NET-IO mit DAC u. ADC an Junkers Stetigregelung, Siemens LOGO!8, JeeLink uvm...

TeeVau

@Frank
Bei dir scheint es Probleme mit dem non blocking zu geben. Die PID ist immer gleich, das kann nicht sein. Habe gelesen, dass du auch mit dem tts Modul Probleme hast, was auch non blocking verwendet. Kann es sein, dass du ein generelles Problem mit deinem fhem oder dem Linux hast?

@9zehn75
Von dir fehlt mir noch ein Log mit verbose 5
FHEM 5.8 dev (virtualisiert) / FBF 7390 (CUL 868MHz V 1.51 / panStick (AVR1))
FS20: fs20di,fs20pira,fs20sm8,fs20st2,fs20tfk,fs20ue1,fs20ws1
panStamp (AVR1): RGB Multi von ext23, 1W-DSxxxx, I/O Sketch, Spritzpumpe
Multimedia: Panasonic TV (VIERA), Kodi, Yamaha RX-V781, LMS
Sonstiges: XiaomiFlowerSen