Readings not updating in Tuya app

Wi-Fi devices, Wi-Fi low power devices, Wi-Fi BLE dual-mode devices, Ethernet devices, Ethernet+Wi-Fi devices and so on.


Post Reply
intelligadgets
Posts: 7

Hello,
I created a product using Arduino Pro Mini and Tuya WRB3 WiFi and Bluetooth module..
Imam using BME680 environmental sensor.
I am able to add the device in Tuya app and when I add it, I can see all the readings in the Custom Console which I created.
However, the readings are not getting updated.
I used the Tuya Debugging Assistant software and found that I am getting the readings only once.
Please see attached image Image

I have the below in my code already

Code: Select all

void dp_update_all(void)
{
  // Update all DPs with current LED state
  my_device.mcu_dp_update(DPID_BME680_Hum, humidity, 1);
  my_device.mcu_dp_update(DPID_BME680_Temp, temperature, 1);
  my_device.mcu_dp_update(DPID_BME680_Press, atmpress, 1);
  my_device.mcu_dp_update(DPID_BME680_Gas, voc, 1);
  // Update other DPs as needed
}

Any clue what could be wrong?

User avatar
chenyisong
Posts: 96

Re: Readings not updating in Tuya app

The dp_update_all() function is only used to report all dp data after the device is powered on again. To report other data, call the my_device.mcu_dp_update() function at the required location.

intelligadgets
Posts: 7

Re: Readings not updating in Tuya app

Thank you..
I added the below in loop and the readings are getting updated in the Tuya Debugging Assistant software..

Code: Select all

temperature = bme.readTemperature();
    humidity = bme.readHumidity();
    atmpress = bme.readPressure()/100;
    voc = bme.readGas()/1000;
    my_device.mcu_dp_update(DPID_BME680_Temp, temperature, 1);
    my_device.mcu_dp_update(DPID_BME680_Hum, humidity, 1);
    my_device.mcu_dp_update(DPID_BME680_Press, atmpress, 1);
    my_device.mcu_dp_update(DPID_BME680_Gas, voc, 1);  

But it is not getting updated in the app..
any idea what could be wrong?

yangjie
Posts: 191

Re: Readings not updating in Tuya app

You can only report when the report value has changed by calling the mcu_dp_update interface. You also need to ensure that the size of the data you report is within the range set on the tuya iot platform. You can print out the reported data and have a look at it.

intelligadgets
Posts: 7

Re: Readings not updating in Tuya app

Thanks for your response..
Is there any link or document where I can find more details about data size in reporting and settings in tuya iot platform?

yangjie
Posts: 191

Re: Readings not updating in Tuya app

Open the product you want to develop:

PixPin_2024-02-19_11-38-19.png

click edit:

PixPin_2024-02-19_11-38-40.png

This means: -100.0 to 100.0.

Post Reply