-
Hi, I got tuya_mqtt.net successfully integrated in my FHEM system. Or to be precise: I manage to get the readings in but I seem not be able to control the tuya devices via MQTT. Here I have the question, how the topic needs to be structured in order to successfully send a command to tuya_mqtt.net and the device. I could not find any documentation. Secondly, the topics coming in are a bit cryptic. DS20/DS21/DSXX - is there a list somewhere which function/info is behind these codes? E.g. DS20 = state of power / switch, TS = time stamp, ... Such a list would be super helpful in order to have meaningful readings in the home automation server. Sorry if this is a basic/stupid question but I searched the web and managed not to find anything useful in this regard. Cheers and a great weekend! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
First, there is no kind of templates to translate the raw data to a kind of device type. The data to the MQTT broker is the pure DPx where the 'x' is a number 1..128 . each TUYA device can publish any number of datapoints with any meaning. This needs to be figured out by trial & error. or when having access to the cloud api - the descriptions can be read there. |
Beta Was this translation helpful? Give feedback.
-
About controlling the individual datapoints, if they are controllable is device dependent. you can try to write, but if the device does not like be controlled at that datapoint - nothing can be done against that. example, you have a device publishing MQTT items to note: DP1 exists on all devices and this also is the controllable input. ... posting a logfile from tuya_mqtt.net may be helpful to discuss any device specific options |
Beta Was this translation helpful? Give feedback.
-
as an example: a device bfcac4e409bb624cc7w9hq is connected and publishes the following DP items to identify what's what meaning - you can login to the TUYA IOT Explorer The json may give some hints what the item meaning could be.
|
Beta Was this translation helpful? Give feedback.
-
added Wiki page |
Beta Was this translation helpful? Give feedback.
About controlling the individual datapoints, if they are controllable is device dependent. you can try to write, but if the device does not like be controlled at that datapoint - nothing can be done against that.
example, you have a device publishing MQTT items to
tuya/bfcac4e409bb624cc7w9hq/DP1
by publishing data to the itemtuya/bfcac4e409bb624cc7w9hq/DP1/command
values can be set and written.note: DP1 exists on all devices and this also is the controllable input.
... posting a logfile from tuya_mqtt.net may be helpful to discuss any device specific options