Mon, 11 May 2020 22:09:41 +0200
Added websockets for node status changes.
0 | 1 | <!-- |
2 | vim:syntax=docbksgml | |
3 | --> | |
4 | ||
5 | <chapter id="protocols"> | |
6 | <title>Protocollen.</title> | |
7 | <para> | |
8 | De netwerk protocollen. | |
9 | </para> | |
10 | ||
11 | <sect1 id="prototopic"> | |
12 | <title>MQTT topic formaat.</title> | |
13 | <para>De topics zijn als volgt gedefinieerd:</para> | |
14 | <programlisting> | |
15 | mbv1.0/<code>group_id</code>/<code>message_type</code>/<code>edge_node</code>/<code>device_id</code> | |
16 | </programlisting> | |
17 | ||
18 | <itemizedlist> | |
19 | <listitem><para><code>group_id</code> geeft het type apparaat aan zoals <code>fermenters</code> | |
20 | en <code>brewcontrol</code>.</para></listitem> | |
21 | <listitem><para><code>message_type</code> geeft het bericht type aan zoals | |
22 | <code>NBIRTH</code>, <code>DDATA</code>.</para></listitem> | |
23 | <listitem><para><code>edge_node</code> is de hostnaam van de node die het bericht stuurt. Dit is | |
24 | de naam zonder domain toevoeging.</para></listitem> | |
25 | <listitem><para><code>device_id</code> is de verkorte naam van het apparaat module waarvan dit | |
26 | bericht komt zoals de naam van een vergisting controller. Dit is niet aanwezig met NODE berichten.</para></listitem> | |
27 | </itemizedlist> | |
28 | ||
29 | <para> | |
30 | De volgende <code>group_id</code> namen zijn gedefinieerd: | |
31 | </para> | |
32 | <orderedlist> | |
511 | 33 | <listitem><para><code>brewery</code> is voor de bms applicatie zelf. Nog uitwerken.</para></listitem> |
34 | <listitem><para><code>fermenters</code> is voor vergisting controllers.</para></listitem> | |
35 | <listitem><para><code>co2meters</code> is een drukmeter om bijvoorbeeld hergisting op de fles | |
0 | 36 | te monitoren.</para></listitem> |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
37 | <listitem><para><code>ispindels</code> is een electronische hydrometer die in het gistvat drijft |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
38 | en de temperatuur en sg verstuurt.</para></listitem> |
0 | 39 | </orderedlist> |
40 | ||
41 | <para>De volgende <code>message_type</code> namen zijn gedefinieerd:</para> | |
42 | <orderedlist> | |
43 | <listitem><para>NBIRTH geeft aan wanneer een node opstart en met het netwerk | |
44 | verbonden is. Dit is een zogenaamd persistent bericht, het blijft voor nieuwe | |
45 | MQTT clients altijd zichtbaar. Bij het starten van een node wordt er een payload | |
46 | verzonden, zie het payload formaat voor een node. Als een node afsluit wordt juist geen | |
47 | payload verzonden zodat het bericht verdwijnt.</para></listitem> | |
48 | <listitem><para>NDEATH wordt verstuurd als een node offline gaat. Maar het kan ook | |
49 | ontvangen worden als de MQTT verbinding verbroken wordt met een node, het NDEATH | |
325
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
50 | bericht is ook het `last will' bericht van een node. Maar als het echt fout gaat |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
51 | dan zal er mogenlijk nooit een NDEATH bericht gezien worden.</para></listitem> |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
52 | <listitem><para>NCMD is een commando bestemd voor een node. |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
53 | Dit kan bijvoorbeeld een reboot commando zijn.</para></listitem> |
364 | 54 | <listitem><para>NDATA wordt verstuurd als er veranderingen zijn voor de node, |
55 | maar ook iedere vijf minuten om aan te geven dat de node nog "levend" en aanwezig | |
56 | is.</para></listitem> | |
57 | ||
0 | 58 | <listitem><para>DBIRTH is een of meer berichten van een apparaat wat online komt |
325
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
59 | en ingeschakeld is. Een apparaat is een deel van een node. |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
60 | Bij het opstarten van de node is er geen <code>device_id</code> |
0 | 61 | omdat alle apparaten is een keer verstuurd worden. Indien er later een enkel apparaat |
62 | ingeschakeld wordt dan is er wel een geldige <code>device_id</code> aanwezig. | |
63 | Hier ook weer, er is een payload bij opstarten en geen payload bij afsluiten om het | |
64 | persistente bericht goed te houden.</para></listitem> | |
364 | 65 | <listitem><para>DDEATH wordt verstuurd als een node offline gaat, of als het apparaat |
66 | uitgeschakelt wordt.</para></listitem> | |
0 | 67 | <listitem><para>DDATA heeft altijd een payload, maar deze hoeft niet volledig te zijn, |
68 | enkel de gewijzigde data moet in het bericht zitten.</para></listitem> | |
69 | <listitem><para>DLOG is een data log. Hier bestaat de payload uit gegevens die de | |
70 | bms applicatie in de database zet.</para></listitem> | |
325
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
71 | <listitem><para>DCMD is een commando voor een apparaat wat op een node geinstalleerd is. |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
72 | Dit zullen voornamelijk instellingen voor dat enkele apparaat zijn.</para></listitem> |
0 | 73 | </orderedlist> |
74 | ||
75 | </sect1> | |
76 | ||
77 | ||
78 | <sect1 id="payloadnode"> | |
79 | <title>Netwerk payload formaat voor een node</title> | |
80 | <para> | |
81 | De payload zoals die door een node verstuurd wordt. Het wordt in json formaat | |
511 | 82 | verzonden zonder extra spaties en opmaak zoals hieronder is te zien. Het timestamp |
83 | is de unix tijd sinds 1 januari 1970. Niet alle controllers sturen een timestamp, | |
84 | controllers zonder klok laten dit weg. De tijd wordt dan door <code>bmsd</code> | |
85 | ingevuld en is de tijd dat het bericht ontvangen wordt. | |
579
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
86 | Het `seq' nummer wordt met ieder bericht met 1 verhoogd. |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
87 | Ook dit nummer is niet altijd aanwezig.</para> |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
88 | <para>In de `metric' groep is de `interval' optioneel. Dit wordt bijvoorbeeld |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
89 | verstuurd door iSpindels en is de ingestelde update interval tijd in seconden. |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
90 | Indien dit niet aanwezig is dan wordt 300 seconden als standaard waarde gebruikt. |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
91 | Deze waarde wordt gebruikt om een apparaat als offline te markeren indien het langer |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
92 | als twee maal deze tijd niet wordt gezien.</para> |
0 | 93 | <programlisting> |
94 | { | |
95 | "timestamp": 1532201089, | |
96 | "metric": { | |
97 | "uuid": "b508f01c-1f82-4e8b-b0d2-d88ecfb53031", | |
579
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
98 | "interval":300, |
0 | 99 | "properties": { |
100 | "hardwaremake": "Raspberry", | |
101 | "hardwaremodel": "Unknown", | |
102 | "os": "Linux", | |
103 | "os_version": "4.1.19+", | |
104 | "FW": "0.8.2" | |
105 | }, | |
106 | "THB": { | |
107 | "temperature": 20.0, | |
108 | "humidity": 50.0, | |
109 | "barometer": 1002 | |
110 | }, | |
111 | "GPS": { | |
112 | "latitude": 1.2345, | |
113 | "longitude": 2.3456, | |
114 | "altitude": 20 | |
115 | }, | |
116 | "net": { | |
117 | "address": "10.126.151.11", | |
118 | "ifname": "eth0", | |
119 | "rssi": 0 | |
120 | } | |
121 | } | |
122 | } | |
123 | </programlisting> | |
124 | </sect1> | |
125 | ||
126 | <sect1 id="cmdnode"> | |
127 | <title>Netwerk kommando payload formaat voor nodes.</title> | |
128 | <para>De volgende kommando's kunnen gestuurd worden naar nodes:</para> | |
129 | <programlisting> | |
130 | { | |
131 | "timestamp":1532201089, | |
132 | "metric": { | |
133 | "Node Control/Reboot":true | |
134 | } | |
135 | } | |
325
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
136 | </programlisting> |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
137 | <para>Dit commando reboot niet de computer maar de applicatie die op een |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
138 | computer zoals een Raspberry Pi geinstalleerd is. Een uitzondering zijn de |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
139 | controllers zoals Arduino's en andere eenvoudige systemen.</para> |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
140 | <programlisting> |
0 | 141 | { |
142 | "timestamp":1532201089, | |
143 | "metric": { | |
144 | "Node Control/Rebirth":true | |
145 | } | |
146 | } | |
147 | </programlisting> | |
325
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
148 | <para>Dit commando zorgt er voor dat alle NBIRTH en DBIRTH berichten opnieuw |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
149 | verzonden worden alsof de computer net is opgestart. Dit kan nuttig zijn na |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
150 | een herstart van de bms applicatie zelf zodat de juiste nodes informatie weer |
9a8c650972ca
Update some documentation. Thermometer gauges animate easing
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
151 | beschikbaar is.</para> |
0 | 152 | </sect1> |
153 | ||
154 | <sect1 id="payloadfermdata"> | |
155 | <title>Netwerk payload data formaat voor vergisting controllers</title> | |
156 | <para> | |
157 | Dit is het meest uitgebreide formaat wat getoond is. Indien er bijvoorbeeld geen | |
361
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
158 | chiller aanwezig is, dan wordt een `null' gestuurd in plaats van een json blok |
0 | 159 | met gegevens. De werkelijke uitvoering van de hardware en de configuratie daarvan |
160 | bepaald dus het uiteindelijke payload formaat. | |
161 | </para> | |
162 | <programlisting> | |
163 | { | |
164 | "uuid": "48c9ae27-3f58-41c9-ae4b-1d57b249c45a", | |
165 | "alias": "unit1", | |
166 | "product": { | |
167 | "uuid": "1eb0c7bf-bf06-491c-a086-ac5478d521b9", | |
168 | "code": "CB0001", | |
592 | 169 | "name": "Hoppy Housebeer", |
170 | "yeast_lo": 18.0, | |
171 | "yeast_hi": 24.0 | |
0 | 172 | }, |
173 | "air": { | |
174 | "address": "70d60411-3ec8-40ab-998a-81fead83025f", | |
175 | "state": "OK", | |
176 | "temperature": 21.562 | |
177 | }, | |
178 | "beer": { | |
179 | "address": "8ec36f9d-f382-4e32-a47f-732642e1018d", | |
180 | "state": "OK", | |
181 | "temperature": 22.125 | |
182 | }, | |
183 | "chiller": { | |
184 | "address": "e81265b8-07f7-4b22-96c1-6f55a4b66a83", | |
185 | "state": "OK", | |
186 | "temperature": 12.437 | |
187 | }, | |
188 | "heater": { | |
189 | "address": "d2f2d6bc-4d12-4852-9462-95f4c2476034", | |
190 | "state": 0, | |
191 | "usage": 10710793 | |
192 | }, | |
193 | "cooler": { | |
194 | "address": "a9f30140-812c-4ec1-9e98-3a9d47deff7c", | |
195 | "state": 0, | |
196 | "usage": 920504 | |
197 | }, | |
198 | "fan": { | |
199 | "address": "ae9f9887-8209-4810-9f58-ddfb34ee142f", | |
200 | "state": 100, | |
201 | "usage": 62889739 | |
202 | }, | |
203 | "light": { | |
204 | "address": "cc6353cf-9c97-41b9-b6cf-00cea312e478", | |
205 | "state": 0, | |
206 | "usage": 29647290 | |
207 | }, | |
208 | "door": { | |
209 | "address": "ad8746d1-0549-485a-a215-41e5cdde9e75", | |
210 | "state": 1 | |
211 | }, | |
212 | "psu": { | |
213 | "address": "e1bb7182-883d-4977-a1c0-76e214072fc5", | |
214 | "state": 1 | |
215 | }, | |
216 | "stage": "PRIMARY", | |
217 | "mode": "BEER", | |
218 | "setpoint": { | |
219 | "low": 21.0, | |
592 | 220 | "high": 21.5 |
334
26c6f8e5d58e
Added webcam_url and webcam_light fields to the mon_fermenters database table. Currently these fields need to be set using phpMyAdmin or another tool. If the webcam_url field is set, then on the mon_fermenter webpage a button is added to show a webcam page.
Michiel Broek <mbroek@mbse.eu>
parents:
325
diff
changeset
|
221 | }, |
0 | 222 | "alarm": 0, |
223 | "profile": { | |
224 | "uuid": "c93ad1bb-0446-4788-9c43-83990c5f8b82", | |
225 | "name": "Witbier methode Cellis", | |
226 | "state": "OFF", | |
227 | "percent": 0, | |
228 | "inittemp": { | |
229 | "low": 17.9, | |
230 | "high": 18.1 | |
231 | }, | |
232 | "steps": [ | |
233 | { | |
234 | "resttime": 2, | |
235 | "steptime": 0, | |
236 | "target": { | |
237 | "low": 18.0, | |
238 | "high": 18.0 | |
239 | }, | |
240 | "fridgemode": 0 | |
241 | }, | |
242 | { | |
243 | "resttime": 0, | |
244 | "steptime": 24, | |
245 | "target": { | |
246 | "low": 18.0, | |
247 | "high": 22.0 | |
248 | }, | |
249 | "fridgemode": 0 | |
250 | }, | |
251 | { | |
252 | "resttime": 48, | |
253 | "steptime": 96, | |
254 | "target": { | |
255 | "low": 26.0, | |
256 | "high": 26.0 | |
257 | }, | |
258 | "fridgemode": 0 | |
259 | } | |
260 | ] | |
261 | } | |
262 | } | |
263 | </programlisting> | |
264 | <para>Temperature states can be: OK, MISSING or ERROR.<para> | |
265 | <para>The general `mode' can be: OFF, NONE, FRIDGE, BEER or PROFILE.</para> | |
266 | <para>The profile `state' can be: OFF, PAUSE, RUN, DONE or ABORT.</para> | |
267 | </sect1> | |
268 | ||
269 | ||
270 | <sect1 id="payloadfermlog"> | |
271 | <title>Netwerk payload log formaat voor vergisting controllers</title> | |
272 | <para> | |
273 | Dit is het meest uitgebreide formaat wat getoond is. Indien er bijvoorbeeld geen | |
274 | chiller aanwezig is, dan wordt geen data hiervoor verstuurd. | |
275 | De werkelijke uitvoering van de hardware en de configuratie daarvan | |
276 | bepaald dus het uiteindelijke payload formaat. | |
277 | </para> | |
278 | <programlisting> | |
279 | { | |
280 | "timestamp": 1532201089, | |
281 | "metric": { | |
282 | "product": { | |
283 | "uuid": "1eb0c7bf-bf06-491c-a086-ac5478d521b9", | |
284 | "code": "CB0001", | |
285 | "name": "Hoppy Housebeer" | |
286 | }, | |
287 | "stage": "PRIMARY", | |
288 | "mode": "BEER", | |
289 | "temperature": { | |
290 | "air": 20.125, | |
291 | "beer": 20.062, | |
292 | "chiller": -3.000, | |
293 | "room": 20.1 | |
294 | }, | |
295 | "setpoint": { | |
296 | "low": 19.8, | |
297 | "high": 20.1 | |
298 | }, | |
299 | "heater": { | |
300 | "power": 100, | |
301 | "usage": 1234 | |
302 | }, | |
303 | "cooler": { | |
304 | "power": 0, | |
305 | "usage": 27273 | |
306 | }, | |
307 | "fan": { | |
308 | "power": 100, | |
309 | "usage": 8273772 | |
310 | }, | |
311 | "event": "Something to mark", | |
312 | "fermenter_uuid": "48c9ae27-3f58-41c9-ae4b-1d57b249c45a" | |
313 | } | |
314 | } | |
315 | </programlisting> | |
361
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
316 | <para> |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
317 | De ontvangen vergisting log gegevens worden niet opgeslagen in de SQL database |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
318 | maar in platte tekst bestanden. Hierdoor is de gelogde informatie sneller toegankelijk. |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
319 | Ieder brouw product heeft zijn eigen bestand. |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
320 | De bestanden staan in <code>www/logs/fermentation/</code>. |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
321 | De bestandsnamen zijn <code>product_code\ product_name.log</code>. |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
322 | Het interne formaat is:</para> |
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
323 | <programlisting> |
530
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
324 | 2014-11-15 18:39:12,BEER,PRIMARY,20.312,19.750,-1.500,20.5,18.6,18.8,35,12345,0,67890,Whatsup,Fermenter |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
325 | | | | | | | | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
326 | 0 datetime + | | | | | | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
327 | 1 werkwijze ---------+ | | | | | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
328 | 2 vergisting fase ---------+ | | | | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
329 | 3 temperatuur lucht --------------+ | | | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
330 | 4 temperatuur bier ----------------------+ | | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
331 | 5 temperatuur koeler ---------------------------+ | | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
332 | 6 temperatuur ruimte ----------------------------------+ | | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
333 | 7 instelwaarde laag ----------------------------------------+ | | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
334 | 8 instelwaarde hoog ---------------------------------------------+ | | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
335 | 9 verwarming vermogen -----------------------------------------------+ | | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
336 | 10 verwarming verbruik ---------------------------------------------------+ | | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
337 | 11 koeler vermogen -----------------------------------------------------------+ | | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
338 | 12 koeler verbruik ---------------------------------------------------------------+ | | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
339 | 13 gebeurtenis --------------------------------------------------------------------------+ | |
a7430eee20bd
Updated the documentation. Changed page layout.
Michiel Broek <mbroek@mbse.eu>
parents:
511
diff
changeset
|
340 | 14 vergister uuid --------------------------------------------------------------------------------+ |
361
9f07e2f47ec8
Moved some stuff to the real documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
341 | </programlisting> |
0 | 342 | </sect1> |
343 | ||
579
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
344 | <sect1 id="payloadco2data"> |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
345 | <title>Netwerk payload data formaat voor CO2 meters.</title> |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
346 | <para> |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
347 | Nog schrijven |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
348 | </para> |
592 | 349 | <programlisting> |
350 | { | |
351 | "seq":228196, | |
352 | "metric":{ | |
353 | "units":[ | |
354 | { | |
355 | "uuid":"c0ffeeee-dead-beef-caf0-3c71bffe4054", | |
356 | "alias":"unit1", | |
357 | "mode":"ON", | |
358 | "alarm":0, | |
359 | "temperature":{ | |
360 | "state":"OK", | |
361 | "address":"e001191420732a28", | |
362 | "temperature":20.250 | |
363 | }, | |
364 | "pressure":{ | |
365 | "state":"OK", | |
366 | "channel":7, | |
367 | "voltage":0.322, | |
368 | "zero":0.110, | |
369 | "bar":0.00 | |
370 | } | |
371 | }, | |
372 | { | |
373 | "uuid":"c0ffeeee-dead-beef-caf1-3c71bffe4054", | |
374 | "alias":"unit2", | |
375 | "mode":"OFF", | |
376 | "alarm":1, | |
377 | "temperature":{ | |
378 | "state":"OK", | |
379 | "address":"e001191420732a28", | |
380 | "temperature":20.250 | |
381 | }, | |
382 | "pressure":{ | |
383 | "state":"OK", | |
384 | "channel":6, | |
385 | "voltage":0.075, | |
386 | "zero":0.109, | |
387 | "bar":0.00 | |
388 | } | |
389 | } | |
390 | ] | |
391 | } | |
392 | } | |
393 | </programlisting> | |
579
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
394 | </sect1> |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
395 | |
506
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
396 | <sect1 id="payloadco2log"> |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
397 | <title>Netwerk payload log formaat voor CO2 meters.</title> |
511 | 398 | <para> |
592 | 399 | Voor iedere actieve CO2 meter wordt bij iedere systeemstart en iedere vijf |
400 | minuten een logbericht gestuurd. Omdat de CO2 meters eenvoudige | |
511 | 401 | controllers zijn is er geen tijd en product informatie beschikbaar. Deze |
402 | ontbrekende gegevens worden aangevuld door <command>bmsd</command> | |
403 | </para> | |
404 | <programlisting> | |
592 | 405 | { |
406 | "seq":228229, | |
407 | "metric":{ | |
408 | "uuid":"c0ffeeee-dead-beef-caf0-3c71bffe4054", | |
409 | "temperature":21.125, | |
410 | "pressure":0.000 | |
411 | } | |
412 | } | |
511 | 413 | </programlisting> |
506
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
414 | <para> |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
415 | De ontvangen CO2 log gegevens worden niet opgeslagen in de SQL database |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
416 | maar in platte tekst bestanden. Hierdoor is de gelogde informatie sneller toegankelijk. |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
417 | Ieder brouw product heeft zijn eigen bestand. |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
418 | De bestanden staan in <code>www/logs/co2pressure/</code>. |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
419 | De bestandsnamen zijn <code>product_code\ product_name.log</code>. |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
420 | Het interne formaat is:</para> |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
421 | <programlisting> |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
422 | 2019-10-11 16:13:33,22.250,5.964,c0ffeeee-dead-beef-caf0-3c71bffe4054 |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
423 | | | | | |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
424 | 0 datetime + | | | |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
425 | 1 temperatuur ----------+ | | |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
426 | 2 CO2 flesdruk in bar ---------+ | |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
427 | 3 meter uuid -------------------------------------+ |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
428 | </programlisting> |
8ab0e87d579e
Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents:
364
diff
changeset
|
429 | </sect1> |
0 | 430 | |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
431 | |
579
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
432 | <sect1 id="payloadispindeldata"> |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
433 | <title>Netwerk payload data formaat voor iSpindels.</title> |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
434 | <para> |
592 | 435 | Iedere actieve iSpindel stuurt bij iedere systeemstart een bericht. |
436 | Daarna na iedere <code>interval</code> tijd in seconden een volgend bericht. | |
437 | Omdat de iSpindel eenvoudige controllers zijn is er geen tijd en product | |
595 | 438 | informatie beschikbaar. De instellingen voor <code>bmsd</code> in de iSpindel zijn: |
439 | </para> | |
440 | ||
441 | <orderedlist> | |
442 | <listitem><para>Unit of temperature: Celsius</para></listitem> | |
443 | <listitem><para>Service Type: HTTP</para></listitem> | |
444 | <listitem><para>Token: leeg laten</para></listitem> | |
445 | <listitem><para>Server Address: het server IP adres</para></listitem> | |
446 | <listitem><para>Server Port: 80</para></listitem> | |
447 | <listitem><para>Path / URI: /ispindel/index.php</para></listitem> | |
448 | </orderedlist> | |
449 | ||
450 | <para> | |
451 | De densiteit wordt standaard door de iSpindel in graden Plato gegeven en zo worden | |
452 | de gegevens ook verwerkt. Het SG wordt door de <code>/ispindel/index.php</code> | |
453 | berekend. Dit script verzorgd de omzetting van de iSpindel POST data naar MQTT | |
454 | data. | |
455 | </para> | |
456 | ||
457 | <informaltable frame="none" rowsep="0" colsep="0"> | |
458 | <tgroup cols="2"> | |
459 | <tbody> | |
460 | <row> | |
461 | <entry> | |
462 | <para> | |
463 | <figure><title>iSpindel menu.</title> | |
464 | <mediaobject> | |
465 | <imageobject> | |
466 | <imagedata valign="top" fileref="bms-ispindel-1.png" scale="15" format="png"> | |
467 | </imageobject> | |
468 | </mediaobject> | |
469 | </figure> | |
470 | </para> | |
471 | </entry> | |
472 | <entry> | |
473 | <para> | |
474 | <figure><title>iSpindel configuratie.</title> | |
475 | <mediaobject> | |
476 | <imageobject> | |
477 | <imagedata valign="top" fileref="bms-ispindel-2.png" scale="15" format="png"> | |
478 | </imageobject> | |
479 | </mediaobject> | |
480 | </figure> | |
481 | </para> | |
482 | </entry> | |
483 | </row> | |
484 | </tbody> | |
485 | </tgroup> | |
486 | </informaltable> | |
487 | ||
488 | <para> | |
489 | De ontbrekende gegevens worden aangevuld door <command>bmsd</command> | |
490 | De volgende gegevens worden via het MQTT protocol ontvangen: | |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
491 | </para> |
592 | 492 | <programlisting> |
493 | { | |
494 | "unit":{ | |
495 | "uuid":"c0ffeeee-cafe-dead-bee0-2af236d50dc9", | |
496 | "alias":"iSpindel000", | |
497 | "alarm":0, | |
498 | "interval":900, | |
499 | "angle":42.96722, | |
500 | "temperature":25.5625, | |
501 | "battery":4.254432, | |
502 | "gravity":9.306425 | |
503 | } | |
504 | } | |
505 | </programlisting> | |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
506 | <para> |
592 | 507 | De iSpindel stuurt geen aparte log informatie, alle informatie voor de logfile |
508 | wordt uit het standaard bericht gehaald. | |
595 | 509 | De log gegevens worden niet opgeslagen in de SQL database |
510 | maar weggeschreven in platte tekst bestanden. Hierdoor is de gelogde informatie sneller toegankelijk. | |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
511 | Ieder brouw product heeft zijn eigen bestand. |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
512 | De bestanden staan in <code>www/logs/ispindel/</code>. |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
513 | De bestandsnamen zijn <code>product_code\ product_name.log</code>. |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
514 | Het interne formaat is:</para> |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
515 | <programlisting> |
579
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
516 | 2020-01-05 14:01:53,19.3750,7.08093,1.02806,3.34724,38.78126,900,c0ffeeee-cafe-dead-bee0-2af236d50dc9 |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
517 | | | | | | | | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
518 | 0 datetime + | | | | | | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
519 | 1 temperatuur -----------+ | | | | | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
520 | 2 densiteit plato ---------------+ | | | | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
521 | 3 densiteit SG --------------------------+ | | | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
522 | 4 batterij voltage ------------------------------+ | | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
523 | 5 tilt hoek ---------------------------------------------+ | | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
524 | 6 update interval ----------------------------------------------+ | |
1253a237b620
Added check for database changes for iSpindels such as a new beer, or changing mode. Added denity in Plato and SG to the iSpindel web screen. The iSpindels must be calibrated in Plato! A bit of documentation updated.
Michiel Broek <mbroek@mbse.eu>
parents:
568
diff
changeset
|
525 | 7 ispindel uuid ------------------------------------------------------------------+ |
568
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
526 | </programlisting> |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
527 | </sect1> |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
528 | |
6f3c24e21deb
Added ispindel logging. Updated the documentation.
Michiel Broek <mbroek@mbse.eu>
parents:
530
diff
changeset
|
529 | |
0 | 530 | </chapter> |