Closed leonboot closed 6 years ago
Thanks for your PR! The original reason I only implemented port 1 is that for most people the gas meter should be on port 1 and the other ports could be used for other types of meters like water meters. However, according to the spec I don't know how to distinguish what type of meter is connected to a port and what are the available options. As far as I know at least in The Netherlands only Gas meters are attached so I think it's safe to just assume any meter connected to a port as being a Gas meter. So I will merge your PR.
@ruudverheijden my old gas meter used to be connected to port 1 as well, I suppose it's like that for 99.99% of the meters. I agree the DSMR spec is quite vague. I do believe only gas meters are connected at present. Maybe the device type 003 indicates it's a gas meter, but that's just a wild guess. Nothing concrete about that in the specs.
Anyway, thanks for merging! :)
The code assumes the gas meter is always connected to port 1. My gas meter was recently replaced and the replacement meter was connected to port 2. From what I can tell from the DSMR 4.0 spec, a gas meter can be connected to either port 1, 2, 3 or 4. Adding
case
lines for these ports fixed theUnable to parse line: 0-2:24.1.0
error lines for me.