# P1 smartmeter (API)

**URL:** <https://community.homey.app/t/p1-smartmeter-api/6150>\
**Category:** Apps\
**Created:** [January 1, 2019, 12:22pm UTC](https://community.homey.app/t/p1-smartmeter-api/6150 "2019-01-01T12:22:22Z")\
**Posts on this page:** 1\
**Page:** 8

<div class="post-metadata">

**Author:** ![Wouter\_Boessenkool](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wouter_boessenkool/32/17160_2.png) [@Wouter\_Boessenkool](https://community.homey.app/u/Wouter_Boessenkool)\
**Post date:** [March 25, 2025, 9:46am UTC](https://community.homey.app/t/p1-smartmeter-api/6150/141 "2025-03-25T09:46:49Z")

</div>

Hi everyone,

I’m trying to read my smart electricity meter via P1 **(DSMR 4.0)** and send the data to Homey using **com.p1.smartmeter-dsmr.reader**. I’m following the instructions from [this forum thread](https://community.homey.app/t/p1-smartmeter-api/6150), but I’m running into issues.

#### **Setup:**

- **Raspberry Pi 1B**
- **Homey (Early 2019)**
- **Smart Meter connected to Raspberry via USB (ttyUSB0)**
- **P1 Smart Meter app installed on Homey**
- **P1 smartmeter added as a device in Homey**
- **Homey local IP:** 192.168.2.19
- **Configuration file (`config.js`):**

```auto
const homeyId = 'xxxxx'; // Homey ID anonymized
const usbPort = '/dev/ttyUSB0';
const bps = 115200;
const bits = 8;
const parity = 'none';
const homeyEndpoint = '/api/app/com.p1/update';
const homeyHosts = ['https://' + homeyId + '.connect.athom.com'];

```

#### **What works?**

- The smart meter seems to be connected properly:

```auto
node src/p1.js  
{"level":"info","message":"p1 smartmeter is connected!"}

```

#### **What doesn’t work?**

1. **API call via Homey Cloud returns an error:**

```auto
curl -k https://xxxxx.connect.athom.com/api/app/com.p1/update
{"code":404,"error":"not_found","error_description":"Not found: GET /api/app/com.p1/update"}

```

1. **API call via local IP also fails:**

```auto
curl -k -X POST -d '{"your": "data"}' http://192.168.2.19/api/app/com.p1/update
false

```

#### **Questions:**

- Has anyone successfully set up this integration with Homey (Early 2019)?
- Do I need to configure an API token somewhere?
- What does the `"not_found"` error mean exactly? Do I need to configure a specific device in Homey, other than adding P1 smartmeter?
- Is there a way to check logs in Homey to see if the request is being received?

Any help is greatly appreciated! Thanks in advance. 😊

[Previous page](https://community.homey.app/t/p1-smartmeter-api/6150.md?page=7)
