# How to log all device's measurements to TimescaleDB, and view them in Grafana

**URL:** <https://community.homey.app/t/how-to-log-all-devices-measurements-to-timescaledb-and-view-them-in-grafana/146789>\
**Category:** Tutorials\
**Created:** [December 12, 2025, 9:34am UTC](https://community.homey.app/t/how-to-log-all-devices-measurements-to-timescaledb-and-view-them-in-grafana/146789 "2025-12-12T09:34:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/emile/32/115314_2.png) [@Emile](https://community.homey.app/u/Emile)\
**Post date:** [December 12, 2025, 9:34am UTC](https://community.homey.app/t/how-to-log-all-devices-measurements-to-timescaledb-and-view-them-in-grafana/146789/1 "2025-12-12T09:34:13Z")

</div>

This is a guide for those who like to use Grafana to visualize their data.

## Requirements

- Homey Pro or Homey Pro mini
- A Linux server, such as a Raspberry Pi

## 1. Install Docker

Sign in to your Linux server and open a terminal.

If you haven’t installed Docker yet, do so by executing:

```bash
$ curl -sSL https://get.docker.com | sh
$ sudo usermod -aG docker $(whoami)
$ exit

```

## 2. Install TimescaleDB & Grafana

Sign in to your Linux server and open a terminal.

Create a directory in your home folder:

```bash
mkdir homey-grafana

```

In this folder, create a file named `docker-compose.yml`:

```yaml
services:

  timescaledb:
    image: timescale/timescaledb:latest-pg17
    hostname: timescaledb
    container_name: timescaledb
    restart: unless-stopped
    environment:
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=toor
      - POSTGRES_DB=homey
    ports:
      - "5432:5432"
    volumes:
      - ./TimescaleDB/:/var/lib/postgresql/data

  grafana:
    image: grafana/grafana:latest
    hostname: grafana
    container_name: grafana
    restart: unless-stopped
    user: "$UID:$GID"
    environment:
      - GF_USERS_ALLOW_SIGN_UP=false
    ports:
      - "3000:3000"
    volumes:
      - ./Grafana/:/var/lib/grafana

```

Save the file, and execute:

```bash
docker compose up --detach

```

Your server will now run Grafana on `http://<ip-of-your-server>:3000`.

### 3. Install the TimescaleDB app on Homey

Visit [http://homey.app/a/net.weejewel.timescaledb](http://homey.app/a/net.weejewel.timescaledb) and install this app on your Homey.

Once it’s installed, in the Homey mobile or web app, navigate to the app’s settings, and configure your TimescaleDB URL.

This will be in the format like:

```auto
postgres://root:toor@192.168.1.3:5432/homey

```

Replace `192.168.1.3` with your server’s hostname or IP address.

Once you’ve clicked **Save & Connect** , the app will let you know if it’s connected to TimescaleDB on your server.

### 4. Configure Grafana

In a web browser, visit `http://<ip-of-your-server>:3000`, and sign in with the default username `admin` and the default password `admin`.

Head over to **Connections** → **Add new connection**. Search for **PostgreSQL** and configure the database.

- **Name** : `timescaledb`
- **Host URL** : `timescaledb:5432`
- **Database name** : `homey`
- **Username** : `root`
- **Password** : `toor`
- **TLS/SSL Mode** : `disable`
- **TimescaleDB** : Checked

Then click **Save & test**.

### 5. Create your first Dashboard

Head over to **Dashboards** → **New** → **New Dashboard**.

Click **Add visualization** , and select `timescaledb` as your data source.

Enable the **Filter** and **Order** toggles.

Under **Table** , select `homey`.

Under **Data operations** , add two rows, with the **Column** values of `value` and `time`.

Under **Filter by column value** , add at least `device_id` and `capability_id`. Set those to a matching Device ID and Capability ID.

> You can find these IDs in the [Homey Developer Tools](https://tools.developer.homey.app/tools/devices).

Set **Order by** to `time` and remove the **Limit**.

 ![Screenshot 2025-12-12 at 10.51.24](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/e/1ed3e4ab737d932ef0915f70f41e0eb1f60e17d1.png)

Click **Save dashboard** , and you can take it from here! 🎉

 ![Screenshot 2025-12-12 at 10.54.30](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/1/d1e77f0c1bc19e9ede7ad9bfde1ef1c81579137e.png)

---

<div class="post-metadata">

**Author:** ![Emile](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/emile/32/115314_2.png) [@Emile](https://community.homey.app/u/Emile)\
**Post date:** [December 12, 2025, 9:55am UTC](https://community.homey.app/t/how-to-log-all-devices-measurements-to-timescaledb-and-view-them-in-grafana/146789/3 "2025-12-12T09:55:49Z")

</div>

Listed on December 12, 2025, 9:55am UTC


