Also hab jetzt die Datei "io_smarthome.py.js" im Verzeichnis "/var/www/html/smartVISU/driver" auf dem SHNG-RPi mal so adaptiert:
Ist es soweit korrekt die vorhanden "open:function" so zu adaptieren oder muss der Content von Post #17 einfach unten dran?
Habs jetzt so mal wie oben probiert, aus der SmartVISU die IP/Port raus aber bekomm trotzdem keine Werte (sowohl intern/extern) angezeigt. Sind zusätzlich noch weitere Anpassungen am NGINX (vor allem jene von OnkelAndy in diesem Thread) nötig?
LG
Code:
.....................................
open: function () {
var protocol = '';
if (!io.address || io.address.indexOf('://') < 0) {
// adopt websocket security to current protocol (https -> wss and http -> ws)
// if the protocol should be forced, add it to the address
protocol = location.protocol === 'https:' ? 'wss://' : 'ws://';
if (!io.address) {
// use url of current page if not defined
io.address = location.hostname;
}
if (!io.port) {
// use port of current page if not defined and needed
if (location.port != '') {
io.port = location.port;
} else {
if (location.protocol == 'http:') io.port = '80';
if (location.protocol == 'https:') io.port = '443';
if (io.address == '10.0.0.191') io.port = '2424'
}
}
}
alert(protocol + io.address + ':' + io.port);
io.socket = new WebSocket(protocol + io.address + ':' + io.port);
io.socket.onopen = function () {
io.send({'cmd': 'proto', 'ver': io.version});
................................
Ist es soweit korrekt die vorhanden "open:function" so zu adaptieren oder muss der Content von Post #17 einfach unten dran?
Habs jetzt so mal wie oben probiert, aus der SmartVISU die IP/Port raus aber bekomm trotzdem keine Werte (sowohl intern/extern) angezeigt. Sind zusätzlich noch weitere Anpassungen am NGINX (vor allem jene von OnkelAndy in diesem Thread) nötig?
LG


Aber is alles "Neuland"
....
Kommentar