Set up · How-to
Connect Wi-Fi and IoT devices
Endpoints, topics and message formats for devices that talk MQTT directly, including commands and twins.
Updated 11 Nov 20262 min read
All ThingsX IoT Core pages
- What ThingsX IoT Core does
- Quick start: connect your first device
- Key concepts
- Security and access
- Connect Wi-Fi and IoT devices
- BLE gateways, shelf labels and child devices
- LoRaWAN sensors and gateways
- Industrial I/O modules
- Device twins and state
- Send commands to devices
- Rules: react to device messages
- SDK and REST API
- Monitor your fleet and support customers
- Moving from another IoT platform
- From AWS IoT Core
- From Azure IoT Hub and other platforms
- Device can't connect
- Devices keep disconnecting or reconnecting
- Data isn't arriving or a rule doesn't fire
- Frequently asked questions
- Topics and limits reference
Endpoint and ports
| Port | Protocol | Sign in with |
|---|---|---|
| 8883 | MQTT over TLS | Client certificate, or username and password |
| 8443 | MQTT over secure WebSocket | Username and password |
| 1883 | Plain MQTT (private networks only) | Username and password |
Use the endpoint from your workspace details (<your-endpoint> below). The client ID must equal the thing name.
Topics a device uses
| Purpose | Topic | Direction |
|---|---|---|
| Telemetry | tic/things/<name>/telemetry | Device → cloud |
| Events | tic/things/<name>/events | Device → cloud |
| Commands | tic/things/<name>/commands/<id> | Cloud → device (subscribe to tic/things/<name>/commands/#) |
| Command reply | tic/things/<name>/commands/<id>/response | Device → cloud |
| Twin | $tic/things/<name>/twin/update, /get, /delete | Both ways (replies on /accepted, /rejected, /delta, /documents) |
Telemetry
Publish JSON. Every numeric field becomes a metric you can chart and use in rules; nested objects are flattened ({"power": {"v": 230}} becomes power.v). Add ts (ISO 8601) if the reading was taken earlier than it is sent.
{ "temperature": -19.4, "humidity": 61.2, "door_open": 0, "ts": "2026-11-11T09:30:00Z" }
Events
For things that happen rather than readings, publish to the events topic with a type:
{ "type": "door_alarm", "duration_s": 95 }
Events appear on the device's Timeline and can trigger rules.
Commands
Subscribe to your command topic. When a command arrives, do the work, then reply on the response topic with {"status": "ok"} or {"status": "failed", "reason": "…"}. The command moves from queued → sent → acked (or failed). See Send commands.
Device examples
- ESP32 (Arduino or ESP-IDF): use the MQTT client with TLS; load the root CA, device certificate and key from flash. Keep the clock right (SNTP) so certificate checks pass.
- Linux devices: any MQTT library works (Paho for Python, C or Java;
mosquitto_pubfor quick tests).
mosquitto_pub -h <your-endpoint> -p 8883 --cafile root-ca.pem --cert dev.pem --key dev.key \
-i store-hyd-01-freezer-1 -t tic/things/store-hyd-01-freezer-1/telemetry -m '{"temperature": -19.4}' -q 1
Was this page helpful?
Can't find what you need? Contact support or read about ThingsX IoT Core.