api.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>MeteoControl WiFi Station</title>
  8. <!-- Bootstrap core -->
  9. <link href="/bootstrap.css" rel="stylesheet">
  10. <script src="/jquery.js"></script>
  11. <style>
  12. .main { font-size: 63px; }
  13. </style>
  14. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  15. <!--[if lt IE 9]>
  16. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  17. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  18. <![endif]-->
  19. </head>
  20. <body>
  21. <div class="container">
  22. <div class="header">
  23. <nav>
  24. <ul class="nav nav-pills pull-right">
  25. <li role="presentation"><a href="/">Home</a></li>
  26. <li role="presentation"><a href="/config">Configuration</a></li>
  27. <li role="presentation" class="active"><a href="/api">API</a></li>
  28. </ul>
  29. </nav>
  30. <h3 class="text-muted">MeteoControl</h3>
  31. </div>
  32. <div class="row">
  33. <h2>&nbsp;</h2>
  34. <div class="col-xs-offset-2">
  35. <div class="col-xs-10 col-md-5">
  36. <div class="panel panel-default">
  37. <div class="panel-heading">
  38. <h3 class="panel-title">Read value</h3>
  39. </div>
  40. <div class="panel-body">
  41. <h4>http://{IP}/api/sensors</h4>
  42. <p>Will return all sensors values</p>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="col-xs-10 col-md-5">
  47. <div class="panel panel-default">
  48. <div class="panel-heading">
  49. <h3 class="panel-title">Control output</h3>
  50. </div>
  51. <div class="panel-body">
  52. <h4>http://{IP}/api/output?control=1</h4>
  53. <p>Switch control output to HIGH state</p>
  54. <h4>http://{IP}/api/output?control=0</h4>
  55. <p>Switch control output to LOW state</p>
  56. </div>
  57. </div>
  58. </div>
  59. </div><!-- /col -->
  60. </div>
  61. </div>
  62. </div> <!-- /container -->
  63. </body>
  64. </html>