Skip to content

GUI operation for TUYA devices

Volker Hänsel edited this page Nov 4, 2023 · 6 revisions

When opening the 'Tuya Devices' page, the status shall show the monitoring status, the number of currently monitored devices and if the cloud API has been configured.

The 'Scanned Network Devices' lists all devices, actively broadcasting in the network. With the "+" sign, the individual device can be taken to the "Add/Edit section" to get it continously monitored.

Adding devices to the connection list

LocalTuya mode

  • requires Address/IP, Device ID, LocalKey to be configured
    • for the LocalKey see FAQ
  • specify the Polling Intervall,how often den DPs from the device shall be read and puiblished to the MQTT broker

Name

Specify a clear text name in the MQTT publish, otherwise the device ID is used.

Protocol Version

The settings shall be set to V3.3 for most of the devices

Device Type 0A/0D

read also here There exists different versions of devices, most of the devices (traditional?) shall be type 0A. If the device test says error "json data unvalid", most likely this is a 0D device.

Unfortunately for this devices the DP (datapoints) need to be specified manually in the DP list. The DP 1 is a mandatory for all devices.

Identify DPs (needed for 0D devices)

This functions reads all available DPs from the device. If a cloud access is configured, the data is read from the TUYA API.

This function also can be used to reduce the DP items, read from the device. It would act as a filter, e.g. only read DP=1 for a switch if the power consumptions are not needed to be published. The list can be separated by "," ":" ";" or

An empty list means all DPs are to be read. (except for 0D devices)

Get From Tuya API

Use the cloud API to determine this item value.

Cloud mode

  • this option requires the Cloud Api credentials filled in and be valided

With the Cloud mode, the DP are read through the cloud API. This is can be useful if the LocalTuya may not supoort the device. For example, battery driven sensors do not open a local port and could not be read through the localTuya implementation.

In this mode, the local device IP, LocalKey, ProtocolVersion and Device-Type are not needed. Those fields are grayed out.

Save settings

click the button

The data is saved in the docker container as /app/DataDir/MQTTsettings.json

Connected Devices

Lists the currently monitored devices. Expand the list to see the current data items for this device.

In case there is no expansion possible, there seems to be a connection problem and the device cannot be read. In this case, click the "change device settings" button and try the 'Test connection' in the 'Add/Change Connected Device' section.