Neues Modul "PhilipsTV"

Begonnen von RalfP, 08 November 2022, 15:25:09

Vorheriges Thema - Nächstes Thema

sam50

Hallo Ralf
Da bekomme ich folgende Antwort:

{"notifyChange":"http","menulanguage":"German","name":"75PUS8536\/12","country":"Germany","serialnumber_encrypted":"XXprV38qRCUMS8TYmpeUNir\/Ff+zdy\/O1jBIBJfl9eU=\n","softwareversion_encrypted":"QiwFbxwSlxr0FgY+eMuIfkvCIo4JIlpI0xZDxIr8KCxXyl9voiSjpbCgFuD7Anq6\n","model_encrypted":"Lb+AuLptDBHaRBCiF+InlBdcC+KvJILVycMFtS8ykN0=\n","deviceid_encrypted":"TI1\/zxT6OxSmSOtRmK5RJ8Xode1LDKYIGbQMGnCgKIk=\n","nettvversion":"10.0.0","epgsource":"no_epg","api_version":{"Major":6,"Minor":1,"Patch":0},"featuring":{"jsonfeatures":{"editfavorites":["TVChannels","SatChannels"],"recordings":["List","Schedule","Manage"],"ambilight":["LoungeLight","Hue","Ambilight","HueStreaming"],"menuitems":["Setup_Menu"],"textentry":["not_available"],"applications":["TV_Apps","TV_Games","TV_Settings"],"pointer":["not_available"],"inputkey":["key"],"activities":["intent"],"channels":["preset_string"],"mappings":["server_mapping"]},"systemfeatures":{"tvtype":"consumer","content":["dmr","pvr"],"tvsearch":"intent","pairing_type":"digest_auth_pairing","secured_transport":"true","companion_screen":"true"}},"os_type":"MSAF_2019_P"}

RalfP

Hallo Peter,

OK, dann wurde http in gewisser Weise abgeschaltet  >:(

Ich habe mal ein quick fix bei mir getestet. Sofern du die Möglichkeit hast die 70_PhilipsTV.pm (Datei hier beigefügt Du darfst diesen Dateianhang nicht ansehen.) mal anzupassen, hätten wir einen Test, ob es auch mit deinem TV dann funktioniert.

Ich habe den SystemRequest eingeschränkt auf https://, Port 1926, ApiVersion 6 und den SSL_Fingerprint beigefügt.

sub PhilipsTV_SystemRequest {
    my ( $hash ) = @_;
    my $name = $hash->{NAME};

    Log3 $name, 5, $name.": <SystemRequest> called";
   
    my @ports = (1926);
    my @apiVersions = (6);
   
    my $uri;
    my $protocol = "https://";
    my $ip = $hash->{IP} ;
    my $response;
    my $protokolR;
    my $portR;
    my $timeout = AttrVal($name, "requestTimeout", 2);            # Timeout in s

    foreach my $port (@ports) {
        foreach my $apiVersion (@apiVersions) {
            $uri = $protocol . $ip . ":" . $port . "/" . $apiVersion . "/system";
            $client->timeout($timeout);
            $client->agent(USER_AGENT);
            $client->ssl_opts(SSL_fingerprint => 'sha1$96A52B034901D9580C9ECFD4B6C9442EC483C3EB');
           
            Log3 $name, 5, $name.": <SystemChangeRequest> URL:".$uri." send:\n".
                "## Content ###########\n"."---";
           
            $response = $client->get($uri);
           


...sollte dies Erfolg haben, werde ich demnächst eine neue Version machen.

Grüße
Ralf

sam50

Hallo Ralf
Erstmal vielen Dank für deine Unterstützung. Ich habe deinen Test ausgeführt und folgende Info bekommen.

2023.07.15 14:41:49 5: 75PUS8536: <SystemRequest> called
2023.07.15 14:41:49 5: 75PUS8536: <SystemChangeRequest> URL:https://192.168.1.150:1926/6/system send:
## Content ###########
---
2023.07.15 14:41:49 5: 75PUS8536: <SystemRequest> URL:https://192.168.1.150:1926/6/system get HTTP returned:
## Response ##########
$VAR1 = bless( {
                 '_protocol' => 'HTTP/1.1',
                 '_rc' => 200,
                 '_msg' => 'OK',
                 '_request' => bless( {
                                        '_uri_canonical' => bless( do{\(my $o = 'https://192.168.1.150:1926/6/system')}, 'URI::https' ),
                                        '_content' => '',
                                        '_headers' => bless( {
                                                               'user-agent' => 'Fhem',
                                                               '::std_case' => {
                                                                                 'if-ssl-cert-subject' => 'If-SSL-Cert-Subject'
                                                                               }
                                                             }, 'HTTP::Headers' ),
                                        '_uri' => $VAR1->{'_request'}{'_uri_canonical'},
                                        '_method' => 'GET'
                                      }, 'HTTP::Request' ),
                 '_content' => '{"notifyChange":"http","menulanguage":"German","name":"75PUS8536\\/12","country":"Germany","serialnumber_encrypted":"jrUM0l9\\/JqLD5i578iOl6JBK\\/lwZFe0ncKdBUCynrMY=\\n","softwareversion_encrypted":"OQMMSgOHkAOfThgzUPgTXWI1miz0zUgLlja7l3kAdp2TMh8s+XAaWR49eiFbBMTC\\n","model_encrypted":"cR\\/3kdMEolIw53F+Hkw0FQ7lmaEp89V4h5guKCSJ2rY=\\n","deviceid_encrypted":"kYfbiMkIdwAXjlNUY2v2X7P4Pwlys6jKSJPTYQvvtAQ=\\n","nettvversion":"10.0.0","epgsource":"no_epg","api_version":{"Major":6,"Minor":1,"Patch":0},"featuring":{"jsonfeatures":{"editfavorites":["TVChannels","SatChannels"],"recordings":["List","Schedule","Manage"],"ambilight":["LoungeLight","Hue","Ambilight","HueStreaming"],"menuitems":["Setup_Menu"],"textentry":["not_available"],"applications":["TV_Apps","TV_Games","TV_Settings"],"pointer":["not_available"],"inputkey":["key"],"activities":["intent"],"channels":["preset_string"],"mappings":["server_mapping"]},"systemfeatures":{"tvtype":"consumer","content":["dmr","pvr"],"tvsearch":"intent","pairing_type":"digest_auth_pairing","secured_transport":"true","companion_screen":"true"}},"os_type":"MSAF_2019_P"}',
                 '_headers' => bless( {
                                        'client-date' => 'Sat, 15 Jul 2023 12:41:49 GMT',
                                        'content-type' => 'application/json; charset=UTF-8',
                                        '::std_case' => {
                                                          'access-control-allow-origin' => 'Access-Control-Allow-Origin',
                                                          'client-ssl-warning' => 'Client-SSL-Warning',
                                                          'client-peer' => 'Client-Peer',
                                                          'client-ssl-socket-class' => 'Client-SSL-Socket-Class',
                                                          'client-ssl-cert-subject' => 'Client-SSL-Cert-Subject',
                                                          'client-response-num' => 'Client-Response-Num',
                                                          'client-ssl-cert-issuer' => 'Client-SSL-Cert-Issuer',
                                                          'client-date' => 'Client-Date',
                                                          'client-ssl-cipher' => 'Client-SSL-Cipher'
                                                        },
                                        'client-ssl-cert-subject' => '/C=IN/ST=Karnataka/L=Bengaluru/O=TP VISION India Pvt. Ltd./OU=Smart TV/CN=restfultv.tpvision.com',
                                        'client-ssl-cert-issuer' => '/C=IN/ST=Karnataka/L=Bengaluru/O=TP VISION India Pvt. Ltd./OU=Smart TV/CN=ca.tpvision.com',
                                        'content-length' => '1107',
                                        'client-peer' => '192.168.1.150:1926',
                                        'access-control-allow-origin' => '*',
                                        'client-ssl-warning' => 'Peer certificate not verified',
                                        'date' => 'Sat, 15 Jul 2023 12:41:48 GMT',
                                        'server' => 'Restlet-Framework/2.3.12',
                                        'client-ssl-cipher' => 'TLS_AES_256_GCM_SHA384',
                                        'accept-ranges' => 'bytes',
                                        'client-ssl-socket-class' => 'IO::Socket::SSL',
                                        'client-response-num' => 1
                                      }, 'HTTP::Headers' )
               }, 'HTTP::Response' );

## Data ##############
{"notifyChange":"http","menulanguage":"German","name":"75PUS8536\/12","country":"Germany","serialnumber_encrypted":"jrUM0l9\/JqLD5i578iOl6JBK\/lwZFe0ncKdBUCynrMY=\n","softwareversion_encrypted":"OQMMSgOHkAOfThgzUPgTXWI1miz0zUgLlja7l3kAdp2TMh8s+XAaWR49eiFbBMTC\n","model_encrypted":"cR\/3kdMEolIw53F+Hkw0FQ7lmaEp89V4h5guKCSJ2rY=\n","deviceid_encrypted":"kYfbiMkIdwAXjlNUY2v2X7P4Pwlys6jKSJPTYQvvtAQ=\n","nettvversion":"10.0.0","epgsource":"no_epg","api_version":{"Major":6,"Minor":1,"Patch":0},"featuring":{"jsonfeatures":{"editfavorites":["TVChannels","SatChannels"],"recordings":["List","Schedule","Manage"],"ambilight":["LoungeLight","Hue","Ambilight","HueStreaming"],"menuitems":["Setup_Menu"],"textentry":["not_available"],"applications":["TV_Apps","TV_Games","TV_Settings"],"pointer":["not_available"],"inputkey":["key"],"activities":["intent"],"channels":["preset_string"],"mappings":["server_mapping"]},"systemfeatures":{"tvtype":"consumer","content":["dmr","pvr"],"tvsearch":"intent","pairing_type":"digest_auth_pairing","secured_transport":"true","companion_screen":"true"}},"os_type":"MSAF_2019_P"}
## Content-Type ######
application/json

Allerdings findet er den TV jetzt nicht mehr automatisch über Upnp (TV antwortet nicht mehr). Das wird gerade immer schlimmer.
Ich habe jetzt bei Philips ein Ticket aufgemacht und die senden mir nächste Woche einen USB Stick mit einer Recovery Version zu.
Philips meint das beim letzten Firmware Update etwas schief gegangen ist und einige Dateien fehlen. Die leere Antwort auf Port 1925 wäre
nicht okay. Jetzt versuch ich zuerst meinen TV wieder auf einen normalen Stand zu bringen, bevor wir weiter suchen.
Vielen Dank für deine Mühe bis jetzt, ich melde mich wieder sobald ich neue Infos habe. Bitte im Moment keine weitere Arbeit investieren, nicht
das wir nach einem nicht vorhandenen Fehler suchen.
Grüße Peter

RalfP

Hallo Peter,

OK, alles klar. Lass hören, wenn du etwas Neues hast. Trotzdem hat es mir Einiges gezeigt in meinem Code, was ich demnächst mal verbessern kann. Ich werde vieles, was ich mal als Tests eingebaut hatte, entfernen und mich nur noch auf die API für Android TVs konzentrieren.

PS: Die Antwort per https sieht aber trotzdem gut aus  ;)

Grüße
Ralf

sam50

Hallo Ralf
Unabhängig davon , warum findet der Befehl 'define Smarttv PhilipsTV PHILIPS' bei UPNP meinen TV nicht mehr. über die Philips App wird er gefunden und über die
Funktion in FHEM 'UPNPController' wird er ebenfalls gefunden . Sind da zum erneuten Pairing noch irgendwo alte Settings vorhanden, die ich löschen sollte ?
Grüße Peter

RalfP

Hallo Peter,

nur ein Schreibfehler? 'define Smarttv PhilipsTV PHILIPS'

Das define sollte nur so aussehen: 'define Smarttv PhilipsTV'

Die SUBTYPES PHILIPS und TV IP-Adresse werden automatisch angelegt. PHILIPS ist der UPnP Part und TV IP-Adresse wird für jeden gefundenen TV angelegt. Löschst du den UPnP Part (SUBTYPES PHILIPS) werden auch alle TV gelöscht.

Grüße
Ralf

sam50

#126
Hallo Ralf
Also es gibt neue Infos. Das Recovery des TV hat nichts gebracht, es liegt also scheinbar nicht an der neuen Firmware. Aber Philips sucht weiter.
Was mir noch aufgefallen ist, das nachdem ich den Befehl 'define Smarttv PhilipsTV' eingegeben habe wird zwar das Device 'Smarttv' angelegt, aber der TV wird nicht mehr gefunden und auch kein zusätzliches 'Device' abgelegt.
Das finden funktioniert allerdings mit dem Tool 'UPNP_Controller' dort wird der TV gefunden und folgendes darüber angezeigt.
192.168.1.150_49153-UDN
uuid:F00DBABE-AA5E-BABA-DADA-0ccafb0c3a8b
2023-07-20 12:19:27
192.168.1.150_49153-friendlyName
75PUS8536/12
2023-07-20 12:19:27
192.168.1.150_49153-location
http://192.168.1.150:49153/nmrDescription.xml
2023-07-20 12:19:27
192.168.1.150_49153-modelDescription
UPnP Media Renderer 1.0
2023-07-20 12:19:27
192.168.1.150_49153-modelNumber
2k15MTK
2023-07-20 12:19:27
192.168.1.150_49153-presence
online
2023-07-20 12:19:27
192.168.1.150_49153-presentationURL
nmr.html
2023-07-20 12:19:27
192.168.1.150_49153-zs-AVTransport
urn:schemas-upnp-org:service:AVTransport:1
2023-07-20 12:19:27
192.168.1.150_49153-zs-ConnectionManager
urn:schemas-upnp-org:service:ConnectionManager:1
2023-07-20 12:19:27
192.168.1.150_49153-zs-RenderingControl
urn:schemas-upnp-org:service:RenderingControl:1
2023-07-20 12:19:27
192.168.1.150_8008-UDN
uuid:f5328af3-9f75-2989-f12c-5bf07c8ca68c
2023-07-20 12:19:26
192.168.1.150_8008-friendlyName
75PUS8536/12
2023-07-20 12:19:26
192.168.1.150_8008-location
http://192.168.1.150:8008/ssdp/device-desc.xml
2023-07-20 12:19:26
192.168.1.150_8008-manufacturer
TPV
2023-07-20 12:19:26
192.168.1.150_8008-modelName
2021/22 Philips UHD Android TV
2023-07-20 12:19:26
192.168.1.150_8008-presence
online
2023-07-20 12:19:26
192.168.1.150_8008-zs-dial

Auch mit den externen Apps (zB. Phillips TV Remote) für Handy/Tablet funktioniert das Pairing und das steuern des TV .
Mit 'Smarttv' wird weder das Gerät gefunden noch im Logging angezeigt außerdem wird kein Pairing vorgenommen. Desweiteren sind nach wie vor 'Altinformationen wie zB der Raum' weiterhin vorhanden
obwohl ich alles gelöscht habe.

RalfP

Hallo Peter,

es sieht so aus, als ob der ModelName evtl. abweichend ist. Ich habe einen Filter eingebaut. Dieser ist aber über das Attribut acceptedModelName änderbar:

acceptedModelName
Default 'Philips TV'
Filter für Modelnamen der per Upnp gefunden werden soll.

Rufe mal http://192.168.1.150:49153/nmrDescription.xml in deinem Browser auf. Da müsste es einen Eintrag wie modelName geben. Wie lautet er?

Hoffentlich wurde er nicht weggelassen  ::)

Grüße
Ralf

sam50

Hi Ralf
Er Lautet:
root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:pcrc="urn:schemas-philips-com:philips-crc-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<friendlyName>75PUS8536/12</friendlyName>
<manufacturer>Philips</manufacturer>
<manufacturerURL>http://www.philips.com</manufacturerURL>
<modelDescription>UPnP Media Renderer 1.0</modelDescription>
<modelName>Philips TV DMR</modelName>
<modelNumber>2k15MTK</modelNumber>
<modelURL>http://www.philips.com/</modelURL>
<serialNumber>12345</serialNumber>
<UDN>uuid:F00DBABE-AA5E-BABA-DADA-0ccafb0c3a8b</UDN>
<UPC>123456789012</UPC>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>CP_logo_0.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>CP_logo_1.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>CP_logo_2.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>CP_logo_3.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<SCPDURL>nmrRenderingControl.xml</SCPDURL>
<controlURL>upnp/control/RenderingControl1</controlURL>
<eventSubURL>upnp/event/RenderingControl1</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>nmrConnectionManager.xml</SCPDURL>
<controlURL>upnp/control/ConnectionManager1</controlURL>
<eventSubURL>upnp/event/ConnectionManager1</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<SCPDURL>nmrAVTransport.xml</SCPDURL>
<controlURL>upnp/control/AVTransport1</controlURL>
<eventSubURL>upnp/event/AVTransport1</eventSubURL>
</service>
</serviceList>
<presentationURL>nmr.html</presentationURL>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50 </dlna:X_DLNADOC>
</device>
<pcrc:X_PhilipsCRC>68580838</pcrc:X_PhilipsCRC>
</root>

RalfP

Hallo Peter,

jetzt bin ich aber etwas überfragt. Der Eintrag ist wie erwartet vorhanden.

<modelName>Philips TV DMR</modelName>

Kann es sein, das du in deiner Fhem Instanz noch weitere UPnP Devices definiert hast? Pro Instanz wird nur ein UPnP Controlpoint benutzt. Ausgeschlossene IP's wirken sich durchaus auf andere Devices aus.

Hast du mal RescanNetwork versucht?

Gibt es irgendeinen Hinweis im Log?

Grüße
Ralf

sam50

#130
Hi ralf
Rescan Netzwerk habe ich schon versucht.
Bei einem Reboot von FHEM bekomme ich folgende Fehlermeldung
2023.07.20 13:09:05 1: PERL WARNING: Use of uninitialized value $param[2] in string eq at ./FHEM/70_PhilipsTV.pm line 323.
2023.07.20 13:09:05 1: PERL WARNING: Use of uninitialized value $param[2] in string eq at ./FHEM/70_PhilipsTV.pm line 335.

Und wie gesagt, was mir sehr seltsam vorkommt ist das bei 'define Smarttv PhilipsTV' in Smarttv schon der Raumname 'PhilipsTV' angelegt wird , den ich aber sonst nirgendwo nutze.
Auch schon vorher ist mir aufgefallen das nie ein Pairing am TV angezeigt wurde. Das sieht doch so aus als ob irgendwo noch Altlasten vorhanden sind

Hier noch das LOG File
2023.07.20 18:34:57 3: PhilipsTV: set Smarttv RescanNetwork
2023.07.20 18:34:57 5: Smarttv: <rescanNetwork> called
2023.07.20 18:34:57 5: Smarttv: <StopControlPoint> called
2023.07.20 18:34:57 5: Smarttv: <getAllTVs> called
2023.07.20 18:34:57 5: Smarttv: <StopControlPoint> socket HTTP::Daemon=GLOB(0x18f45f8) closed
2023.07.20 18:34:57 5: Smarttv: <StopControlPoint> socket IO::Socket::INET=GLOB(0x5e8e568) closed
2023.07.20 18:34:57 5: Smarttv: <StopControlPoint> socket IO::Socket::INET=GLOB(0x4b526f8) closed
2023.07.20 18:34:57 5: Smarttv: <getAllUPnPSockets> called
2023.07.20 18:34:58 5: Smarttv: <StopControlPoint> UPnPSocket hidden device delete UPnPSocket_Smarttv
2023.07.20 18:34:59 5: Smarttv: <StopControlPoint> UPnPSocket hidden device delete UPnPSocket_Smarttv_1900
2023.07.20 18:35:00 5: Smarttv: <StopControlPoint> UPnPSocket hidden device delete UPnPSocket_Smarttv_42561
2023.07.20 18:35:00 1: Smarttv: ControlPoint is successfully stopped!
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <setupControlpoint> called setup Upnp ControlPoint
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <setupControlpoint> succesfull setup of Upnp ControlPoint
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <startSearch> called UPnP Search
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 3: Smarttv: new Upnp search - started
2023.07.20 18:35:00 5: Smarttv: <startSearch> succesfull setup of Upnp Search
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <rescanNetwork> succesfull setup of rescan network
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:00 5: Smarttv: <Get> called for Smarttv : msg = ?
2023.07.20 18:35:00.538 5: ControlPoint: Receive Search-Response: "HOST: 239.255.255.250:1900
EXT:
CACHE-CONTROL: max-age=100
LOCATION: http://192.168.1.157:80/description.xml
SERVER: Hue/1.0 UPnP/1.0 IpBridge/1.58.0
hue-bridgeid: ECB5FAFFFEA319AF
ST: upnp:rootdevice
USN: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af::upnp:rootdevice

"
2023.07.20 18:35:00.538 5: ControlPoint: Unknown Search-Response...
2023.07.20 18:35:00.588 5: ControlPoint: Receive Search-Response: "HOST: 239.255.255.250:1900
EXT:
CACHE-CONTROL: max-age=100
LOCATION: http://192.168.1.157:80/description.xml
SERVER: Hue/1.0 UPnP/1.0 IpBridge/1.58.0
hue-bridgeid: ECB5FAFFFEA319AF
ST: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af
USN: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af

"
2023.07.20 18:35:00.588 5: ControlPoint: Unknown Search-Response...
2023.07.20 18:35:00.637 5: ControlPoint: Receive Search-Response: "HOST: 239.255.255.250:1900
EXT:
CACHE-CONTROL: max-age=100
LOCATION: http://192.168.1.157:80/description.xml
SERVER: Hue/1.0 UPnP/1.0 IpBridge/1.58.0
hue-bridgeid: ECB5FAFFFEA319AF
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af

"
2023.07.20 18:35:00.637 5: ControlPoint: Unknown Search-Response...
2023.07.20 18:35:01.539 5: ControlPoint: Receive Search-Response: "HOST: 239.255.255.250:1900
EXT:
CACHE-CONTROL: max-age=100
LOCATION: http://192.168.1.157:80/description.xml
SERVER: Hue/1.0 UPnP/1.0 IpBridge/1.58.0
hue-bridgeid: ECB5FAFFFEA319AF
ST: upnp:rootdevice
USN: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af::upnp:rootdevice

"
2023.07.20 18:35:01.539 5: ControlPoint: Unknown Search-Response...
2023.07.20 18:35:01.590 5: ControlPoint: Receive Search-Response: "HOST: 239.255.255.250:1900
EXT:
CACHE-CONTROL: max-age=100
LOCATION: http://192.168.1.157:80/description.xml
SERVER: Hue/1.0 UPnP/1.0 IpBridge/1.58.0
hue-bridgeid: ECB5FAFFFEA319AF
ST: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af
USN: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af

"
2023.07.20 18:35:01.590 5: ControlPoint: Unknown Search-Response...
2023.07.20 18:35:01.641 5: ControlPoint: Receive Search-Response: "HOST: 239.255.255.250:1900
EXT:
CACHE-CONTROL: max-age=100
LOCATION: http://192.168.1.157:80/description.xml
SERVER: Hue/1.0 UPnP/1.0 IpBridge/1.58.0
hue-bridgeid: ECB5FAFFFEA319AF
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-ecb5faa319af

"
2023.07.20 18:35:01.641 5: ControlPoint: Unknown Search-Response...
2023.07.20 18:35:02 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:02 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:06 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:35:06 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:36:09 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:36:11 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:36:11 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:36:11 5: Smarttv: <Get> called for Smarttv : msg = ?
2023.07.20 18:36:17 5: Smarttv: <Attr> called for acceptedModelName : value =
2023.07.20 18:36:17 3: PhilipsTV: attr Smarttv del acceptedModelName
2023.07.20 18:36:17 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:36:17 5: Smarttv: <Set> called for Smarttv : msg = ?
2023.07.20 18:36:17 5: Smarttv: <Get> called for Smarttv : msg = ?

RalfP

Hallo Peter,

Der Raum PhilipsTV wird automatisch vom Modul angelegt. Darin befindet sich das Device mit dem SUBTYPE PHILIPS und TV, bzw. alle gefundenen TV's. Somit brauch man sie nicht zu suchen. Später kann das alles umbenannt werden.

Die beiden Logzeilen deuten darauf hin, das du ein Device hast, welches aber keinen definierten Parameter 2 hat - komisch  ???

Mach mal "list TYPE=PhilipsTV".

So sieht das Ergebnis bei mir aus:

Philips
TV_192168276
UPnPSocket_Philips_1900
UPnPSocket_Philips_37107
UPnPSocket_Philips_8009

Bei dir entsprechend Smarttv anstatt Philips.

Poste auch mal die RAW Definition von Smarttv inkl. Internals.

Grüße
Ralf

sam50

#132
Hallo Ralf

Hier das Ergebnis von List:
Smarttv
UPnPSocket_Smarttv
UPnPSocket_Smarttv_1900
UPnPSocket_Smarttv_37117

Und die RAW

defmod Smarttv PhilipsTV PHILIPS
attr Smarttv expert 1
attr Smarttv room PhilipsTV
attr Smarttv verbose 5
#   CFGFN     
#   DEF        PHILIPS
#   FUUID      64b915d1-f33f-f0d5-2501-9112e19ec81f1660
#   NAME       Smarttv
#   NR         984
#   STATE      Upnp is running
#   SUBTYPE    PHILIPS
#   TYPE       PhilipsTV
#   VERSION    v0.2.17
#   eventCount 28
#   subscriptionURL <http://192.168.1.176:37117/eventSub>
#   READINGS:
#     2023-07-20 18:35:00   state           Upnp is running
#   helper:
#     pair:
#     upnp:
#
setstate Smarttv Upnp is running
setstate Smarttv 2023-07-20 18:35:00 state Upnp is running


Kann das damit zusammenhängen das ich beim Aufruf der Seite 'http://192.168.1.150:1925/6/system' ein leeres Ergebnis/Browserfenster zurück bekomme

RalfP

Hallo Peter,

du kannst mal einen anderen attr searchPort benutzen z.B. 8009.
Auf was für einem System läuft eigentlich bei dir Fhem?

Letztendlich kannst du auch versuchen den TV separat anzulegen (hatte ich aber bisher noch nie so richtig getestet, müsste aber funktionieren)

define TV_1921681150 PhilipsTV TV 192.168.1.150

PS: in deinem Log habe ich keine Antwort von 192.168.1.150 entdeckt, als du den RescanNetwork gemacht hattest. Leider kann ich das jetzt nicht 1:1 bei mir testen, da ich nicht zu Hause bin. Ich hätte angenommen, das der TV auf die UPnP Suchanfrage bei RescanNetwork auch im Log erscheinen müsste. Leider kann ich mich da nicht mehr erinnern.

Grüße
Ralf

sam50

Hallo Ralf
Bei Search Port 8009 ändert sich nichts , ich dachte auch der Tv sollte sich im LOG melden , aber ich bekomme nichts.
FHEM läuft auf Raspberry

Das 'define TV_1921681150 PhilipsTV TV 192.168.1.150' ergibt wieder den ursprünglichen Fehler mit
2023.07.20 20:58:10 5: TV_1921681150: <SystemChangeRequest> URL:http://192.168.1.150:1925/6/system send:
## Content ###########
---
2023.07.20 20:58:11 5: TV_1921681150: <SystemRequest> URL:http://192.168.1.150:1925/6/system get HTTP returned:
## Response ##########
$VAR1 = bless( {
                 '_headers' => bless( {
                                        'content-length' => '0',
                                        'date' => 'Thu, 20 Jul 2023 18:58:09 GMT',
                                        '::std_case' => {
                                                          'client-peer' => 'Client-Peer',
                                                          'client-response-num' => 'Client-Response-Num',
                                                          'client-date' => 'Client-Date',
                                                          'access-control-allow-origin' => 'Access-Control-Allow-Origin'
                                                        },
                                        'content-type' => 'application/json; charset=UTF-8',
                                        'accept-ranges' => 'bytes',
                                        'access-control-allow-origin' => '*',
                                        'client-date' => 'Thu, 20 Jul 2023 18:58:11 GMT',
                                        'client-response-num' => 1,
                                        'server' => 'Restlet-Framework/2.3.12',
                                        'client-peer' => '192.168.1.150:1925'
                                      }, 'HTTP::Headers' ),
                 '_content' => '',
                 '_rc' => 200,
                 '_request' => bless( {
                                        '_method' => 'GET',
                                        '_headers' => bless( {
                                                               'user-agent' => 'Fhem'
                                                             }, 'HTTP::Headers' ),
                                        '_uri' => bless( do{\(my $o = 'http://192.168.1.150:1925/6/system')}, 'URI::http' ),
                                        '_uri_canonical' => $VAR1->{'_request'}{'_uri'},
                                        '_content' => ''
                                      }, 'HTTP::Request' ),
                 '_msg' => 'OK',
                 '_protocol' => 'HTTP/1.1'
               }, 'HTTP::Response' );

## Data ##############

## Content-Type ######
application/json
## Content-length ####
0

2023.07.20 20:58:11 1: TV_1921681150: Error while HTTP requesting URL:http://192.168.1.150:1925/6/system - no JSON data!
2023.07.20 20:58:11 5: TV_1921681150: <SystemChangeRequest> URL:http://192.168.1.150:1925/5/system send:
## Content ###########
---
2023.07.20 20:58:11 4: TV_1921681150: Error while HTTP requesting URL:http://192.168.1.150:1925/5/system - Error - 404 Not Found
2023.07.20 20:58:11 5: TV_1921681150: <SystemChangeRequest> URL:http://192.168.1.150:1925/1/system send:
## Content ###########
---
2023.07.20 20:58:11 4: TV_1921681150: Error while HTTP requesting URL:http://192.168.1.150:1925/1/system - Error - 404 Not Found
2023.07.20 20:58:11 5: TV_1921681150: <SystemChangeRequest> URL:http://192.168.1.150:1926/6/system send:
## Content ###########
---
2023.07.20 20:58:13 4: TV_1921681150: Error while HTTP requesting URL:http://192.168.1.150:1926/6/system - Error - 500 read timeout
2023.07.20 20:58:13 5: TV_1921681150: <SystemChangeRequest> URL:http://192.168.1.150:1926/5/system send:
## Content ###########
---
2023.07.20 20:58:15 4: TV_1921681150: Error while HTTP requesting URL:http://192.168.1.150:1926/5/system - Error - 500 read timeout
2023.07.20 20:58:15 5: TV_1921681150: <SystemChangeRequest> URL:http://192.168.1.150:1926/1/system send:
## Content ###########
---
2023.07.20 20:58:17 4: TV_1921681150: Error while HTTP requesting URL:http://192.168.1.150:1926/1/system - Error - 500 read timeout