<?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[Unable to subscribe to IoT topic (M5StickCPlus)]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I've been trying to subscribe to an AWS IoT topic but with no success... even after searching for solution in this forum and on the internet. This is how the code looks like using UIFlow v1.11.9</p>
<p dir="auto"><img src="https://i.imgur.com/SJh7Zfc.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">I can publish to topics without issues, but i'm unable to subscribe to topics :(</p>
<p dir="auto">The data defined for label0 to label2 shows as 'none' and the label3 that i included on the AWS subscribe loop does not show at all.  Which makes me wonder whether the subscribe commands is even done or whether it is done with error... although i do not see any errors when i run the code.</p>
<p dir="auto">python code looks like this:<br />
<img src="https://i.imgur.com/IuAUssX.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">Anyone has faced this issue? is it a bug? Any help would be greatly appreciated.<br />
Thanks</p>
]]></description><link>https://community.m5stack.com/topic/5437/unable-to-subscribe-to-iot-topic-m5stickcplus</link><generator>RSS for Node</generator><lastBuildDate>Mon, 04 May 2026 13:15:10 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5437.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2023 13:42:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unable to subscribe to IoT topic (M5StickCPlus) on Thu, 29 Jun 2023 18:15:51 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> I've physically restarted the device (power OFF and back ON with the side button) instead of just having it run / reset from the flow web ui, now it seems to work (with HiveMQ, i haven't re-tried the other yet)!<br />
Thanks a lot for your support and for sharing your code,  much appreciated !</p>
]]></description><link>https://community.m5stack.com/post/21398</link><guid isPermaLink="true">https://community.m5stack.com/post/21398</guid><dc:creator><![CDATA[mino91]]></dc:creator><pubDate>Thu, 29 Jun 2023 18:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to subscribe to IoT topic (M5StickCPlus) on Thu, 29 Jun 2023 05:02:14 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1688014690329-screenshot-2023-06-28-at-06.14.39-resized.png" alt="0_1688014683644_Screenshot 2023-06-28 at 06.14.39.png" class=" img-fluid img-markdown" /><br />
This is the code I'm using on a core2 that sends to a self hosted Mosquitto server and so far had no issues.</p>
<p dir="auto"><img src="/assets/uploads/files/1688014874722-screenshot-2023-06-29-at-06.01.10-resized.png" alt="0_1688014882686_Screenshot 2023-06-29 at 06.01.10.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">and this is my M5Paper receiver code that retrieves data from the server.</p>
]]></description><link>https://community.m5stack.com/post/21376</link><guid isPermaLink="true">https://community.m5stack.com/post/21376</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Thu, 29 Jun 2023 05:02:14 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to subscribe to IoT topic (M5StickCPlus) on Thu, 29 Jun 2023 01:05: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></p>
<p dir="auto">Thanks for your feedback!<br />
The wifi connects fine, because of the wifi config you burn via the M5burner I think. But you are right I can add that wifi block just in case.</p>
<p dir="auto">Update: I've tried with HiveMQ broker and the subscription PARTIALLY works: only the first message is received.<br />
During the initial run (clicking run from the flow web UI), the code initializes then when publishing the first message to the topic via another client, the M5stick receive and display the message as expected. The get key part to get the values in the JSON data actually works fine if the message is received.</p>
<p dir="auto">However, the subsequent published messages to the topic are not received by the M5stick. I've tried to run the code under the subscribe block inside a loop but it doesn't work neither.</p>
<p dir="auto">I've also tested  EMQ broker and with a self hosted Mosquito broker, same results: only first message published is received.  So it is likely something misconfigured or bugged on the M5 side  ? I've now tried with 4 different brokers lol.</p>
<p dir="auto">In the code, I've used the generic MQTT blocks this time instead of the AWS ones.</p>
<p dir="auto"><img src="https://i.imgur.com/liSIf8A.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">thanks for your help.</p>
]]></description><link>https://community.m5stack.com/post/21373</link><guid isPermaLink="true">https://community.m5stack.com/post/21373</guid><dc:creator><![CDATA[mino91]]></dc:creator><pubDate>Thu, 29 Jun 2023 01:05:53 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to subscribe to IoT topic (M5StickCPlus) on Wed, 28 Jun 2023 19:21:02 GMT]]></title><description><![CDATA[<p dir="auto">You have a wificonnect block but haven't placed a wifi block to say what SSID and password to use to connect to the wifi network.</p>
<p dir="auto">I have been getting some code fails when trying to decode JSON files, If I add the get key blocks as you have then it just doesn't work and wont even load the json stream.</p>
]]></description><link>https://community.m5stack.com/post/21368</link><guid isPermaLink="true">https://community.m5stack.com/post/21368</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 28 Jun 2023 19:21:02 GMT</pubDate></item></channel></rss>