Add support for DSMR digital meters from Belgium and Netherlands
Is your feature request related to a problem? Please describe. Currently there is no ability to add DSMR meters to EVCC. Since every home in Belgium/Netherlands will be equipped with a digital meter instead of a disc meter it makes sense to add support for this.
Describe the solution you'd like Enable EVCC to interface with DSMR as a meter
Describe alternatives you've considered Buying and installing a MODBUS meter but this does not always measure the same values as the DSMR does.
Additional context
https://github.com/roaldnefs/go-dsmr

@hyperbart I‘d be happy to add this. However, the dsmr repo doesn‘t show any example how to connect to the meter and retrieve data. It only seems to provide the parsing. Could you fill the gap?
Got it. Seems it should be read over serial (are there other options?) and example is in https://github.com/basvdlei/gotsmart/blob/master/gotsmart.go.
Ja, genau it is a serial connection. Physical it is an RJ12 socket.
Of course one can do serial over TCP (which is quite common in the case of the DSMR) as the metercabinet is often located further away from the server/NAS that is running at a home.
https://www.zuidwijk.com/product/p1-reader-ethernet/
Could you put the meter on a public port and email access information to [email protected]? Must be TCP then, maybe using ser2net (though I wouldn‘t know how).
Closing here. Without access implementation won‘t be possible.
DSMR Reader (https://github.com/dsmrreader/dsmr-reader is very easy to setup (ie raspberry pi) and provides a wealth of smart meter data. Besides it is capable of exporting it's readings to MQTT or to store it in an InfluxDB. It also provides an API to obtain read values and the API documentation is public.
I have procured a P1 Reader over Ethernet. It's arriving next week.
By the way: The Belgian meters are based on the DSMR protocol which originated from the Netherlands. Belgian meters are 100% compatible with DSMR but also include some more data which the Dutch meters don't:
https://www.fluvius.be/sites/fluvius/files/2020-01/dmk-demo-v2.1-rtc.pdf
--> Slide 45

Telegram structure:

Telegram detail:

@stefaanbolle : are you Belgian or Dutch? Do you have a 3phase meter available to publish?
@andig : 0-1:17.0.0 and 1-0:31.4.0 are both values that our grid operators can use to limit the kW total and Amps per phase. Right now it is not being used in Belgium but it is one of those things we Belgians have but Dutch people don't.
That will only become relevant when we support load management.
I have reached out to the Dutch forum I mentioned earlier. Hope somebody reports back here and allows you to access a 3P DSMR.
@hyperbart @andig I have a 3 phase DMSR4 meter you can use for testing.
Implementation is done, waiting for license approval
Belgium 3P+N smart meter DSMR5


No solar panels, export data is from the construction crane, while braking it acted for a very short period of time as a generator :).
For the ones interested, implementing DSMR-Reader via API:
meters:
- name: dsmr
type: custom
power:
source: calc
add:
- source: http
uri: http://<DSMR-READER URL>/api/v2/consumption/electricity-live
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .|{currently_delivered}| join(" ")
scale: 1
timeout: 10s
- source: http
uri: http://<DSMR-READER URL>/api/v2/consumption/electricity-live
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .|{currently_returned}| join(" ")
scale: -1
timeout: 10s
energy:
source: calc
add:
- source: http
uri: http://<DSMR-READER URL>/api/v2/consumption/today
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .|{electricity_merged}| join(" ")
scale: 1
timeout: 10s
- source: http
uri: http://<DSMR-READER URL>/api/v2/consumption/today
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .|{electricity_returned_merged}| join(" ")
scale: -1
timeout: 10s
currents:
- source: http
uri: http://<DSMR-READER URL>/api/v2/datalogger/dsmrreading?limit=1&ordering=-timestamp
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .results[]|{phase_power_current_l1}| join(" ")
scale: 1
timeout: 10s
- source: http
uri: http://<DSMR-READER URL>/api/v2/datalogger/dsmrreading?limit=1&ordering=-timestamp
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .results[]|{phase_power_current_l2}| join(" ")
scale: 1
timeout: 10s
- source: http
uri: http://<DSMR-READER URL>/api/v2/datalogger/dsmrreading?limit=1&ordering=-timestamp
method: GET # default HTTP method
headers:
- content-type: application/json
- X-AUTHKEY: <API Key>
insecure: true # set to true to trust self-signed certificates
jq: .results[]|{phase_power_current_l3}| join(" ")
scale: 1
timeout: 10s
I will report back if I have set up the needed remote access.
On Sat, Apr 2, 2022 at 2:35 PM andig @.***> wrote:
Closing here. Without access implementation won‘t be possible.
— Reply to this email directly, view it on GitHub https://github.com/evcc-io/evcc/issues/2880#issuecomment-1086630926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQIK3R2H2XCY7VCO6NL2RLVDA5HFANCNFSM5QU2WSZA . You are receiving this because you were mentioned.Message ID: @.***>
So what exactly is meant with TCP Connection? I bought a USB to P1 adapter and intend to connect it straight to one of the USB ports of a Raspberry Pi running EVCC. Will ser2net on localhost work? Or do I need a hardware p1 ethernet reader?
So what exactly is meant with TCP Connection? The connection that is presented/available when you have bought a P1 Ethernet Reader (example: https://www.zuidwijk.com/product/p1-reader-ethernet/)
I bought a USB to P1 adapter and intend to connect it straight to one of the USB ports of a Raspberry Pi running EVCC. Will ser2net on localhost work? It might work, you will have to look up if ser2net presents the interface in the same way as the P1 Reader Ethernet does. If that is the case you are golden.
Or do I need a hardware p1 ethernet reader? I would suggest a P1 Ethernet reader, then the P1 is generally available on your network and you can talk freely with it from different devices/software.
Or you can launch a seperate feature request to have the EVCC team to add support for USB mode.
On Fri, 28 Oct 2022 at 10:39, vinc-vo @.***> wrote:
So what exactly is meant with TCP Connection? I bought a USB to P1 adapter and intend to connect it straight to one of the USB ports of a Raspberry Pi running EVCC. Will ser2net on localhost work? Or do I need a hardware p1 ethernet reader?
— Reply to this email directly, view it on GitHub https://github.com/evcc-io/evcc/issues/2880#issuecomment-1294706493, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQIK3RBCBUTHA2HCBBKCA3WFOGN3ANCNFSM5QU2WSZA . You are receiving this because you were mentioned.Message ID: @.***>
Hey i also have the p1 meter from zuidwijk.com. Is there already a way to implement this reader with evcc? My meter has now esp home installed and i can read out the values with home assistant and if i type the ip adress in my browser. I wish i could help more but i'm a complete noob with these things, i like to get evcc to work over here tough...