<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+ <change afterPath="$PROJECT_DIR$/tools/pop/pop.py" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/tools/pop/scanner.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/ssh.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ssh.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/servers/insteon.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/insteon.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/servers/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/squeezebox.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option value="Less File" />
<option value="Setup Script" />
<option value="HTML File" />
- <option value="JavaScript File" />
<option value="Python Script" />
+ <option value="JavaScript File" />
</list>
</option>
</component>
<workItem from="1566649679962" duration="18000" />
<workItem from="1566649714025" duration="13165000" />
<workItem from="1567019099272" duration="183000" />
- <workItem from="1567019296675" duration="3128000" />
- </task>
- <task id="LOCAL-00169" summary=".">
- <created>1551170528833</created>
- <option name="number" value="00169" />
- <option name="presentableId" value="LOCAL-00169" />
- <option name="project" value="LOCAL" />
- <updated>1551170528833</updated>
+ <workItem from="1567019296675" duration="5845000" />
+ <workItem from="1567261528772" duration="609000" />
+ <workItem from="1567408023339" duration="2511000" />
+ <workItem from="1567413752073" duration="969000" />
</task>
<task id="LOCAL-00170" summary=".">
<created>1551171910164</created>
<option name="project" value="LOCAL" />
<updated>1567019261001</updated>
</task>
- <option name="localTasksCounter" value="218" />
+ <task id="LOCAL-00218" summary=".">
+ <created>1567064583593</created>
+ <option name="number" value="00218" />
+ <option name="presentableId" value="LOCAL-00218" />
+ <option name="project" value="LOCAL" />
+ <updated>1567064583593</updated>
+ </task>
+ <option name="localTasksCounter" value="219" />
<servers />
</component>
<component name="TodoView">
['type' => 'ifttt', 'event' => 'coffee_on'],
],
'chambre/deshumidificateur/on' => [
- // ['type' => 'insteon', 'command' => '0?1138=I=0=0'],
+
],
'chambre/deshumidificateur/off' => [
- // ['type' => 'insteon', 'command' => '0?1338=I=0=0'],
+
+ ],
+ 'chambre/rapberry/on' => [
+ ['type' => 'insteon', 'command' => '0?1138=I=0=0'],
+ ],
+ 'chambre/raspberry/off' => [
+ ['type' => 'insteon', 'command' => '0?1338=I=0=0'],
],
'chambre/auto' => [
['type' => 'function', 'function' => 'chambreAuto', 'args' => [true]],
['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Stop All Sounds'],
['type' => 'scene', 'scene' => 'salon/freebox/off'],
['type' => 'scene', 'scene' => 'sdb/ampli/off'],
+ ['type' => 'scene', 'scene' => 'chambre/planetarium/off'],
['type' => 'ifttt', 'event' => 'coffee_off'],
['type' => 'ifttt', 'event' => 'oven_off'],
],
['type' => 'hue', 'light' => $freebox, 'scene' => ['on' => false]],
],
'ecomode/basic' => [
- //['type' => 'scene', 'scene' => 'bureau/media/off'],// Media bureau
+ ['type' => 'scene', 'scene' => 'bureau/media/off'],// Media bureau
['type' => 'scene', 'scene' => 'salon/freebox/off'],
['type' => 'scene', 'scene' => 'sdb/ampli/off'],
- // ['type' => 'domoticz', 'device' => '2', 'switchtype' => 'scene', 'command' => false],
+ ['type' => 'scene', 'scene' => 'chambre/raspberry/off'],
+ ['type' => 'domoticz', 'device' => '2', 'switchtype' => 'scene', 'command' => false],
],
'ecomode/super' => [
['type' => 'scene', 'scene' => 'ecomode/basic'],
- //['type' => 'domoticz', 'device' => '1', 'switchtype' => 'scene', 'command' => false],
+ ['type' => 'domoticz', 'device' => '1', 'switchtype' => 'scene', 'command' => false],
],
'ecomode/notsuper' => [
['type' => 'domoticz', 'device' => '1', 'switchtype' => 'scene', 'command' => true, 'priority' => false],
],
'ecomode/off' => [
['type' => 'scene', 'scene' => 'ecomode/notsuper'],
+ ['type' => 'scene', 'scene' => 'chambre/raspberry/on'],
['type' => 'scene', 'scene' => 'bureau/media/on'],// Media bureau
['type' => 'domoticz', 'device' => '2', 'switchtype' => 'scene', 'command' => true, 'priority' => false],
],
--- /dev/null
+#!/usr/bin/python
+
+from bluepy import btle
+
+class MyDelegate(btle.DefaultDelegate):
+ def __init__(self):
+ btle.DefaultDelegate.__init__(self)
+
+ def handleNotification(self, cHandle, data):
+ print("A notification was received: %s" %data)
+
+# Initialisation -------
+#p = btle.Peripheral("a0:e6:f8:dc:01:d7", btle.ADDR_TYPE_RANDOM)
+p = btle.Peripheral("a0:e6:f8:db:ff:2f", btle.ADDR_TYPE_PUBLIC)
+p.setDelegate( MyDelegate() )
+
+# Setup to turn notifications on, e.g.
+svc = p.getServiceByUUID("0000fe61-0000-1000-8000-00805f9b34fb")
+ch = svc.getCharacteristics()[0]
+print(ch.valHandle)
+
+# Main loop --------
+
+p.writeCharacteristic(ch.valHandle+1, "\x02\x00")
+
+while True:
+ if p.waitForNotifications(1.0):
+ # handleNotification() was called
+ continue
+
+ print("Waiting...")
+ # Perhaps do something else here
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python
+
+from bluepy.btle import Scanner, DefaultDelegate
+
+class ScanDelegate(DefaultDelegate):
+ def __init__(self):
+ DefaultDelegate.__init__(self)
+
+ def handleDiscovery(self, dev, isNewDev, isNewData):
+ if isNewDev:
+ print "Discovered device", dev.addr
+ elif isNewData:
+ print "Received new data from", dev.addr
+
+scanner = Scanner().withDelegate(ScanDelegate())
+devices = scanner.scan(1)
+
+for dev in devices:
+ print "Device %s (%s), RSSI=%d dB" % (dev.addr, dev.addrType, dev.rssi)
+ for (adtype, desc, value) in dev.getScanData():
+ print " %s = %s" % (desc, value)