<?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[MQTT subscribes on UiFlow]]></title><description><![CDATA[<p dir="auto">Did anyone try to had more than 1 subscribe by MQTT protocol ant how it made?</p>
]]></description><link>https://community.m5stack.com/topic/1595/mqtt-subscribes-on-uiflow</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 01:05:39 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1595.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Jan 2020 13:10:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 11 Mar 2020 11:33:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> Thanx! After making new topics and setting them to QoS=0, and retain=0, it finally works with many MQTT subscriptions on both M5Stack and M5Stick-C! (1.4.4 and 1.4.5)</p>
<p dir="auto">(PS! Just changing the old topics that had retain back to no retain, did not work, had to make new ones.)</p>
]]></description><link>https://community.m5stack.com/post/7717</link><guid isPermaLink="true">https://community.m5stack.com/post/7717</guid><dc:creator><![CDATA[cortado]]></dc:creator><pubDate>Wed, 11 Mar 2020 11:33:50 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 05 Feb 2020 12:00:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/skysurfer" aria-label="Profile: skysurfer">@<bdi>skysurfer</bdi></a></p>
<p dir="auto">I can’t help much without knowing your setup. What are you seeing on the REPL or serial monitor? What devices and firmware version are you running? Post your code and I’ll see if I can figure out your issue.</p>
]]></description><link>https://community.m5stack.com/post/7307</link><guid isPermaLink="true">https://community.m5stack.com/post/7307</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Wed, 05 Feb 2020 12:00:19 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 05 Feb 2020 11:27:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> Makes no difference here...</p>
]]></description><link>https://community.m5stack.com/post/7306</link><guid isPermaLink="true">https://community.m5stack.com/post/7306</guid><dc:creator><![CDATA[skysurfer]]></dc:creator><pubDate>Wed, 05 Feb 2020 11:27:52 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 30 Jan 2020 06:48:01 GMT]]></title><description><![CDATA[<p dir="auto">Ok that could be they key. I will try that out.<br />
So many thanks!</p>
]]></description><link>https://community.m5stack.com/post/7246</link><guid isPermaLink="true">https://community.m5stack.com/post/7246</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Thu, 30 Jan 2020 06:48:01 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 29 Jan 2020 16:19:50 GMT]]></title><description><![CDATA[<p dir="auto">I have some important discoveries... If you have another client device (i.e. MQTTlens, MQTTool, etc.) that sets the retain flag = True on the publish message, that will cause an error on the m5stack MQTT client when you subscribe to multiple topics. Here is the Traceback error.</p>
<pre><code>Internal FS (FatFS): Mounted on partition 'internalfs' [size: 2031616; Flash address: 0x210000]
----------------
Filesystem size: 1978368 B
           Used: 585728 B
           Free: 1392640 B
----------------
I (497) [TFTSPI]: attached display device, speed=8000000
I (497) [TFTSPI]: bus uses native pins: false
[ M5 ] node id:d8a01d698f30, api key:32532B1C
I (4783) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (4784) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (4935) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0
I (4942) modsocket: Initializing
Connect Wi-Fi: SSID:xxxxxxxx PASSWD:xxxxxxxx network...
......
Connected. Network config: ('10.0.0.5', '255.255.255.0', '10.0.0.1', '10.0.0.1')
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Traceback (most recent call last):
  File "main.py", line 48, in &lt;module&gt;
  File "flowlib/m5mqtt.py", line 100, in subscribe
  File "flowlib/simple.py", line 193, in subscribe
  File "flowlib/simple.py", line 243, in wait_msg
  File "flowlib/m5mqtt.py", line 52, in _on_data
KeyError: b'sensor/light'
MicroPython v1.11-319-g54c3f2613-dirty on 2020-01-15; ESP32 module with ESP32
Type "help()" for more information.
&gt;&gt;&gt; 
</code></pre>
<p dir="auto">So, subscribing to multiple topics seems to be okay in general, but setting the retain flag = True on more than one of those topics seems to cause the MQTT client to throw an error. Also, with lots of debugging, I found that you can only have one topic that has the retain flag = True and it has to be the last one in your micropython code (I think because the code is processed from the bottom up???).</p>
<p dir="auto"><strong>This code works.</strong> Topics aa, bb, cc, and dd have messages with retain=True. Topics aaa, bbb, ccc, and ddd have messages with retain=False. Topic dd is at the bottom.</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
from m5mqtt import M5mqtt

setScreenColor(0x000000)


m5mqtt = M5mqtt('m5stickC', '10.0.0.60', 1883, 'mqtt', 'password', 300)

label0 = M5TextBox(2, 17, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label1 = M5TextBox(2, 57, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label2 = M5TextBox(2, 96, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label3 = M5TextBox(2, 132, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)

a = None
b = None
c = None
d = None


def fun_aaa_(topic_data):
  global a, b, c, d
  a = topic_data
  label0.setText(str(a))
  pass
m5mqtt.subscribe(str('aaa'), fun_aaa_)

def fun_bbb_(topic_data):
  global a, b, c, d
  b = topic_data
  label1.setText(str(b))
  pass
m5mqtt.subscribe(str('bbb'), fun_bbb_)

def fun_ccc_(topic_data):
  global a, b, c, d
  c = topic_data
  label2.setText(str(c))
  pass
m5mqtt.subscribe(str('ccc'), fun_ccc_)

def fun_dd_(topic_data):
  global a, b, c, d
  d = topic_data
  label3.setText(str(d))
  pass
m5mqtt.subscribe(str('dd'), fun_dd_)


m5mqtt.start()
while True:
  wait(1)
  wait_ms(2)
</code></pre>
<p dir="auto"><strong>This does not work</strong> since topic cc (retain=True) is not at the bottom.</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
from m5mqtt import M5mqtt

setScreenColor(0x000000)


m5mqtt = M5mqtt('m5stickC', '10.0.0.60', 1883, 'mqtt', 'password', 300)

label0 = M5TextBox(2, 17, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label1 = M5TextBox(2, 57, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label2 = M5TextBox(2, 96, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label3 = M5TextBox(2, 132, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)

a = None
b = None
c = None
d = None


def fun_aaa_(topic_data):
  global a, b, c, d
  a = topic_data
  label0.setText(str(a))
  pass
m5mqtt.subscribe(str('aaa'), fun_aaa_)

def fun_bbb_(topic_data):
  global a, b, c, d
  b = topic_data
  label1.setText(str(b))
  pass
m5mqtt.subscribe(str('bbb'), fun_bbb_)

def fun_cc_(topic_data):
  global a, b, c, d
  c = topic_data
  label2.setText(str(c))
  pass
m5mqtt.subscribe(str('cc'), fun_cc_)

def fun_ddd_(topic_data):
  global a, b, c, d
  d = topic_data
  label3.setText(str(d))
  pass
m5mqtt.subscribe(str('ddd'), fun_ddd_)


m5mqtt.start()
while True:
  wait(1)
  wait_ms(2)
</code></pre>
<p dir="auto">However, <strong>if you move the cc topic to the bottom it works again.</strong></p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
from m5mqtt import M5mqtt

setScreenColor(0x000000)


m5mqtt = M5mqtt('m5stickC', '10.0.0.60', 1883, 'mqtt', 'password', 300)

label0 = M5TextBox(2, 17, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label1 = M5TextBox(2, 57, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label2 = M5TextBox(2, 96, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
label3 = M5TextBox(2, 132, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)

a = None
b = None
c = None
d = None


def fun_aaa_(topic_data):
  global a, b, c, d
  a = topic_data
  label0.setText(str(a))
  pass
m5mqtt.subscribe(str('aaa'), fun_aaa_)

def fun_bbb_(topic_data):
  global a, b, c, d
  b = topic_data
  label1.setText(str(b))
  pass
m5mqtt.subscribe(str('bbb'), fun_bbb_)

def fun_ddd_(topic_data):
  global a, b, c, d
  d = topic_data
  label3.setText(str(d))
  pass
m5mqtt.subscribe(str('ddd'), fun_ddd_)

def fun_cc_(topic_data):
  global a, b, c, d
  c = topic_data
  label2.setText(str(c))
  pass
m5mqtt.subscribe(str('cc'), fun_cc_)

m5mqtt.start()
while True:
  wait(1)
  wait_ms(2)
</code></pre>
<p dir="auto">Hope this helps. Also, I hope <a class="plugin-mentions-user plugin-mentions-a" href="/user/m5stack" aria-label="Profile: m5stack">@<bdi>m5stack</bdi></a> will update the m5mqtt client to support the Retain flag, QoS, and the Last Will and Testament (LWT) messages soon to solve some of these limitations I have uncovered.</p>
]]></description><link>https://community.m5stack.com/post/7240</link><guid isPermaLink="true">https://community.m5stack.com/post/7240</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Wed, 29 Jan 2020 16:19:50 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Tue, 28 Jan 2020 10:53:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> Thank you so far for your hard work. I really have to try again.</p>
]]></description><link>https://community.m5stack.com/post/7215</link><guid isPermaLink="true">https://community.m5stack.com/post/7215</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Tue, 28 Jan 2020 10:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 23 Jan 2020 20:58:10 GMT]]></title><description><![CDATA[<p dir="auto">Okay, so I was really challenged and determined by this thread to get the setup working. I installed Home Assistant and set up the Mosquitto MQTT add-on. Long story short, I was able to get multiple topics subscribed and working on 3 different devices. Two M5Stacks and one iPhone app called MQTTool. All three devices are publishing and receiving data to/from MQTTT.</p>
<p dir="auto">Here are my uiFlows:<br />
<img src="/assets/uploads/files/1579798426223-screen-shot-2020-01-23-at-11.51.34-am-resized.png" alt="0_1579798423204_Screen Shot 2020-01-23 at 11.51.34 AM.png" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1579798434535-screen-shot-2020-01-23-at-10.32.17-am-resized.png" alt="0_1579798433528_Screen Shot 2020-01-23 at 10.32.17 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">M5Stack #1 has an ENV unit providing Temperature, Pressure, and Humidity to MQTT, is reading the status of the LIGHT unit from M5Stack #2, and is reading the status of the iPhone app providing fake sensor/thermostat data. M5Stack #2 has a LIGHT unit providing the digital status of the light sensor (on/off) to MQTT, is reading the T/P/H values provided by M5Stack #1, and is reading the status of the iPhone app providing fake sensor/thermostat data.<br />
<img src="/assets/uploads/files/1579798857279-img_0916-resized.jpg" alt="0_1579798854625_IMG_0916.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Troubleshooting the black screen: REPL is your friend for errors. That is ultimately how I figured out what was not working. On a Mac, I opened Terminal and typed this to get to the REPL:<br />
<code>screen -port /dev/tty.SLAB_USBtoUART -b 115200</code></p>
<p dir="auto">As I was building the setup, trying a slightly modified flow on each device, I forgot to connect the unit on the other M5stack. If you have a unit added in uiFlow UI (left side panel) and the unit blocks added to your flow, but the unit is not physically connected to the M5stack, this causes a black screen when attempting to connect to MQTT. No on screen error at all, but the REPL said something like "env0 not found" when I rebooted the M5stack and looked at the startup logs. It would just sit there and hang.</p>
<p dir="auto">Another issue is that the Unit number might be changing on you when you add/remove it from your device or program (i.e. env0 changes to env1 or light0 changes to light1), especially when you don't refresh the entire uiFlow webpage before connecting each new device.</p>
<p dir="auto">Anyway, I hope this helps someone. If you have other scenarios you want me to test, let me know.</p>
]]></description><link>https://community.m5stack.com/post/7175</link><guid isPermaLink="true">https://community.m5stack.com/post/7175</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Thu, 23 Jan 2020 20:58:10 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 23 Jan 2020 12:25:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/buhi" aria-label="Profile: buhi">@<bdi>buhi</bdi></a> there is one more option: you can read / write data from the channel using REST API queries: tab <strong>ADVANCED -&gt; HTTP-&gt; HTTP REQUEST</strong>. Most MQTT brokers allow this option.</p>
<p dir="auto">When i send http request:<br />
<strong><a href="https://io.adafruit.com/api/v2/robalstona/feeds/feed01" target="_blank" rel="noopener noreferrer nofollow ugc">https://io.adafruit.com/api/v2/robalstona/feeds/feed01</a></strong></p>
<p dir="auto">i receive something like that in json format:</p>
<p dir="auto"><em>{"username":"robalstona","owner":{"id":300855,"username":"robalstona"},"id":1207296,"name":"feed01","description":null,"license":null,"history":true,"enabled":true,"visibility":"public","unit_type":null,"unit_symbol":null,"last_value":"20.7","created_at":"2019-10-27T19:40:47Z","updated_at":"2020-01-23T12:01:53Z","key":"feed01","writable":false,"group":{"id":198443,"key":"default","name":"Default","user_id":300855},"groups":[{"id":198443,"key":"default","name":"Default","user_id":300855}]}</em></p>
<p dir="auto">in my case the "last_value" field with assigned value "20.7" is what I need.</p>
<p dir="auto">You can use <strong>JSON-&gt;loads json</strong> and <strong>ADVANCED -&gt; HTTP -&gt; Get Data</strong> to store this data in variable as list.</p>
<p dir="auto">only then do you need to know the structure of this list to get to the field with interesting data values</p>
]]></description><link>https://community.m5stack.com/post/7169</link><guid isPermaLink="true">https://community.m5stack.com/post/7169</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Thu, 23 Jan 2020 12:25:23 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 23 Jan 2020 07:23:18 GMT]]></title><description><![CDATA[<p dir="auto">Is there really no one that can help us? We are already 3 with the same problem.<br />
I don't think that we did the same wrong.<br />
Is there a other way to get the values from my mqtt broker or homeassistant? Processing by IFTT or other web service and read the values a different way onto the M5?</p>
]]></description><link>https://community.m5stack.com/post/7168</link><guid isPermaLink="true">https://community.m5stack.com/post/7168</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Thu, 23 Jan 2020 07:23:18 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Sat, 18 Jan 2020 21:46:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/skysurfer" aria-label="Profile: skysurfer">@<bdi>skysurfer</bdi></a> said in <a href="/post/7096">MQTT subscribes on UiFlow</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> Your example does not read the topics, it's being set when you push the buttons....</p>
</blockquote>
<p dir="auto">You are correct. I'm having the same issues as you.</p>
]]></description><link>https://community.m5stack.com/post/7105</link><guid isPermaLink="true">https://community.m5stack.com/post/7105</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Sat, 18 Jan 2020 21:46:44 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Fri, 17 Jan 2020 20:20:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> Your example does not read the topics, it's being set when you push the buttons....</p>
]]></description><link>https://community.m5stack.com/post/7096</link><guid isPermaLink="true">https://community.m5stack.com/post/7096</guid><dc:creator><![CDATA[skysurfer]]></dc:creator><pubDate>Fri, 17 Jan 2020 20:20:46 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Fri, 17 Jan 2020 14:45:32 GMT]]></title><description><![CDATA[<p dir="auto">Two topics is working for me with Adafruit IO and this example flow. I'm using uiFlow V1.4.4 and firmware V1.4.3 on the grey M5Stack core (since firmware V1.4.4 currently has some issues).</p>
<p dir="auto"><img src="/assets/uploads/files/1579271919322-screen-shot-2020-01-17-at-9.36.39-am-resized.png" alt="0_1579271908570_Screen Shot 2020-01-17 at 9.36.39 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I'm not using HomeAssistant and do not have any real sensors that I'm pulling data from. However, the two topics is working for me when I simulate sensor data with button A and B presses, or when I add the data manually via the AIO feed console.</p>
<p dir="auto">I'll try to set up HomeAssistant on a RPi and see if anything changes.</p>
]]></description><link>https://community.m5stack.com/post/7088</link><guid isPermaLink="true">https://community.m5stack.com/post/7088</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Fri, 17 Jan 2020 14:45:32 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 16 Jan 2020 13:52:14 GMT]]></title><description><![CDATA[<p dir="auto">I have the exact same problem. 1 topic works fine, but more does not work.</p>
]]></description><link>https://community.m5stack.com/post/7064</link><guid isPermaLink="true">https://community.m5stack.com/post/7064</guid><dc:creator><![CDATA[skysurfer]]></dc:creator><pubDate>Thu, 16 Jan 2020 13:52:14 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 16 Jan 2020 02:52:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/buhi" aria-label="Profile: buhi">@<bdi>buhi</bdi></a> said in <a href="/post/7058">MQTT subscribes on UiFlow</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robalstona" aria-label="Profile: robalstona">@<bdi>robalstona</bdi></a><br />
So if i try to get the second one also with mqtt subscribe to a different topic (2nd inverter) the hole screen is black. Any hints?</p>
</blockquote>
<p dir="auto">Are there any errors on HomeAssistant? I use Adafruit IO and when I get a black screen due to an issue configuring something in UIFlow , typically I can see some errors on the broker’s web console.</p>
<p dir="auto">It could be your feed configuration or the sensor data (stored as float or int instead of strings) or something like that.</p>
]]></description><link>https://community.m5stack.com/post/7061</link><guid isPermaLink="true">https://community.m5stack.com/post/7061</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Thu, 16 Jan 2020 02:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Thu, 16 Jan 2020 02:12:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robalstona" aria-label="Profile: robalstona">@<bdi>robalstona</bdi></a> said in <a href="/post/7051">MQTT subscribes on UiFlow</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/buhi" aria-label="Profile: buhi">@<bdi>buhi</bdi></a> It is possible that the problem is how the data is sent to the mqtt server and how often they are sent. In my case, the sensor data is sent every 25 seconds. And if I run this program it will only show me <strong>---</strong> until the server receives new data. and then the channel is subscribed, the data are saved to the variable and displayed on the lcd display. So if you have data updated, for example, every hour, nothing may be displayed for an hour. You can combine something with the "retain" flag when sending data to the server, then you will be able to receive the last data received from the feed. But this already needs to be changed on the device / software side that this data sends.</p>
<p dir="auto"><a href="https://mntolia.com/mqtt-retained-messages-explained-example" target="_blank" rel="noopener noreferrer nofollow ugc">https://mntolia.com/mqtt-retained-messages-explained-example</a></p>
</blockquote>
<p dir="auto">I opened a request for UIFlow to add support for the retain flag. You can track it here.</p>
<p dir="auto"><a href="https://github.com/m5stack/UIFlow-Code/issues/1" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/UIFlow-Code/issues/1</a></p>
]]></description><link>https://community.m5stack.com/post/7060</link><guid isPermaLink="true">https://community.m5stack.com/post/7060</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Thu, 16 Jan 2020 02:12:06 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 15 Jan 2020 21:36:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robalstona" aria-label="Profile: robalstona">@<bdi>robalstona</bdi></a> Ok i understand enough from MQTT how it works. They are published to my Broker every second.<br />
But strange is that this code below with one subscribe topic works.<br />
First both variables get "0" after the 3500ms wait solar gets update with 0.0 (now its night here so no solar power)<br />
<img src="/assets/uploads/files/1579123158615-m5_stack_mqtt-resized.png" alt="0_1579123155832_m5_stack_mqtt.PNG" class=" img-fluid img-markdown" /><br />
Because i have two solaredge inverters i have two different values in the same format.<br />
So if i try to get the second one also with mqtt subscribe to a different topic (2nd inverter) the hole screen is black. Any hints?</p>
]]></description><link>https://community.m5stack.com/post/7058</link><guid isPermaLink="true">https://community.m5stack.com/post/7058</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Wed, 15 Jan 2020 21:36:29 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 15 Jan 2020 15:23:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/buhi" aria-label="Profile: buhi">@<bdi>buhi</bdi></a> It is possible that the problem is how the data is sent to the mqtt server and how often they are sent. In my case, the sensor data is sent every 25 seconds. And if I run this program it will only show me <strong>---</strong> until the server receives new data. and then the channel is subscribed, the data are saved to the variable and displayed on the lcd display. So if you have data updated, for example, every hour, nothing may be displayed for an hour. You can combine something with the "retain" flag when sending data to the server, then you will be able to receive the last data received from the feed. But this already needs to be changed on the device / software side that this data sends.</p>
<p dir="auto"><a href="https://mntolia.com/mqtt-retained-messages-explained-example" target="_blank" rel="noopener noreferrer nofollow ugc">https://mntolia.com/mqtt-retained-messages-explained-example</a></p>
]]></description><link>https://community.m5stack.com/post/7051</link><guid isPermaLink="true">https://community.m5stack.com/post/7051</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Wed, 15 Jan 2020 15:23:28 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Wed, 15 Jan 2020 06:20:18 GMT]]></title><description><![CDATA[<p dir="auto">Has this something to do that i receive the value solar without float and zaehler with float?</p>
]]></description><link>https://community.m5stack.com/post/7049</link><guid isPermaLink="true">https://community.m5stack.com/post/7049</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Wed, 15 Jan 2020 06:20:18 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Tue, 14 Jan 2020 21:01:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robalstona" aria-label="Profile: robalstona">@<bdi>robalstona</bdi></a><br />
I tried again with your code but nothing happens to the screen. Not even one value apears.<br />
I see them in MQTT Lens. <img src="/assets/uploads/files/1579035600710-capture-resized.png" alt="0_1579035595487_Capture.PNG" class=" img-fluid img-markdown" /><br />
Anyone a Hint? I have 1.4.3 on the m5 core and on the ui flow.</p>
]]></description><link>https://community.m5stack.com/post/7048</link><guid isPermaLink="true">https://community.m5stack.com/post/7048</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Tue, 14 Jan 2020 21:01:28 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Mon, 13 Jan 2020 10:44:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robalstona" aria-label="Profile: robalstona">@<bdi>robalstona</bdi></a> Thank you. I already learned alot out of your code. I will try that out.<br />
I'm looking forward for my mqtt value screen ;-)</p>
]]></description><link>https://community.m5stack.com/post/7017</link><guid isPermaLink="true">https://community.m5stack.com/post/7017</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Mon, 13 Jan 2020 10:44:00 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Fri, 10 Jan 2020 21:09:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/maltim" aria-label="Profile: maltim">@<bdi>maltim</bdi></a> I use <strong><a href="http://adafruit.io" target="_blank" rel="noopener noreferrer nofollow ugc">adafruit.io</a></strong> via <strong>mqtt</strong> and subscribe and display two feeds values. I use uiflow 1.4.2 firmware in my StickC. Se on my code <a href="https://github.com/stonatm/m5stickc?files=1" target="_blank" rel="noopener noreferrer nofollow ugc">mqtt_example</a></p>
]]></description><link>https://community.m5stack.com/post/6977</link><guid isPermaLink="true">https://community.m5stack.com/post/6977</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Fri, 10 Jan 2020 21:09:16 GMT</pubDate></item><item><title><![CDATA[Reply to MQTT subscribes on UiFlow on Fri, 10 Jan 2020 15:16:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi there.<br />
I have exactly the same problem.<br />
I can subscribe to one topic and show the value on the screen.<br />
But when i do it with the second topic then it doesn't work anymore.<br />
Has anyone a solution for this?<br />
I want to show different states from the homeassistant mqtt statestream.</p>
]]></description><link>https://community.m5stack.com/post/6970</link><guid isPermaLink="true">https://community.m5stack.com/post/6970</guid><dc:creator><![CDATA[Buhi]]></dc:creator><pubDate>Fri, 10 Jan 2020 15:16:13 GMT</pubDate></item></channel></rss>