AWS IoT Twin Maker - read data from Entities

0

Am new to IoT Twin Maker. I have an entity that has a component with properties humidity and temperature. Am able to test this component and am getting results successfully. I need to write a Lambda function that will ready this JSON, do a formatting and expose the JSON via REST API. What steps should I follow? Any sample code would help.

I tried creating a lambda function as

response = client.get_property_value( componentName='string', componentTypeId='string', entityId='string', selectedProperties=[ 'string', ], workspaceId='string' )

Am getting the error "An error occurred (ValidationException) when calling the GetPropertyValue operation: No attributePropertyValueReaderByEntity connector defined for a query within entity : <<entityID>> Am sure am missing something, please guide.

已提问 1 年前356 查看次数
2 回答
0

Hi,

it seems that the connector you are using does not support get_property_value. You can try if get_property_value_history is working. Not every connector supports necessarily both methods.

Cheers,
Philipp

AWS
专家
已回答 1 年前
0

You may also need to check your component type model: for GetPropertyValue on properties marked as "isStoredExternally": true you should have an attributePropertyValueReaderByEntity definition under the functions in your component type (e.g. instead of "dataReader" in this example)

The lambda function used to implement the above reader should follow this request/response interface: docs

AWS
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则