MQTT



  • Hi, has anyone got the MQTT working in Ulflow, can anybody post a picture of the layout, I've tried a few different things but when I download it I just get a blank screen, other projects work OK.



  • @gadjet said in MQTT:

    Hi, has anyone got the MQTT working in Ulflow, can anybody post a picture of the layout, I've tried a few different things but when I download it I just get a blank screen, other projects work OK.

    No, but I'm working on something with @watson
    The demo won't work because it can't access the MQTT broker used by the one who made the demo.
    You need access to a MQTT broker/server before you can use the MQTT functions alas, I haven't had a chance to install one on a raspberry pi.
    (Can't get it to mosquitto to work on OSX)



  • @ajb2k3 Just use www.cloudmqtt.com, I use this with my RPi and node red, it's a free account with username and password and I've used it successfully for quite a while.

    Where can I find this Demo, maybe I get get it working with Cloudmqtt



  • sorry, in this week mqtt m5flow will fix some bug, and add a example



  • @heybin That would be great, thanks.



  • hello, Mqtt has been fixed in v1.1.1, but example need spend some time



  • 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.



  • 0_1547713244710_Inkedmqtt_LI.jpg
    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:

    0_1547713244710_Inkedmqtt_LI.jpg
    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
    RGB LED Flow

    Last night it would only work with the play button and not the download option, now it works with both ???



  • @gadjet

    Ok something is missing that set the topic to on or off.


Log in to reply
 

Looks like your connection to M5Stack Community was lost, please wait while we try to reconnect.