# Simpele koppeling tussen DSMR en Homey

**URL:** <https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826>\
**Category:** 🇳🇱 Nederlands (Dutch)\
**Created:** [January 4, 2020, 10:45pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826 "2020-01-04T22:45:31Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [April 1, 2020, 6:28am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/21 "2020-04-01T06:28:30Z")

</div>

Ik weet niet of het aan het gebruikte font ligt, maar het lijkt erop alsof je “smart quotes” gebruikt in plaats van normale quotes (dus `“` en `” ` in plaats van `"`).

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [April 1, 2020, 8:40am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/22 "2020-04-01T08:40:10Z")

</div>

Vreemd, ik heb de hele flow een keer opnieuw opgebouwd (met exact dezelfde JSON text)  
en nu doet hij het wel 🤔

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [April 1, 2020, 9:53am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/23 "2020-04-01T09:53:38Z")

</div>

En zien je quotes er nu anders uit in de flow card?

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [April 1, 2020, 10:17am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/24 "2020-04-01T10:17:59Z")

</div>

Nee, niet echt, ik heb die excercitie gisteren ook al een keer geprobeerd om de quotes goed te zetten,… het enige verschil in deze flow is nu dat ik de trigger op “als deze flow gestart” wordt heb gezet ipv iedere 30sec

Ik ben nog wel aan het stoeien met de velden die ik kan uitlezen via de API,  
Ik wil de meterstanden ook meenemen, als ik de [API doc](https://dsmr-reader.readthedocs.io/en/v2/api.html#get-consumption-electricity) volg moeten deze te vinden zijn onder “/api/v2/consumption/electricity” delivered\_1 en delivered\_2  
De flow test meld dan dat hij het veld niet kan vinden, ik ga daar vanavond mijn python scriptje nog eens op los laten denk ik

“id”: 1728715,  
“read\_at”: “2019-04-19T10:58:00+02:00”,  
“delivered\_1”: “3332.442”,  
“returned\_1”: “0.000”,  
“delivered\_2”: “3441.996”,  
“returned\_2”: “0.000”,  
“currently\_delivered”: “0.147”,  
“currently\_returned”: “0.000”,  
…

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [April 4, 2020, 2:34pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/25 "2020-04-04T14:34:00Z")

</div>

Wellicht een stomme vraag maar hoe zet ik een sensor waarde van een virtual sensor? Ik heb de waardes in een betterlogic variabele zitten, daar kan ik de logging ook van zien dus die doen het.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/e/fe5b64ad6738aa6a4d1d6e0ba55471417973a119.jpeg)

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [April 4, 2020, 2:51pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/26 "2020-04-04T14:51:20Z")

</div>

Zet waarde:  
measure\_power (eerste moet je ook typen, geen tag nemen!)  
Tag hier

[Hier](https://community.homey.app/t/monitor-a-device/10649/11) staat het ook.

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [April 4, 2020, 6:05pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/27 "2020-04-04T18:05:58Z")

</div>

![Screenshot_20200404-200521](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/3/13d2e70ab7d7d1c832c600d6203cde55be196f25.jpeg)

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [April 4, 2020, 7:41pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/28 "2020-04-04T19:41:58Z")

</div>

het is gelukt! die capability name uitschrijven had ik nooit geraden!

Misschien moeten we maar eens een tutorial schrijven…  
de onderstaande paden spugen een array uit,…  
{  
“count”: 247,  
“previous”: null,  
“results”: [  
{  
“currently\_delivered”: “0.000”,  
“delivered”: “15750.463”,  
“read\_at”: “2020-03-25T14:00:00+01:00”,  
“id”: 1  
}  
],  
“next”: “[http://192.168.2.5:7777/api/v2/consumption/gas?limit=1&offset=1](http://192.168.2.5:7777/api/v2/consumption/gas?limit=1&offset=1)”  
}

**gas verbruik ophalen:**  
_URL=_  
{“method”:“get”,“protocol”:“http:”,“hostname”:“192.168.2.5”,“port”:7777,“path”:"/api/v2/consumption/gas?limit=1",“headers”:{“X-AUTHKEY”:“APIKEY”}}  
_jsonpath=_  
$.results[0].currently\_delivered

**gas meter ophalen:**  
_URL=_{“met\*hod”:“get”,“protocol”:“http:”,“hostname”:“192.168.2.5”,“port”:7777,“path”:"/api/v2/consumption/gas?limit=1",“headers”:{“X-AUTHKEY”:“APIKEY”}}  
_jsonpath=_  
$.results[0].delivered

**elektriciteitsmeter(s) ophalen:**  
_URL=_  
{“method”:“get”,“protocol”:“http:”,“hostname”:“192.168.2.5”,“port”:7777,“path”:"/api/v2/consumption/electricity?limit=1",“headers”:{“X-AUTHKEY”:“APIKEY”}}  
_jsonpath=_  
.results[0].delivered\_1 .results[0].delivered\_2

removed the offset variable from the URL

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [April 9, 2020, 7:22am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/29 "2020-04-09T07:22:44Z")

</div>

I had a problem where my gas consumption was stuck at 0,340, this seems to be the problem of the offset=1 value, removed it from the previous post

editing these long text directly from the edit box in homey app / website is a real pain, just put them in a proper editor and copy past them in the correct location

---

<div class="post-metadata">

**Author:** ![Paul\_Rade](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/paul_rade/32/16419_2.png) [@Paul\_Rade](https://community.homey.app/u/Paul_Rade)\
**Post date:** [June 7, 2020, 8:23pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/30 "2020-06-07T20:23:49Z")

</div>

Thanx, was ik niet mee bekend, onlangs geprobeerd, en nu ben ik om. werkt prima.

---

<div class="post-metadata">

**Author:** ![Michael\_Richter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_richter/32/30193_2.png) [@Michael\_Richter](https://community.homey.app/u/Michael_Richter)\
**Post date:** [January 25, 2021, 8:37pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/31 "2021-01-25T20:37:38Z")

</div>

> [@willumpie](#):
>
> import requests  
> import json
> 
> URL = “[http://192.168.2.5:7777/api/v2/consumption/today](http://192.168.2.5:7777/api/v2/consumption/today)”
> 
> APIKEY = “YOURKEY”
> 
> r = requests.get(url = URL, headers = {‘X-AUTHKEY’: APIKEY})
> 
> parsed=json.loads(r.text)
> 
> print(json.dumps(parsed, indent=2)

ik probeer alles uit maar ik krijg dit niet werkend.  
Is er bij dsmr reader een setting die je moet inschakelen?

Ik krijg steeds de melding value not found

mvg

---

<div class="post-metadata">

**Author:** ![Luke\_Vredeveld](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luke_vredeveld/32/33899_2.png) [@Luke\_Vredeveld](https://community.homey.app/u/Luke_Vredeveld)\
**Post date:** [April 6, 2021, 10:35am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/32 "2021-04-06T10:35:19Z")

</div>

Hi there, hope you can help me out here… I did everything exactly like your example. Ofcourse I used the rigt IP, port number en Auth-key. I’ve made the variable in BetterLogic app. But still I receive this error when running the flow:

```
Cannot read property 'indexOf' of null

```

Any ideas?? 🙄

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [April 6, 2021, 12:15pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/33 "2021-04-06T12:15:59Z")

</div>

![Screenshot_20210406-141251](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/d/9def56f2249bfaa638d049619dfe2b5442d62333.jpeg)  
Still working here on latest DSMR

Does it look like this? Also check the quotes, sometimes it doesn’t work with smart quotes.

Otherwise, check with another app to check if you can make a request?

---

<div class="post-metadata">

**Author:** ![Luke\_Vredeveld](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luke_vredeveld/32/33899_2.png) [@Luke\_Vredeveld](https://community.homey.app/u/Luke_Vredeveld)\
**Post date:** [April 6, 2021, 1:38pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/34 "2021-04-06T13:38:47Z")

</div>

Yep, it’s the same. I can use HTTP-get command with the ‘logic’ app, that succeeds. But I have no idea were there data stays when I choose this option…

 ![Knipsel](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/f/1f1f7da6b580d2b006af5ebee7adfdd604efc61c.png)

This also works:

 ![Knipsel2](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/874c1f0b377c023ce4a09605fe6af29dfb912655.png)

but again: I have no idea where the write-out of this requests stays (the apps says there is a seperate card for that, but I can’t configure it correct

**EDIT: uninstalled the app, threw away all my flows. Re-installed the app, made new flows and now it works… wtf…** 😱

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [April 6, 2021, 3:10pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/35 "2021-04-06T15:10:01Z")

</div>

Glad you made it work!

The values get stored in the variable you defined. This I use to forward that value to a virtual device, which you can then use for your dashboard etc also.

---

<div class="post-metadata">

**Author:** ![Luke\_Vredeveld](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luke_vredeveld/32/33899_2.png) [@Luke\_Vredeveld](https://community.homey.app/u/Luke_Vredeveld)\
**Post date:** [April 6, 2021, 6:11pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/36 "2021-04-06T18:11:50Z")

</div>

Forwarding the read-outs to virtual devices is the next step. I have all my values now in homey variables AND betterlogic and downloaded the app Virtuele Apparaten. There’s we the next errors come from 😬

When I am using the virtual device THEN-card I get the error: `invalid_capability`

When I am using the logic-function in the THEN-card I get `token_is_null`

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/f/7fd4ab6de8faefe7cc2292d9fa2b3e4894a4d513.jpeg)

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [April 6, 2021, 7:05pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/37 "2021-04-06T19:05:12Z")

</div>

Misschien is de P1 slimme meter app ook een optie? Hier kun je dsmr berichten naar toe sturen.

> **[P1 Slimme meter](https://homey.app/nl-nl/app/com.p1/P1-Slimme-meter/)**
>
> P1 Slimme meter

---

<div class="post-metadata">

**Author:** ![Luke\_Vredeveld](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luke_vredeveld/32/33899_2.png) [@Luke\_Vredeveld](https://community.homey.app/u/Luke_Vredeveld)\
**Post date:** [April 6, 2021, 8:03pm UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/38 "2021-04-06T20:03:34Z")

</div>

Liever niet, heb al een behoorlijk database opgebouwd in DSMR-reader. Dus maak liever van die optie gebruik 🙂  
Niet de makkelijkste weg misschien, maar vooralsnog wel de voorkeur

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [April 7, 2021, 5:36am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/39 "2021-04-07T05:36:42Z")

</div>

Had je de plug-in gezien voor dsmr reader? Zie [beschrijving van P1 meter](https://community.homey.app/t/p1-smartmeter-api/6150)

> Script for reading the data and push it to the api (DSMR-Reader)
> 
> 1. Install the script `https://gist.github.com/steffjenl/31bd083eeb9d0be04375b7695b9f2eaf` as plugin for DSM-Reader.
> 2. More information about installing plugin’s can be found on `https://dsmr-reader.readthedocs.io/nl/v3/plugins.html`
> 3. Change the `HOMEY_ID` as described in `forward_raw_telegram_to_api.py` .
> 4. Execute as user dsmr in the dsmr directory `./post-deploy.sh`

De P1 reader app ontvangt de dsmr berichten op zijn endpoint en regelt dan alles verder op je homey.

---

<div class="post-metadata">

**Author:** ![Luke\_Vredeveld](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luke_vredeveld/32/33899_2.png) [@Luke\_Vredeveld](https://community.homey.app/u/Luke_Vredeveld)\
**Post date:** [April 7, 2021, 10:38am UTC](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826/40 "2021-04-07T10:38:13Z")

</div>

ja heb ik gezien. Maar was me niet duidelijk of die beschrijving en-en-en gevolgd moest worden, of dat je alleen het kopje moest volgen dat voor jouw situatie nodig was. Ik wil dus dat de data ook nog naar dsmr-reader gestuurd blijft worden. Ik heb de stappen onder dit kopje wel doorlopen, maar dat levert niks bruikbaars op in homey. De p1-meter blijft leeg. En als ik andere stappen ga volgen, bijvoorbeeld het installeren van `com.p1.smartmeter`, dan vangt hij de telegrammen af en mis ik een hoop bij of homey of dsmr-reader.

[Previous page](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826.md?page=1)

[Next page](https://community.homey.app/t/simpele-koppeling-tussen-dsmr-en-homey/23826.md?page=3)
