Browse Source

[front] updated routes in html

Maxime Alves LIRMM@home 3 years ago
parent
commit
9c58549a81
1 changed files with 49 additions and 1 deletions
  1. 49
    1
      pyheatpump/index.html

+ 49
- 1
pyheatpump/index.html View File

@@ -10,7 +10,55 @@
10 10
 			Welcome to the pyHeatpump API.
11 11
 		</p>
12 12
 		<hr />
13
-		<h2>Routes</h2>
13
+		<h2>Configuration Routes</h2>
14
+		<p>
15
+			List of the GET routes.
16
+		</p>
17
+		<ul>
18
+			<li><a href="/config/">/config/</a> Get configuration as a JSON-formatted dictionary 
19
+			<li><a href="/config/mac">/config/mac</a> Get mac address configuration value in plain text format
20
+			<li><a href="/config/last_update">/config/last_update</a> Get last update value in plain text format (timestamp in seconds)
21
+		</ul>
22
+
23
+		<p>
24
+			List of the POST routes.
25
+
26
+			<i>The examples in this section are written with "<a href="httpie.org">httpie</a>" for readability, you can easily convert the to CURL syntax.</i>
27
+		</p>
28
+		
29
+		<h2>Config</h2>
30
+
31
+		Examples :
32
+
33
+		<code>echo '{"heatpump": {"mac_address": "00:11:22:33:44:55" }}' | http POST http://rpi-ip/config/</code> 
34
+
35
+		<h2>Mac address</h2>
36
+
37
+		Sets the mac address to the value given in text/plain format through the body of the request.
38
+
39
+		Examples :
40
+
41
+		<code>echo '00:11:22:33:44:55 | http POST http://rpi-ip/config/mac</code> 
42
+
43
+		<h2>Last update</h2>
44
+
45
+		Sets the last_update timestamp relative to the *value* given in seconds and in text/plain format through the body of the request.
46
+
47
+		If the *value* is 0, last_update is set to now.
48
+		If the *value* is below 0, last_update is set to -*value* seconds after now.
49
+		If the *value* is above 0, last_update is set to *value* seconds before now.
50
+
51
+		Examples :
52
+
53
+		<code>echo '0' | http POST http://rpi-ip/config/last_update</code>
54
+		<code>echo '-3000' | http POST http://rpi-ip/config/last_update</code>
55
+
56
+		An interesting example to set last_update to 0 (epoch):
57
+
58
+		<code>echo '0' | http POST http://rpi-ip/config/last_update | http POST http://rpi-ip/config/last_update</code>
59
+
60
+		</p>
61
+		<h2>Heatpump Routes</h2>
14 62
 		<p>
15 63
 			List of the GET routes.
16 64
 

Loading…
Cancel
Save