From 868b0977b01165c90798ffb688346530ff8604ba Mon Sep 17 00:00:00 2001 From: tsightler Date: Thu, 17 Sep 2020 21:47:21 -0400 Subject: [PATCH] Update README.md --- README.md | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index a96028a..6708093 100644 --- a/README.md +++ b/README.md @@ -63,34 +63,11 @@ If discovery will not work for your case you can still use the IP address, but, tuya/ver3.3//////command ``` -Change device state (by topic): - tuya////command/ - - Example: - - tuya////command/on - - tuya////command/off - - tuya////command/ON - - tuya////command/OFF - - tuya////command/1 - - tuya////command/0 - - tuya////command/toggle - - tuya////command/TOGGLE - - tuya////command/{ "dps": 1, "set": true } - - tuya////command/{ "dps": 7, "set": true } - - tuya////command/{ "multiple": true, "data": { "1": true, "7": true } } - - tuya////command/{ "schema": true } - - tuya////command/{ "multiple": true, "data": { "1": true, "2": "scene_4" } } - - tuya////command/{ "multiple": true, "data": - { "1": true, "2": "scene", "6": "c479000025ffc3" } } - -Change device state (by payload) -Use with OpenHAB 2.X MQTT bindings or others where only a single command topic is preferred: -NOTE: notice that nothing follows the word command, DO NOT but a "/" in after command. - +Command topic to change device state tuya////command - Example: - "ON" + Example MQTT message payload for basic command (assumes DPS 1 is "on/off" control): + "ON" "OFF" "on" "off" @@ -98,6 +75,8 @@ NOTE: notice that nothing follows the word command, DO NOT but a "/" in after co "0" "toggle" "TOGGLE" + + Example MQTT message payload for advanced commands (set any DPS value): "{ \"dps\": 1, \"set\": true }" "{ \"dps\": 7, \"set\": true }" "{ \"multiple\": true, \"data\": { \"1\": true, \"7\": true } }" @@ -105,15 +84,15 @@ NOTE: notice that nothing follows the word command, DO NOT but a "/" in after co "{ \"multiple\": true, \"data\": { \"1\": true, \"2\": \"scene_4\" } }" "{ \"multiple\": true, \"data\": { \"1\": true, \"2\": \"scene\", \"6\": \"c479000025ffc3\" } }" -Change color of lightbulb (payload as HSB-Color) +Command topic for color change of lightbulb tuya////color - Example: + Example MQTT message payload: 64,0,100 0,0,89 ``` -### MQTT Topic's (read data) +### MQTT State Topic's (get device data) ``` Current device state (allways DPS[1]-Value): tuya////state