Skip to content

daviian/awsiotgg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awsiotgg

Wrapper for AWS Greengrass to perform Core Discovery and Connection Establishment

Features

  • Core Discovery
  • Core Connection Establishment
  • Discovery Information Cache (enables connecting to Core even connection to Discovery Endpoint is lost)
  • Automatic Retry during Discovery and Connection Establishment

Usage

from AWSIoTGG import GGConnector

# Init AWSIoTMQTTShadowClient
self._shadow_client = AWSIoTPyMQTT.AWSIoTMQTTShadowClient(<THING_NAME>)

# Init DiscoveryInfoProvider
self._discovery_info_provider = DiscoveryInfoProvider()
self._discovery_info_provider.configureEndpoint(<HOST>)
self._discovery_info_provider.configureCredentials(<ROOT_CA_PATH>, <CERTIFICATE_PATH>, <PRIVATE_KEY_PATH>)

gg_connector = GGConnector(
    self._shadow_client, self._discovery_info_provider)

try:
    core_info, group_ca_path = gg_connector.discover(<THING_NAME>)

    gg_connector.connect(
        core_info, group_ca_path, <CERTIFICATE_PATH>, <PRIVATE_KEY_PATH>)
except BaseException as err:
    logger.error(err)
    sys.exit(1)

# Here comes the actual device implementation

About

Small Library for AWS GreenGrass Discovery and Connection Establishment

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy