Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
To interact with an MQTT broker, we need an MQTT client. We take emqtt. Add it to mix.exs as a dependency:
using MQTT.js to connect to the broker directly from the frontend through WebSockets.
All the code is available at https://github.com/savonarola/mqtt-article .
The book mentioned above mainly focuses on the Nerves part and uses HTTP protocol for network interactions. Although this is a reasonable choice in many situations, I want to introduce another widely used option for production IoT setups: MQTT.
Related posts
- Simplest Guide to DIY Your Own LLM Toy in 2024
- Server Sent Events simplified in SvelteKit
- Enriching Payloads with MQTT 5 Metadata, using AWS IoT Core Rules Engine
- Automatically Applying Configuration to IoT Devices with AWS IoT and AWS Step Functions - Part 1
- "Client <unknown> disconnected due to malformed packet."