DEV Community

Chris McKelt
Chris McKelt

Posted on • Originally published at on

Azure IoT Edge – using TimescaleDB on the Edge


Part 1 - dotnet vs python vs node - temperature emission - who is cooler?

Part 2 - Developing modules
Part 3 - Custom Containers using Apache Nifi
Part 4 - Custom Module using TimescaleDB
Part 5 - Custom Module using Grafana


This is part 4 in a series starting here that runs through building an Azure IOT Edge solution. This post will run through setting up TimescaleDB to store data published from the dotnet, python and node temperature modules.

The code is located at:

TimescaleDB: An open-source database built for analysing

time-series data with the power and convenience of

SQL — on premise, at the edge or in the cloud.

Steps to add the database

1. add the custom module

2. add the section to the deployment file

Expose the internal port 5432 that TimescaleDB uses to 8081 for external container use

3. create the docker file

4. create the database, login and schema

5. run the container and insert data from another module

select * from “table_001” where Isairconditioneron = 0 ORDER BY “Timestamp” DESC LIMIT 100;


Now we have data being saved into the database we can move onto displaying it visually via Grafana in the next post.

Top comments (0)