All Dutch electricity/gas meters are beiing replaced by digitale smart meters with P1 support. The P1 port is effectively a serial interface (RS232) which send statistical data every 10 seconds. (DSMR protocol)
Domoticz and OpenHAB already both support the system. Lack of support is for me the only reason not to switch to home assistant.
Hey Henk. Klasse manier van vragen om support. “Enige reden dat ik niet switch is omdat jullie het niet supporten” met wat linkjes erbij.
Zitten veel cool gasten op deze bbs die hun vrije tijd opofferen omdat platform nog beter en uitgebreidere qua ondersteunde protocollen te maken.
What Henk is asking here is if we would be so kind and look into incorporating this feature into HA.
I have dabbled with P1 in the past for a smart router solution so might anyone need writeups PM me.
I’m also interested in dutch smartmeter support (DSMR 4.* via P1 port) for Home Assistant.
I just switched from domoticz to HA and this is one of the things i’m missing.
I’m no code wizard and new to Home Assistant so i’m probably not going to come up with something that works… hope that someone with more experience looks into this.
I’m willing to test though.
After some thinking I started wondering what the use case will be for this in home assistant?
Trigger automations on energy or gas usage ?
For now I graph everything in grafana.
For me the most important one I use now when it comes down to automation is notification when there is unexpected usage. Actually just saved me as we are on holiday and my gas consumption suddenly jumped to 300 l/h. Turned out there was something wrong with the hvac system and I had someone fix it while I was gone. Based on the usage I can even see if my hottub is on or other high usage appliances as p1 is almost real-time (10 sec intervals)
Next to automation it’s just super usefull to have all energy consumption in your home automation system.
for graphing i’m using grafana at the moment with an influx db.
Home - Assistant is for automation >> i get the use case where you get notified when you have excessive energy usage etc. but for insights i use grafana
(comparing outside temperature to gas usage or under floor heating temps v.s. central heating burner on /off usage )
However disagree with your statement about ‘automation’ versus insights.
HASS already has a lot of components that are about insights and/or are not focussed on automation (camera’s & history components just to name a few). And what about the existing energy components that roughly do the same (show current energy consumption). Furthermore where is the ‘border’ between the two? Why is showing that someone is at work on a dashboard different then for instance current consumption? It’s in insight that makes me more consious of the energy I’m using (beside the triggers talked about earlier).
FYI; all major HA systems have P1 support; Homeseer, Vera, OpenHab, Domoticz, Fibaro homecenter just to name a few.
Ha I arrived here just in time! I love HA, and just ordered the ‘smart meter’ P1 cable, and intend to use it on my Raspberry Pi. I do some coding but am a noob in Python ans having very little free time, yet i would see If I can get something started.
I’m not really looking to use the metric as a trigger, but just for insights.
It looks this would be a typical sensor, but with multiple outputs:
I don’t know about where to store the historical data yet, nor how to create an (interactive graph) but I guess the HA database should suffice for storage, and looking at the CPU graphs I guess some custom graphs should be achievable.
Home Automation is more than only creating events. Its about getting access on whats going on in your home and of course garden
That means getting acces to your energy consumption. Main goal next to comfort is getting your energy bill low but not willing to let you lose some comfort. So if using x amount of energy in a month or day, but the a month later your using twice the amount of energy you should investigate what happend.
So my main goal of automation is getting a view of what energy i am using and getting the electricity bill lower and getting a comfort home in a automatic way…
So yes getting a insight of my energy consumption is an part of my home automation.
So for I have just gotten the basic readout to work (outside of the HASS ecosystem), there are some meter-specific connection settings I’d have to incorporate in the HASS config.
For now I intend to use smeterd for reading the data, but I have a connection issue I have to resolve first (https://github.com/nrocco/smeterd/issues/7)
I’m too very new to HASS development or even Python, but I think this is a nice introductory project.
My code hase not been tested yet in any way. This is just a draft of the data model, inspired by the HASS development tutorial and some other components.
This an evening project fo me, so my work on it might be a bit sporadic.
@Tyfoon do you have any coding experience and wish to contribute?
then the meter.py will work with your baud rate setting.
I think it has to do with the DSMR 4.* versus 2.2 telegrams.
i also changed line 56 to 30 instead of 13 because DSMR 4.0 consists of 30 lines instead of 13.
Looking at the output i’m getting it look like the gas totals don’t work …
Small progress report: I managed to get a development environment (Windows, Visual Studio) set up and familiarized myself with the basics of configuration and reporting data through entities.
The component used as an abstraction layer to read the meter has just been updated to incorporate my meter, so I hope to get this setup running on my Pi soon (as my dev machine is nowhere near my meter), in order to actually read the meter.
Next steps:
Actually read the meter
Either detect reportable values (not every home has the same reportable data), make them configurable or both
Could an interactive graph be achievable? I would like to report for various periods (now, last x weeks, months years)