Integrating Hardware
Connect sensor and actuator data flows to TelemetryOS applications with MQTT messaging.
Integrating Hardware
Overview
Most physical integrations in TelemetryOS custom applications follow this pattern:
- Devices or gateways publish sensor/state data to an MQTT broker.
- Your TelemetryOS app subscribes to relevant topics with
mqtt(). - The app updates its UI and storage in near real time.
- User actions or automation logic publish control commands back to actuators.
Use this for real-time operational workflows where external systems must influence what is displayed on-device.
Important: MQTT support requires Node Pro and is not available on Node Mini.
What to use MQTT for
MQTT is best when your app needs low-latency updates, persistent state changes, or bi-directional device communication.
Common use cases include:
- Environmental monitoring (temperature, humidity, occupancy, air quality)
- Equipment telemetry (PLC/sensor readings, runtime status, fault alarms)
- Facility operations (door/window contact, lighting status, motion events)
- Kiosk and signage control (show/hide content based on sensor input)
- Actuator workflows (open vents, dim lights, acknowledge events)
Integration pattern
At a high level, connect these pieces:
- Sensors / field devices publish to MQTT topics like
factory/line-a/temperature. - Actuators / controllers subscribe to command topics like
facility/display-12/set-brightness. - TelemetryOS app:
- uses
mqtt().discover()to find available brokers - uses
mqtt().connect()to establish a connection - uses
mqtt().subscribe()to receive sensor data - uses
mqtt().publish()to send actuator commands - uses
mqtt().subscribeConnectionStatus()for robustness monitoring
- uses
Store short-lived operational state in store().device only when device context is needed; mirror critical values into store().instance or store().application for UI consistency across render/settings if required.
Security and reliability notes
- Use TLS transport (
mqtts/wss) whenever available. - Keep retained topics limited to values you want late joiners to read immediately.
- Use topic naming that reflects ownership and environment (
site/floor/zone/equipment). - Validate command payloads before forwarding actions to physical equipment.
- Watch connection state and reconnect behavior for unattended deployments.
Next steps
- MQTT Methods - Complete API reference for discover/connect/publish/subscribe
- Device and platform configuration - Manage deployments and hardware assignments
Updated about 2 hours ago