• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Asynchronous Web Server: Temperature and Humidity Readings

Q&A Forum › Category: ESP32 › Asynchronous Web Server: Temperature and Humidity Readings
0 Vote Up Vote Down
Bojan Križanec asked 4 years ago

Hi, I was build Asynchronous Web Server:
with Temperature and Humidity Readings on sample in your book. Ok so far.
But I want to add some other information on this web page. I tryed add another temparature reading and some door and window opening state, but the web page cannot display that correcty.
There is my part of code….(labels are in slovene language)
…
<body>
<h2>GARAZA</h2>
<p>
<i class=”fas fa-thermometer-half” style=”color:#059e8a;”></i>
<span class=”dht-labels”>Notranja temperatura</span>
<span id=”temperature”>%TEMPERATURE%</span>
<sup class=”units”>&deg;C</sup>
</p>
<p>
<i class=”fas fa-tint” style=”color:#00add6;”></i>
<span class=”dht-labels”>Notranja vlaga</span>
<span id=”humidity”>%HUMIDITY%</span>
<sup class=”units”>%</sup>
</p>
<p>
<i class=”fas fa-thermometer-half” style=”color:#ebef0b;”></i>
<span class=”dht-labels”>Zunanja temperatura</span>
<span id=”tempext”>%TEMPEXT%</span>
<sup class=”units”>&deg;C</sup>
</p>
</body>
<p>
<i class=”fas fa-door-open”></i>
<span class=”dht-labels”>VRATA GARAZE:</span>
<span id=”vrgstat”>%VRGSTAT%</span>
</p>
<p>
<i class=”fab fa-windows”></i>
<span class=”dht-labels”>OKNA GARAZE:</span>
<span id=”okgstat”>%OKGSTAT%</span>
</p>
<p>
<i class=”fas fa-door-open”></i>
<span class=”dht-labels”>VRATA HODNIK:</span>
<span id=”vrhstat”>%VRHSTAT%</span>
</p>
…

There is example, how its look on, may web page (I cant add a picture in this message) Text with bold character should be below your original measurement (temperature and humidity)
GARAZA
 Notranja temperatura 33.30 °C
 Notranja vlaga 35.20 TEMPEXTVRGSTATOKGSTATVRHSTAT%
 
Can you help me ?
Regards,
Bojan

Question Tags: WEB Server
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
You’re just sharing the HTML text and that looks fine.
You need to provide more information, otherwise it’s very difficult to figure out what might be wrong.
When you say it doesn’t work, what happens exactly?
Can you share a picture on how it looks?
Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
I received your email with the response.
In line 165, you have

<sup class="units">%</sup>

The % for the humidity can interfere with the % signs of the placeholders.
So, instead of the % sign, you should use the HTML entity: https://dev.w3.org/html5/html-author/charref
Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

This is issue was resolved via email.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.