Can't send DP reports to cloud

Panel mini-program development related product technical discussions, including panel mini-programs, intelligent mini-programs, React Native, Ray cross-platform framework, Panel SDK, WeChat mini-programs, mini-program development tools (IDE), and other related development technologies.


Post Reply
Gregor
Posts: 2

Hi to everybody,

I'm struggling with one problem. I'm using miniapp IDE, SmartLife and custom hardware board based on ESP32 (code base on tuya-iot-core-sdk). At this moment I can send data (though Tuya cloud) from device to miniapp. I can run default app (created by Tuya during bonding device to SmartLife) and send data from SmartLife to my device. But I can't send data from my miniapp to device. All the time I getting message:
SyntaxError: Uncaught (in promise) {"errorCode":20028,"errorMsg":"Publish Dps error","innerError":{"errorCode":"11001"}}

I build also example from tuya-ray-demo (panel-universal) which importing DP schema by own self, so I don't made any changed inside, but also this example can't send MQTT reports to cloud (list of DP was imported correctly).

I'm sure that, I'm making some silly mistake, but I don't know where. This is not any firewall and internet connection problem because default app on SmartLife works well, so error must be inside my miniapp.

I will be appreciated, if somebody can give me some clues, where I should search error. Or maybe there is available source code for that default app created during bonding.

Thank you in advance for help,
best regards,
Gregor

SmartLife 6.8.5
Tuya MiniApp IDE version information: 0.9.2 minipack 3.3.5
App application version information: 1.0.0
The versions of @ray-js/ray: 1.7.24
@ray-js/panel-sdk: 1.13.1
Mobile device information: Android 13

xuanyi
Posts: 149
Location: 涂鸦玄一

Re: Can't send DP reports to cloud

Hello,
There is some differences between IDE and App, may be the communication protocol has not been supported in the IDE. So that`s not a problem with your code. Please provide your product id to facilitate our investigation of the cause. And during this period, it is recommended to first use the real machine debugging function for the dp publish function. By the way, can your IDE receive dp notivication from your hardware or App ? This is important for us to find out the cause of the bug.

Thanks for your information.

Tuya Developer

Gregor
Posts: 2

Re: Can't send DP reports to cloud

Hi xuanyi,

my PID is: mjuooytpriwkfqy9, device: 26e62490f97f7c01ccoecn. Yes, during my investigation I mostly use debugging on my phone (Remote debugger 2.0, scan QR, test on phone).
About my IDE. I set my device to send every 2 sec. report with new bool value of "parental_lock" (true false true ...)

  • clicking on visualisation of my panel on IDE, is not sendind data to my device, but on Device Tools->Device Control->Message Log there are info like "Publish Data {"parental_lock":true}"
  • Device Tools->Device Control->Control Panel is locked. I see all my DP, but they are locked for edit,
  • Device Tools->Device Control->Virtual Panel, when I click i.e. on "dp_parental_lock" then button is switched, but on log I see "Publish Data{"parental_lock":true} Fail"
  • Device Tools->Device Log. There is information about received reports from my device (source: device itself) every 2 sec, so this is OK
  • App loaded on SmartLife app (in debugging mode 2.0) receive DP reports from device. Button "parental_lock" every 2 sec change it own state (OFF ON OFF ...). But when I clik on it, then report isn't send to device and on tuya-ark-ide->console I see error which I wrote in previous post.
  • when I turn off device, then after few seconds on IDE, my visualisation panel is locked with window with message: Offline Device Check the following items .....)

best regards,
Gregor

xuanyi
Posts: 149
Location: 涂鸦玄一

Re: Can't send DP reports to cloud

Hi, Gregor

The product is based on tuyalink protocol, you shoud use thing model to control your device. And you can take a look at those documents first:

Concept of Thing Model:
https://developer.tuya.com/en/docs/app- ... ktvho94imr

APIs:
https://developer.tuya.com/en/miniapp/d ... ThingModel

Demo:

https://github.com/Tuya-Community/tuya- ... r/rayThing

Post Reply