changeset 740:1f8abec7f687

more devices Ignore-this: f4279781f8d09d5b75cb1f6e740a7898
author drewp@bigasterisk.com
date Mon, 10 Feb 2020 23:58:26 -0800
parents 03bad43bbcb3
children 1135680fba5a
files service/rdf_to_mqtt/index.html service/rdf_to_mqtt/rdf_to_mqtt.py
diffstat 2 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/service/rdf_to_mqtt/index.html	Mon Feb 10 23:56:42 2020 -0800
+++ b/service/rdf_to_mqtt/index.html	Mon Feb 10 23:58:26 2020 -0800
@@ -17,8 +17,18 @@
     <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=:kitchenCounterLight&p=:brightness" data-body="0.0">Send (:kitchenCounterLight :brightness 0.0)</button></div>
+    <div><button data-post="output?s=:kitchenCounterLight&p=:brightness" data-body="1.0">Send (:kitchenCounterLight :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>
+    <div><button data-post="output?s=:livingLamp1&p=:brightness" data-body="0.0">Send (:livingLamp1 :brightness 0.0)</button></div>
+    <div><button data-post="output?s=:livingLamp1&p=:brightness" data-body="1.0">Send (:livingLamp1 :brightness 1.0)</button></div>
+    <div><button data-post="output?s=:livingLamp2&p=:brightness" data-body="0.0">Send (:livingLamp2 :brightness 0.0)</button></div>
+    <div><button data-post="output?s=:livingLamp2&p=:brightness" data-body="1.0">Send (:livingLamp2 :brightness 1.0)</button></div>
+    <div><button data-post="output?s=:livingLamp3&p=:brightness" data-body="0.0">Send (:livingLamp3 :brightness 0.0)</button></div>
+    <div><button data-post="output?s=:livingLamp3&p=:brightness" data-body="1.0">Send (:livingLamp3 :brightness 1.0)</button></div>
+    <div><button data-post="output?s=:livingLamp4&p=:brightness" data-body="0.0">Send (:livingLamp4 :brightness 0.0)</button></div>
+    <div><button data-post="output?s=:livingLamp4&p=:brightness" data-body="1.0">Send (:livingLamp4 :brightness 1.0)</button></div>
 
     <script>
      Array.from(document.querySelectorAll("button")).forEach((el) => {
@@ -31,5 +41,9 @@
      });
     </script>
 
+      <div class="served-resources">
+        <a href="stats/">/stats/</a>
+        <a href="output">/output (post)</a>
+      </div>
   </body>
 </html>
--- a/service/rdf_to_mqtt/rdf_to_mqtt.py	Mon Feb 10 23:56:42 2020 -0800
+++ b/service/rdf_to_mqtt/rdf_to_mqtt.py	Mon Feb 10 23:58:26 2020 -0800
@@ -31,6 +31,37 @@
         'ctx': ROOM['sonoff_0'],
         'values': 'binary',
     },
+    ROOM['livingLamp1']: {
+        'root': 'sonoff_1/switch/sonoff_basic_relay/command',
+        'ctx': ROOM['sonoff_1'],
+        'values': 'binary',
+    },
+    ROOM['livingLamp2']: {
+        'root': 'sonoff_2/switch/sonoff_basic_relay/command',
+        'ctx': ROOM['sonoff_2'],
+        'values': 'binary',
+    },
+    ROOM['livingLamp3']: {
+        'root': 'sonoff_3/switch/sonoff_basic_relay/command',
+        'ctx': ROOM['sonoff_3'],
+        'values': 'binary',
+    },
+    ROOM['livingLamp4']: {
+        'root': 'sonoff_4/switch/sonoff_basic_relay/command',
+        'ctx': ROOM['sonoff_4'],
+        'values': 'binary',
+    },
+    ROOM['livingLamp5']: {
+        'root': 'sonoff_5/switch/sonoff_basic_relay/command',
+        'ctx': ROOM['sonoff_5'],
+        'values': 'binary',
+    },
+#-t theater_blaster/ir_out -m 'input_game'
+#-t theater_blaster/ir_out -m 'input_bd'
+#-t theater_blaster/ir_out -m 'input_cbl'
+#-t theater_blaster/ir_out -m 'input_pc'
+#-t theater_blaster/ir_out/volume_up -m '{"times":1}'
+#-t theater_blaster/ir_out/volume_down -m '{"times":1}'
 }