DWEET.IO for when MQTT is just too hard.

Use this section to discuss your embedded Flowcode projects.
Post Reply
mnfisher
Valued Contributor
Posts: 1512
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 725 times

Flowcode v10 DWEET.IO for when MQTT is just too hard.

Post by mnfisher »

I read a bit about dweet.io - and tried to get it working with esp32.
dweet.io gives a way to pass messages (a bit like X?) for IOT devices - but there is no sign up. Devices can just send/receive messages - and you'll need a unique device name (it assigned me "vulgar-island" - when I tried the demo - so that is what I have used here)

I came up with this simple proof of concept - it does the (slightly pointless) dweeting and then receiving (the same) dweet.
The site holds up to 5 messages for up to 24 hours.

I hit upon a small snag - using a variable to hold the ssid (or password) doesn't work - the values are hardcoded into wifiInit as strings. I failed to get it to work better than this - even with -Wno-missing-braces added to the build.

As it is it outputs the reply data received from dweet.io to UART (it is a json string) - the event handler could do more with this.

This gives on send:
{"this":"succeeded","by":"dweeting","the":"dweet","with":{"thing":"vulgar-island","created":"2025-02-24T16:13:36.139Z","content":{"Hello":"World","Count":45},"transaction":"6b87d9bf-b71b-4eea-9942-e2db1a62aa96"}}
And on receive:
{"this":"succeeded","by":"getting","the":"dweets","with":[{"thing":"vulgar-island","created":"2025-02-24T16:13:36.139Z","content":{"Hello":"World","Count":45}}]}
It doesn't always seem to connect correctly - and will give errors - resetting the esp32 'should' fix this - and when running it is rock solid.

Although it is billed as
Ridiculously simple messaging for the Internet of Things.
I'm not entirely sure I can see many benefits over MQTT - and unless you stump up for the 'pro' version - anyone can dweet to your device ('why do the lights keep flashing?') or read dweets intended for your device. Using a UUID as the device name might mitigate the chance of this?

Martin
Attachments
dweet.fcfx
(17.6 KiB) Downloaded 38 times

chipfryer27
Valued Contributor
Posts: 1574
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 356 times
Been thanked: 560 times

Re: DWEET.IO for when MQTT is just too hard.

Post by chipfryer27 »

Hi Martin

I'd never heard of this dweet thing so went to their site. Struggling to see why it appears to be so popular as I don't really see what it improves upon or offers compared to MQTT or such like.

A way to send random instructions to anything, anywhere perhaps? Maybe with little trace too?

Regards

mnfisher
Valued Contributor
Posts: 1512
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 725 times

Re: DWEET.IO for when MQTT is just too hard.

Post by mnfisher »

True, and I'm not sure when it appeared - whether it predates mqtt or followed after.

It 'could' be useful for crowd type art projects - but it doesn't really offer anything more (or much less) than mqtt. It is nice to have a service with no need to register / credit card to wave / life story & inside leg measurement to give ;)

There are (as ever) lots of ways to do the same thing - Azure offers a very similar messaging service (but there are limits what can be done for free)

Back to making an ESP32 crash in new and exciting ways today (division by 0 just now 😢 even though I haven't divided anything by anything.)

chipfryer27
Valued Contributor
Posts: 1574
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 356 times
Been thanked: 560 times

Re: DWEET.IO for when MQTT is just too hard.

Post by chipfryer27 »

Hi

I actually can see a use for this, but not one I care to broadcast.

I think it's been running for over a decade now.

I'm divided too... Stay in nice warm sunshine or come back to the cold... :)

Regards

Post Reply