By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS IoT SiteWise

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Automate SiteWise Asset Property Alias

Hi There I'm looking for perhaps the missing link in how to automatically change asset properties within SiteWise? This must be a common Sitewise requirement for the manufacturing industry? Yet the whole CLI workflow requesting asset ID, then parsing properties and then responding seems quite complicated for widespread use. Even if forced to communicate with a server on per device, rather than a global configuration export/import; I'd still expect something as simple as: *"aws iotsitewise {Asset**Name**}.{Property**Name**}.Alias = {GiveAliasString}"* Currently, it seams like I have to do the following: 1. Search for all existing SiteWise Assets 2. Search that JSON response for the human name of the Sitewise asset. 3. Get AssetID that "owns" the assetName found in that JSON response 4. Query server again using AssetID and get another JSON description of that particular Sitewise asset 5. Search JSON response for parameter/metric of interest 6. Get PropertryID from JSON response 7. Finally use property ID to update alias string I'd imagine 90% of SiteWises development is given to automation engineers. Yet based on assumed workflow, the response from 99% of them, myself included response would be to go find someone else... There must be a better way I haven't found? Creating assets is easy enough, single CLI command; but some assets might have 20+ properties, and a normal project probably has 100+ assets. The console isn't practical for real project.
2
answers
0
votes
44
views
asked 3 months ago

Simple IoT Core thing rule and SiteWise property alias ingestion config

Hi, I am seeking some basic plain english assistance please. Any assistance will be great appreciated. I have a temperature sensor Thing receiving MQTT data. * The Things name is: TestThing * The data includes 4 fields: "TS", "datetime", "class", "data" * The published Topic is: TestTopic * The IoT Core MQTT Test Client payload displays as: {"TS": 1656941515, "datetime": 04/07/2022 23:31:55, "class": Temperature, "data": 11} I do not know how to fill out the IoT Core rule correctly, and I am also not sure if the SiteWise Asset propertyAlias is correct. Based on what i have read (see below), the latest failure is: **IoT Core Rule config UI** * SQL Statement: SELECT * FROM 'TestTopic' * Property Alias: TestTopic * Time in seconds: ${TS} * Data type: DOUBLE * Value: ${data} * IAM role: created via the UI - create new role I have used Data type: DOUBLE although i note the incoming data is seen within IoT Analytics as integer. The SiteWise model Measurement definitions is also set to DOUBLE **SiteWise config** * Model Measurement definitions: Temperature * Asset Measurement: Temperature * Asset Measurement - Temperature field (enter a property alias): TestTopic I believe i have created the model and asset correctly. Although, I am not sure if i understand the what exactly is the Property, and thus the propertyAlias. based on the above, I believe i created the propertyAlias for the Temperature field as: TestTopic **Setup and read history** The setup is super simple for testing. A single IoT thing, pulling in MQTT topic data. The Thing was created as a single Thing with certificates. A MODBUS sensor connected to a gateway with MQTT. No OPC server, no Greengrass, no Lora. IoT Analytics and AWS QuickSight services can access the data. I have read: 1) all the AWS suggested questions, 2) the manual - docs pages on SiteWise IoT Core data ingestion, including the tutorial section, 3) the AWS workshop pages, 4) watch every wonderful Youtube on the topic (not many). Key articles read: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/ingest-data-from-iot-things.html https://docs.aws.amazon.com/iot/latest/developerguide/iotsitewise-rule-action.html https://docs.aws.amazon.com/iot-sitewise/latest/userguide/connect-data-streams.html https://docs.aws.amazon.com/iot-sitewise/latest/userguide/iot-rules.html https://iot-sitewise.workshop.aws/en/40_aws-iot-sitewise-data-ingestion.html https://repost.aws/tags/TAGaSyCvg-SI2w6FYqm1H2RQ/aws-io-t-site-wise
2
answers
0
votes
61
views
asked 3 months ago

Measuraments not reported in Iot SiteWise

Hi, I have followed the tutorial [here](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/ingest-data-from-iot-things.html). I can see my data in IoT core, but the measurement are not reported in IoT SiteWise. There seem to be a permission problem. This is the error from the error rule ``` { "ruleName": "SiteWiseTutorialDeviceRule", "topic": "$aws/things/SiteWiseTutorialDevice1/shadow/update/accepted", "cloudwatchTraceId": "e3aec656-d5d7-b500-5558-d51ae7aee895", "clientId": "N/A", "base64OriginalPayload": "eyJzdGF0ZSI6eyJyZXBvcnRlZCI6eyJ0ZW1wZXJhdHVyZSI6MTAuMSwiaHVtaWRpdHkiOjY0LjIsInRpbWVzdGFtcCI6MS42NTU3OTk2MjQ0NTczODFFOX19LCJtZXRhZGF0YSI6eyJyZXBvcnRlZCI6eyJ0ZW1wZXJhdHVyZSI6eyJ0aW1lc3RhbXAiOjE2NTU3OTk2MjR9LCJodW1pZGl0eSI6eyJ0aW1lc3RhbXAiOjE2NTU3OTk2MjR9LCJ0aW1lc3RhbXAiOnsidGltZXN0YW1wIjoxNjU1Nzk5NjI0fX19LCJ2ZXJzaW9uIjo5NjAsInRpbWVzdGFtcCI6MTY1NTc5OTYyNCwiY2xpZW50VG9rZW4iOiIyYzU2Zjg1NC0zM2IzLTQzNmQtYjJjZC1kMzk2ZmZkNTYxMGYifQ==", "failures": [ { "failedAction": "IotSiteWiseAction", "failedResource": "", "errorMessage": "Failed to send message data to IoT SiteWise asset properties. [Code: AccessDeniedException, Message: User: arn:aws:sts::908401988620:assumed-role/SiteWiseTutorialDeviceRuleRole/9SUxG6SG is not authorized to perform: iotsitewise:BatchPutAssetPropertyValue on resource: /tutorial/device/SiteWiseTutorialDevice1/temperature because no identity-based policy allows the iotsitewise:BatchPutAssetPropertyValue action]. Message arrived on: $aws/things/SiteWiseTutorialDevice1/shadow/update/accepted, Action: iotSiteWise" } ] } ``` Any suggestion?
1
answers
0
votes
56
views
asked 3 months ago