koenekelschot / DsmrParser

Package for Dutch Smart Meters which comply to DSMR (Dutch Smart Meter Requirements), also known as ‘Slimme meter’ or ‘P1 poort’. Support parsing DSMR V2.2 and V4. For official information about DSMR refer to: http://www.netbeheernederland.nl/themas/hotspot/hotspot-documenten/?dossierid=11010056&title=Slimme%20meter&onderdeel=Documenten
https://nuget.org/packages/DsmrParser
4 stars 3 forks source link

Sample usage? #1

Open Atrejoe opened 6 years ago

Atrejoe commented 6 years ago

Hi Koen, do you maybe have some example on how to use your parser? I expect you are using your parser directly hooked up to a smart meter as well.

I would like to see if I can replace my current setup with a cleaner solution: A Docker container running on a Linux host, reading my smart meter using an USB cable, sending its data over to Influxdb.

Currently I'm doing the same using Home Assisstant, but I think this is overkill. And this is a nice project for my first .Net core application.

edit: ha I see you're into Home Assistant too!

koenekelschot commented 6 years ago

Hi Robert, I have a P1 wifi device plugged in to my smart meter. A .Net application I wrote is listening to this device and parses the tcp stream. Messages are received every 10 seconds, and are relayed to Home Assistant every 5 minutes in order not to flood the database with useless updates.

See DsmrService.cs in HomeAssistant.Hub for an example

QuantumSingularity commented 5 years ago

At the moment I'm using a Python script to read the DSMR values and send it by MQTT. I'm going to convert it to C# (.Net Core). When I'm ready I'll commit it to my Repository here on Github.

My SetUp:

Atrejoe commented 5 years ago

Hi @QuantumSingularity,

That's similar to what I wanted to do too, see: https://github.com/Atrejoe/SmartMeterToInfluxDb (I also wanted it to be publish it as Docker image)

Unfortunately I didn't get the serial port to work on Linux. I tried using https://github.com/jcurl/SerialPortStream

Here's a full article on getting access to the serial port. https://github.com/Ellerbach/serialapp

Let's me know if you succeed! Maybe we can split it into two components: one component that streams the data from the port, and a second part that hooks into it (MQTT in your case, influxdb in mine)