AWS IoT SDK support
-
For micropython?
If you are just using MQTT to send data to green grass as shown in that article then you can use the included AWS functions along with MQTT function in the current UIFLOW/Micropython firmware. -
The sample(https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/samples/basic_discovery.py) uses below imports:
import time
import json
from concurrent.futures import Future
from awscrt import io
from awscrt.mqtt import QoS
from awsiot.greengrass_discovery import DiscoveryClient
from awsiot import mqtt_connection_builderIf you run that script on core2, you will get an error because concurrent, awscrt, and awsiot don't exist in the core2. It will be great if I can make those available from core2.
-
@ajb2k3 Did you have a chance to test out if there's any way to do this?
-
@kulmam92 Sorry, up to my next dealing with the ATECC608b and security features of the Core2 AWS
-
@ajb2k3 FYI, the below are the closest attempts that I was able to find.
-
Ok so from what I can work out (two days fighting to log into AWS!)
Any device works as a Grass client using MQTT or HTTP
No devices at present work as a Greengrass hub until CM4's become available enough to start production of the M5CM4 Hub.
You can use an RPI4 or equiv as the Greengrass hub or just use mosquitto service on the RPI4 or equivalent linux device. -
@ajb2k3 Thank you for your effort and update. The flow that I have in mind is:
Core2(Greengrass client using aws IoT device SDK) -> RaspberryPi(Greengrass) -> AWS IoT Core
The reason that I want to use this is to demonstrate the features of the AWS Greengrass like:
- ML at the edge: core2 send image to RaspberryPi(Greengrass) and run ML like object detection.
- device shadow
- device defender
You may send message to RsapberryPi(Greengrass) via mqttclient like below but you can’t use device shadow or device defender.
https://www.rosietheredrobot.com/2019/03/green-green-grass-of-home.html?m=1
I hope this give you a clear picture of what I’m trying to do.
-
@kulmam92 from what I gather DeviceShadow/Device Twin and device defender work between the GGgateway and AWS IOT server.
-
@kulmam92 love the humour you put in your post and it looks great so far.
Cpt.James.Purcell (my split personality) just subscribed to rosietherobot -
@ajb2k3 I’m afraid but I’m not the author of that post. But, I agree that it’s a well written one. Regarding device shadow, this is what I meant: