Mercurial > code > home > repos > homeauto
view service/rdf_to_mqtt/index.html @ 1532:7cc7700302c2
more service renaming; start a lot more serv.n3 job files
Ignore-this: 635aaefc7bd2fa5558eefb8b3fc9ec75
darcs-hash:2c8b587cbefa4db427f9a82676abdb47e651187e
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Thu, 06 Feb 2020 16:36:35 -0800 |
parents | |
children | 8c410b493da4 |
line wrap: on
line source
<!doctype html> <html> <head> <title>mqtt_graph_bridge</title> <meta charset="utf-8"> <script src="/lib/polymer/1.0.9/webcomponentsjs/webcomponents.min.js"></script> <script src="/lib/require/require-2.3.3.js"></script> <script src="/rdf/common_paths_and_ns.js"></script> <link rel="stylesheet" href="/rdf/browse/style.css"> </head> <body class="rdfBrowsePage"> mqtt_graph_bridge <p>Send demo statements to bridge:</p> <div><button data-post="output?s=:kitchenLight&p=:brightness" data-body="0.0">Send (:kitchenLight :brightness 0.0)</button></div> <div><button data-post="output?s=:kitchenLight&p=:brightness" data-body="1.0">Send (:kitchenLight :brightness 1.0)</button></div> <div><button data-post="output?s=:livingLampShelf&p=:brightness" data-body="0.0">Send (:livingLampShelf :brightness 0.0)</button></div> <div><button data-post="output?s=:livingLampShelf&p=:brightness" data-body="1.0">Send (:livingLampShelf :brightness 1.0)</button></div> <script> Array.from(document.querySelectorAll("button")).forEach((el) => { el.addEventListener("click", (ev) => { fetch(el.dataset.post, { method: "PUT", body: el.dataset.body }); }); }); </script> </body> </html>