uniquejava / blog

My notes regarding the vibrating frontend :boom and the plain old java :rofl.
Creative Commons Zero v1.0 Universal
11 stars 5 forks source link

IoT and MQTT #216

Open uniquejava opened 6 years ago

uniquejava commented 6 years ago

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.

“Any application that can be written in JavaScript, will eventually be written in JavaScript.” -Jeff Atwood @codinghorror, Founder of StackOverflow

matteo1

matteo6

mqtt3_small

mqtt2_small

Watson IoT

watson iotp

About Watson IoT Platform

Node.js for device developers

References

  1. How to Build an High Availability MQTT Cluster for the Internet of Things - Create a scalable MQTT infrastructure using Node.js, Redis, HAProxy and nscale to make the deployment phase a piece of cake
uniquejava commented 6 years ago

Watson IoTP

名词释义: organization (不同于ibm cloud org) device managed devices, unmanaged devices. gateways applications events commands

mqtt的两个实现mosquitto和paho

... https://www.eclipse.org/paho/downloads.php

misc

Publishing to Mosquitto with Python, Node.js, and Java

什么时候用mqtt什么时候用http

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.

怎么不注册device快速验证连通性? (不需要Security)

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连接Watson IoTP

MQTT connectivity for devices 所有的device有相同的用户名use-token-auth, 用密码来区分不同的device. 密码是在注册device时提供的.

Events的格式

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

Payload大小限制

不得超过131072 bytes