SiteWise ingestion rules coming from IoT Core

0

I have some devices that are three channel power monitors. I created a model that has separate measurements for rms0, rms1, and rms2. When I send them in, the format is JSON more or less like this:

{ measurement: "power_meter", timestamp: 1634185751589, fields: { rms0: 0.024, rms1: 0.025, rms2: 0.037 }, tags: { mac: "0102030405060708" }

I decided to push them in via IOT Core mostly because of the elasticity.

I am creating a rule to push these streams in, but I'm not clear on something. All three streams - rms0, rms1, rms2 - are part of a single Model. In the IoT rule configuration it says

Select a property ID from an asset model in AWS IoT SiteWise so my rule writes three different properties. All three have timestamp ${ts} and they each write a separate property with a value like ${fields.rms0}. I think (please correct me if I'm wrong) this means three separate API calls to IoT SiteWise meaning three times the cost (true?)

If all that is correct, then my question is this: within the action you can add "entries" (which I think really means "properties") and within each "entry" you can add "rows."

Why would I add multiple "rows" to the same property? Is this for a case where the incoming message has multiple samples with multiple timestamps in it, rather than one "row" at a time?

profile picture
wz2b
질문됨 2년 전492회 조회
1개 답변
0

The IoT SiteWise rule action maps very directly to the BatchPutAssetPropertyValue API: https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchPutAssetPropertyValue.html . So it is a single API call even if you have multiple entries and/or multiple rows (property values) per entry in that rule action. Up to 10 entries.

https://docs.aws.amazon.com/iot/latest/developerguide/iotsitewise-rule-action.html

When you send data to AWS IoT SiteWise with this action, your data must meet the requirements of the BatchPutAssetPropertyValue operation. For more information, see BatchPutAssetPropertyValue in the AWS IoT SiteWise API Reference.

It doesn't have to be the case that each sample in the message has a unique timestamp. They may or may not. It all depends on how your sensor data is collected and sent. If you have multiple values all with one timestamp, that's fine too.

profile pictureAWS
전문가
Greg_B
답변함 2년 전

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

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

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

관련 콘텐츠