Query Device Properties in Bulk

Discussing technical aspects of Yun development products, including IoT Core and other cloud service APIs, data analysis products, etc.


Post Reply
andrewj
Posts: 2

Hi,
I'm developing an application to provide an overview of domestic IoT devices. It's based on the IoT Core APIs, in particular "Query Properties": /v2.0/cloud/thing/{device_id}/shadow/properties.

My code works fine, but every time I refresh the display (once or twice a minute) I have to make separate call to "properties" for each device in turn. This "chatty" interface increases network and server load, and is relatively slow because I have to throttle my client code to avoid breaching call rate limits (I have over 50 devices).

Is there a bulk query API which includes the properties (not just the "device details")? If not, is there any way to bundle properties queries for multiple devices into a single API call, or make multiple API calls in one exchange with the server?

Thanks
Andrew

JamesG
Posts: 67

Re: Query Device Properties in Bulk

hi,

You can refer to this document to access device-reported messages for processing your logic. This way, you can receive device-reported data in real time without calling APIs.

https://developer.tuya.com/en/docs/iot/ ... qcfr4k67n9

andrewj
Posts: 2

Re: Query Device Properties in Bulk

Hi,
The message queue looks like a good solution for me, and is similar in concept to solutions I've developed in other environments.

However I'm falling at the first fence, because I can't find out how to enable the Message Service. I've tried following the instructions in https://developer.tuya.com/en/docs/iot/ ... qcrvckbh9h, but that says "In the left-side navigation bar, click Cloud > Message Service" and that doesn't exist. I've looked everywhere, and I can't find a base location in the Developer Platform for either "Message Service" or "Message Queue".

I did wonder if it's enabled by default, but I've tried the Pulsar C# code with my existing keys and I'm getting an odd authentication error which suggests that it's not enabled so far.

Please can someone tell me how to find the config for the Message Service?

Thanks

Post Reply