Lightweight messaging libraries for implementing MQTT protocols in resource-constrained Internet of Things device applications.
Curl is a command-line tool and portable library for transferring data across a wide range of network protocols. It functions as a unified engine that abstracts diverse communication standards, allowing users and developers to move files and information between servers using a consistent interface. The project provides both a versatile command-line client for terminal-based automation and a stable programmatic interface for integrating complex network operations into applications. The system is distinguished by its protocol-agnostic core and its ability to manage both synchronous and asynchronous network transfers. It features a non-blocking event loop that enables multiple simultaneous transfers within a single thread, alongside a connection pooling mechanism that reuses network sockets to minimize latency. Security is a primary focus, implemented through a pluggable architecture that supports various cryptographic backends, native certificate store integration, and comprehensive authentication mechanisms for protected resources. Beyond core data movement, the project includes extensive support for modern networking standards, including HTTP/3, WebSockets, and MQTT. It offers sophisticated state management through a built-in cookie engine and provides granular control over request headers, URL construction, and batch processing. These capabilities are supported by robust debugging tools that allow for the inspection of raw request and response data during development. The project is distributed with standard configuration scripts and package management support to facilitate integration into diverse build environments.
Example code showing how to use the MQTT protocol with the Thingspeak cloud service https://thingspeak.com
Socket.io is a real-time communication engine that enables bidirectional, event-based data exchange between clients and servers. It provides a robust transport-agnostic protocol layer that automatically manages connection lifecycles, including heartbeat signals, automatic reconnection, and seamless fallback between WebSockets and HTTP long-polling. By maintaining persistent links, it ensures reliable messaging across diverse network environments. The project distinguishes itself through a scalable, distributed architecture that supports multi-node synchronization and room-based message routing. It utilizes pluggable adapters to distribute events and state across server clusters, ensuring consistent communication regardless of the host node. Developers can organize traffic into isolated namespaces for multi-tenant applications and apply middleware to handle authentication and request modification during the connection process. Beyond core messaging, the platform offers comprehensive tools for managing complex communication patterns. This includes support for acknowledgement-based delivery, stateful connection recovery, and custom data serialization for binary payloads. It also provides mechanisms for type-safe network communication, allowing developers to define shared interfaces for event payloads and listeners to improve development consistency. The library includes built-in diagnostic utilities for monitoring connection health, inspecting internal events, and verifying protocol compliance. It is designed to be installed as a dependency in TypeScript environments, providing a structured framework for building interactive applications that require instant, reliable data synchronization.
MQTT is an easily used networking protocol designed for IOT (internet of things) applications. It is well suited for controlling hardware devices and for reading sensors across a local network or the internet.
libhv is a high-performance C/C++ network library and event-driven I/O framework used to build TCP, UDP, SSL, HTTP, WebSocket, and MQTT clients and servers. It provides a non-blocking event loop for managing network sockets, timers, and system signals across multiple threads. The project is distinguished by its integrated support for specialized network roles, including a full HTTP web server with RESTful routing and middleware, an MQTT messaging client for IoT communication, and the ability to implement SOCKS5 and HTTP proxies. It also features a reliable UDP implementation to ensure ordered packet delivery and congestion control over connectionless transport. Broad capabilities include asynchronous network programming with multi-threaded event loops, transport-layer encryption via SSL/TLS, and protocol-agnostic packet unpacking. The library also covers structured data parsing for JSON and INI formats, static file serving, and the management of bidirectional real-time communication.
Bitchat is a decentralized messaging protocol designed for secure, private communication across both local and wide-area networks. It functions as an encrypted offline messenger that enables direct data exchange between devices without requiring centralized servers or persistent internet connectivity. By utilizing end-to-end encryption, the platform ensures that message content remains confidential and protected from unauthorized access throughout the entire transport process. The project distinguishes itself through a hybrid connectivity layer that dynamically routes messages between short-range wireless radio links and global internet relays. This architecture allows the system to maintain communication in disconnected environments by automatically switching paths based on network availability. When recipients are offline, the system employs an asynchronous store-and-forward mechanism to buffer messages locally, synchronizing them once a stable connection path is re-established. Beyond its core routing capabilities, the framework supports location-based channel discovery, allowing users to join regional or community-specific groups based on geographic metadata. The system is optimized for power efficiency, utilizing throttled radio polling to minimize battery consumption during peer-to-peer mesh operations. These features collectively provide a resilient communication channel suitable for emergency response coordination and environments where traditional infrastructure is unavailable.
Example code showing how to use the MQTT protocol with the Thingspeak cloud service https://thingspeak.com
Netty is an asynchronous network framework designed for building scalable protocol servers and clients. It utilizes an event-driven reactor pattern and a non-blocking input/output model to decouple connection handling from application logic, allowing for the development of responsive network services that manage high volumes of concurrent connections. The framework distinguishes itself through a modular pipeline-based processing chain that enables the implementation of custom binary or text-based protocols. It provides a pluggable transport abstraction that allows developers to switch between standard Java sockets and native platform-specific drivers without modifying application code. To maintain performance under high load, it employs zero-copy buffer management and reference-counted memory pooling, which minimize garbage collection pressure and facilitate low-latency data transmission. Beyond its core transport capabilities, the framework includes tools for secure network communication and the transformation of raw byte streams into high-level domain objects. It also provides mechanisms to reassemble fragmented data packets, ensuring that application logic processes complete units of information. Comprehensive documentation is available, including a user guide that details the construction of various network services and handlers.
This repository provides a general framework to deploy smarthome nodes based on micropython and communicating using mqtt. The framework is easy to use and extend with custom components/scripts.
This project provides a desktop-based interface for remote control and screen mirroring of Android devices. It functions by establishing a persistent, multiplexed communication channel over the Android Debug Bridge, allowing for the transmission of raw binary data streams between a host computer and a connected mobile device. The tool distinguishes itself by injecting a lightweight binary into the mobile runtime to access system-level APIs for direct screen buffer capture and input event injection. By translating desktop mouse and keyboard signals into native Linux kernel events, it enables responsive interaction with the mobile interface without the overhead of hardware emulation. It further ensures performance through hardware-accelerated video decoding on the host and synchronized audio-visual streaming, which maintains temporal alignment between the device output and the desktop display. Beyond basic mirroring, the project supports comprehensive remote device management and debugging workflows. It utilizes zero-copy capture techniques and socket-based binary transport to minimize latency, facilitating tasks such as mobile application quality assurance and real-time hardware monitoring. The software is distributed as a command-line utility that operates across multiple desktop platforms.
MQTT.js is a JavaScript client library and asynchronous messaging client used to connect to message brokers and exchange data via the MQTT protocol. It provides a broker interface for publishing and subscribing to topics, and includes a command-line interface for interacting with brokers without writing code. The library supports multiple network layers, including TCP, TLS, and WebSockets, and allows for custom WebSocket construction and transport injection to handle specific headers or subprotocols. It implements bandwidth reduction through topic aliasing, which replaces repetitive topic strings with numeric identifiers. The project covers connection management through automatic reconnection, keepalive heartbeats, and credential refreshing. It manages message reliability using pluggable in-flight storage for unacknowledged messages and ensures secure data transfer via TLS encryption with SNI and ALPN extensions. Messaging capabilities include batched subscription requests and topic name validation.
This project provides a comprehensive implementation of the WebSocket protocol, enabling persistent, bidirectional communication between clients and servers. It handles the low-level complexities of the protocol, including the initial HTTP upgrade handshake and the encapsulation of data into discrete binary frames. By managing these connections, it allows applications to exchange data instantly without the overhead associated with repeated standard request cycles. The library distinguishes itself through its focus on high-frequency message exchange and concurrent connection management. It utilizes internal memory buffers to optimize network throughput and minimize system calls, while employing lightweight execution threads to maintain independent state for multiple active clients simultaneously. To ensure data integrity and compatibility, it also manages masking-based payload obfuscation for client-sent frames. Beyond core protocol support, the project includes a suite of web toolkit capabilities for building complete network applications. This includes mechanisms for routing HTTP requests, processing traffic through reusable middleware layers, and managing user sessions. It also supports remote procedure invocation, form data binding, and security features such as request forgery prevention and encrypted cookie handling.
A MicroPython project to control an ITEAD Sonoff switch (or any ESP8266 module really) via an MQTT broker.
Requests is a high-level HTTP client library designed to simplify web communication and API integration. It provides an intuitive, human-readable interface for performing standard network operations, including request execution, connection pooling, and stateful session management. By encapsulating raw network data into structured objects, the library automates the complexities of headers, cookies, and payload transmission. The library distinguishes itself through a modular transport adapter layer that allows for custom protocol handling and extensible authentication hooks. It supports a wide range of security requirements, including OAuth, digest authentication, and mutual TLS via client-side certificates. Developers can further optimize performance and testing workflows through built-in features like persistent connection pooling, response caching, and the ability to record and replay network interactions. Beyond core request handling, the framework provides comprehensive tools for managing the full request lifecycle. This includes automated redirection logic, configurable timeouts, proxy routing, and memory-efficient streaming for large data transfers. It also features robust error management, translating low-level network issues into a consistent hierarchy of descriptive exceptions to facilitate debugging. The library supports asynchronous execution patterns, allowing for non-blocking network calls within concurrent applications. It is designed for extensibility, offering interfaces for community-driven plugins and custom request preparation to accommodate specialized communication requirements.
Async MQTT client library with auto reconnect for MicroPython devices such as the ESP32 or Pycom devices
ntfy is a self-hosted messaging infrastructure that provides a lightweight platform for sending and receiving real-time notifications. It functions as a topic-based pub-sub server, allowing users to publish and subscribe to message channels using standard HTTP requests. By bridging server-side events with native mobile and desktop clients, it enables the delivery of alerts across various environments through a unified communication layer. The project distinguishes itself by offering a complete, private notification ecosystem that includes persistent message caching and robust access control. It supports the UnifiedPush protocol, acting as a gateway to native mobile operating system push services, which allows for decentralized notification delivery without reliance on proprietary cloud providers. Users can interact with the system through a command-line interface, webhooks, or persistent streaming connections like Server-Sent Events and WebSockets. The platform covers a broad range of operational capabilities, including automated system monitoring, workflow integration, and cross-platform event broadcasting. It supports advanced message features such as content templating, file attachments, interactive buttons, and priority-based delivery. The system is designed for flexible deployment, offering containerized and binary-based installation options that simplify integration into existing infrastructure. The software is distributed as a single static binary, facilitating straightforward deployment across Linux, macOS, and Windows environments.
MicroPython MQTT Sonoff Switch This project uses MicroPython to implement a MQTT controllable relay switch on the ITead Sonoff Switch.
Librepods is a cross-platform hardware controller that functions as a Bluetooth audio protocol interceptor. It provides a unified software layer to manage device-specific settings and connectivity features across various desktop and mobile operating systems, acting as a configuration tool for hardware-level sound parameters. The project distinguishes itself through a vendor identity emulation layer that masks hardware signatures to bypass authentication checks. By intercepting and modifying low-level Bluetooth handshake packets and spoofing device identifiers, it enables access to restricted platform features and proprietary settings that are typically locked to specific manufacturer ecosystems. Beyond identity emulation, the software facilitates multi-device audio management by allowing hardware to connect to multiple sources simultaneously. It includes capabilities for real-time audio stream interception, which enables the injection of signal processing filters to adjust noise reduction, transparency, and frequency response based on user-defined profiles. The system also supports runtime modification of firmware-bound configuration structures to unlock hidden hardware features.
MicroPython and CircuitPython examples showing how to use the MQTT protocol with the Adafruit IO cloud service. The example code shows how a Heap statistic (free heap size in bytes) can be used with MQTT at Adafruit IO. This heap statistic provides a convenient means to show the MQTT…
NSQ is a distributed, brokerless messaging platform designed for high-throughput, fault-tolerant communication. By utilizing a decentralized topology, it eliminates single points of failure and allows for horizontal scaling across clusters. The system organizes message streams into topics and channels, effectively decoupling producers from consumers to support both streaming and job-oriented workloads. The platform distinguishes itself through a lookup-service-based discovery mechanism that enables clients to dynamically locate producers at runtime without requiring centralized coordination. To ensure reliability, it implements an explicit acknowledgement protocol that guarantees at-least-once message delivery, automatically re-queuing unhandled data. The system also manages memory usage by spilling message queues to disk when thresholds are exceeded, preventing service crashes during periods of high load. Beyond its core messaging capabilities, the project provides a comprehensive suite of administrative tools, including built-in HTTP endpoints for monitoring cluster health and managing configuration. It supports flexible deployment patterns, ranging from containerized environments to direct binary execution, and offers official client libraries alongside a documented TCP-based binary protocol for custom integrations. The software is available as pre-compiled binaries or source code, with documentation covering cluster administration, performance benchmarking, and operational configuration.