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 all1/18
AWS IoT rule SQL query for mqtt nested arrays
I have the following mqtt message:
```
{
"sensors": [
{
"lsid": 412618,
"data": [
{
"temp_in": 72.3,
"heat_index_in": 72,
"dew_point_in": 55.9,
"ts": 1652785241,
"hum_in": 56.3
}
],
"sensor_type": 243,
"data_structure_type": 12
},
{
"lsid": 421195,
}
```
I can get the "sensors,0.lsid" value and the entire "data" array using this query:
```
select get(sensors,0).lsid as ls, get(sensors, 0).data as data1 from "topic"
```
but what I really need is to get "temp_in:72.3" , i.e. the values from the second level array
I've tried using this :[https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-nested-queries.html](), but unless i'm not following it correctly, it doesnt seem to work.
Any help would be greatly appreciated
Accepted AnswerInternet of Things
1
answers
0
votes
11
views
asked 2 days ago
1
answers
0
votes
6
views
asked 3 days ago
JITP PROVISIONING DEVICE SHADOW CREATION
HI, I have followed the instructions from : https://aws.amazon.com/premiumsupport/knowledge-center/aws-iot-core-jitp-setup/,
and i have created a thing in the AWS IoT Core.
But there is no shadow created in the Device Shadows -- Device Shadows (0)Info.
How i can create also the Device Shadow with JITP Provision?
Thanks.
Accepted AnswerAWS IoT Core
1
answers
0
votes
4
views
asked 6 days ago
Greengrass Python Lambda using awsiotsdk: No module named '_awscrt'
I'm trying to create a Greengrass Lambda function that publishes to an IPC topic using the the IoT SDK. My Lambda code includes:
```
from awsiot import greengrasscoreipc # type: ignore
from awsiot.greengrasscoreipc.model import ( # type: ignore
JsonMessage,
PublishMessage,
PublishToTopicRequest,
)
ipc_client = greengrasscoreipc.connect()
```
This leads to the following import error:
```
FATAL: lambda_runtime.py:426,Failed to initialize Lambda runtime due to exception: No module named '_awscrt'.
```
I can see that the Lambda artifact includes both `awscrt` and `awsiot` in `/greengrass/v2/packages/artifacts-unarchived/componentName/version/lambda-artifact/`, so I'm not sure why the import is failing.
I'm using a non-pinned Python 3.8 Lambda in NoContainer mode with LambdaManager v2.2.3, LambdaLauncher v2.0.10, and LambdaRuntimes v2.0.8
I have been able to use `awsiot` to publish to IPC topics in a non-Lambda component. That component runs a `pip install -r requirements.txt` command to install `awsiotsdk` to the site-packages for `ggc_user` during the install lifecycle, whereas the Lambda component is delivered to the device with its package dependencies included. Any ideas what I need to do differently? I haven't seen this problem yet with other Lambdas that have different dependencies.
Accepted AnswerAWS IoT Greengrass
1
answers
0
votes
4
views
asked 9 days ago
Popular users
see all1/18
Learn AWS faster by following popular topics
1/1