# Report your P1 smart meter data - my solution

**URL:** <https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347>\
**Category:** Ideas & Suggestions\
**Created:** [September 4, 2020, 12:40pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347 "2020-09-04T12:40:50Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [September 4, 2020, 12:40pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/1 "2020-09-04T12:40:50Z")

</div>

Just thought I’d share my flows; perhaps it will inspire someone to do something similar.

My gas and electricity data is loaded into Domoticz (running on a Synology NAS) with a P1 cable. This data is queried by Homey every 15 minutes with this flow:

 ![Schermafbeelding 2020-09-04 om 14.34.10](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/6/06a5751018b2b95370b09561c1f3fba9a41ba39d.jpeg) (and a similar flow to collect the gas data).  
The extra card gets the data for the tiles in Homey Dash:

![Schermafbeelding 2020-09-04 om 14.31.44](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/6/16dc17a7941f1b337f9b9589467add31b0a64397.png)

At the end of every day the total gas and electricity usage is posted as a notification in Homey and a push message to my phone:

 ![Schermafbeelding 2020-09-04 om 14.35.38](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/b/4becc2bca74d5aef9fe9b75085170b39b165601d.jpeg)

And after that has been done, the last flow runs to reset the variables to zero:

 ![Schermafbeelding 2020-09-04 om 14.44.27](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bf72f3b67d4a28d01c317a082f011b739a383f1b.jpeg)

Check the calculations; I have created variables in Better Logic so I only have to update my actual gas and electricity price within the Better Logic App (and not in the flows). Also, all outcome is rounded to two decimals with the round() function.

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [September 4, 2020, 6:13pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/2 "2020-09-04T18:13:55Z")

</div>

What interface do you use for connecting the p1 to your NAS?

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [September 4, 2020, 8:20pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/3 "2020-09-04T20:20:17Z")

</div>

Nice will keep this is mind. Just ordered a p1 cable and will attach it to a RAspberry Pi with Ztatz. Nice project for the upcoming weeks.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [September 5, 2020, 7:22am UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/4 "2020-09-05T07:22:06Z")

</div>

A “smart meter P1 usb to rj12 cable”, which has some electronics in it to read data from the “smart meter”. They are available for around € 12,00

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [September 5, 2020, 8:15am UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/5 "2020-09-05T08:15:07Z")

</div>

Ordered in in China for € 8,62🙀Reviews were good, so hope it works ok. Will try to get the data with MQTT in Homey. But still have to figure out how MQTT exactly works. Have MQTT now running on my NAS. Testing this was waiting for the cable. Cable will arrive today. So hope i figure it out next week(or weeks😿)

Also still working on a script for my SolarPanels. Would be nice to combine all these data

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [September 5, 2020, 8:16am UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/6 "2020-09-05T08:16:56Z")

</div>

> [@Marcel\_Ubels](#):
>
> Will try to get the data with MQTT in Homey.

Would like to see that work! Good luck!

---

<div class="post-metadata">

**Author:** ![Bob\_Oosterbaan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_oosterbaan/32/37949_2.png) [@Bob\_Oosterbaan](https://community.homey.app/u/Bob_Oosterbaan)\
**Post date:** [March 21, 2021, 11:38am UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/8 "2021-03-21T11:38:30Z")

</div>

Hi @Eternity

I am curious how you have created the virtual devices which are displaying the values. I managed to get the data from domoticz and put this in the variable, I am unable to show this on a virtual switch. I am using the VD app for this, but especially for gas there is no capability??? I am pretty new to this all 😉

Any suggestions will be appriciated 😉

Kind Regards,

Bob

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 21, 2021, 11:53am UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/9 "2021-03-21T11:53:45Z")

</div>

When you create the VD, you have to **type in** the correct capability in the ‘text’ field.

See this topic (Dutch), and specifically the image shown!

> [@Homeydash.com , een Homey dashboard](https://community.homey.app/t/homeydash-com-een-homey-dashboard/17436/13):
>
> Het Virtuele Apparaat heeft ook de waarde niet, vandaar de NaN in homeydash. Het kaartje om de waarde in het Virtuele Apparaat te zetten moet er zo uitzien: Om een waarde van een Virtueel Apparaat te zetten moet de ‘technische’ naam van een capability gebruikt worden zoals in dit geval measure\_humidity (deze staan hier beschreven: [https://developer.athom.com/docs/apps-reference](https://developer.athom.com/docs/apps-reference)) De waarde die je er inzet mag zowel een vaste waarde in een flow zijn als een tag.

and also were to look for all capabilities.

 ![Schermafbeelding 2021-03-21 om 12.54.36](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/a/fa5bbf4f7fc3f1fc40dae36382d3caffd3ad6660.png)

---

<div class="post-metadata">

**Author:** ![Bob\_Oosterbaan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_oosterbaan/32/37949_2.png) [@Bob\_Oosterbaan](https://community.homey.app/u/Bob_Oosterbaan)\
**Post date:** [March 21, 2021, 12:32pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/10 "2021-03-21T12:32:12Z")

</div>

Ohhhh… I was using gas\_meter 😉 Thanks!!!

---

<div class="post-metadata">

**Author:** ![Bob\_Oosterbaan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_oosterbaan/32/37949_2.png) [@Bob\_Oosterbaan](https://community.homey.app/u/Bob_Oosterbaan)\
**Post date:** [March 21, 2021, 12:39pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/11 "2021-03-21T12:39:49Z")

</div>

@Eternity One more question and then I’ll leave you alone 🤣

In your example you can see the value on the “button” and in my case I have to hold button to see the value? Any specific settings I need to make to achieve this?

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 21, 2021, 12:48pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/12 "2021-03-21T12:48:34Z")

</div>

> [@Bob\_Oosterbaan](#):
>
> In your example you can see the value on the “button”

That’s because you see an image taken from Homeydash. Unfortunately in the official Athom dash, I can’t see the value either. I too have too push the button to see it.

---

<div class="post-metadata">

**Author:** ![Bob\_Oosterbaan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_oosterbaan/32/37949_2.png) [@Bob\_Oosterbaan](https://community.homey.app/u/Bob_Oosterbaan)\
**Post date:** [March 21, 2021, 12:56pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/13 "2021-03-21T12:56:47Z")

</div>

@Eternity

It’s a pitty 😄 I will leave it like this! Thanks again…

Bob

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [March 21, 2021, 1:01pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/14 "2021-03-21T13:01:05Z")

</div>

A dirty way is to use a virtual termostat, when you copy your value to the target\_temperature, it will be visible.

---

<div class="post-metadata">

**Author:** ![Bob\_Oosterbaan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_oosterbaan/32/37949_2.png) [@Bob\_Oosterbaan](https://community.homey.app/u/Bob_Oosterbaan)\
**Post date:** [March 21, 2021, 9:37pm UTC](https://community.homey.app/t/report-your-p1-smart-meter-data-my-solution/34347/15 "2021-03-21T21:37:59Z")

</div>

@JPe4619 Really dirty, but it works 😊 The only thing is that you are limited (the maximum is the number 200 you can use, so converting to KwH works fine for me. Thanks

Bob
