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!
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.
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
Hallo,
Stellt das VIERA Device bitte auf verbose 5.
Ich vermute, dass der Child prozess in den Time out läuft.
Tobias
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?
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
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.
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
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?
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?
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
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.
Gibt es hier noch etwas, was ich tun kann?
Ich hab bei mir wieder auf Blocking umgestellt und da funktioniert Alles wie gewohnt.
VG
Frank
@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
Hallo TeeVau, die tts Sache passiert nur wenn ich öfters einen shutdown restart von fhem mache, sonst läuft tts völlig problemlos. fhem läuft seit 3Jahren auch ohne Probleme auf einer ZBOX nano mit SSD, mit vollständiger Debian Wheezy Installation.
Da ja mittlerweile alle Module auf non Blocking umgestellt sind, wären da etliche Probleme zu erwarten, wenn non Blocking auf meinem System Probleme machen würden.
VG
Frank
@TeeVau:
Mein Log steht doch oben. Fehlt da was? Was soll ich loggen?
Sorry, habe ich übersehen.
Ich kann mir keinen Reim drauf machen: Bei euch beiden wird die Funktion im non blocking nicht aufgerufen. Das Polling (VIERA_GetStatus) wird bei euch beiden aufgerufen. Es wird auch jeweils ein Child generiert (VIERA_GetDoIt() BlockingCall process started with PID xxx). Danach ist dann aber Stille! Die Funktion VIERA_GetDoIt() wird im Child nicht aufgerufen, denn dann würde die Logmeldung "VIERA[NonBlocking-VIERA_GetDoIt()]: BlockingCall for wz_TV start..." folgen.
Eigentlich sollte irgendwann dann ein Timeout greifen. Aber ich vermute fast, dass gar kein Child gestartet wird...
Muss ich mal im dev. Board nachfragen, kann mir da keinen Reim draus machen. Sorry für die Umstände.
@9zehn75
Kannst du bitte einmal ein verbose 5 log machen was so für 2 Minuten läuft?! Ich möchte gerne sehen ob sich die PID bei den blocking Aufruf verändert. Bei mir zählt die PID nämlich immer brav hoch.
Zitat von: TeeVau am 10 Februar 2016, 12:06:33
@9zehn75
Kannst du bitte einmal ein verbose 5 log machen was so für 2 Minuten läuft?! Ich möchte gerne sehen ob sich die PID bei den blocking Aufruf verändert. Bei mir zählt die PID nämlich immer brav hoch.
Bei mir zählt nichts hoch:
2016-02-10 21:01:28 VIERA Wohnzimmer_TV off
2016.02.10 21:01:57 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:01:57 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:02:27 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:02:27 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:02:57 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:02:57 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:03:27 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:03:27 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:03:57 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:03:57 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
Hier noch mal ein Test mit komplettem Log-Inhalt:
2016.02.10 21:15:41 3: VIERA: Set off
2016.02.10 21:15:41 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.10 21:15:41 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.10 21:15:50 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:15:50 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:16:20 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:16:20 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:16:50 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:16:50 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:17:25 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:17:25 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:17:55 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:17:55 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
2016.02.10 21:18:25 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.10 21:18:25 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 3407
Hier noch mal mit Blocking="1":
2016-02-10 21:06:44 VIERA Wohnzimmer_TV off
2016.02.10 21:06:57 4 : VIERA[VIERA_GetStatus]: Using blocking...
2016.02.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: Send Data to 192.168.178.32:55000: POST /dmr/control_0 HTTP/1.0 Host: 192.168.178.32: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.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: 192.168.178.32 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>20</CurrentVolume> </u:GetVolumeResponse> </s:Body> </s:Envelope>
2016.02.10 21:06:57 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>20</CurrentVolume> </u:GetVolumeResponse> </s:Body> </s:Envelope>
2016.02.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: Send Data to 192.168.178.32:55000: POST /dmr/control_0 HTTP/1.0 Host: 192.168.178.32: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.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: 192.168.178.32 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.10 21:06:57 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.10 21:06:57 4 : VIERA[VIERA_GetStatus]: Set reading volume to 20
2016.02.10 21:06:57 4 : VIERA[VIERA_GetStatus]: Set reading mute to off
Sieht schon besser aus, oder? Aber leider bekommt mein FHEM nach dem Ausschalten immer noch nicht mit, dass der Fernseher ausgeschaltet ist.
Da ich im Developer Bereich nicht posten kann:
ZitatMit "attr global verbose 4" bekommt man im Mutter(?)-Prozess etwas mehr an Ausgaben, vermutlich wird das aber nicht weiterhelfen.
Klassisch waere Speicherengpass: fork geht zwar durch, damit werden alle Speicherseiten beim Kind auf CopyOnWrite gesetzt. Falls es anfaengt was sinnvolles zu machen, dann muessen neue Seiten alloziert werden, und das geht schief, der Prozess wird terminiert. Das ist nur eine Vermutung/Theorie, basierend auf evtl. veraltetes Wissen.
Um die Theorie zu unterstuetzen wuerde ich bei den Notleidenden regelmaessig free protokollieren (oder head -4 /proc/meminfo).
Alternativen:
- das Kind verklemmt sich im fhemFork in einem TcpServer_Close oder DevIo_CloseDev. Pruefen mit strace -p oder lsof aufs Kind.
- Eine SELinux/etc Konfiguration unterbindet bestimmte Aktionen fuer Kinder.
Ich habe das verlinkte Thema auf beobachten gesetzt.
Klassisch waere Speicherengpass, bei 8GB Ram auf dem ZOTAC scheidet das bestimmt aus (denke ich jedenfalls)
frank1@zotac:~$ free
total used free shared buffers cached
Mem: 8086436 924672 7161764 0 183204 509304
-/+ buffers/cache: 232164 7854272
Swap: 9526268 0 9526268
frank1@zotac:~$
P.S. Andere Module die fork verwenden, funktionieren und werden im child ausgeführt
VG
Frank
Zitat von: 9zehn75 am 10 Februar 2016, 21:08:57
Hier noch mal mit Blocking="1":
2016-02-10 21:06:44 VIERA Wohnzimmer_TV off
2016.02.10 21:06:57 4 : VIERA[VIERA_GetStatus]: Using blocking...
2016.02.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: Send Data to 192.168.178.32:55000: POST /dmr/control_0 HTTP/1.0 Host: 192.168.178.32: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.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: 192.168.178.32 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>20</CurrentVolume> </u:GetVolumeResponse> </s:Body> </s:Envelope>
2016.02.10 21:06:57 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>20</CurrentVolume> </u:GetVolumeResponse> </s:Body> </s:Envelope>
2016.02.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: Send Data to 192.168.178.32:55000: POST /dmr/control_0 HTTP/1.0 Host: 192.168.178.32: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.10 21:06:57 5 : VIERA[Blocking-VIERA_connection()]: 192.168.178.32 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.10 21:06:57 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.10 21:06:57 4 : VIERA[VIERA_GetStatus]: Set reading volume to 20
2016.02.10 21:06:57 4 : VIERA[VIERA_GetStatus]: Set reading mute to off
Sieht schon besser aus, oder? Aber leider bekommt mein FHEM nach dem Ausschalten immer noch nicht mit, dass der Fernseher ausgeschaltet ist.
Ich gehe mal davon aus, dass der Fernseher, nachdem set off, auch wirklich aus geht, oder? ;-)
Es scheint sich etwas an der Firmware geändert zu haben. Dein Fernseher meldet, obwohl er aus ist, noch die Lautstärke und den Mute-Zustand zurück. Das interpretiere ich in dem Modul als "eingeschaltet".
Wenn sich der Fernseher so verhält, wäre prinzipiell auch egal ob es blocking oder non blocking ist.
@franky08 und 9zehn75
Bitte noch mal ein log machen mit dem globael verbose auf level 4 (attr global verbose 4). Vielleicht helfen die Logmeldungen doch, die Chance sollten wir nicht ungenutzt lassen.
Dass sich die PID nicht ändert ist mir ein Dorn im Auge. Bitte führe ein "lsof -p <PID Nummer>" aus und poste den output hier mal. Vielleicht kann Rudi damit irgendwas sehen. Die PID muss die sein, die das VIERA Modul im Log für den child Prozess meldet (VIERA_GetDoIt() BlockingCall process started with PID xxxx)
Nach dem "Off" geht der Fernseher an. Ein"On" gibt es in meinem Device nicht. Wenn der TV an ist, schaltet "Off" ihn aus. Ist er aus, schaltet "Off" ihn ein. Stimmt schon da was nicht?
Log folgt heute Abend.
So, jetzt bin ich total ratlos, plötzlich funktioniert das VIERA Modul mit non blocking! Hier mal die relevanten Log Abschnitte. Mit Einschalten nach 9:00 Uhr. pid wird hochgezählt, child läuft.
.........
2016.02.11 08:59:49 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 08:59:49 4: BlockingCall (VIERA_GetDoIt): created child (1707), uses telnetPort to connect back
2016.02.11 08:59:49 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 1707
2016.02.11 08:59:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: BlockingCall for TV start...
.........
2016.02.11 08:59:51 4: VIERA[NonBlocking-VIERA_connection()]: 192.168.2.20: not able to open socket
2016.02.11 08:59:51 4: VIERA[NonBlocking-VIERA_GetDoIt()]: GetStatusVol-Request NO SOCKET!
2016.02.11 08:59:51 4: Connection accepted from telnetPort_127.0.0.1_33619
2016.02.11 08:59:51 4: VIERA[NonBlocking-VIERA_GetDone()]: Param: TV|error-noSocket|error-noSocket
2016.02.11 08:59:51 4: VIERA[NonBlocking-VIERA_GetDone()]: Seems to be there is no socket available. Guessing TV is off!
...........
2016.02.11 09:01:49 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 09:01:49 4: BlockingCall (VIERA_GetDoIt): created child (1758), uses telnetPort to connect back
2016.02.11 09:01:49 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 1758
2016.02.11 09:01:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: BlockingCall for TV start...
2016.02.11 09:01:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received HTTP Code 200 OK
2016.02.11 09:01:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received volume with level 45
2016.02.11 09:01:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received HTTP Code 200 OK
2016.02.11 09:01:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received mute state off
2016.02.11 09:01:49 4: Connection accepted from telnetPort_127.0.0.1_33641
2016.02.11 09:01:49 4: VIERA[NonBlocking-VIERA_GetDone()]: Param: TV|45|off
2016.02.11 09:01:49 4: LED5ON exec set 16_LED_5 led green
2016.02.11 09:01:49 4: TV_dummy_reset exec {if(Value("TV") eq "absent")
{fhem "set TV_an_dummy off"}
}
..........
2016.02.11 09:03:49 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 09:03:49 4: BlockingCall (VIERA_GetDoIt): created child (1893), uses telnetPort to connect back
2016.02.11 09:03:49 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 1893
2016.02.11 09:03:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: BlockingCall for TV start...
2016.02.11 09:03:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received HTTP Code 200 OK
2016.02.11 09:03:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received volume with level 45
2016.02.11 09:03:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received HTTP Code 200 OK
2016.02.11 09:03:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received mute state off
2016.02.11 09:03:49 4: Connection accepted from telnetPort_127.0.0.1_33658
2016.02.11 09:03:49 4: VIERA[NonBlocking-VIERA_GetDone()]: Param: TV|45|off
........
2016.02.11 09:05:49 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 09:05:49 4: BlockingCall (VIERA_GetDoIt): created child (1946), uses telnetPort to connect back
2016.02.11 09:05:49 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 1946
2016.02.11 09:05:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: BlockingCall for TV start...
2016.02.11 09:05:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received HTTP Code 200 OK
2016.02.11 09:05:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received volume with level 45
2016.02.11 09:05:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received HTTP Code 200 OK
2016.02.11 09:05:49 4: VIERA[NonBlocking-VIERA_GetDoIt()]: Received mute state off
2016.02.11 09:05:49 4: Connection accepted from telnetPort_127.0.0.1_33677
2016.02.11 09:05:49 4: VIERA[NonBlocking-VIERA_GetDone()]: Param: TV|45|off
Bei mir ist somit alles OK, hatte gestern oder vorgestern ein update gemacht, vlt. hängt es damit zusammen?
version:
fhem.pl 10747 2016-02-07 07:39:16Z rudolfkoenig
96_allowed.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
90_at.pm 10594 2016-01-22 13:27:34Z rudolfkoenig
98_autocreate.pm 10651 2016-01-28 16:18:49Z rudolfkoenig
98_average.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
57_Calendar.pm 10733 2016-02-06 09:02:02Z borisneubert
98_cmdalias.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
10_CUL_HM.pm 10757 2016-02-07 19:18:11Z martinp876
93_DbLog.pm 9718 2015-10-29 15:05:52Z rapster
98_dewpoint.pm 6757 2014-10-12 18:58:57Z joachim09876
98_dummy.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
66_ECMD.pm 10732 2016-02-06 08:48:07Z borisneubert
67_ECMDDevice.pm 7698 2015-01-24 19:02:54Z borisneubert
70_ENIGMA2.pm 10559 2016-01-17 15:51:02Z loredo
72_FB_CALLLIST.pm 10716 2016-02-03 19:01:38Z markusbloch
72_FB_CALLMONITOR.pm 10740 2016-02-06 14:45:51Z markusbloch
93_FHEM2FHEM.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
01_FHEMWEB.pm 10747 2016-02-07 07:39:16Z rudolfkoenig
92_FileLog.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
95_FLOORPLAN.pm 10076 2015-12-03 18:21:53Z ulimaass
98_help.pm 10533 2016-01-16 20:00:25Z betateilchen
98_HMinfo.pm 10615 2016-01-24 21:09:45Z martinp876
00_HMLAN.pm 10409 2016-01-08 15:13:59Z martinp876
98_HTTPMOD.pm 9127 2015-08-24 18:43:31Z ststrobel
98_logProxy.pm 10532 2016-01-16 19:56:21Z justme1968
99_myAvarageUtils.pm 1001 2016-01-12 16:16:21Z ?????
99_myBattUtils.pm 1001 2016-01-16 16:20:54Z frankdonath
No Id found for 99_myFerienUtils.pm
No Id found for 99_myHZ_AusUtils.pm
No Id found for 99_myHZ_ZYCUtils.pm
No Id found for 99_myicalUtils.pm
No Id found for 99_myoutdateUtils.pm
No Id found for 99_myTESTUtils.pm
No Id found for 99_myTextAusgabeUtils.pm
No Id found for 99_myTVUtils.pm
99_myUtils.pm 1002 2016-01-12 15:22:24Z frankdonath
99_myUtilsTelefon.pm 1932 2012-10-06 20:15:33Z ulimaass
91_notify.pm 10694 2016-02-01 06:43:00Z rudolfkoenig
70_PIONEERAVR.pm 10052 2015-11-29 16:29:49Z hofrichter
71_PIONEERAVRZONE.pm 7365 2014-12-30 15:42:43Z hofrichter
73_PRESENCE.pm 10686 2016-01-31 15:46:23Z markusbloch
33_readingsGroup.pm 10532 2016-01-16 19:56:21Z justme1968
98_statistics.pm 10075 2015-12-03 17:21:21Z grompo
99_SUNRISE_EL.pm 10569 2016-01-19 06:30:28Z rudolfkoenig
98_SVG.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
42_SYSMON.pm 10360 2016-01-04 21:21:02Z hexenmeister
98_telnet.pm 10551 2016-01-17 11:03:44Z rudolfkoenig
98_Text2Speech.pm 9758 2015-11-03 06:06:33Z tobiasfaust
98_THRESHOLD.pm 8521 2015-05-03 18:32:17Z damian-s
98_update.pm 10617 2016-01-25 07:40:33Z rudolfkoenig
99_Utils.pm 10570 2016-01-19 06:39:23Z rudolfkoenig
98_version.pm 10658 2016-01-29 19:43:10Z markusbloch
70_VIERA.pm 10463 2016-01-11 18:03:07Z teevau
91_watchdog.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
59_Weather.pm 10403 2016-01-07 19:44:04Z borisneubert
98_weblink.pm 10530 2016-01-16 19:27:21Z rudolfkoenig
No Id found for 95_WebViewControl.pm
Blocking.pm 10343 2016-01-03 10:55:45Z rudolfkoenig
DevIo.pm 8954 2015-07-13 16:01:48Z rudolfkoenig
FritzBoxUtils.pm 6574 2014-09-19 17:32:48Z rudolfkoenig
HMConfig.pm 10758 2016-02-07 19:36:23Z martinp876
HttpUtils.pm 10698 2016-02-02 18:36:14Z rudolfkoenig
Info.pm 28 2008-11-09 01:08:44Z dsully
RTypes.pm 10476 2016-01-12 21:03:33Z borisneubert
SetExtensions.pm 9413 2015-10-09 13:13:11Z rudolfkoenig
TcpServerUtils.pm 10346 2016-01-03 12:34:27Z rudolfkoenig
VG
Frank
Hier mal etwa zehn Minuten mit global vebose 4:
2016.02.11 19:04:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:04:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:05:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:05:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:05:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:05:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:06:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:06:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:06:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:06:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:07:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:07:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:07:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:07:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:08:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:08:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:08:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:08:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:09:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:09:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:09:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:09:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:10:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:10:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:10:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:10:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:11:16 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:11:16 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
2016.02.11 19:11:46 4: VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.11 19:11:46 4: VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 7809
Nichts neues...
Nochmals meine Frage von vorher:
Ist es normal, dass mein Device keinen Status "On" kennt? Es gibt nur "Off":
Unknown argument on, choose one of off mute remoteControl volume volumeUp volumeDown channel channelUp channelDown input
Meinst du wirklich den Status?
Internals:
CHANGED
DEF 192.168.2.20 120
NAME TV
NR 284
STATE on
TYPE VIERA
Readings:
2015-01-04 21:56:05 mute off
2016-02-11 21:57:53 power on
2016-02-11 21:57:53 presence present
2016-02-11 21:57:53 state on
2016-02-11 22:15:53 volume 30
Helper:
HOST 192.168.2.20
INTERVAL 120
PORT 55000
Attributes:
DbLogExclude .*
blocking 0
devStateIcon absent.*:it_television@red .*:it_television@green
event-on-change-reading .*
fp_Grundriss 460,225,0,
fp_Grundriss2 572,233,0,
fp_status2 520,1130,0,
room Wohnzimmer
userattr room_map structexclude
webCmd off
Oder das webcmd nur off enthält und du den TV nur aus aber nicht an schalten kannst? Laut commandref geht nur off.
VG
Frank
Zitat von: franky08 am 11 Februar 2016, 22:26:55
Meinst du wirklich den Status?
Oder das webcmd nur off enthält und du den TV nur aus aber nicht an schalten kannst? Laut commandref geht nur off.
webcmd stellt bei mir nur "off" zur Verfügung. die Readings "Power" als auch "State" stehen immer auf "ON". Soweit ich den Source (und die CommandRef) verstehe, ist jedenfalls erstes richtig. Zweites wohl nicht. Ich finde aber keinen Fehler bei mir und vermute daher nach wie vor einen Fehler im Modul.
Zitat von: 9zehn75 am 12 Februar 2016, 11:15:43
webcmd stellt bei mir nur "off" zur Verfügung. die Readings "Power" als auch "State" stehen immer auf "ON". Soweit ich den Source (und die CommandRef) verstehe, ist jedenfalls erstes richtig. Zweites wohl nicht. Ich finde aber keinen Fehler bei mir und vermute daher nach wie vor einen Fehler im Modul.
Bei mir geht das power reading nur in den off Zustand, wenn die Netwerkeinstellung am TV entsprechend eingestellt ist, d.h. wenn der TV im Stanby nicht per Netzwerk errreichbar ist (Stanbyleuchte rot und nicht orange).
Gruß,
Stefan
Ihr seid in der glücklichen Lage, dass euer Fernseher im Standby das Netzwerk Interface aktiv hat.
Das macht meiner nicht. Aus ist dann wirklich aus und auch ohne Netzwerk. Das interpretiert auch das Modul so: Kein Socket zum Fernseher = fernseher aus.
Bei euch ist das Socket aber immer da, somit denkt das Modul der Fernseher ist an.
Mir ist nicht bekannt, wie man den Zustand Fernseher ein- oder ausgeschaltet, Abfragen kann. Wenn jemand weis wie das geht, baue ich es gerne ein.
Hast du ein fhem update gemacht? Bei franky hat sich das Problem dadurch plötzlich erledigt!
@franky08
Tja, sehr seltsam. Aber gut zu wissen, dass es nicht am Modul liegt. Ich hätte zwar gerne gewusst was der Fehler ist, aber man kann nicht immer alles haben :-)
Jetzt bin ich sehr verwirrt: Kann man nun mit dem Modul feststellen, ob der Fernseher eingeschaltet ist, oder kann man das nicht?
Wie schon gesagt, kommt auf die Netzwerkeinstellungen am TV an, wenn das Netzwerk im Standby aus ist JA ansonsten nicht.
Zitat von: 9zehn75 am 13 Februar 2016, 14:19:21
Jetzt bin ich sehr verwirrt: Kann man nun mit dem Modul feststellen, ob der Fernseher eingeschaltet ist, oder kann man das nicht?
Solange dein Fernseher im Netzwerk erreichbar ist, auch wenn er ausgeschaltet ist, kann das Modul den Zustand nicht feststellen. Denn im Netzwerk erreichbar = eingeschaltet.
Alternativ wäre es eine Möglichkeit, dass du vom VIERA Protokoll die Abfrage kennst, womit festgestellt werden kann ob der Fernseher eingeschaltet ist oder nicht. Ich selber kenne den Befehl zum Abfragen nicht.
Sieht man bei mit schön am Switch, TV aus ==> LED am Switch aus ;)
VG
Frank
@9zehn75
Da bei dir das non blocking auch nicht funktioniert, hast du mal ein fhem update gemacht und ein shutdown+restart ?
Das hat bei frank geholfen. Das würde zumindest dazu führen, dass die Lautstärke und der Mute-Zustand aktualisiert wird.
Denn mit dem non blocking läuft auch bei dir was nicht richtig.
Zitat von: TeeVau am 17 Februar 2016, 07:24:51
@9zehn75
Da bei dir das non blocking auch nicht funktioniert, hast du mal ein fhem update gemacht und ein shutdown+restart ?
Das hat bei frank geholfen. Das würde zumindest dazu führen, dass die Lautstärke und der Mute-Zustand aktualisiert wird.
Habe ich bislang täglich gemacht. Kann mich im Moment nicht aktiv erinnern, dass das zu einer Besserung geführt hätte (habe aber im Moment auch andere Baustellen). Schau heute Abend aber nochmals nach.
Ich habe mir zwischenzeitlich schon überlegt, einfach den Fernseher an eine schaltbare Steckdose zu stecken. Dann ist zumindest die Problematik mit der fehlenden Rückmeldung für die Zustände on/off erledigt und ich kann über Skripte sicher feststellen, ob der Fernseher an oder aus ist.
Hmm, ok. Dann mach noch mal bitte ein log mit global verbose 4.
Rudi sagte dann steht etwas mehr zum blocking im fhem log. Vielleicht hilft uns schon das weiter. Ansonsten wäre der nächste Schritt speicherauslastungg beobachten
Sorry, bin nicht eher dazu gekommen. Hier ein Log (GLOBAL verbose 4 und VIERA verbose 4, blocking 0):
1. Fernseher aus; ich schalte ihn ein
2016.02.19 21:19:18 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:19:18 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:19:48 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:19:48 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:20:18 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:20:18 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:20:48 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:20:48 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:21:18 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:21:18 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2. Ich schalte den Fernseher wieder aus
2016.02.19 21:21:48 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:21:48 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:22:18 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:22:18 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:22:48 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:22:48 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:23:18 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:23:18 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
2016.02.19 21:23:48 4 : VIERA[VIERA_GetStatus]: Using non blocking...
2016.02.19 21:23:48 4 : VIERA[VIERA_GetStatus]: VIERA_GetDoIt() BlockingCall process started with PID 23836
3. Nun stelle ich um auf Blocking=1 und schalte ihn wieder ein
2016.02.19 21:35:18 4 : VIERA[VIERA_GetStatus]: Using blocking...
2016.02.19 21:35:18 4 : VIERA[VIERA_GetStatus]: Set reading volume to 11
2016.02.19 21:35:18 4 : VIERA[VIERA_GetStatus]: Set reading mute to off
2016.02.19 21:35:26 3 : VIERA: Set off
2016-02-19 21:35:26 VIERA Wohnzimmer_TV off
2016.02.19 21:35:42 3 : VIERA: Set off
2016-02-19 21:35:42 VIERA Wohnzimmer_TV off
2016.02.19 21:35:48 4 : VIERA[VIERA_GetStatus]: Using blocking...
2016.02.19 21:35:48 4 : VIERA[VIERA_GetStatus]: Set reading volume to 11
2016.02.19 21:35:48 4 : VIERA[VIERA_GetStatus]: Set reading mute to off
2016.02.19 21:36:18 4 : VIERA[VIERA_GetStatus]: Using blocking...
2016.02.19 21:36:18 4 : VIERA[VIERA_GetStatus]: Set reading volume to 11
2016.02.19 21:36:18 4 : VIERA[VIERA_GetStatus]: Set reading mute to off
Leider findet sich nicht mehr im Log...
Nach dem analysieren des Logs und der aktuellen Quellen:
- Fork erzeugt ein Prozess mit PID 23836.
- der geforkte Prozess ist nicht in der Lage eine Meldung zu produzieren. Im Log haette sowas auftauchen muessen:
Zitat2016.02.20 07:24:59 4: BlockingCall (DoSleep): created child (89745), uses tPort to connect back
- ich habe ein Bug in Blocking.pm gefixt, was leider keine Auswirkung auf das aktuelle Problem haben wird: der Rueckgabewert war falsch, falls Blocking kein Telnet-Port fuers Rueckmelden finden und auch keins anlegen konnte. Falls wir diesen Fall gehabt haetten, haetten wir eine Menge sonstiger Fehlermeldungen bekommen.
Ich habe es noch nie erlebt, dass hintereinander erfolgte forks das gleiche PID zurueckliefern, und ich habe auch kein Hinweis darauf im Netz gefunden.
Falls machbar, wuerde ich gerne ein strace output sehen:
- FHEM normal starten, attr global log auf 4 und VIERA auf non blicking.
- in einem separaten Fenster FHEMPID aussuchen (mit ps/top), und "strace -f -p <FHEMPID> -o strace.fhem.out" starten.
- sofort nach dem strace-start Fernseher mit FHEM ein oder ausschalten (egal), und danach strace beenden mit Ctrl-C
- strace.fhem.out hier anhaengen.
Rudolf,
siehe anbei.
Und hier auch noch mal den entsprechenden Log.
Sorry, habs vergessen: ich brauche ein Log/strace in dem Fall wo zwar non-blocking aktiviert ist, aber es _nicht_ funktioniert.
Im angehaengten Log scheint alles OK zu sein.
Kleine Anmerkung: das Polling nutzt non blocking!
Ich glaube, müsste nachgucken bin aber unterwegs, die seit Befehle sind immer blocking!
Also nicht einen Befehl zum Fernseher senden, sondern das Polling abwarten!
kann mir jemand sagen ob ich mit dem VIERA-Modul den Panasonic TX 40DSW504S bedienen kann bzw. gibt es eine Möglichkeit dieses vorm Kauf festzustellen?
Ich nutze zwar kein FHEM mehr, aber vielleicht interessiert es ja den ein oder anderen. Ich hab die Tage mittels Netzwerkanalyse eine Möglichkeit entdeckt, heraus zu finden, ob der Fernseher an oder aus ist.
Der Trick lautet UPNP und Subscribe. Man kann dem Fernseher mitteilen, dass man über Zustandsänderungen per HTTP Callback informiert werden möchte.
Man kann das wie folgt testen:
curl -X SUBSCRIBE http://TVIP:55000/nrc/event_0 -H "CALLBACK: <http://CALLBACKHOST/PATH>" -H "NT: upnp:event" -H "TIMEOUT: Second-300" -v
Dieser Befehl muss halt alle ca 290 Sekunden erneut werden. Die Timeoutangabe im Header scheint meist ignoriert zu werden. Daher sollte man mit dem Default 300 weiter arbeiten.
Vielleicht hilft es euch das in FHEM zu integrieren.
Gruß
Hallo,
da ich auch auf der Suche nach einem funktionierendem Tool bin um festzustellen, ob mein Fernseher (Panasonic) an ist oder nicht, bin ich über diesen Threat gestolpert.
Das VIERA-Modul funktioniert nämlich bei mir auch nicht so, wie ich mir das vorstelle.
Über Lan-Ping funktioniert es zunächst. Anscheinend wacht der TV bei ausgeschaltetem Zustand aber irgendwann auf und sucht nach Aktualisierungen im Netz oder so ähnlich. Das ist doof für Lichtszenen ;)
Zitat von: traxanos am 04 Oktober 2017, 14:36:31
Der Trick lautet UPNP und Subscribe. Man kann dem Fernseher mitteilen, dass man über Zustandsänderungen per HTTP Callback informiert werden möchte.
Man kann das wie folgt testen:
curl -X SUBSCRIBE http://TVIP:55000/nrc/event_0 -H "CALLBACK: <http://CALLBACKHOST/PATH>" -H "NT: upnp:event" -H "TIMEOUT: Second-300" -v
Dieser Befehl muss halt alle ca 290 Sekunden erneut werden. Die Timeoutangabe im Header scheint meist ignoriert zu werden. Daher sollte man mit dem Default 300 weiter arbeiten.
Für mich hört sich das so an, als ob der Fernseher selbstständig Meldungen sendet, wenn man ihm sagt, dass man das möchte.
Damit würde sogar ein Interval entfallen und die Meldungen über an/aus direkt kommen. Was für Lichtszenen optimal wäre.
Hat das schonmal jemand probiert?
Ich habe leider keine Ahnung, was traxanos mit dem callbackhost/path meint.
Könnte mir da jemand unter die arme greifen?
Vielen Dank!
Bis denn
SouzA