Skip to main content

Avnet IoTConnect Greengrass SDK

Project description

This document is reformatted to better viewing as a standalone document. We recommend visiting this GitHub v1.0.1 link for best experience.

Introduction

This project is the Avnet /IOTCONNECT AWS Greengrass SDK intended for the /IOTCONNECT platform Greengrass devices and Components based on Python.

The project based on the /IOTCONNECT Python Library.

While the example Components and the SDK can be built on other OS-es, only Linux is supported for development, along with the provided build scripts.

Licensing

This python package is distributed under the MIT License.

Installing the Greengrass Nucleus

The Components using this SDK need to be run on a Greengrass Nucleus.

When creating an /IOTCONNECT Greengrass Device (Nucleus) using the /IOTCONNECT Web UI:

  • If using the Classic Nucleus, execute the script provided by the website and the follow the online instructions.
  • If using the Nucleus Lite on Embedded Linux devices, download the device credential package to the device and follow the device-specific instructions provided in the doc directory.

Once your Greengrass Device Nucleus is running, you can proceed to develop and deploy your greengrass Component using this repository.

Building and Running The Examples

For a reference implementation, see examples/iotconnect-gg-basic-demo.

To set up a Component package and recipe, first execute the build.sh script in the selected corresponding example.

There are two ways to build the example Components:

  • With your CPID and Environment specified.
  • With default configuration.

It is recommended to use the first option, and before building or deploying specify:

export IOTC_ENV=YourENV
export IOTC_CPID=YourCPID

These values can be obtained from Settings -> Key Vault on the /IOTCONNECT Web UI.

At this point in time, it is not strictly necessary to provide these values, and the SDK will use the information provided by the Greengrass environment to guess the MQTT topics that will be used to communicate to /IOTCONNECT, but in the future, more advanced SDK features may require this.

The build script should install gdk locally and build your Component such that the provided CPID and Environment values will be injected into the recipe.yaml.

Once your Component is built, you can upload the zip package it along with the generated recipe from the greengrass-build directory of the Component. Do NOT use the recipe.yaml from the root directory of the example as that recipe will need to be processes.

Developing Your Components

To learn more about how to send telemetry, or receive commands, refer to the /IOTCONNECT Python Lite SDK examples as the client interface closely matches that of the SDK.

Development Tips

For best development turnaround, it is recommended to install a Greengrass Device (Nucleus) on your development PC and use the local-deploy.sh to instantly deploy the component locally. This makes it possible to test your component without having to update the revision and upload it to /IOTCONNECT every time a change is made, improving the overall development turnaround time.

After creating the PC greengrass device, make sure to also deploy aws.greengrass.Cli Public Component using the /IOTCONNECT Firmware deployment option. The Greengrass CLI will be used in conjunction with local-deploy.sh to locally deploy your example. When executing this script, pass the same parameters to it as you would to the build.sh

If making changes to the SDK itself or needing to ship custom python packages, see the PACKAGE_LOCAL_SDK behavior in build.sh.

Once you have tested your Component or changes on a local nucleus, the Component code should be easier troubleshoot.

Licensing

This python package is distributed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iotconnect_greengrass_sdk-1.0.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iotconnect_greengrass_sdk-1.0.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file iotconnect_greengrass_sdk-1.0.1.tar.gz.

File metadata

File hashes

Hashes for iotconnect_greengrass_sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b9c1ffe27e59b5147df1efdacb6382bf563e29608e76d7ac9eaa09527670e62d
MD5 318025eb0d1f3529f6f262587edbce0d
BLAKE2b-256 776e79b4684f06f70fda2aecd4b547b8f08c4fe76ed5fa20541c65e99d50c29d

See more details on using hashes here.

File details

Details for the file iotconnect_greengrass_sdk-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for iotconnect_greengrass_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6320442af0ea2a5a5fc1afe9c6a3780a9504e59f8abf45960400f010177d56
MD5 18523455f92f959e99e3d3cb5d71f36a
BLAKE2b-256 0a3cd73c84781bab1c051136a11e5df7361c3a08c0cb3b38205cadcd4c9da462

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page