Projet de remplacement du "RPiPasserelle" d'Otec.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>pyHeatpump API index</title>
  6. </head>
  7. <body>
  8. <h1>pyHeatpump API</h1>
  9. <p>
  10. Welcome to the pyHeatpump API.
  11. </p>
  12. <hr />
  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. <p>
  23. List of the POST routes.
  24. <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>
  25. </p>
  26. <h2>Config</h2>
  27. Examples :
  28. <code>echo '{"heatpump": {"mac_address": "00:11:22:33:44:55" }}' | http POST http://rpi-ip/config/</code>
  29. <h2>Mac address</h2>
  30. Sets the mac address to the value given in text/plain format through the body of the request.
  31. Examples :
  32. <code>echo '00:11:22:33:44:55 | http POST http://rpi-ip/config/mac</code>
  33. <h2>Last update</h2>
  34. Sets the last_update timestamp relative to the *value* given in seconds and in text/plain format through the body of the request.
  35. If the *value* is 0, last_update is set to now.
  36. If the *value* is below 0, last_update is set to -*value* seconds after now.
  37. If the *value* is above 0, last_update is set to *value* seconds before now.
  38. Examples :
  39. <code>echo '0' | http POST http://rpi-ip/config/last_update</code>
  40. <code>echo '-3000' | http POST http://rpi-ip/config/last_update</code>
  41. An interesting example to set last_update to 0 (epoch):
  42. <code>echo '0' | http POST http://rpi-ip/config/last_update | http POST http://rpi-ip/config/last_update</code>
  43. </p>
  44. <h2>Heatpump Routes</h2>
  45. <p>
  46. List of the GET routes.
  47. <i>All of these routes return JSON-formatted dictionaries.</i>
  48. </p>
  49. <h3>Heatpump</h3>
  50. <ul>
  51. <li><a href="/heatpump">/heatpump</a> Get all variable values of a heatpump</li>
  52. </ul>
  53. <h3>Variable types</h3>
  54. <ul>
  55. <li><a href="/types">/types</a> Get all variable types</li>
  56. </ul>
  57. <h3>Variables</h3>
  58. <ul>
  59. <li><a href="/variables">/variables</a> Get all variables</li>
  60. </ul>
  61. <h3>Variables values</h3>
  62. <ul>
  63. <li><a href="/values">/values</a> Get all variables (not implemented)</li>
  64. <li><a href="/values/A/1">/values/{TYPE}/{ADDRESS}</a> Get current variable value</li>
  65. <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>
  66. </ul>
  67. </body>
  68. </html>