{"id":12,"date":"2026-09-21T09:44:58","date_gmt":"2026-09-21T07:44:58","guid":{"rendered":"http:\/\/aquasmartos.party\/?page_id=12"},"modified":"2026-09-21T09:44:58","modified_gmt":"2026-09-21T07:44:58","slug":"device","status":"publish","type":"page","link":"http:\/\/aquasmartos.party\/","title":{"rendered":"Device"},"content":{"rendered":"    <!-- TODO move this to an external CSS file. -->\n    <style>\n        form:invalid > button[type='submit'] {\n          pointer-events: none;\n          opacity: 0.8;\n        }\n          input:invalid {\n          border-color: #900;\n          background-color: #fdd;\n        }\n\n        input:focus:invalid {\n          outline: none;\n        }\n    <\/style>\n\n\t<!-- TODO move this to an external JS file. -->\n\t<script>\n\t\tfunction confirmDelete(deviceKey) {\n\t\t\tif ( window.confirm(`Delete device '${ deviceKey }'?`) ) {\n\t\t\t\tconst form = document.createElement( \"form\" );\n\t\t\t\tform.style.visibility = \"hidden\";\n\t\t\t\tform.method = \"POST\";\n\t\t\t\tform.action = \".\";\n\n\t\t\t\tconst input = document.createElement( \"input\" );\n\t\t\t\tinput.name = \"removeDevice\";\n\t\t\t\tinput.value = deviceKey;\n\t\t\t\tform.appendChild( input );\n\n\t\t\t\tdocument.body.appendChild( form );\n\t\t\t\tform.submit();\n\t\t\t}\n\t\t}\n\t<\/script>\n    <h3>OpenThings OTC Devices<\/h3>\n    \n\tRegister your devices here so you can access them through OpenThings online services.\n\n    <table>\n        <thead>\n        <tr>\n            <th>Device Type<\/th>\n            <th>OpenThings Cloud (OTC) Token<\/th>\n            <th>Device Description<\/th>\n\t\t\t<th>Actions<\/th>\n        <\/tr>\n        <\/thead>\n            <\/table>\n\n    <form action=\".\" method=\"POST\">\n        <input type=\"text\" name=\"deviceDescription\" placeholder=\"Please type in a device description here (required)\" required>\n        <select name=\"deviceType\" required>\n                            <option value=\"OpenGarage\">\n                    OpenGarage                <\/option>\n                                <option value=\"OSBee\">\n                    OSBee                <\/option>\n                                <option value=\"OpenSprinkler\">\n                    OpenSprinkler                <\/option>\n                        <\/select>\n        <button type=\"submit\">\n            <span>Add new device<\/span>\n        <\/button>\n    <\/form>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-12","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/pages\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":1,"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/pages\/12\/revisions"}],"predecessor-version":[{"id":13,"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/pages\/12\/revisions\/13"}],"wp:attachment":[{"href":"http:\/\/aquasmartos.party\/index.php\/wp-json\/wp\/v2\/media?parent=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}