Skip to content

simple example using python to create and connect a webhook notification channel

Notifications You must be signed in to change notification settings

maclobdell/pelion-python-webhook-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Pelion Device Management Python Webhook Example

This is a simple example using python packages pycurl a webhook notification channel with Pelion Device Management

This allows you to subscribe to resources and get notifications if they change.

Created by Mac Lobdell

Setup

Install Python 3 (I tested this with Python 3.7.6), then run the following commands.

pip install pycurl

Usage

Connect a device to Pelion Device Management and get an API key. Follow the guide at https://www.pelion.com/guides/connect-device-to-pelion/.

Follow the guide to setup API Gateway, Lambda, and Elasticsearch on AWS at https://github.com/PelionIoT/pelion-aws-lambda-webhook-example. This example replaces the CURL commands referenced in the guide.

Use this script instead of the CURL commands referenced there.

To run the script:

python pelion_webhook.py <API_KEY> <AWS_API_KEY> <AWS WEBHOOK CALLBACK URL>

Example:

python pelion_webhook.py ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyy abcabcabcabc.execute-api.us-west-2.amazonaws.com/default/pass_pelion_data

About

simple example using python to create and connect a webhook notification channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages