# IoT 資料搜集 ## tuya https://developer.tuya.com/en/docs/iot/Data-Parsing?id=Kb4qgsj9g1duj https://developer.tuya.com/en/docs/iot/remote_config?id=Kbrxvzug63axu ## Tuya MQTT Standard Protocol https://developer.tuya.com/en/docs/iot/MQTT-protocol?id=Kb65nphxrj8f1 Gateway sub-device ![image](https://hackmd.io/_uploads/HkJo_4LF0.png) How MQTT works ![image](https://hackmd.io/_uploads/Hk6sOV8FC.png) ## Support for MQTT Quality of Service (QoS) in MQTT messaging is an agreement between the sender and the receiver on the guarantee of delivering a message. There are three levels of QoS, namely QoS 0, QoS 1, and QoS 2. Only QoS 0 and QoS 1 are supported. ::: success | Quality of service (QoS) | Description | Support | | -------- | -------- | -------- | | QoS 0 | The message is delivered at most once. The message might be lost if the client is disconnected. | Yes | |:+1: QoS 1 (Recommended) | The message is always delivered at least once.| Yes | | QoS 2| The message is always delivered exactly once. | No | ::: There are three MQTT versions, MQTT 3.1, MQTT 3.1.1, and MQTT 5. MQTT 3.1.1 is widely used in IoT environments. Tuya Developer Platform supports MQTT 3.1.1 only. ## Matter 協議規範的完整打字稿實作 (https://buildwithmatter.com)。 包括對控制器、設備、調試、安全通訊、設備類型和叢集定義的全面支援。 https://github.com/project-chip/matter.js/ ## youtube 【Matter】Tuya Matter 001 #iot #matter #tuya https://www.youtube.com/watch?v=VN-9L1AeqzE ## BluetoothManager bluetooth/BluetoothManager.kt https://github.com/project-chip/connectedhomeip/blob/master/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/bluetooth/BluetoothManager.kt