Commit Graph

11 Commits

Author SHA1 Message Date
tsightler
670a87e9fb Use devices.json for discovery
* Usese devices.json from "tuya-cli wizard" for device discovery, no topic config required
* Uses device discovery by default, but can manually edit devices.json to add IP address, protocol version, or change
* Creates short topic name using just "friendly name" or "id".
2020-09-21 00:23:31 -04:00
tsightler
01fd5abcff Merge branch 'dev' into master 2020-09-17 20:41:12 -04:00
tsightler
279590eb71 Support for manual protocol 3.3
Add support to explisitly set protocol version.
2019-06-22 23:31:38 -04:00
tsightler
3b72a000c8 tuyapi 5.1.x and protocol 3.3
Initial update to work with tuyapi 5.1.x and support for Tuya protocol ver 3.3 via device discovery.
2019-06-18 22:32:18 -04:00
GadgetAngel
61433e74a9 This update allows for an essential TuyAPI command to be implemented via the tuya-mqtt.exe MQTT server. {"schema": true} is the ONLY COMMAND that the TuyAPI GET method implements.
{"schema": true} allows the user to establish that proper communications with the tuya device can occur WITHOUT actually changing the present STATE of the device.  This is the only command that will query the tuya device.

The current documentation says that you can query the tuya device over the "dps" TOPIC but from what I see the present state of the software does not force the tuya device to respond when using the "dps" TOPIC.

Since {"schema": true} is a command that forces a response from the tuya device, this command has been implemented under the "command" TOPIC. So "command" is the action and '{"schema": true}' becomes the command.  The response is returned just like all other commands.  I, use this command to guarantee communications has been established with the tuya device.  If this "schema" command fails, tuya-mqtt will indicate the result in the openhab.log file and then I, can find out what is physically wrong with the communications.  If this command fails the first time due to "socket" error and then goes through on the second attempt then I know that the error was due to TCP communications problem on initial startup.  This command helps as a work-a-round for the "ERROR: socket problem"
2019-04-20 09:29:01 -04:00
KarstenSiedentopp
cfefbabe90 ADD: support to toggle device state 2019-04-09 19:23:15 +02:00
KarstenSiedentopp
18ebcbdd74 MOD: remove device type from topic if not set 2019-04-08 18:14:45 +02:00
KarstenSiedentopp
86e602d6cf ADD: capability to set multiple dps values 2019-04-08 17:09:59 +02:00
KarstenSiedentopp
dd2385f6e2 updated TuyAPI to v 4.x 2019-02-20 22:25:28 +01:00
KarstenSiedentopp
9f6b350a17 removed custom set function 2019-02-09 17:24:24 +01:00
KarstenSiedentopp
debe4968d2 updated mqtt script to event based TuyAPI 2018-10-27 18:31:49 +02:00