Aktuell sieht es so aus, klappt aber noch nicht.
Code:<? /** * ---------------------------------------- * Example - PHP LG SmartTV API * ---------------------------------------- * https://github.com/SteveWinfield/PHP-LG-SmartTV **/ include smartTV.php; /** * Create instance of TV * @param IP Address of TV * (optional) @param Port of TV (default is 8080) **/ $tv = new SmartTV('192.168.1.45', 8080); // new SmartTV('192.168.2.103', 8080) /** * Set pairing key (if you don't know the pairing key * execute the method ..->displayPairingKey() and it will * be shown on your tv) * @param Key **/ $tv->setPairingKey(696850); // $tv->displayPairingKey(); /** * Authenticate to the tv * @except Login fails (wrong pairing key?) **/ $setValueID = (58369 /*[Hausautomation\Entertainment\Archiv\LG-TV\SetValue]*/); //ID von "SetValue" Script"
Das ist der output:
Notice: Use of undefined constant smartTV - assumed 'smartTV' in C:\IP-Symcon\scripts\39505.ips.php on line 8
Notice: Use of undefined constant php - assumed 'php' in C:\IP-Symcon\scripts\39505.ips.php on line 8
Warning: include(smartTVphp): failed to open stream: No such file or directory in C:\IP-Symcon\scripts\39505.ips.php on line 8
Warning: include(): Failed opening 'smartTVphp' for inclusion (include_path='.;C:\php\pear') in C:\IP-Symcon\scripts\39505.ips.php on line 8
Fatal error: Class 'SmartTV' not found in C:\IP-Symcon\scripts\39505.ips.php on line 14
Der include Befehl erwartet einen String. Versuch es mal mit ““.
Gruß
Burkhard
HM per RaspberryMatic | EKM-868 | LGS-868 | 1 Wire | Fibaro Motion Sensor & Aeon Labs Z-Stick S2 | SONOS | Denon AVR 3312 | Vu+ Ultimo 4K | Sony KD-75XE9405 | Fritzbox 6360 | Hikvision DS-2CD2686G2-IZS | Echo Dot + Show | Stall.biz AirSniffer | Vaillant eBUS | Intel NUC i3 | IPS V5.5 Beta
klappt leider nicht.
PHP-Code:
include smartTV.php;
/**
* Create instance of TV
* @param IP Address of TV
* (optional) @param Port of TV (default is 8080)
**/
$tv = new SmartTV("192.168.1.45", 8080); // new SmartTV('192.168.2.103', 8080)
/**
* Set pairing key (if you don't know the pairing key
* execute the method ..->displayPairingKey() and it will
* be shown on your tv)
* @param Key
Notice: Use of undefined constant smartTV - assumed 'smartTV' in C:\IP-Symcon\scripts\39505.ips.php on line 8
Notice: Use of undefined constant php - assumed 'php' in C:\IP-Symcon\scripts\39505.ips.php on line 8
Warning: include(smartTVphp): failed to open stream: No such file or directory in C:\IP-Symcon\scripts\39505.ips.php on line 8
Warning: include(): Failed opening 'smartTVphp' for inclusion (include_path='.;C:\php\pear') in C:\IP-Symcon\scripts\39505.ips.php on line 8
Fatal error: Class 'SmartTV' not found in C:\IP-Symcon\scripts\39505.ips.php on line 14
Wo liegt denn die „smartTV.php“? Sie muss im scripts Ordner liegen. Wie die Fehlermeldung sagt kann die Datei nicht gefunden/geöffnet werden. In deinem Listing fehlen aber weiterhin die Anführungszeichen.
HM per RaspberryMatic | EKM-868 | LGS-868 | 1 Wire | Fibaro Motion Sensor & Aeon Labs Z-Stick S2 | SONOS | Denon AVR 3312 | Vu+ Ultimo 4K | Sony KD-75XE9405 | Fritzbox 6360 | Hikvision DS-2CD2686G2-IZS | Echo Dot + Show | Stall.biz AirSniffer | Vaillant eBUS | Intel NUC i3 | IPS V5.5 Beta
ok bin einen schritt weiter. Lag tatsächlich daran das es nicht im script Ordner lag.
jetzt kommt folgende Fehlermeldung:PHP-Code:
<?
/**
* ----------------------------------------
* Example - PHP LG SmartTV API
* ----------------------------------------
* https://github.com/SteveWinfield/PHP-LG-SmartTV
**/
include "smartTV.php";
/**
* Create instance of TV
* @param IP Address of TV
* (optional) @param Port of TV (default is 8080)
**/
$tv = new SmartTV('192.168.1.45', 8080); // new SmartTV('192.168.2.103', 8080)
/**
* Set pairing key (if you don't know the pairing key
* execute the method ..->displayPairingKey() and it will
* be shown on your tv)
* @param Key
**/
$tv->setPairingKey(696850); // $tv->displayPairingKey();
/**
* Authenticate to the tv
* @except Login fails (wrong pairing key?)
**/
$setValueID = (58369 /*[WZ & EZ\LG OLED65B6D\setValue]*/); //ID von "SetValue" Script"
Fatal error: Call to undefined function extension_loaaded() in C:\IP-Symcon\scripts\smartTV.php on line 12
scheint wohl an curl zu liegen. Wie enable oder installiere ich das ?
Das ist Zeile 12.
PHP-Code:
if (!extension_loaded('curl')) {
die ('You have to install/enable curl in order to use this application.');
}
Curl ist bei der win Variante ips immer dabei.habe grad nen oled Lg bekommen und getestet aber keine Chance. Das könnt ihr knicken.. der Zugriff in der Art läuft max mit ganz alten Modellen wie eben 2012 oder 13
Gesendet von iPhone mit Tapatalk
Geändert von swissboy (29.12.17 um 21:45 Uhr)
IPS Ninja - Windows 10, 64 Bit Server - IR Trans - Eaton GW - Homematic CCU2 - FHZ - HMS - AKM, JKM + EKM 868 - Div. Sonos - Allnet 3690+91 -IOS/Win10 auf Clientseite - SILEX - SEH - QNAP - APC - Siemens OZW 672 - Homematic - Aviosys - BlueIris - Mobotix T25M, S15 und M12
sicher das es nicht geht ? Das war eigentlich mein Plan. LG OLES65B6D ansteuern.... das wäre ja doof wenn es nicht klappt. Webos 3.5 ist da ja drauf.