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:
And on receive:{"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"}}
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.{"this":"succeeded","by":"getting","the":"dweets","with":[{"thing":"vulgar-island","created":"2025-02-24T16:13:36.139Z","content":{"Hello":"World","Count":45}}]}
Although it is billed as
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?Ridiculously simple messaging for the Internet of Things.
Martin