Open uniquejava opened 6 years ago
名词释义: organization (不同于ibm cloud org) device managed devices, unmanaged devices. gateways applications events commands
... https://www.eclipse.org/paho/downloads.php
Publishing to Mosquitto with Python, Node.js, and Java
You can connect your device to Watson IoT Platform by using MQTT or HTTP protocols. Use MQTT if you want to configure an event scenario, such as when someone rings a doorbell and causes an alert to be triggered in a mobile device, or if you want to send a large number of events. Use HTTP if you want to configure request-response scenario, such as when someone makes a purchase and receives an acknowledgement.
A device must be registered with an organization before it can connect to the Watson IoT Platform. ... If you want to connect your device without registering it, for example to run a proof of concept, you can do so by using the special organization ID QuickStart. QuickStart is a public sandbox instance of Watson IoT Platform that runs in the cloud. If you do not need to connect securely, you can use QuickStart to test your device connectivity and experiment with Watson IoT Platform. When you have finished experimenting, reconnect your device securely to your own specific organization ID instance by using TLS and your authentication token.
MQTT connectivity for devices
所有的device有相同的用户名use-token-auth
, 用密码来区分不同的device. 密码是在注册device时提供的.
topic的格式: iot-2/evt/event_id/fmt/format_string
event_id比如status, format_string比如json
command的格式:
iot-2/cmd/command_id/fmt/format_string
command_id比如update, format_string比如json
不得超过131072 bytes
An IoT system is an application that collects data from the real world, usually through sensors, and transforms the data into insights for its users. Humans are in control; we are in charge of communicating our desires to the system, which converts our desires into
commands for actuators in the real world.
Watson IoT
About Watson IoT Platform
Node.js for device developers
References