-
Notifications
You must be signed in to change notification settings - Fork 2
/
jw_dsmrreader.xml
185 lines (185 loc) · 9.88 KB
/
jw_dsmrreader.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?xml version="1.0"?>
<Container version="2">
<Name>DSMRReader</Name>
<Repository>xirixiz/dsmr-reader-docker</Repository>
<Registry>https://hub.docker.com/r/xirixiz/dsmr-reader-docker</Registry>
<Network>bridge</Network>
<MyIP/>
<Shell>sh</Shell>
<Privileged>false</Privileged>
<Support>https://forums.unraid.net/topic/101905-support-flight777-just-works-container-repository/</Support>
<Project>https://github.com/xirixiz/dsmr-reader-docker</Project>
<Overview>&lt;b&gt;DSMR protocol reader for smart energy meters. Stores data reads and visualizes energy use.&lt;/b&gt;
&lt;/br&gt;
&lt;/br&gt;
UNRAID template that JUST WORKS, brought to you by Flight777!
&lt;/br&gt;
&lt;/br&gt;
[b][span style='color: #E80000;']IMPORTANT 1!![/span][/b] --&gt; Next to this container, you will have to install a PostgreSQL container from the APPS, any version 11 or 12 will do.
DB name: dsmrreader
DB user: dsmrreader
DB password: dsmrreader
&lt;/br&gt;
&lt;/br&gt;
[b][span style='color: #E80000;']IMPORTANT 2!![/span][/b]
By default this container is set-up as RECEIVER (see DATALOGGER MODE), meaning that the DSMR P1 input is received on another machine with an instance of DSMR READER running and the internal datalogger on this instance is disabled. After running this container, you will need to set-up the SENDER with the right API, please see: https://dsmr-reader.readthedocs.io/en/v4/api.html#configuration
&lt;/br&gt;
&lt;/br&gt;
If you UNRAID machine has a direct P1 input, then change this value to STANDALONE and configure:
&lt;/br&gt;
&lt;/br&gt;
DATALOGGER INPUT METHOD=serial[br]
DATALOGGER_SERIAL_PORT=/dev/ttyUSB0[br]
DATALOGGER_SERIAL_BAUDRATE=115200[br]
[br]
[span style='color: #E80000;']and set your device to the right USB path[/span]
&lt;/br&gt;
&lt;/br&gt;
&lt;b&gt;[span style='color: #E80000;']IMPORTANT 3!![/span]&lt;/b&gt;
The DATALOGGER SLEEP TIME has been set to 10 seconds, instead of 1, to save you some DB writes. 6 readings per minute should still give you data enough ;)</Overview>
<Category>HomeAutomation:</Category>
<WebUI>http://[IP]:[PORT:80]</WebUI>
<TemplateURL>https://raw.githubusercontent.com/Flight777/unraid_justworks_templates/main/jw_dsmrreader.xml</TemplateURL>
<Icon>https://raw.githubusercontent.com/Flight777/unraid_justworks_templates/main/images/dsmrreader/dsmrreader.png</Icon>
<ExtraParams/>
<PostArgs/>
<CPUset/>
<DateInstalled>1611740837</DateInstalled>
<DonateText/>
<DonateLink>https://www.paypal.me/robvermeij</DonateLink>
<Description>&lt;b&gt;DSMR protocol reader for smart energy meters. Stores data reads and visualizes energy use.&lt;/b&gt;
&lt;/br&gt;
&lt;/br&gt;
UNRAID template that JUST WORKS, brought to you by Flight777!
&lt;/br&gt;
&lt;/br&gt;
[b][span style='color: #E80000;']IMPORTANT 1!![/span][/b] --&gt; Next to this container, you will have to install a PostgreSQL container from the APPS, any version 11 or 12 will do.
User:
DB name: dsmrreader
DB user: dsmrreader
DB password: dsmrreader
&lt;/br&gt;
&lt;/br&gt;
[b][span style='color: #E80000;']IMPORTANT 2!![/span][/b]
By default this container is set-up as RECEIVER (see DATALOGGER MODE), meaning that the DSMR P1 input is received on another machine with an instance of DSMR READER running and the internal datalogger on this instance is disabled. After running this container, you will need to set-up the SENDER with the right API, please see: https://dsmr-reader.readthedocs.io/en/v4/api.html#configuration
&lt;/br&gt;
&lt;/br&gt;
If you UNRAID machine has a direct P1 input, then change this value to STANDALONE and configure:
&lt;/br&gt;
&lt;/br&gt;
DATALOGGER INPUT METHOD=serial[br]
DATALOGGER_SERIAL_PORT=/dev/ttyUSB0[br]
DATALOGGER_SERIAL_BAUDRATE=115200[br]
[br]
[span style='color: #E80000;']and set your device to the right USB path[/span]
&lt;/br&gt;
&lt;/br&gt;
&lt;b&gt;[span style='color: #E80000;']IMPORTANT 3!![/span]&lt;/b&gt;
The DATALOGGER SLEEP TIME has been set to 10 seconds, instead of 1, to save you some DB writes. 6 readings per minute should still give you data enough ;)</Description>
<Networking>
<Mode>bridge</Mode>
<Publish>
<Port>
<HostPort>7777</HostPort>
<ContainerPort>80</ContainerPort>
<Protocol>tcp</Protocol>
</Port>
</Publish>
</Networking>
<Data>
<Volume>
<HostDir>/mnt/user/appdata/dsmr-reader/backups</HostDir>
<ContainerDir>/home/dsmr/app/backups</ContainerDir>
<Mode>rw</Mode>
</Volume>
</Data>
<Environment>
<Variable>
<Value/>
<Name>DJANGO_DATABASE_HOST</Name>
<Mode/>
</Variable>
<Variable>
<Value>admin</Value>
<Name>DSMRREADER_ADMIN_USER</Name>
<Mode/>
</Variable>
<Variable>
<Value/>
<Name>DSMRREADER_ADMIN_PASSWORD</Name>
<Mode/>
</Variable>
<Variable>
<Value>receiver</Value>
<Name>DATALOGGER_MODE</Name>
<Mode/>
</Variable>
<Variable>
<Value/>
<Name>DATALOGGER_SERIAL_PORT</Name>
<Mode/>
</Variable>
<Variable>
<Value/>
<Name>DATALOGGER_SERIAL_BAUDRATE</Name>
<Mode/>
</Variable>
<Variable>
<Value>localhost</Value>
<Name>VIRTUAL_HOST</Name>
<Mode/>
</Variable>
<Variable>
<Value>5432</Value>
<Name>DJANGO_DATABASE_PORT</Name>
<Mode/>
</Variable>
<Variable>
<Value>dsmrdb</Value>
<Name>DJANGO_DATABASE_NAME</Name>
<Mode/>
</Variable>
<Variable>
<Value>10</Value>
<Name>DATALOGGER_SLEEP</Name>
<Mode/>
</Variable>
<Variable>
<Value>99</Value>
<Name>PUID</Name>
<Mode/>
</Variable>
<Variable>
<Value>100</Value>
<Name>PGID</Name>
<Mode/>
</Variable>
<Variable>
<Value>nobody</Value>
<Name>SD_USER</Name>
<Mode/>
</Variable>
<Variable>
<Value>users</Value>
<Name>SD_GROUP</Name>
<Mode/>
</Variable>
</Environment>
<Labels/>
<Config Name="DATABASE HOST (Adjust to your UNRAID host IP)" Target="DJANGO_DATABASE_HOST" Default="[IP]" Mode="" Description="Container Variable: DJANGO_DATABASE_HOST " Type="Variable" Display="always" Required="true" Mask="false"/>
<Config Name="WEBUI ADMIN USERNAME" Target="DSMRREADER_ADMIN_USER" Default="" Mode="" Description="Container Variable: DSMRREADER_ADMIN_USER" Type="Variable" Display="always" Required="true" Mask="false">admin</Config>
<Config Name="WEBUI ADMIN PASSWORD" Target="DSMRREADER_ADMIN_PASSWORD" Default="dsmrreader" Mode="" Description="Container Variable: DSMRREADER_ADMIN_PASSWORD" Type="Variable" Display="always" Required="true" Mask="true"/>
<Config Name="WEB UI Port" Target="80" Default="" Mode="tcp" Description="Container Port: 80" Type="Port" Display="always" Required="true" Mask="false">7777</Config>
<Config Name="Backup directory" Target="/home/dsmr/app/backups" Default="" Mode="rw" Description="Container Path: /home/dsmr/app/backups" Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/dsmr-reader/backups</Config>
<Config Name="DATALOGGER MODE (change if P1 port is on this machine to STANDALONE)" Target="DATALOGGER_MODE" Default="receiver|standalone" Mode="" Description="Container Variable: DATALOGGER_MODE" Type="Variable" Display="always" Required="true" Mask="false">receiver</Config>
<Config Name="DATALOGGER SERIAL PORT" Target="DATALOGGER_SERIAL_PORT" Default="|/dev/ttyUSB0" Mode="" Description="Optional - required if setting DATALOGGER MODE to standalone!" Type="Variable" Display="always" Required="false" Mask="false"/>
<Config Name="DATALOGGER SERIAL BAUDRATE" Target="DATALOGGER_SERIAL_BAUDRATE" Default="|115200" Mode="" Description="Optional - required if setting DATALOGGER MODE to standalone!" Type="Variable" Display="always" Required="false" Mask="false"/>
<Config Name="VIRTUAL_HOST" Target="VIRTUAL_HOST" Default="" Mode="" Description="Container Variable: VIRTUAL_HOST" Type="Variable" Display="advanced" Required="true" Mask="false">localhost</Config>
<Config Name="DATABASE PORT" Target="DJANGO_DATABASE_PORT" Default="5432" Mode="" Description="Container Variable: DJANGO_DATABASE_PORT" Type="Variable" Display="advanced" Required="true" Mask="false">5432</Config>
<Config Name="DATABASE NAME" Target="DJANGO_DATABASE_NAME" Default="dsmrreader" Mode="" Description="Container Variable: DJANGO_DATABASE_NAME" Type="Variable" Display="advanced" Required="true" Mask="false">dsmrdb</Config>
<Config Name="DATALOGGER SLEEP TIME (seconds)" Target="DATALOGGER_SLEEP" Default="5" Mode="" Description="Container Variable: DATALOGGER_SLEEP" Type="Variable" Display="advanced" Required="true" Mask="false">10</Config>
<Config Name="PUID" Target="PUID" Default="" Mode="" Description="Container Variable: PUID" Type="Variable" Display="advanced" Required="true" Mask="false">99</Config>
<Config Name="PGID" Target="PGID" Default="" Mode="" Description="Container Variable: PGID" Type="Variable" Display="advanced" Required="true" Mask="false">100</Config>
<Config Name="Supervisor User" Target="SD_USER" Default="nobody" Mode="" Description="User of which the supervisor should be part, important for file permissions!" Type="Variable" Display="advanced" Required="true" Mask="false">nobody</Config>
<Config Name="Supervisor Group" Target="SD_GROUP" Default="users" Mode="" Description="Group of which the supervisor should be part, important for file permissions!" Type="Variable" Display="advanced" Required="true" Mask="false">users</Config>
</Container>