<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Webserver with UIFlow?]]></title><description><![CDATA[<p dir="auto">I am not sure how to realize a website to show sensor data.</p>
<p dir="auto">For example:<br />
I have a m5stack core which measures several temperatures and voltages.<br />
Then I want to open a website on local network, where I can see all the data which are provided by m5stack.</p>
<p dir="auto">How to start with UIFlow? Just only to show one sensor value on a small website, which is provided by m5stack via WLAN.</p>
]]></description><link>https://community.m5stack.com/topic/4490/webserver-with-uiflow</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:07:05 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4490.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Aug 2022 08:43:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Webserver with UIFlow? on Wed, 30 Nov 2022 22:01:18 GMT]]></title><description><![CDATA[<p dir="auto">What do you think?</p>
<p dir="auto"><a href="https://github.com/kotobuki/http-server-block-for-uiflow" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/kotobuki/http-server-block-for-uiflow</a></p>
]]></description><link>https://community.m5stack.com/post/19422</link><guid isPermaLink="true">https://community.m5stack.com/post/19422</guid><dc:creator><![CDATA[Suginami_iot]]></dc:creator><pubDate>Wed, 30 Nov 2022 22:01:18 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Wed, 03 Aug 2022 19:53:02 GMT]]></title><description><![CDATA[<p dir="auto">Ok I have something basic working<br />
<img src="/assets/uploads/files/1659556143092-screenshot-2022-08-03-at-20.47.34-resized.png" alt="0_1659556132473_Screenshot 2022-08-03 at 20.47.34.png" class=" img-fluid img-markdown" /></p>
<pre><code class="language-from">from m5stack_ui import *
from uiflow import *
import unit

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
env3_0 = unit.get(unit.ENV3, unit.PORTA)


holder = None



label0 = M5Label('label0', x=-13, y=121, color=0x000, font=FONT_MONT_14, parent=None)




label0.set_text(str(env3_0.temperature))
holder = str((env3_0.temperature))
try:
  import usocket as socket
except:
  import socket

from machine import Pin
import network

import esp
esp.osdebug(None)

import gc
gc.collect()

ssid = ''
password = ''

station = network.WLAN(network.STA_IF)

station.active(True)
station.connect(ssid, password)

while station.isconnected() == False:
  pass

print('Connection successful')
print(station.ifconfig())

def web_page():

  html = """&lt;html&gt;&lt;head&gt; &lt;title&gt;ESP Web Server&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;link rel="icon" href="data:,"&gt; &lt;style&gt;html{font-family: Helvetica; display:inline-block; margin: 0px auto; text-align: center;}
  h1{color: #0F3376; padding: 2vh;}p{font-size: 1.5rem;}.button{display: inline-block; background-color: #e7bd3b; border: none;
  border-radius: 4px; color: white; padding: 16px 40px; text-decoration: none; font-size: 30px; margin: 2px; cursor: pointer;}
  .button2{background-color: #4286f4;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt; &lt;h1&gt;ESP Temperature monitor&lt;/h1&gt;
  &lt;p&gt;ENVIII Temperature: &lt;strong&gt;""" + holder +  """&lt;/strong&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"""
  return html

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('', 80))
s.listen(5)

while True:
  conn, addr = s.accept()
  print('Got a connection from %s' % str(addr))
  request = conn.recv(1024)
  request = str(request)
  print('Content = %s' % request)
  led_on = request.find('/?led=on')
  led_off = request.find('/?led=off')
  if led_on == 6:
    print('LED ON')
    led.value(1)
  if led_off == 6:
    print('LED OFF')
    led.value(0)
  response = web_page()
  conn.send('HTTP/1.1 200 OK\n')
  conn.send('Content-Type: text/html\n')
  conn.send('Connection: close\n\n')
  conn.sendall(response)
  conn.close()
</code></pre>
<p dir="auto"><a href="https://github.com/Ajb2k3/UIFlowHandbook/blob/master/ENVServer.m5f" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Ajb2k3/UIFlowHandbook/blob/master/ENVServer.m5f</a></p>
<p dir="auto">Its not async yet but its a start.</p>
]]></description><link>https://community.m5stack.com/post/18188</link><guid isPermaLink="true">https://community.m5stack.com/post/18188</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 03 Aug 2022 19:53:02 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Wed, 03 Aug 2022 05:59:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/holofloh" aria-label="Profile: holofloh">@<bdi>holofloh</bdi></a> said in <a href="/post/18178">Webserver with UIFlow?</a>:</p>
<blockquote>
<p dir="auto">Ok, I see you want to poll the data instead of push.</p>
<p dir="auto">Blockly, which is great for simple projects or quick test of a sensor, seems to lack of many functions. It is also not very comfortable for extensive projects and you are required to use a cloud service to edit your code or you have to use a very old desktop version with even less functions. My oppinion about that.</p>
<p dir="auto">I prefer the Arduino environment. There are many libraries and examples including web servers.<br />
It means a bit more of text coding and less drag&amp;drop but copy&amp;paste from examples work for me well.</p>
</blockquote>
<p dir="auto">You don't have to use cloud services to program the Core. UIFlow is built on Micropython and so you can program directly using REPL or using a stand alone local IDE like Thonny</p>
]]></description><link>https://community.m5stack.com/post/18180</link><guid isPermaLink="true">https://community.m5stack.com/post/18180</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 03 Aug 2022 05:59:25 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Wed, 03 Aug 2022 05:45:31 GMT]]></title><description><![CDATA[<p dir="auto">Ok, I see you want to poll the data instead of push.</p>
<p dir="auto">Blockly, which is great for simple projects or quick test of a sensor, seems to lack of many functions. It is also not very comfortable for extensive projects and you are required to use a cloud service to edit your code or you have to use a very old desktop version with even less functions. My oppinion about that.</p>
<p dir="auto">I prefer the Arduino environment. There are many libraries and examples including web servers.<br />
It means a bit more of text coding and less drag&amp;drop but copy&amp;paste from examples work for me well.</p>
]]></description><link>https://community.m5stack.com/post/18178</link><guid isPermaLink="true">https://community.m5stack.com/post/18178</guid><dc:creator><![CDATA[holofloh]]></dc:creator><pubDate>Wed, 03 Aug 2022 05:45:31 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Wed, 03 Aug 2022 05:38:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/holofloh" aria-label="Profile: holofloh">@<bdi>holofloh</bdi></a><br />
Thanks so much for your explanation and ideas!</p>
<p dir="auto">But I mean, is there no way in UIFlow (Blockly) to make the m5stack core accessable by IP from local network to get some data?<br />
Just only to make the data vissible on internet browser? I would like to show real data, current status of the battery for monitoring in case of grid power loss.</p>
<p dir="auto">I want/have to use Blockly, because I don´t have much time for programming in Python and I realized already some functions with UIFlow Blockly.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> I will try it too, later today.</p>
<p dir="auto">I now found the "remote+" block in UIFlow, which provides the function I am looking for, but it works only with access to external server. So, without internet access it is not working anymore, right?</p>
]]></description><link>https://community.m5stack.com/post/18177</link><guid isPermaLink="true">https://community.m5stack.com/post/18177</guid><dc:creator><![CDATA[RoToR]]></dc:creator><pubDate>Wed, 03 Aug 2022 05:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Wed, 03 Aug 2022 05:00:20 GMT]]></title><description><![CDATA[<p dir="auto">I tried last night but couldn't get a page to work. I'm missing something.</p>
]]></description><link>https://community.m5stack.com/post/18174</link><guid isPermaLink="true">https://community.m5stack.com/post/18174</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 03 Aug 2022 05:00:20 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Tue, 02 Aug 2022 11:22:41 GMT]]></title><description><![CDATA[<p dir="auto">EZData is just one of the possible data storages. With M5 products it is very easy to use. It is also possibe to use other cloud services. Cloud means "some storage somewhere on the internet". It requires a connection to the internet anyway.</p>
<p dir="auto">Some ideas:</p>
<ul>
<li>Use a separate non interupted connection such as LoRa or mobile internet for your battery measurement. Depends on what is possible at your location and what/how you need to communicate.</li>
<li>log to a cloud like storage in the local network, powered by battery on mains loss. No access during power loss but all data saved</li>
<li>Detect the internet connection loss and log to SD card until the connection is back, then upload all missing.</li>
</ul>
]]></description><link>https://community.m5stack.com/post/18154</link><guid isPermaLink="true">https://community.m5stack.com/post/18154</guid><dc:creator><![CDATA[holofloh]]></dc:creator><pubDate>Tue, 02 Aug 2022 11:22:41 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Tue, 02 Aug 2022 11:15:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rotor" aria-label="Profile: rotor">@<bdi>rotor</bdi></a> I’ll look into it but someone else should know.<br />
Something else to add to my IOT book</p>
]]></description><link>https://community.m5stack.com/post/18153</link><guid isPermaLink="true">https://community.m5stack.com/post/18153</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 02 Aug 2022 11:15:58 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Tue, 02 Aug 2022 10:10:27 GMT]]></title><description><![CDATA[<p dir="auto">Didn´t realized EZData. That could be an alternative solution.</p>
<p dir="auto">But as I understand, internet is needed, which could be a problem for my project.<br />
I want to read out a big battery, which must be accessable even if power from grid (and internet) is missing.</p>
]]></description><link>https://community.m5stack.com/post/18152</link><guid isPermaLink="true">https://community.m5stack.com/post/18152</guid><dc:creator><![CDATA[RoToR]]></dc:creator><pubDate>Tue, 02 Aug 2022 10:10:27 GMT</pubDate></item><item><title><![CDATA[Reply to Webserver with UIFlow? on Tue, 02 Aug 2022 09:46:33 GMT]]></title><description><![CDATA[<p dir="auto">I’m not sure how to implement it to be accessible from the core it’s self as I haven’t got into web dev but it is possible. Another alternative is to use EZData from within UIFlow which allows you to view the data locally and via the internet</p>
]]></description><link>https://community.m5stack.com/post/18151</link><guid isPermaLink="true">https://community.m5stack.com/post/18151</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 02 Aug 2022 09:46:33 GMT</pubDate></item></channel></rss>