Skip to content

Commit 343bf99

Browse files
AlexMekkeringfabaff
authored andcommitted
Add support for remote (TCP/IP) DSMR sensors (i.e. via ser2net) (home-assistant#1699)
* Add support for remote (TCP/IP) DSMR sensors (i.e. via ser2net) * Processed review comment and added ser2net config
1 parent f4e21d2 commit 343bf99

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

source/_components/sensor.dsmr.markdown

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ This component is known to work for:
3333
- Kaifa E0026
3434
- Kamstrup 382JxC (DSMR 2.2)
3535

36-
And USB serial converters:
36+
,USB serial converters:
3737

3838
- Cheap (Banggood/ebay) Generic PL2303
3939
- https://sites.google.com/site/nta8130p1smartmeter/webshop
40+
- https://www.sossolutions.nl/slimme-meter-kabel
41+
42+
And Serial to network proxies:
43+
44+
- ser2net - http://ser2net.sourceforge.net/
4045

4146
```yaml
4247
# Example configuration.yaml entry
@@ -46,13 +51,14 @@ sensor:
4651
4752
Configuration variables:
4853
49-
- **port** string (*Optional*): Serial port to which Smartmeter is connected (default: /dev/ttyUSB0).
50-
- **dsmr_version_** string (*Optional*): Version of DSMR used by meter, choices: 2.2, 4 (default: 2.2).
54+
- **port** string (*Optional*): Serial port to which Smartmeter is connected (default: /dev/ttyUSB0 (connected to USB port)). For remote (i.e. ser2net) connections, use TCP port number to connect to (i.e. 2001).
55+
- **host** string (*Optional*): Host to which Smartmeter is connected (default: '' (connected via serial or USB, see **port**)). For remote connections, use IP address of host to connect to (i.e. 192.168.1.13).
56+
- **dsmr_version** string (*Optional*): Version of DSMR used by meter, choices: 2.2, 4 (default: 2.2).
5157
52-
A full configuration example can be found below:
58+
Full configuration examples can be found below:
5359
5460
```yaml
55-
# Example configuration.yaml entry
61+
# Example configuration.yaml entry for USB/serial connected Smartmeter
5662
sensor:
5763
- platform: dsmr
5864
port: /dev/ttyUSB1
@@ -69,6 +75,31 @@ group:
6975
- sensor.gas_consumption
7076
```
7177
78+
```yaml
79+
# Example configuration.yaml entry for remote (TCP/IP, i.e. via ser2net) connection to host which is connected to Smartmeter
80+
sensor:
81+
- platform: dsmr
82+
host: 192.168.1.13
83+
port: 2001
84+
dsmr_version: 4
85+
86+
group:
87+
meter_readings:
88+
name: Meter readings
89+
entities:
90+
- sensor.power_consumption_low
91+
- sensor.power_consumption_normal
92+
- sensor.power_production_low
93+
- sensor.power_production_normal
94+
- sensor.gas_consumption
95+
```
96+
97+
Optional configuration example for ser2net:
98+
```sh
99+
# Example /etc/ser2net.conf for proxying USB/serial connections to DSMRv4 smart meters
100+
2001:raw:600:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS
101+
```
102+
72103
[HASSbian](/getting-started/installation-raspberry-pi-image/) users have to give dialout permission to the user `homeassistant`:
73104

74105
```

0 commit comments

Comments
 (0)