aws-iot-device-sdk-python | SDK for connecting to AWS IoT from a device using Python

 by   aws Python Version: v1.5.2 License: Apache-2.0

kandi X-RAY | aws-iot-device-sdk-python Summary

kandi X-RAY | aws-iot-device-sdk-python Summary

aws-iot-device-sdk-python is a Python library typically used in Internet of Things (IoT) applications. aws-iot-device-sdk-python has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install aws-iot-device-sdk-python' or download it from GitHub, PyPI.

SDK for connecting to AWS IoT from a device using Python.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              aws-iot-device-sdk-python has a low active ecosystem.
              It has 653 star(s) with 417 fork(s). There are 60 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 261 have been closed. On average issues are closed in 193 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of aws-iot-device-sdk-python is v1.5.2

            kandi-Quality Quality

              aws-iot-device-sdk-python has 0 bugs and 0 code smells.

            kandi-Security Security

              aws-iot-device-sdk-python has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              aws-iot-device-sdk-python code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              aws-iot-device-sdk-python is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              aws-iot-device-sdk-python releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              aws-iot-device-sdk-python saves you 2136 person hours of effort in developing the same functionality from scratch.
              It has 7801 lines of code, 921 functions and 82 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed aws-iot-device-sdk-python and discovered the below as its top functions. This is intended to give you an instant insight into aws-iot-device-sdk-python implemented functionality, and help decide if they suit your requirements.
            • Publish a message to a topic
            • Send a PUBLISH command
            • Pack the remaining bytes into the given length
            • Generate a new ID
            • Subscribe to messages
            • Send a subscribe command
            • Sends update notification
            • Validate dictionary object
            • Validate a JSON string
            • Sets the shadow subscription
            • Handles a handshake
            • Unsubscribe from the client
            • Connect to server
            • Subscribe to a topic
            • Configure IAM credentials
            • Configure certificate credentials
            • Configures auto - reconnect backoff time
            • Returns a list containing all the CA CA certificates
            • Register a callback for the shadow
            • Publish a message
            • Configure offline publish queueing
            • Configure the Mqtt endpoint
            • Get all available cores
            • Perform a discovery operation
            • Configure endpoint
            • Connects to AWSAWQTT client
            Get all kandi verified functions for this library.

            aws-iot-device-sdk-python Key Features

            No Key Features are available at this moment for aws-iot-device-sdk-python.

            aws-iot-device-sdk-python Examples and Code Snippets

            No Code Snippets are available at this moment for aws-iot-device-sdk-python.

            Community Discussions

            QUESTION

            Issues publishing to device shadow using the aws-iot-device-sdk-python-v2
            Asked 2021-Oct-25 at 09:24

            In a python application that uses the aws iot device sdk for python v2 (v1.7.1) I am running into an issue where I cannot update the device shadow.

            After starting the program, the DeviceShadowManager will attempt to get the latest shadow state and set it locally. If a delta state is present the DeviceShadowManager will merge the last reported state and delta state and publish it. That works. However, when the manager subscribes for updates, after the initial setup, I am running into an error, where when the desired state changes, the manager cannot update the reported state. Here is the error:

            ...

            ANSWER

            Answered 2021-Oct-25 at 09:24

            I am pretty sure the problem lies within

            Source https://stackoverflow.com/questions/69696291

            QUESTION

            AWS-IoT-SDK-JS-v2 connection problem - AWS CRT binary not present in any of the following locations
            Asked 2021-Jun-23 at 10:47

            I'm trying to connect to AWS IoT Core via aws-iot-sdk-js-v2 and receiving the following error when I'm running the PubSub example as described below:

            ...

            ANSWER

            Answered 2021-Jun-23 at 07:48

            I received an answer in aws-iot-device-sdk-js-v2 repository from jmklix that solved my problem:

            Currently, the maintainers of the package don't include the pre-compiled binaries for raspberry pi, but we can do this manually if we want. described in aws-crt-nodejs:

            Source https://stackoverflow.com/questions/68063950

            QUESTION

            Pass certificates to AWS MQTT API from in-memory location instead of on-disk
            Asked 2021-Jan-31 at 01:43

            I'm setting up an AWS IoT MQTT connection from a Python environment using Python package awsiotsdk. I have followed this example https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/samples/pubsub.py and gotten the demo publish/subscribe to work, so I have all the pieces.

            The only difference from the demo is that in my environment the certificates all reside in memory rather than on disk. A hack solution would be to write them to a temp location on disk and follow the example.

            I would prefer to simply instantiate the appropriate AWS authentication class which can accept a file-like object rather than a string filename. However following the code only leads me to c-binding dead ends.

            How can I create an MQTT client using in-memory certificates?

            ...

            ANSWER

            Answered 2021-Jan-31 at 01:43

            As far as I've been able to determine, this is simply not possible. My solution is to use the tempfile package to create a temporary directory which I write the cert to and then reference when I create my MQTT client. It's not elegant, but it keeps me from needing to manage the certs as an external dependency (which is what I wanted to avoid).

            Source https://stackoverflow.com/questions/65818419

            QUESTION

            How does an AWS IoT device show as "connected"
            Asked 2021-Jan-26 at 00:07

            I'm following the pubsub.py example code for AWS IoT using MQTT here. In particular I'm connecting to MQTT using the awsiotsdk.

            That example works ok, but it connects to MQTT as a generic client, not as a specific device.

            I would like to connect to MQTT to publish and subscribe as a specific device. In particular I want to be able to query for connected devices and see this device show up.

            In the demo code I see that --client-id is included. By default it uses a UUID to generate a unique client ID for the demo. I've tried setting the client-id to the thing ARN arn:aws:iot:us-west-2:123456789012:thing/test

            What I want/expect to see is the following search show the connected thing. The query comes back empty while the pubsub demo is running. The fact that it's empty tells me that the pubsub example is connecting as an MQTT client, not as a device. How do I connect as a device?

            ...

            ANSWER

            Answered 2021-Jan-26 at 00:07

            The clientId must equal the Thing name of a Thing registered in the Registry.

            The connectivity status data is indexed only for connections where the client ID has a matching thing name.

            https://docs.aws.amazon.com/iot/latest/developerguide/aggregation-troubleshooting.html

            Source https://stackoverflow.com/questions/65875369

            QUESTION

            Using awsiotsdk when subscribing to a topic with QoS.EXACTLY_ONCE, encountering AWS_ERROR_MQTT_UNEXPECTED_HANGUP
            Asked 2021-Jan-22 at 22:44

            I'm following the example pub/sub in awsiotsdk.

            ...

            ANSWER

            Answered 2021-Jan-22 at 22:44

            EXACTLY_ONCE (MQTT QOS level 2) is not currently supported by the AWS IoT Core server. This is mentioned in the source:

            Source https://stackoverflow.com/questions/65849905

            QUESTION

            Specifying a profile for awscrt.auth.AwsCredentialsProvider
            Asked 2021-Jan-22 at 16:19

            I'm creating an AwsCredentialsProvider class (api docs) from:

            ...

            ANSWER

            Answered 2021-Jan-22 at 16:19

            For custom credentials file path set environment variables AWS_CONFIG_FILE and AWS_CREDENTIAL_FILE

            For default profile set environment variable AWS_PROFILE with AWS profile name you would like to select as default. In order to use at runtime, this AWS profile name must be present in your AWS credentials file with valid configurations.

            If you use only one AWS region, then you can also set environment variable AWS_DEFAULT_REGION. At times it saves few lines of code, where you might need to specify a AWS region.

            Source https://stackoverflow.com/questions/65847720

            QUESTION

            how to connect device to AWS greengrass
            Asked 2020-Jan-27 at 08:59

            I am using MOKOSMART_mkgw1 to collect data and send it to AWS IoT Core. for that, I need to set the following configurations,

            1. endpoint (aws iot endpoint)
            2. topic (any)
            3. device certificate and private key
            4. root ca.

            I was able to connect and send data to aws iot core.

            now I want to connect it to aws greengrass device instead of iot core directly.

            i have greengrass running, on ip 192.196.1.12 on port 8883 (windows machine). i download Group CA using basic discovery api. so i used this mqtt settings for device:

            1. broker endpoint (192.168.1.12:8883)
            2. topic (same as registered in subscription in aws iot GG)
            3. device certificate and private key (the device is registered in aws iot GG)
            4. Group CA (downloaded by basic discovery sample application)

            but i am still not able to connect to aws gg?

            my understanding is aws GG also has a MQTT broker. so by providing a proper authentication and topic, i should be able to connect to it, whether or not I have aws device SDKs or not. am i wrong? what does "basic discovery example" do extra to be able to connect to aws gg ??

            ...

            ANSWER

            Answered 2020-Jan-27 at 08:59

            I am so sorry for wasting your time if you brainstorm on this question. the issue was, I was passing a random clientID in MQTT. instead, I passed "Device Name" as the client ID and it worked.

            keep this question here if someone else falls in the same hole.

            Source https://stackoverflow.com/questions/59704928

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install aws-iot-device-sdk-python

            You can install using 'pip install aws-iot-device-sdk-python' or download it from GitHub, PyPI.
            You can use aws-iot-device-sdk-python like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/aws/aws-iot-device-sdk-python.git

          • CLI

            gh repo clone aws/aws-iot-device-sdk-python

          • sshUrl

            git@github.com:aws/aws-iot-device-sdk-python.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link