123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>pyHeatpump API index</title>
- </head>
- <body>
- <h1>pyHeatpump API</h1>
- <p>
- Welcome to the pyHeatpump API.
- </p>
- <hr />
- <h2>Configuration Routes</h2>
- <p>
- List of the GET routes.
- </p>
- <ul>
- <li><a href="/config/">/config/</a> Get configuration as a JSON-formatted dictionary
- <li><a href="/config/mac">/config/mac</a> Get mac address configuration value in plain text format
- <li><a href="/config/last_update">/config/last_update</a> Get last update value in plain text format (timestamp in seconds)
- </ul>
-
- <p>
- List of the POST routes.
-
- <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>
- </p>
-
- <h2>Config</h2>
-
- Examples :
-
- <code>echo '{"heatpump": {"mac_address": "00:11:22:33:44:55" }}' | http POST http://rpi-ip/config/</code>
-
- <h2>Mac address</h2>
-
- Sets the mac address to the value given in text/plain format through the body of the request.
-
- Examples :
-
- <code>echo '00:11:22:33:44:55 | http POST http://rpi-ip/config/mac</code>
-
- <h2>Last update</h2>
-
- Sets the last_update timestamp relative to the *value* given in seconds and in text/plain format through the body of the request.
-
- If the *value* is 0, last_update is set to now.
- If the *value* is below 0, last_update is set to -*value* seconds after now.
- If the *value* is above 0, last_update is set to *value* seconds before now.
-
- Examples :
-
- <code>echo '0' | http POST http://rpi-ip/config/last_update</code>
- <code>echo '-3000' | http POST http://rpi-ip/config/last_update</code>
-
- An interesting example to set last_update to 0 (epoch):
-
- <code>echo '0' | http POST http://rpi-ip/config/last_update | http POST http://rpi-ip/config/last_update</code>
-
- </p>
- <h2>Heatpump Routes</h2>
- <p>
- List of the GET routes.
-
- <i>All of these routes return JSON-formatted dictionaries.</i>
- </p>
-
- <h3>Heatpump</h3>
- <ul>
- <li><a href="/heatpump">/heatpump</a> Get all variable values of a heatpump</li>
- </ul>
- <h3>Variable types</h3>
- <ul>
- <li><a href="/types">/types</a> Get all variable types</li>
- </ul>
- <h3>Variables</h3>
- <ul>
- <li><a href="/variables">/variables</a> Get all variables</li>
- </ul>
- <h3>Variables values</h3>
- <ul>
- <li><a href="/values">/values</a> Get all variables (not implemented)</li>
- <li><a href="/values/A/1">/values/{TYPE}/{ADDRESS}</a> Get current variable value</li>
- <li><a href="/values/A/1/2020-08-02T13:21:42">/values/{TYPE}/{ADDRESS}/{TIMESTAMP}</a> Get variable value at specified time (in iso format, e.g. : 2020-08-02T13:21:42)</li>
- </ul>
- </body>
- </html>
|