<?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[m5tough UIFlow2.0 Alpha 24. mqtt. first-timer needs some guidance]]></title><description><![CDATA[<p dir="auto">hi all,</p>
<p dir="auto">this is all very new to me so please bear with me.<br />
I want to use the m5 stack on my sailboat as a display for my rudder pos and depth. Both values are being published over mqtt via node red.</p>
<p dir="auto">When i run this uiflow everything works fine and the mqtt values are being displayed on the device. But when i press download to the device i get an error:</p>
<p dir="auto">traceback (most recent call last: file "<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>" line 69, in &lt;module&gt;<br />
file "<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>"line 52, setup<br />
file "umqtt/simple.py", line 68, in connect<br />
0SError: [Errno 118] EH0STUNREACH.</p>
<p dir="auto">what am i doing wrong ? :)<br />
Many thanks for any advice.</p>
<p dir="auto"><img src="/assets/uploads/files/1694377302201-seatalk-flow-resized.png" alt="0_1694377320265_seatalk flow.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">import os, sys, io<br />
import M5<br />
from M5 import *<br />
from umqtt import *</p>
<p dir="auto">label0 = None<br />
label2 = None<br />
label1 = None<br />
triangle0 = None<br />
title0 = None<br />
mqtt_client = None</p>
<p dir="auto">def mqtt_SEATALK_DIEPTE_event(data):<br />
global label0, label2, label1, triangle0, title0, mqtt_client<br />
label0.setColor(0xffffff, 0x000000)<br />
label0.setText(str((str(((data[1]).decode())) + str('M'))))<br />
label0.setFont(Widgets.FONTS.DejaVu72)<br />
label0.setSize(1.4)</p>
<p dir="auto">def mqtt_SEATALK_ROER_event(data):<br />
global label0, label2, label1, triangle0, title0, mqtt_client<br />
label1.setColor(0xffffff, 0x000000)<br />
label1.setText(str((data[1]).decode()))<br />
label1.setSize(1.4)<br />
label1.setFont(Widgets.FONTS.DejaVu72)</p>
<p dir="auto">def mqtt_SEATALK_ROERICON_event(data):<br />
global label0, label2, label1, triangle0, title0, mqtt_client<br />
label2.setColor(0xffffff, 0x000000)<br />
label2.setText(str((data[1]).decode()))<br />
label2.setSize(1.4)<br />
label2.setFont(Widgets.FONTS.DejaVu72)</p>
<p dir="auto">def setup():<br />
global label0, label2, label1, triangle0, title0, mqtt_client</p>
<p dir="auto">M5.begin()<br />
Widgets.fillScreen(0x222222)<br />
label0 = Widgets.Label("Text", 9, 142, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)<br />
label2 = Widgets.Label("Text", 147, 33, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)<br />
label1 = Widgets.Label("Text", 10, 33, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)<br />
triangle0 = Widgets.Triangle(1729, 485, 1699, 515, 1759, 515, 0xffffff, 0xffffff)<br />
title0 = Widgets.Title("Title", 3, 0xFFFFFF, 0x0000FF, Widgets.FONTS.DejaVu18)</p>
<p dir="auto">mqtt_client = MQTTClient('M5MFD', '192.168.1.111', port=1883, user='', password='', keepalive=0)<br />
Widgets.setBrightness(255)<br />
mqtt_client.connect(clean_session=True)<br />
mqtt_client.subscribe('SEATALK/DIEPTE', mqtt_SEATALK_DIEPTE_event, qos=0)<br />
mqtt_client.subscribe('SEATALK/ROER', mqtt_SEATALK_ROER_event, qos=0)<br />
mqtt_client.subscribe('SEATALK/ROERICON', mqtt_SEATALK_ROERICON_event, qos=0)<br />
Widgets.fillScreen(0x000000)<br />
title0.setColor(text_c=0xffffff, bg_c=0x333333)<br />
title0.setText('DEPTH &amp; RUDDER')</p>
<p dir="auto">def loop():<br />
global label0, label2, label1, triangle0, title0, mqtt_client<br />
M5.update()<br />
mqtt_client.wait_msg()</p>
<p dir="auto">if <strong>name</strong> == '<strong>main</strong>':<br />
try:<br />
setup()<br />
while True:<br />
loop()<br />
except (Exception, KeyboardInterrupt) as e:<br />
try:<br />
from utility import print_error_msg<br />
print_error_msg(e)<br />
except ImportError:<br />
print("please update to latest firmware")</p>
]]></description><link>https://community.m5stack.com/topic/5634/m5tough-uiflow2-0-alpha-24-mqtt-first-timer-needs-some-guidance</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 12:22:42 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5634.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Sep 2023 20:22:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to m5tough UIFlow2.0 Alpha 24. mqtt. first-timer needs some guidance on Thu, 09 Nov 2023 11:15:46 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for explaining.</p>
]]></description><link>https://community.m5stack.com/post/22842</link><guid isPermaLink="true">https://community.m5stack.com/post/22842</guid><dc:creator><![CDATA[jamesmilleree]]></dc:creator><pubDate>Thu, 09 Nov 2023 11:15:46 GMT</pubDate></item><item><title><![CDATA[Reply to m5tough UIFlow2.0 Alpha 24. mqtt. first-timer needs some guidance on Mon, 11 Sep 2023 17:16:13 GMT]]></title><description><![CDATA[<p dir="auto">You need two devices, one set as AP and one as STA for it to work.<br />
What error are you getting when set to STA?</p>
]]></description><link>https://community.m5stack.com/post/22212</link><guid isPermaLink="true">https://community.m5stack.com/post/22212</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 11 Sep 2023 17:16:13 GMT</pubDate></item><item><title><![CDATA[Reply to m5tough UIFlow2.0 Alpha 24. mqtt. first-timer needs some guidance on Mon, 11 Sep 2023 15:15:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> thanks for explaining, simply adding WLAN STA connect to SSID results in a Internal wifi error.. setting the wifi via the webburner isn't helping either. example as cheatsheet would be helpfull.</p>
]]></description><link>https://community.m5stack.com/post/22211</link><guid isPermaLink="true">https://community.m5stack.com/post/22211</guid><dc:creator><![CDATA[Maasi]]></dc:creator><pubDate>Mon, 11 Sep 2023 15:15:53 GMT</pubDate></item><item><title><![CDATA[Reply to m5tough UIFlow2.0 Alpha 24. mqtt. first-timer needs some guidance on Mon, 11 Sep 2023 04:45:47 GMT]]></title><description><![CDATA[<p dir="auto">You need a Wifi network for the data to be shared.When you test, devices are already connected to a network but when you download, you need to set a network for devices to use.</p>
]]></description><link>https://community.m5stack.com/post/22207</link><guid isPermaLink="true">https://community.m5stack.com/post/22207</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 11 Sep 2023 04:45:47 GMT</pubDate></item></channel></rss>