From 68e03fedd19e219ff23505096ab7f775cd6e05a5 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 19 Jun 2020 08:39:12 +0200 Subject: [PATCH] . --- .idea/workspace.xml | 114 ++++++++-------------------------------- config/cuisine.php | 2 +- scripts/lib/scenes.php | 5 +- tools/pop/pop.py | 14 +++-- tools/pop/stoppopdaemon | 3 +- 5 files changed, 38 insertions(+), 100 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2cdf70f..26e4c96 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,13 +2,11 @@ - - - - - + + + @@ -1228,15 +1228,19 @@ + + + + - - + + - + @@ -1271,78 +1275,4 @@ - - - - - - - - - - - - - No facets are configured - - - - - - - - - - - - - - - - - - - - - - home - - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/cuisine.php b/config/cuisine.php index b1f80d9..d39ebe5 100644 --- a/config/cuisine.php +++ b/config/cuisine.php @@ -3,7 +3,7 @@ config('ROOM_NAME', 'Cuisine'); config('ROOM', 'cuisine'); config('SQUEEZEBOX_PLAYER', 'Cuisine'); config('HIDEMASK_TIMEOUT', 250); -config('VOLUME_DEVICE', 'RaspberryPi'); +config('VOLUME_DEVICE', 'SqueezeboxPlayer'); if (DISPLAYINTERFACE) { $c = cuisine(); diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index df4183e..bd9ae29 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -18,6 +18,7 @@ $litvincent = 9; $bedlowscreenbrightness = 12; $home = 15; +$alert = 16; $chambrebedgroup = $chambre; @@ -263,9 +264,7 @@ $scenes = [ ['type' => 'insteon', 'command' => '0?1326=I=0=0'], ], 'home/alert' => [ - ['type' => 'hue', 'group' => $home, 'scene' => ['alert' => 'select']], - ['type' => 'hue', 'group' => $home, 'scene' => ['alert' => 'none'], 'delay' => 1], - ['type' => 'hue', 'group' => $home, 'scene' => ['alert' => 'select']], + ['type' => 'hue', 'group' => $alert, 'scene' => ['alert' => 'lselect']], ['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Tortuga Alerte'], ['type' => 'domoticz', 'device' => '392', 'command' => true], ], diff --git a/tools/pop/pop.py b/tools/pop/pop.py index fa23d77..fd6151e 100644 --- a/tools/pop/pop.py +++ b/tools/pop/pop.py @@ -42,14 +42,22 @@ while True: # Setup to turn notifications on, e.g. svc = p.getServiceByUUID("0000fe61-0000-1000-8000-00805f9b34fb") + ch = svc.getCharacteristics()[0] + p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00') + + ch = svc.getCharacteristics()[1] + p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00') + + ch = svc.getCharacteristics()[2] + p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00') - # Main loop -------- - # p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00') + ch = svc.getCharacteristics()[3] + p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00') while True: try: - if p.waitForNotifications(1.0): + if p.waitForNotifications(60.0): # handleNotification() was called continue diff --git a/tools/pop/stoppopdaemon b/tools/pop/stoppopdaemon index 880a1b1..fdccc0d 100644 --- a/tools/pop/stoppopdaemon +++ b/tools/pop/stoppopdaemon @@ -1,2 +1,3 @@ #!/bin/sh -/sbin/start-stop-daemon --stop --pidfile /var/run/pop-$1.pid --retry 10 \ No newline at end of file +/sbin/start-stop-daemon --stop --pidfile /var/run/pop-$1.pid +pkill -f pop.py \ No newline at end of file -- 2.39.5