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.

질문됨 일 년 전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
전문가
답변함 일 년 전
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠