搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

FF wont display simple webpage from ESP8622 over LAN

  • 無回覆
  • 1 有這個問題
  • 13 次檢視
more options

Using an Espressif Systems ESP8622 Espressif Systems ESP8622 I am trying to delve into the IOT. A simple page I uploaded to the 8622 last night would not display in FF. (78.7.1esr running on 2009 MAcPro OS 10.11.6). The page - displaying data from a DHT22 Temp & Humidity sensor appeared very briefly in the FF browser only to be replaced by a “Connection was reset” dialog. The ESP8622 is over WiFi through my router where could see it. I could also Ping it. I tried the local IP on another Mac using Chrome and the page loaded and stayed up and ditto result on a Pi4 in Chrome. Possible cause - a setting in config? Somewhere I keep away from unless guided! Just in case it helps - Hoping someone can throw some light...

Steve

Just in case there's an element in the code FF does not like- webpage code is below:

def web_page():

 html = """<html><head><meta name="viewport" content="width=device-width, initial-scale=1">
 <style>body{padding: 20px; margin: auto; width: 50%; text-align: center;}
 .progress{background-color: #F5F5F5;} .progress.vertical{position: relative;
 width: 25%; height: 60%; display: inline-block; margin: 20px;}
 .progress.vertical > .progress-bar{width: 100% !important;position: absolute;bottom: 0;}
 .progress-bar{background: linear-gradient(to top, #f5af19 0%, #f12711 100%);}
 .progress-bar-hum{background: linear-gradient(to top, #9CECFB 0%, #65C7F7 50%, #0052D4 100%);}
 p{position: absolute; font-size: 1.5rem; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5;}</style></head>
 <body><h1>DHT Sensor</h1><div class="progress vertical">
 <p>"""+str(temp)+"""*<p>
 <div role="progressbar" style="height: """+str(temp_percentage)+"""%;" class="progress-bar"></div></div><div class="progress vertical">
 <p>"""+str(hum)+"""%</p>
 <div role="progressbar" style="height: """+str(hum)+"""%;" class="progress-bar progress-bar-hum"></div></div></body></html>"""
 return html
Using an Espressif Systems ESP8622 [https://en.wikipedia.org/wiki/ESP8266 Espressif Systems ESP8622] I am trying to delve into the IOT. A simple page I uploaded to the 8622 last night would not display in FF. (78.7.1esr running on 2009 MAcPro OS 10.11.6). The page - displaying data from a DHT22 Temp & Humidity sensor appeared very briefly in the FF browser only to be replaced by a “Connection was reset” dialog. The ESP8622 is over WiFi through my router where could see it. I could also Ping it. I tried the local IP on another Mac using Chrome and the page loaded and stayed up and ditto result on a Pi4 in Chrome. Possible cause - a setting in config? Somewhere I keep away from unless guided! Just in case it helps - Hoping someone can throw some light... Steve Just in case there's an element in the code FF does not like- webpage code is below: def web_page(): html = """&lt;html&gt;&lt;head&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;style&gt;body{padding: 20px; margin: auto; width: 50%; text-align: center;} .progress{background-color: #F5F5F5;} .progress.vertical{position: relative; width: 25%; height: 60%; display: inline-block; margin: 20px;} .progress.vertical &gt; .progress-bar{width: 100% !important;position: absolute;bottom: 0;} .progress-bar{background: linear-gradient(to top, #f5af19 0%, #f12711 100%);} .progress-bar-hum{background: linear-gradient(to top, #9CECFB 0%, #65C7F7 50%, #0052D4 100%);} p{position: absolute; font-size: 1.5rem; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5;}&lt;/style&gt;&lt;/head&gt; &lt;body&gt;&lt;h1&gt;DHT Sensor&lt;/h1&gt;&lt;div class="progress vertical"&gt; &lt;p&gt;"""+str(temp)+"""*&lt;p&gt; &lt;div role="progressbar" style="height: """+str(temp_percentage)+"""%;" class="progress-bar"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="progress vertical"&gt; &lt;p&gt;"""+str(hum)+"""%&lt;/p&gt; &lt;div role="progressbar" style="height: """+str(hum)+"""%;" class="progress-bar progress-bar-hum"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;""" return html

由 cor-el 於 修改