Neues Modul PHTV für Philips Fernseher (inkl. Ambilight)

Begonnen von Loredo, 06 März 2014, 22:09:17

Vorheriges Thema - Nächstes Thema

kurt6908

Hallo Loredo,

ja, XTV ist ein Realm, den ich mit meinem Perl-Script über simple_request() rausbekommen habe.

Im simple_request() werden auch die Quality-Of-Protection ("qop") und der Nonce angezeigt, so wie im anderen Thread beschrieben, d.h. es wird definitv Digest Authentifizierung angewendet.

Was ich nicht weiß, ob sich bei den Android-TVs vom Philips der Realm auch mal ändert, bei meinem TV ist er bis dato gleich geblieben. Eventuell habe ich noch Zugriff auf einen anderen passenden TV, dass ich dort mal den Realm mit simple_request abfrage. Im WorstCase muss das Modul, vielleicht sogar HttpUtils, den Realm rausfinden, was nach meinem Recherchen im Rahmen der Digest-Implementierung bzgl. des Perl-Scriptes  auch gehen sollte.

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

Loredo

Eigentlich habe ich verstanden, dass der Webserver den Realm im Reply-Header mit überträgt (bzw. übertragen sollte).
HttpUtils verwendet diesen dann automatisch. Fehlt der Realm, hält sich der Webserver wohl nicht an den RFC. HttpUtils hat derzeit keine Möglichkeit den Realm manuell und statisch mit zu übergeben.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

kurt6908

#317
Hallo Loredo,

da muss ich jetzt passen, da weiß ich nicht, was HTTPUtils macht. Ändere einfach wie Du meinst, ich kann testen. Eine, welche auch immer, Änderung ist wohl nötig, da die jetztige Form, trotz korrekten User und PW, ja keine Antwort (z.B. bei der Lautstärke) liefert. Da der Aufruf der Lautstärkenänderung ja so klein und unkompliziert ist, glaube ich auch nicht, dass hier ein Fehler vorliegt.

Aber im Python-Script wird der Request so aufgrufen:

from requests.auth import HTTPDigestAuth

r = requests.post("https://" + config['address'] + ":1926/" + config['path'], json=config['body'], verify=False,auth=HTTPDigestAuth(config['device_id'], config['auth_key']))


d.h. hier wird auch kein Realm übergeben, sondern HTTPDigestAuth (Python) macht das automatisch. Da dieses beim TV funktionert, glaube ich, dass sich der Server, also der TV, hier schon RFC-konform verhält, ansonsten müsste Python ja auch den Realm übergeben.

Ich habe es nur nicht geschafft, die Digist-Authentifizierung in Perl nachzubauen, vielleicht brauchts das Ganze gar nicht, da die importierten Module das übernehmen und den Header auswerten.

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

Loredo

#318
Ich muss da leider auch passen.
Du kannst mal global verbose auf 4 oder 5 setzen, damit du mitloggen kannst, was HttpUtils so macht.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

Christian72D

Zitat von: kurt6908 am 19 Februar 2017, 10:15:55
Hallo Christian 72D,

Hast Du einen Philips ab BJ 2016 mit Android TV? Zielhardware sind die Geräte mit dem Attribut jsversion = 6 im Modul PHTV.
Ja, seit ein paar Wochen habe ich den Philips 55PUS7101.
ZitatIm Angebot von Amazon.de seit: 14. April 2016

kurt6908

Hallo Loredo,

ich habe nochmals die in FHEM als Attribut enthaltenen Credentials mit meinem Perl-Abfragescript getestet und konnte deren Richtigkeit bzw. das damit erfolgte Pairing bestätigen.

Hier ein set PhilipsTV statusRequest mit global verbose 5:

2017.02.20 19:19:58 4: WEB_192.168.69.28_52867 GET /fhem?cmd={ReadingsVal(%22PhilipsTV%22,%22statusRequest%22,%22%22)}&XHR=1; BUFLEN:0
2017.02.20 19:19:58 5: Cmd: >{ReadingsVal("PhilipsTV","statusRequest","")}<
2017.02.20 19:19:58 4: name: /fhem?cmd={ReadingsVal(%22PhilipsTV%22,%22statusRequest%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.02.20 19:20:01 4: Connection closed for WEB_192.168.69.28_52868: EOF
2017.02.20 19:20:01 4: WEB_192.168.69.28_52867 POST /fhem&detail=PhilipsTV&dev.setPhilipsTV=PhilipsTV&cmd.setPhilipsTV=set&arg.setPhilipsTV=statusRequest&val.setPhilipsTV=; BUFLEN:0
2017.02.20 19:20:01 5: Cmd: >set PhilipsTV statusRequest<
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 19:20:01 3: PHTV set PhilipsTV statusRequest
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 19:20:01 4: PHTV PhilipsTV: REQ audio/volume
2017.02.20 19:20:01 5: PHTV PhilipsTV: GET https://OJjcn7gLCVEgsYq8:3e1b792515145e1e3fc066ad880d0cbafa50f4582824e68c153e12a9edbe132e@192.168.69.48:1926/6/audio/volume
2017.02.20 19:20:01 4: HttpUtils url=https://OJjcn7gLCVEgsYq8:3e1b792515145e1e3fc066ad880d0cbafa50f4582824e68c153e12a9edbe132e@192.168.69.48:1926/6/audio/volume
2017.02.20 19:20:01 5: Starting notify loop for PhilipsTV, 1 event(s), first is statusRequest
2017.02.20 19:20:01 5: End notify loop for PhilipsTV
2017.02.20 19:20:01 4: WEB_192.168.69.28_52867 GET /fhem?detail=PhilipsTV&fw_id=; BUFLEN:0
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_Get()
2017.02.20 19:20:01 4: name: /fhem?detail=PhilipsTV&fw_id= / RL:6110 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2017.02.20 19:20:01 4: https://OJjcn7gLCVEgsYq8:3e1b792515145e1e3fc066ad880d0cbafa50f4582824e68c153e12a9edbe132e@192.168.69.48:1926/6/audio/volume: HTTP response code 403
2017.02.20 19:20:01 4: HttpUtils https://OJjcn7gLCVEgsYq8:3e1b792515145e1e3fc066ad880d0cbafa50f4582824e68c153e12a9edbe132e@192.168.69.48:1926/6/audio/volume: Got data, length: 445
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 19:20:01 4: PHTV PhilipsTV: RCV audio/volume
2017.02.20 19:20:01 5: PHTV PhilipsTV: RES ERROR 403 audio/volume
<html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Forbidden</p>
<p>The server understood the request, but is refusing to fulfill it</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>

2017.02.20 19:20:01 4: PHTV PhilipsTV: API command 'audio/volume' not supported by device.
2017.02.20 19:20:01 4: WEB_192.168.69.28_52867 GET /fhem?cmd={ReadingsVal(%22PhilipsTV%22,%22volume%22,%22%22)}&XHR=1; BUFLEN:0
2017.02.20 19:20:01 5: Cmd: >{ReadingsVal("PhilipsTV","volume","")}<
2017.02.20 19:20:01 4: name: /fhem?cmd={ReadingsVal(%22PhilipsTV%22,%22volume%22,%22%22)}&XHR=1 / RL:22 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.02.20 19:20:01 4: WEB_192.168.69.28_52851 GET /fhem?cmd={AttrVal(%22PhilipsTV%22,%22room%22,%22%22)}&XHR=1; BUFLEN:0
2017.02.20 19:20:01 5: Cmd: >{AttrVal("PhilipsTV","room","")}<
2017.02.20 19:20:01 4: name: /fhem?cmd={AttrVal(%22PhilipsTV%22,%22room%22,%22%22)}&XHR=1 / RL:33 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.02.20 19:20:01 4: WEB_192.168.69.28_52867 GET /fhem?XHR=1&inform=type=status;filter=PhilipsTV;since=1487614800;fmt=JSON&fw_id=1604×tamp=1487614801217; BUFLEN:0
2017.02.20 19:20:01 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 19:20:06 4: Connection closed for WEB_192.168.69.28_52832: EOF


Ich kann nur rauslesen, dass es nicht funktioniert. Auch sehe ich keine Einträge bzgl. Digest-Auth. Gibt es denn sonst kein Modul, was Digest-Auth verwendet? Mal so zum gegentesten ....

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

Loredo

Der TV scheint auf die anfängliche Basic Authentifizierungsanfrage nicht mit einem 401 Fehler zu antworten (so wäre es richtig), sondern mit einem permanenten 403 Fehler.
Das Digest Handling in HttpUtils verlässt sich derzeit darauf, dass bei fehlgeschlagener Authentifizierung ein 401 Fehler geschickt wird, wie es der RFC vorgibt.


Ohne diesen Roundtrip funktioniert jedoch Digest Auth nicht. HttpUtils müsste also erstmal umgeschrieben werden, um explizit Digest Auth zu beherrschen und die erste Anfrage nicht mit Basic Auth durchzuführen.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

kurt6908

Hallo Christian 72D,

dann mache doch bitte mal von dem Gerät auf dem das Perl-Script installiert ist einen Ping auf Deinen Fernseher (der mit der 192.168.1.131)

ping 192.168.1.131

und schau, ob dieser erreichbar ist.

Sollte dann irgendwie so ausschauen:

Zitat64 bytes from 192.168.1.131: icmp_req=1 ttl=64 time=8.08 ms

Wenn der Fernseher so erreichbar ist, dann bin ich mit meiner Ferndiagnose am Ende ...

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

kurt6908

Hallo Loredo,

doof .... dann ist wohl der Philips das erste Gerät, dass es nicht nach RFC macht ....

Darum gibt es wahrscheinlich in Python auch ausdrücklich die Methode HTTPDigestAuth, mit der DigestAuth explizit angesprochen werden kann.

Sind die Hüter der HttpUtils bereit, HttpUtils mit dem expliziten DigestAuth-Aufruf zu erweitern, so wie es auch Python macht?

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

Loredo

Ich habe einen möglichen Patch eingereicht. Ungewiss, ob er akzeptiert wird.
Du kannst ja die Änderung mal selbst übernehmen und ausprobieren. Ich habe dazu auch gerade ein passendes Update von 70_PHTV eingecheckt.


Gruß
Julian
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

kurt6908

Hallo Loredo,

ZitatDu kannst ja die Änderung mal selbst übernehmen und ausprobieren.

;D ;D ;D zum Glück ist Fasching ....ich kämpf seit 2 Wochen mit dem Perl-Script und dann soll ich diesen Patch irgendwo in den HttpUtils selber einbauen .... na na...das lass ich mal den Profis ....

Ich habe gesehen, dass Dein Patch "eingecheckt" ist, wann und wie bekomme ich denn jetzt das HttpUtils-Update? Dein Modul habe ich manuell eingespielt...

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

Loredo

Morgen per Update oder hier laden und in /opt/fhem/FHEM die Datei ersetzen.

Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

kurt6908

#327
Hallo Loredo,

SUPER !!!

Es scheint zu funktionieren.

Ich habe das alte Device gelöscht und nochmals komplett angelegt. Ich musste es nur zweimal machen, da ich vergessen habe, die PIN am Fernseher anzuschauen  :-\, wie mir es eingefallen ist, war der PIN wieder weg ...daher der Vorschlag mit dem Pop-Up.

Nach dem zweiten erfolgreichen Versuch wurde nach dem Pairing Lautstärke u.a. angezeigt, d.h. der Post mit dem geänderten DigestAuth hat funktioniert. Auch konnte ich wieder die neuen Credentials erfolgreich mit dem Perl-Script überprüfen.

Aber die Werte sind dann wieder verschwunden....wurden wieder angezeigt...dann habe ich auf disable=1 gesetzt.

Ich vermute, und so sehe ich es auch im Log, dass das Pairing mehrfach ausgeführt wird, obwohl der TV schon gepairt ist. Daher verschwinden wohl auch wieder die Werte.

Schau mal
2017.02.20 20:44:13
2017.02.20 20:44:41

Bis auf dieses doppelte Verhalten und das ein paar Werte nicht abfragbar sind funktioniert es. Was ich noch nicht getestet habe ist ein "set PhilipsTV off", was ja mit dem Perl-Script geht.

Hier der Log verbose 5 nach einem "set PhilipsTV statusRequest"


2017.02.20 20:44:12 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:12 3: PHTV set PhilipsTV statusRequest
2017.02.20 20:44:12 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 20:44:12 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:12 4: PHTV PhilipsTV: REQ audio/volume
2017.02.20 20:44:12 5: PHTV PhilipsTV: GET https://192.168.69.48:1926/6/audio/volume
2017.02.20 20:44:13 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:13 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:13 5: PHTV: Entering PHTV_Notify() for global
2017.02.20 20:44:13 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:13 4: PHTV PhilipsTV: REQ pair/request/{"device":{"app_name":"FHEM PHTV","device_name":"fhem","app_id":"org.fhem.PHTV","device_os":"Android","id":"Nf7sXRNa4RwHGDK5","type":"native"},"scope":["read","write","control"]}
2017.02.20 20:44:13 5: PHTV PhilipsTV: GET https://192.168.69.48:1926/6/pair/request (#HASH)
2017.02.20 20:44:13 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:13 3: PHTV PhilipsTV: 200 - Pairing enabled
2017.02.20 20:44:13 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:26 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:26 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:26 5: PHTV PhilipsTV: called function PHTV_Get()
2017.02.20 20:44:30 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:30 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:30 4: PHTV PhilipsTV: REQ pair/grant/{"auth":{"pin":"7061","auth_signature":"MDU5NzdmYWRkOTA4ZmJiYjY3YmNjMTBhMmI0Y2FkODUzNTZkYmQ0NQ==","auth_timestamp":5874,"auth_AppId":1},"device":{"app_name":"FHEM PHTV","device_name":"fhem","app_id":"org.fhem.PHTV","device_os":"Android","id":"Nf7sXRNa4RwHGDK5","type":"native"}}
2017.02.20 20:44:30 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/pair/grant (#HASH)
2017.02.20 20:44:30 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:30 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:30 5: PHTV PhilipsTV: called function PHTV_Get()
2017.02.20 20:44:30 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:30 5: PHTV: Entering PHTV_Notify() for global
2017.02.20 20:44:30 3: PHTV PhilipsTV: 200 - Pairing successful
2017.02.20 20:44:31 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:33 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 20:44:33 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:33 4: PHTV PhilipsTV: REQ audio/volume
2017.02.20 20:44:33 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/audio/volume
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: RCV audio/volume
2017.02.20 20:44:34 5: PHTV PhilipsTV: RES audio/volume
{"muted":false,"current":12,"min":0,"max":60}
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: REQ system
2017.02.20 20:44:34 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/system
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: REQ ambilight/topology
2017.02.20 20:44:34 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/ambilight/topology
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: REQ ambilight/mode
2017.02.20 20:44:34 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/ambilight/mode
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: REQ sources
2017.02.20 20:44:34 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/sources
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: REQ channels
2017.02.20 20:44:34 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/channels
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:34 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:34 4: PHTV PhilipsTV: RCV channels
2017.02.20 20:44:34 5: PHTV PhilipsTV: RES ERROR/404 channels
<html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Not Found</p>
<p>The server has not found anything matching the request URI</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>

2017.02.20 20:44:34 4: PHTV PhilipsTV: API command 'channels' not supported by device.
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:44:41 4: PHTV PhilipsTV: REQ pair/request/{"device":{"app_name":"FHEM PHTV","device_name":"fhem","app_id":"org.fhem.PHTV","device_os":"Android","id":"Nf7sXRNa4RwHGDK5","type":"native"},"scope":["read","write","control"]}
2017.02.20 20:44:41 5: PHTV PhilipsTV: GET https://192.168.69.48:1926/6/pair/request (#HASH)
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:41 4: PHTV PhilipsTV: RCV TIMEOUT sources
   read from https://192.168.69.48:1926 timed out
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:41 4: PHTV PhilipsTV: RCV TIMEOUT ambilight/topology
   read from https://192.168.69.48:1926 timed out
2017.02.20 20:44:41 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:41 4: PHTV PhilipsTV: RCV TIMEOUT system
   read from https://192.168.69.48:1926 timed out
2017.02.20 20:44:42 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:44:42 3: PHTV PhilipsTV: 200 - Pairing enabled
2017.02.20 20:44:42 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:59 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:59 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:44:59 5: PHTV PhilipsTV: called function PHTV_Get()
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: REQ audio/volume
2017.02.20 20:45:19 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/audio/volume
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: RCV audio/volume
2017.02.20 20:45:19 5: PHTV PhilipsTV: RES audio/volume
{"muted":false,"current":12,"min":0,"max":60}
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: REQ ambilight/mode
2017.02.20 20:45:19 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/ambilight/mode
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: REQ sources
2017.02.20 20:45:19 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/sources
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: REQ channels
2017.02.20 20:45:19 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/channels
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: RCV channels
2017.02.20 20:45:19 5: PHTV PhilipsTV: RES ERROR/404 channels
<html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Not Found</p>
<p>The server has not found anything matching the request URI</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>

2017.02.20 20:45:19 4: PHTV PhilipsTV: API command 'channels' not supported by device.
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: RCV sources
2017.02.20 20:45:19 5: PHTV PhilipsTV: RES ERROR/404 sources
<html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Not Found</p>
<p>The server has not found anything matching the request URI</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>

2017.02.20 20:45:19 4: PHTV PhilipsTV: API command 'sources' not supported by device.
2017.02.20 20:45:19 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:45:19 4: PHTV PhilipsTV: RCV ambilight/mode
2017.02.20 20:45:19 5: PHTV PhilipsTV: RES ambilight/mode
{"current":"internal"}
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_GetStatus()
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:46:04 4: PHTV PhilipsTV: REQ audio/volume
2017.02.20 20:46:04 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/audio/volume
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:46:04 4: PHTV PhilipsTV: REQ ambilight/mode
2017.02.20 20:46:04 5: PHTV PhilipsTV: GET https://Nf7sXRNa4RwHGDK5:57fa0f86b98c324ad1a3a4ce8788eb913f31a46403f3217733548171a328bcac@192.168.69.48:1926/6/ambilight/mode
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:46:04 5: PHTV PhilipsTV: API command 'sources' not supported by device.
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_SendCommand()
2017.02.20 20:46:04 5: PHTV PhilipsTV: API command 'channels' not supported by device.
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:46:04 4: PHTV PhilipsTV: RCV audio/volume
2017.02.20 20:46:04 5: PHTV PhilipsTV: RES audio/volume
{"muted":false,"current":12,"min":0,"max":60}
2017.02.20 20:46:04 5: PHTV PhilipsTV: called function PHTV_ReceiveCommand()
2017.02.20 20:46:04 4: PHTV PhilipsTV: RCV ambilight/mode
2017.02.20 20:46:04 5: PHTV PhilipsTV: RES ambilight/mode
{"current":"internal"}
2017.02.20 20:46:06 5: PHTV: Entering PHTV_Notify() for global
2017.02.20 20:46:23 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:46:23 5: PHTV PhilipsTV: called function PHTV_Set()
2017.02.20 20:46:23 5: PHTV PhilipsTV: called function PHTV_Get()


Hier noch die angezeigten Werte

ambiHue

off

2017-02-20 20:43:21
ambiMode

internal

2017-02-20 20:44:41
bri

0

2017-02-20 20:44:41
channel

-

2017-02-20 20:44:41
channelList

-,

2017-02-20 20:44:41
currentMedia

-

2017-02-20 20:44:41
frequency

-

2017-02-20 20:44:41
hue

0

2017-02-20 20:44:41
input

-

2017-02-20 20:44:41
inputList


2017-02-20 20:43:22
level

0 %

2017-02-20 20:44:41
mute

off

2017-02-20 20:48:19
onid

-

2017-02-20 20:44:41
pct

0

2017-02-20 20:44:41
power

on

2017-02-20 20:48:19
presence

present

2017-02-20 20:47:34
receiveMode

-

2017-02-20 20:44:41
rgb

000000

2017-02-20 20:44:41
sat

0

2017-02-20 20:44:41
servicename

-

2017-02-20 20:44:41
sid

-

2017-02-20 20:44:41
state

on

2017-02-20 20:48:19
stateAV

on

2017-02-20 20:48:19
tsid

-

2017-02-20 20:44:41
volume

20

2017-02-20 20:48:19
volumeStraight

12

2017-02-20 20:48:19


Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger

Loredo

Zitat von: kurt6908 am 20 Februar 2017, 21:08:34
Ich habe das alte Device gelöscht und nochmals komplett angelegt. Ich musste es nur zweimal machen, da ich vergessen habe, die PIN am Fernseher anzuschauen  :-\ , wie mir es eingefallen ist, war der PIN wieder weg ...daher der Vorschlag mit dem Pop-Up.


Zu viel Arbeit, lohnt nicht. Andere Module kommen auch ohne aus. Popup ist außerdem Browser-only und kann nicht per Telnet angesprochen werden.
Zudem wird die Authorisierungsanfrage automatisch erneuert. Ggf. gibt man dann einfach die neue PIN ein und das wars.


Soweit ich das im Log sehe, funktioniert erstmal alles wie von mir erwartet.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

kurt6908

Hallo Loredo,

o.k. kapiert.

Aber warum kommt nach dem richtigen pair/request und pair/grant (20:44:13) nochmal ein pair/request (20:44:41)

Bei jedem pair/request wird eine PIN angefragt die dann am TV angezeigt wird, dass sollte ja nur einmalig passieren.

Gruß

Kurt
3* Raspberry Pi (2 über LTE/VPN), 5* Cul, 3* FS20, 4* FHT, 6* HM, Somfy, Solarlog, WMBus/EnergyCam, AVM FritzBox, 3* AVM Powerline, Alexa, Tasmota/MQTT, Rademacher DuoFern, EPEver HiPower/ModBus, go-eCharger