diff --git a/hobu_alert_system_motion/config.json b/hobu_alert_system_motion/config.json index 20107a5..7cc66bf 100644 --- a/hobu_alert_system_motion/config.json +++ b/hobu_alert_system_motion/config.json @@ -1,7 +1,7 @@ { "items": [ { - "host": "192.168.2.125", + "host": "192.168.2.126", "port": 4223, "uid": "wsk", "on": { diff --git a/hobu_distance_switch/app.js b/hobu_distance_switch/app.js index f9b4f20..f70ab66 100644 --- a/hobu_distance_switch/app.js +++ b/hobu_distance_switch/app.js @@ -10,6 +10,8 @@ Helper.each(Conf.items, function(item) { var PORT = item.port; var UID = item.uid; + Log.log('Init ' + UID); + var ipcon = new Tinkerforge.IPConnection(); // Create IP connection var dus = new Tinkerforge.BrickletDistanceUS(UID, ipcon); // Create device object diff --git a/hobu_distance_switch/config.json b/hobu_distance_switch/config.json index c723276..8502f0b 100644 --- a/hobu_distance_switch/config.json +++ b/hobu_distance_switch/config.json @@ -19,6 +19,26 @@ } } } + }, + { + "host": "192.168.2.125", + "port": 4223, + "uid": "z9q", + "on": { + "action": { + "timeout": 4500, + "on": { + "host": "hobu", + "port": "2999", + "path": "/set/state/of/powercontrol/27/to/1/" + }, + "off": { + "host": "hobu", + "port": "2999", + "path": "/set/state/of/powercontrol/27/to/0/" + } + } + } } ] }