Simpele koppeling tussen DSMR en Homey

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 ").

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

1 Like

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

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 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”,

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.

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

Hier staat het ook.

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
}

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

1 Like

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

1 Like

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

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

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?? :roll_eyes:


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?

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…

This also works:

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… :scream:

1 Like

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.

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 :grimacing:

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

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

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

Had je de plug-in gezien voor dsmr reader? Zie beschrijving van P1 meter

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.

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.

2 Likes