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

Internet of Things

There are billions of devices in homes, factories, oil wells, hospitals, cars, and thousands of other places. With the proliferation of devices, you increasingly need solutions to connect them, and collect, store, and analyze device data.

Recent questions

see all
1/18

StartCallAnalyticsJob : User is not authorized to access this resource

Hi everybody, I wanna ask you about AWS Transcribe Analytics Call. API is well with AWS Transcribe but I need also sentiment Analysis, so I try to use AWS Transcribe Analytics. There is my code : ``` from __future__ import print_function import time import boto3 transcribe = boto3.client('transcribe', 'us-east-1') job_name = "my-first-call-analytics-job" job_uri = "PATH_S3_TO_WAV_WHO_HAD_WORD_FOR_AWS_TRANSCRIBE" output_location = "PATH_TO_CREATED_FOLDER" data_access_role = "arn:aws:s3:::MY_BUCKET_NAME_WHERE_WAV_FILES" transcribe.start_call_analytics_job( CallAnalyticsJobName = job_name, Media = { 'MediaFileUri': job_uri }, DataAccessRoleArn = data_access_role, OutputLocation = output_location, ChannelDefinitions = [ { 'ChannelId': 0, 'ParticipantRole': 'AGENT' }, { 'ChannelId': 1, 'ParticipantRole': 'CUSTOMER' } ] ) while True: status = transcribe.get_call_analytics_job(CallAnalyticsJobName = job_name) if status['CallAnalyticsJob']['CallAnalyticsJobStatus'] in ['COMPLETED', 'FAILED']: break print("Not ready yet...") time.sleep(5) print(status) ``` I had done aws configure and I use a IAM user who have AdministratorAccess. > **botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the StartCallAnalyticsJob operation: User: MY_ARN_USER is not authorized to access this resource** Any help please ? Thank you very much!
0
answers
0
votes
4
views
asked 14 hours ago

Old data not inserted into Timestream: RejectedRecordsException

Hello! We have an IoT Core Rule which is fired when a MQTT message is published to certain topic. The message structure is: ``` { "triggers": ["door"], "datetime": "2022-06-01T00:00:00Z", "errCodes": [100], "strength": 107, "net": "GMS", "eco": 0, "light": 0, "def": 0, "fan": 0, "defrost": 1, "Mdef": 0, "comp": 0, "door": 0, "Tcond": 38.1, "Tevap": 1, "Tint": 3.8, "topic": "abc/ar/data/NVC1/test-vscode-3" } ``` We have a requirement where data buffered in remote devices could be sent to IoT Core, so we need to send a "datetime" field (the second one) in the payload. The Iot Core Rule fires a AWS Lambda function, which generates a multi-measure record to be finally sent to Timestream: ``` { "Dimensions":[ { "Name":"hw_model", "Value":"NVC1" }, { "Name":"serial_device", "Value":"test-vscode-3" } ], "MeasureName":"multimeasuredata", "MeasureValueType":"MULTI", "MeasureValues":[ { "Name":"Tint", "Value":"3.8", "Type":"DOUBLE" }, { "Name":"Tevap", "Value":"1", "Type":"DOUBLE" } ], "Time":"1654041600000" } ``` The Timestream table retention periods are: Memory store retention: 45 days Magnetic store retention: 180 days Magnetic store writes: ENABLED The exception thrown is: ``` { "errorType":"RejectedRecordsException", "errorMessage":"One or more records have been rejected. See RejectedRecords for details.", "name":"RejectedRecordsException", "$fault":"client", "$metadata":{ "httpStatusCode":419, "requestId":"VKL72WIIMCBGQNWMMSQLK7CAAQ", "attempts":1, "totalRetryDelay":0 }, "RejectedRecords":[ { "Reason":"The record timestamp is outside the time range [2022-06-17T15:21:13.756Z, 2022-06-27T22:51:04.174Z) of the data ingestion window.", "RecordIndex":0 } ], "__type":"com.amazonaws.timestream.v20181101#RejectedRecordsException", "message":"One or more records have been rejected. See RejectedRecords for details.", "stack":[ "RejectedRecordsException: One or more records have been rejected. See RejectedRecords for details.", " at deserializeAws_json1_0RejectedRecordsExceptionResponse (/var/task/node_modules/@aws-sdk/client-timestream-write/dist-cjs/protocols/Aws_json1_0.js:947:23)", " at deserializeAws_json1_0WriteRecordsCommandError (/var/task/node_modules/@aws-sdk/client-timestream-write/dist-cjs/protocols/Aws_json1_0.js:888:25)", " at processTicksAndRejections (node:internal/process/task_queues:96:5)", " at async /var/task/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24", " at async /var/task/node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:11:20", " at async StandardRetryStrategy.retry (/var/task/node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:51:46)", " at async /var/task/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:6:22", " at async Runtime.exports.handler (/var/task/lambda.js:58:20)" ] } ``` We are not falling out the memory retention period (45 days) in this example (27 days), but the range returned in the exception is (IDK why) [2022-06-17T15:21:13.756Z, 2022-06-27T22:51:04.174Z) Do you have any ideas of why this is the range and hence why the record cannot be inserted? Thanks !
1
answers
0
votes
27
views
asked a day ago

Using AWS basic Station, found TX power to be 0.0dBm EIRP

After my test, the power of TX will be 12dBm, the lowest power of SX1301, Generally, transmission power is a parameter that is controlled by the LNS. I guess there is a server configuration problem or there is a problem with my configuration file, Am I missing something important? ``` 2022-06-22 01:57:17.532 [S2E:INFO] TX ::0 diid=39028 [ant#0] - on air: 925.7MHz 0.0dBm ant#0(0) DR10 SF10/BW500 frame=20309C905190DF9AD2E59C5E..DE87E47C ``` Check out this link for testing information: https://github.com/lorabasics/basicstation/issues/161 Or is there any other relevant information I can continue to provide, station.conf ``` { /* If slaave-X.conf present this acts as default settings */ "SX1301_conf": { /* Actual channel plan is controlled by server */ "lorawan_public": true, /* is default */ "clksrc": 1, /* radio_1 provides clock to concentrator */ /* path to the SPI device, un-comment if not specified on the command line e.g., RADIODEV=/dev/spidev0.0 */ "device": "/dev/spidev1.0", /* freq/enable provided by LNS - only HW specific settings listed here */ "radio_0": { "type": "SX1257", "rssi_offset": -166.0, "tx_enable": true, "antenna_gain": 0 }, "radio_1": { "type": "SX1257", "rssi_offset": -166.0, "tx_enable": false } /* chan_multiSF_X, chan_Lora_std, chan_FSK provided by LNS */ }, "station_conf": { "routerid":"a84041ffff1eeb34", "radio_init": "rinit.sh", "RADIO_INIT_WAIT": "5s", "RX_POLL_INTV": "10ms", "TC_TIMEOUT": "360s", "log_file": "stderr", "log_level": "DEBUG", /* XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL */ "log_size": 10000000, "log_rotate": 3, "CUPS_RESYNC_INTV": "1s" } } ```
1
answers
0
votes
22
views
asked 2 days 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
22
views
asked 8 days ago

Expo build - APK upload fails when using aws-cli command, via GitHub Actions but works from terminal(local)

Command used in GitHub Actions to download APK from expo: latest_build=$(npx eas-cli build:list --status="finished" --distribution="store" --json | jq '[.[] | select(.releaseChannel=="development")][1].artifacts.buildUrl') Command used in GitHub Actions for create-upload and upload in device farm response_upload_app=$(aws devicefarm create-upload --project-arn $DEV_PROJECT_ARN --name latest_build.apk --type ANDROID_APP) curl -T latest_build.apk $url_upload_app Same command when run locally in terminal when the APK is available in a folder, works perfectly fine. Also, at times, when running in local terminal, it was giving request timeout error This is the error log in GitHub Actions in when running get-upload command for the corresponding create upload arn in device farm: "metadata": "{\"errorMessageUrl\":\"https://docs.aws.amazon.com/console/devicefarm/ANDROID_APP_AAPT_DEBUG_BADGING_FAILED\",\"errorMessage\":\"We could not extract information about your Android application package. Please verify that the application package is valid by running the command \\\"aapt debug badging <path to your test package>\\\", and try again after the command does not print any error.\",\"errorCode\":\"ANDROID_APP_AAPT_DEBUG_BADGING_FAILED\"} Debugging done so far: Ran this (aapt debug badging <path to apk>/latest_build.apk ) and was able to get package information correctly
0
answers
0
votes
10
views
asked 9 days ago

Popular users

see all
1/18

Learn AWS faster by following popular topics

1/1