-
Download the
configure-ca-bundle.sh
script (or either copy paste the contents and write to a file called./configure-ca-bundle.sh
) -
Make the script executable
chmod +x ./configure-ca-bundle.sh
#!/bin/sh | |
# ----------------------------------------------------------------------------------------------- | |
# thin-edge.io debugging | |
# ----------------------------------------------------------------------------------------------- | |
# Collect debug information to access the health of the installation | |
# ----------------------------------------------------------------------------------------------- | |
set -e | |
LOG_FILE=/tmp/tedge-debug.log |
Download the binary
Linux / MacOS / WSL
Make sure you choose the appropriate cpu architecture for your machine! Check out the options in the assets section of the latest release.
mkdir -p "$HOME/bin"
#!/bin/sh | |
MODEL=$(cat /proc/cpuinfo | grep Model | cut -d: -f2- | xargs) | |
OS_NAME=$(cat /etc/os-release | grep PRETTY_NAME | cut -d= -f2- | tr -d '"') | |
printf '\n' | |
printf 'Debug information: (copy/paste to the ticket)\n' | |
printf '\n' | |
printf '|Property|Value|\n' | |
printf '|--------|-----|\n' | |
printf '|OS [incl. version]|`%s`|\n' "${OS_NAME:-unknown}" |
"""thin-edge.io data simulator""" | |
import argparse | |
import time | |
import random | |
import json | |
from multiprocessing import Pool | |
import datetime | |
import logging | |
import paho.mqtt.client as mqtt |
This is a short informal overview of how to use thin-edge.io and a custom topic schema to model different IoT use-cases.
This documentation is provided to help people understand thin-edge.io and to provide some early feedback before adding it to the official docs.
This example explores the building management system use-case where thin-edge.io provides the communication from the cloud to a local piece of software which translates the thin-edge.io MQTT API to the required building management system API calls.
#!/bin/bash | |
######################################################################################################################## | |
# Debug script to check the behaviour of the tedge-mapper-c8y/mosquitto and the responsiveness of the | |
# Cumulocity IoT token request/response topics (c8y/s/uat and c8y/s/dat). | |
# | |
# The script does the following: | |
# 1. Install a systemd service (and enables it) | |
# 2. Create mqtt subscriber to c8y/s/dat | |
# 3. Publish a mqtt message to c8y/s/uat | |
# 4. Wait for a message on the c8y/s/dat topic (give up after a few seconds) |
Before creating a custom operation handler, create the configuration and confirm that the operation will be delivered to the device. Once you have confirm this, then you can add your custom handler.
Below shows the steps to create a custom SmartREST collection for Cumulocity IoT, and how to check that the message arrives on the local thin-edge.io MQTT broker.
Create a SmartREST template collection in Cumulocity IoT, and create a custom "response"
Below is an example collection which create two custom operations for the message ids: