FTUI Webseite auf remote server gehostet, keine FHEM Daten

Begonnen von schka17, 21 Januar 2020, 20:02:03

Vorheriges Thema - Nächstes Thema

schka17

Hallo,

versuche seit einiger Zeit ein paar FHEM Informationen in ein anderes Projekt mit Django Framework rein zu bekommen. Dazu habe ich eine ganz einfache webseite erstellet die direkt auf dem FHEM Server läuft, aber im Django Framework bekomme ich einfach keine Daten.
Wenn ich mir die Kommunikation mit ansehe dann fehlt auf dem Remote server der request für die jsonlist, hier der Request von der auf FHEM Server gehosteten Page:

Request URL: http://cockpit-w23.c4sam.com:8042/fhem/?cmd=jsonlist2%20CID0001%2CCID001%20STATE%20state%20alias&fwcsrf=&XHR=1&_=1579631620318
Request Method: GET
Status Code: 200 OK
Remote Address: 192.168.11.42:8042
Referrer Policy: no-referrer-when-downgrade


nach einer Zeit (ich nehme an das ist ein Timeout) kommt dann ein get request mit leerer jsonlist:

Request URL: http://cockpit-w23.c4sam.com:8042/fhem/?cmd=jsonlist2%20undefined&XHR=1&_=1579631375897
Request Method: GET
Status Code: 200 OK
Remote Address: 192.168.11.42:8042
Referrer Policy: no-referrer-when-downgrade


und die Fehlermeldung

FHEM Command failed
error: cmd=jsonlist2 undefined


im FHEM Log sehe ich lediglich das, es wird dabei die html page einmal auf dem FHEM server geladen und einmal auf dem remoteserver:

2020.01.21 19:52:10.011 4: WEB_INT_10.1.1.2_54699 GET /fhem/tablet/lib/jquery.toast.min.js; BUFLEN:0,
2020.01.21 19:52:10.059 4: WEB_INT_10.1.1.2_54354 GET /fhem/tablet/css/fhem-tablet-ui.css; BUFLEN:0,
2020.01.21 19:52:10.064 4: Connection accepted from WEB_INT_10.1.1.2_54702,
2020.01.21 19:52:10.123 4: WEB_INT_10.1.1.2_54699 GET /fhem/tablet/lib/jquery.toast.min.css; BUFLEN:0,
2020.01.21 19:52:10.162 4: WEB_INT_10.1.1.2_54521 GET /fhem/tablet/css/fhem-tablet-ui.css; BUFLEN:0,
2020.01.21 19:52:10.866 4: WEB_INT_10.1.1.2_54360 GET /fhem/?cmd=jsonlist2%20undefined&fwcsrf=1&XHR=1&_=1579492309942; BUFLEN:0,
2020.01.21 19:52:10.868 4: WEB_INT: /fhem/?cmd=jsonlist2%20undefined&fwcsrf=1&XHR=1&_=1579492309942 / RL:79 / application/json; charset=utf-8 / Content-Encoding: gzip
,
/ Cache-Control: no-cache, no-store, must-revalidate
,
,
2020.01.21 19:52:15.240 4: Connection accepted from WEB_INT_127.0.0.1_53200,
2020.01.21 19:52:15.240 4: WEB_INT_127.0.0.1_53200 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:52:15.240 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:52:21.268 4: Connection closed for WEB_INT_10.1.1.2_54702: EOF,
2020.01.21 19:52:35.513 4: Connection accepted from WEB_INT_127.0.0.1_53294,
2020.01.21 19:52:35.513 4: WEB_INT_127.0.0.1_53294 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:52:35.514 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:52:55.765 4: Connection accepted from WEB_INT_127.0.0.1_53362,
2020.01.21 19:52:55.765 4: WEB_INT_127.0.0.1_53362 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:52:55.765 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:53:16.082 4: Connection accepted from WEB_INT_127.0.0.1_53436,
2020.01.21 19:53:16.082 4: WEB_INT_127.0.0.1_53436 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:53:16.082 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:53:21.003 4: Closing inactive connection WEB_INT_10.1.1.2_54360,
2020.01.21 19:53:21.003 4: Closing inactive connection WEB_INT_10.1.1.2_54521,
2020.01.21 19:53:21.003 4: Closing inactive connection WEB_INT_192.168.250.2_52455,
2020.01.21 19:53:21.003 4: Closing inactive connection WEB_INT_10.1.1.2_54354,
2020.01.21 19:53:21.004 4: Closing inactive connection WEB_INT_10.1.1.2_54699,
2020.01.21 19:53:36.348 4: Connection accepted from WEB_INT_127.0.0.1_53522,
2020.01.21 19:53:36.348 4: WEB_INT_127.0.0.1_53522 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:53:36.348 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:53:41.494 4: Connection accepted from WEB_INT_192.168.250.2_54120,
2020.01.21 19:53:41.506 4: WEB_INT_192.168.250.2_54120 GET /fhem/ftui/c4sam/test2.html; BUFLEN:0,
2020.01.21 19:53:41.506 4: WEB_INT: /fhem/ftui/c4sam/test2.html / RL:1331 / text/html; charset=utf-8 / Content-Encoding: gzip
,
/ Cache-Control: no-cache, no-store, must-revalidate
,
,
2020.01.21 19:53:41.512 4: Connection accepted from WEB_INT_192.168.250.2_54121,
2020.01.21 19:53:41.579 4: WEB_INT_192.168.250.2_54120 GET /fhem/tablet/css/fhem-tablet-c4sam-ui.css; BUFLEN:0,
2020.01.21 19:53:41.579 4: WEB_INT_192.168.250.2_54120 => 304 Not Modified,
2020.01.21 19:53:41.592 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/js/fhem-tablet-ui.min.js; BUFLEN:0,
2020.01.21 19:53:41.592 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:41.648 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/lib/jquery.min.js; BUFLEN:0,
2020.01.21 19:53:41.648 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:41.742 4: WEB_INT_192.168.250.2_54121 GET /fhem/?XHR=1&_=1579632821673; BUFLEN:0,
2020.01.21 19:53:41.742 4: WEB_INT: /fhem/?XHR=1&_=1579632821673 / RL:20 / text/plain; charset=UTF-8 / Content-Encoding: gzip
,
/ Cache-Control: no-cache, no-store, must-revalidate
,
,
2020.01.21 19:53:41.744 4: WEB_INT_192.168.250.2_54120 GET /fhem/tablet/lib/jquery.toast.min.js; BUFLEN:0,
2020.01.21 19:53:41.744 4: WEB_INT_192.168.250.2_54120 => 304 Not Modified,
2020.01.21 19:53:41.767 4: Connection accepted from WEB_INT_192.168.250.2_54122,
2020.01.21 19:53:41.769 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/css/fhem-tablet-ui.css; BUFLEN:0,
2020.01.21 19:53:41.769 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:41.778 4: WEB_INT_192.168.250.2_54120 GET /fhem/tablet/lib/jquery.toast.min.css; BUFLEN:0,
2020.01.21 19:53:41.778 4: WEB_INT_192.168.250.2_54120 => 304 Not Modified,
2020.01.21 19:53:41.838 4: WEB_INT_192.168.250.2_54120 GET /fhem/ftui/c4sam/test2.html; BUFLEN:0,
2020.01.21 19:53:41.839 4: WEB_INT: /fhem/ftui/c4sam/test2.html / RL:1331 / text/html; charset=utf-8 / Content-Encoding: gzip
,
/ Cache-Control: no-cache, no-store, must-revalidate
,
,
2020.01.21 19:53:41.839 4: WEB_INT_192.168.250.2_54121 GET /favicon.ico; BUFLEN:0,
2020.01.21 19:53:41.839 4: WEB_INT: redirecting /favicon.ico to /fhem,
2020.01.21 19:53:41.872 4: WEB_INT_192.168.250.2_54120 GET /fhem; BUFLEN:0,
2020.01.21 19:53:41.873 4: WEB_INT: /fhem / RL:1662 / text/html; charset=UTF-8 / Content-Encoding: gzip
,
/ Cache-Control: no-cache, no-store, must-revalidate
,
,
2020.01.21 19:53:41.877 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/js/widget_label.js; BUFLEN:0,
2020.01.21 19:53:41.877 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:41.888 4: WEB_INT_192.168.250.2_54122 GET /fhem/tablet/js/widget_symbol.js; BUFLEN:0,
2020.01.21 19:53:41.888 4: WEB_INT_192.168.250.2_54122 => 304 Not Modified,
2020.01.21 19:53:41.936 4: WEB_INT_192.168.250.2_54122 GET /fhem/tablet/js/widget_famultibutton.js; BUFLEN:0,
2020.01.21 19:53:41.936 4: WEB_INT_192.168.250.2_54122 => 304 Not Modified,
2020.01.21 19:53:41.980 4: WEB_INT_192.168.250.2_54122 GET /fhem/tablet/lib/fa-multi-button.min.js; BUFLEN:0,
2020.01.21 19:53:41.980 4: WEB_INT_192.168.250.2_54122 => 304 Not Modified,
2020.01.21 19:53:41.981 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/lib/jquery-ui.min.js; BUFLEN:0,
2020.01.21 19:53:41.982 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:42.047 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/lib/font-awesome.min.css; BUFLEN:0,
2020.01.21 19:53:42.047 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:42.073 4: Connection accepted from WEB_INT_192.168.250.2_54123,
2020.01.21 19:53:42.089 4: WEB_INT_192.168.250.2_54121 GET /fhem/tablet/fonts/fa-solid-900.woff2; BUFLEN:0,
2020.01.21 19:53:42.089 4: WEB_INT_192.168.250.2_54121 => 304 Not Modified,
2020.01.21 19:53:42.562 4: WEB_INT_192.168.250.2_54121 GET /fhem/?cmd=jsonlist2%20CID0001%2CCID001%20STATE%20state%20alias&fwcsrf=1&XHR=1&_=1579632821674; BUFLEN:0,
2020.01.21 19:53:42.563 4: WEB_INT: /fhem/?cmd=jsonlist2%20CID0001%2CCID001%20STATE%20state%20alias&fwcsrf=1&XHR=1&_=1579632821674 / RL:209 / application/json; charset=utf-8 / Content-Encoding: gzip
,
/ Cache-Control: no-cache, no-store, must-revalidate
,
,
2020.01.21 19:53:56.684 4: Connection accepted from WEB_INT_127.0.0.1_53602,
2020.01.21 19:53:56.684 4: WEB_INT_127.0.0.1_53602 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:53:56.684 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:54:17.022 4: Connection accepted from WEB_INT_127.0.0.1_53680,
2020.01.21 19:54:17.023 4: WEB_INT_127.0.0.1_53680 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:54:17.023 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:54:37.366 4: Connection accepted from WEB_INT_127.0.0.1_53758,
2020.01.21 19:54:37.366 4: WEB_INT_127.0.0.1_53758 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:54:37.366 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:54:57.651 4: Connection accepted from WEB_INT_127.0.0.1_53842,
2020.01.21 19:54:57.652 4: WEB_INT_127.0.0.1_53842 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:54:57.652 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:55:17.936 4: Connection accepted from WEB_INT_127.0.0.1_53908,
2020.01.21 19:55:17.936 4: WEB_INT_127.0.0.1_53908 GET /null/healthcheck; BUFLEN:0,
2020.01.21 19:55:17.936 4: WEB_INT: redirecting /null/healthcheck to /fhem,
2020.01.21 19:55:20.001 4: Closing inactive connection WEB_INT_192.168.250.2_54120,
2020.01.21 19:55:20.001 4: Closing inactive connection WEB_INT_192.168.250.2_54121,
2020.01.21 19:55:20.002 4: Closing inactive connection WEB_INT_192.168.250.2_54122,


Die Webseite ist ganz simple:

<!DOCTYPE html>
<html>

<head>
   



    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <meta name="fhemweb_url" content="http://cockpit-w23.c4sam.com:8042/fhem/">
<link rel="stylesheet" href="http://cockpit-w23.c4sam.com:8042/fhem/tablet/css/fhem-tablet-c4sam-ui.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
<meta name="widget_base_width" content="44">
<meta name="widget_base_height" content="57">
<meta name="widget_margin" content="1.1">
    <meta name="longpoll" content="websocket">  <!-- 1=longpoll;0=shortpoll every 30sec -->
<meta name="debug" content="1"> <!-- 1=output to console;0=not output -->



<script src="http://cockpit-w23.c4sam.com:8042/fhem/tablet/js/fhem-tablet-ui.min.js" defer></script>

<link href='https://fonts.googleapis.com/css?family=Audiowide' rel='stylesheet'>

    <title>Demo</title>
</head>

<body>

<main>

<div class="sheet">
<header class="half-transparent bg-blue" > IOPS</header>
    <div class="row bg-dark-blue">
        <div class="cell">
        <div class="hbox">
       
        </div>
        </div>
       
       
    </div>
    <header class="half-transparent bg-blue" > Business Services</header>
    <div class="row row bg-dark-blue">
        <div class="cell top-space">
        <div class="hbox">
        sdgfsagsdfg

        <p><input type="button" value="open" onclick="openCon();"/></p>
<p><input type="button" value="send" onclick="sendCommand();"/></p>
        <div data-type="label"
    data-device="CID001"
    data-get="alias"
    class="bigger centered">
    </div>
         <div data-type="symbol"
                        data-device="CID0001"
                        data-get="state"
                        data-states='["unknown","normal","acknowledged","information","minor","warning","critical"]'
data-icons='["fa-cart-plus","fa-cart-plus","fa-cart-plus","fa-cart-plus","fa-cart-plus","fa-cart-plus","fa-cart-plus warn blink"]'
                        data-colors='["grey","SeaGreen","DarkGreen","Blue","Orange","black","black"]'
                        data-background-icons='["","","","","","fa-square","fa-square-full"]'
                        data-background-colors='["grey","SeaGreen","DarkGreen","Blue","Orange","Yellow","IndianRed"]'
class="left-space-2x right-space-2x bigger centered">
</div>
                        <div data-type="label"
data-hide="state"
data-hide-on="normal"
data-hide-off="!normal"
    data-device="CID0001"
    data-get="state"
    class="big centered top-narrow">
    </div>   
        </div>
    </div>
    </div>
    <header class="half-transparent bg-blue" > Applications</header>
    <div class="row bg-dark-blue">
        <div class="cell">
        <div class="hbox">
       
        </div>
    </div>
    </div>
    <header class="half-transparent bg-blue" > Infrastructur</header>
    <div class="row bg-dark-blue">
        <div class="cell">
        <div class="hbox">
         
       
        </div>
    </div>
</div>

</main>
</script>
  </body>
</html>


Iregndeine Idee oder hat jemand Erfahrung mit hosting der Webseite auf einem Remote Webserver?
M: Thinclient x64 Debian | CUL FS20, HMS100WD, HMS100TF, HMS100T, HMS100CO, S300, S555TH | OWServer DS1420, DS18B20, DS2408 | RFXCOM UVN128, THWR800, THGR228N,RTGR328, PCR800 |Jeelink PCA301 EC3000|CUNO+IR|HMLAN|HMUSB|CUL433 Somfy|mySensors|espEasy
S1:Raspberry mit BPM810, Jeelink EC3000