MQTT
-
It's working great. I am connected to io.adafruit.com.
set client id = your id
server = io.adafruit.com (the cloud service you are connecting to but could be others such as cloudmqtt.com could just as easily be used)
port = 1883
user = your user name for the cloud service you are connecting to
password = AIO key
keepalive = 300 (not sure what this should be set to)for publish topic = your username/feeds/name of the feed
I also set up a local broker using mqtt.fx on windows 10 and I was able to successfully connect to that as well. This is really great and now using ifttt all kinds of other apis can be explored in a quick and easy way. All you need to do is make a webhook and start sending data from the M5stack to the cloud. Maybe M5stack should make a custom service for IFTTT to monitor sensors and control devices and the like.
-
@jpilarski Great, any chance of a screen grab showing where the blocks go, is the server setup block in the setup and where does the start go, of course I could guess where things go but it would be nice to have a clue :-)
-
Nice, can't wait to play.
-
I am using IFTTT with webhook based on an ok google "turn light on" and "turn light off" command. That message is relayed to io.adafruit and then transmits back to m5stack which performs a function based on the string received. Optionally data can also be sent to the cloud from the board using publish topic. -
@jpilarski Thanks for that I'll give it a go.
-
@jpilarski said in MQTT:
I am using IFTTT with webhook based on an ok google "turn light on" and "turn light off" command. That message is relayed to io.adafruit and then transmits back to m5stack which performs a function based on the string received. Optionally data can also be sent to the cloud from the board using publish topic.IS this the full code?
Doesn't do anything for me :( -
You have to save the file to your board. Don't use run. Once it reboots it will connect to wifi and then run the mqtt blocks.
-
Well initially I got this working a treat but then made some changes and downloaded it and it stopped working ??? not sure what's going on.
I made a simple program to switch neopixel led to R, G and B from the three switches, when I run it using the play button it works, when I download it only one button works, I suspect there is something not working quite right when downloading the program.
-
@jpilarski said in MQTT:
You have to save the file to your board. Don't use run. Once it reboots it will connect to wifi and then run the mqtt blocks.
Are you running the 1.1.1 firmware as I don't have label appearing on the screen?
-
@ajb2k3 Yes I am using firmware 1.1.1.
The first thing I was doing in mine was adding a title and updating the text of the title, I removed this and now it seems to work OK. -
@gadjet ah that explains it, I’m still running 1.0 as I haven’t had the time to update devices yet.
-
Sarcasm funny that it works after the update Sarcasm
Thanks, Gadget, can I use this demo in my book.
still cant get the neopixel to work
-
@ajb2k3 I'm using this flow and it works with a single RGB LED plugged in the grove port A
Last night it would only work with the play button and not the download option, now it works with both ???
-
Ok something is missing that set the topic to on or off.
-
-
Hmn, I need to play then.
-
@jpilarski said in MQTT:
You have to save the file to your board. Don't use run. Once it reboots it will connect to wifi and then run the mqtt blocks.
Hi @jpilarski, how can i save the file? don't i only need to do "download" from "http://flow.m5stack.com"?
i have a project working great if i download it from http://flow.m5stack.com, but when i reboot the M5Stack my module won't start...
Best
Davide -
@jpilarski said in MQTT:
You have to save the file to your board. Don't use run. Once it reboots it will connect to wifi and then run the mqtt blocks.
Hi @jpilarski, how can i save the file? don't i only need to do "download" from "http://flow.m5stack.com"?
i have a project working great if i download it from http://flow.m5stack.com, but when i reboot the M5Stack my module won't start...
Best
DavideYou need to connect you M5 to UIFlow, click the download button (a rough WIP guide is in my WIP Handbook on pages 7, 8, and 9)
You need to click the 3 horizantal lines to get the settings up and then click download.
When the M5 Stack restarts you need to hit the middle button (B) to get the app list then use the right button (C) to move down and then B to run the program. -
thank you @ajb2k3... is there a way to start the m5 immediately with your program?
-
@dvd78 I think.....
If you just power it on it should autoload the program.