Mercurial > code > home > repos > homeauto
view service/rdf_to_mqtt/index.html @ 739:03bad43bbcb3
more renaming, build updates
Ignore-this: 94a0df55a1d8a74d90ec84bb7351d3ef
author | drewp@bigasterisk.com |
---|---|
date | Mon, 10 Feb 2020 23:56:42 -0800 |
parents | fdddbdaf07b5 |
children | 1f8abec7f687 |
line wrap: on
line source
<!doctype html> <html> <head> <title>rdf_to_mqtt</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"> rdf_to_mqtt <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>