Skip to content

Commit

Permalink
Increase version to 0.2.2 and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Oct 27, 2016
1 parent fdb6cce commit 21f6ad5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
56 changes: 30 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,36 @@ You can always specify which bluetooth adapter (default: hci0) you want to use b
Just launch magicblueshell as root user :

```
piouffb@Ordinatron-3000:~/workspace/python/pyMagicBlue$ sudo magicblueshell
Magic Blue interactive shell v0.1
Type "help" to see what you can do
Magic Blue interactive shell v0.2.2
Type "help" for a list of available commands
> help
----------------------------
| List of available commands |
----------------------------
COMMAND PARAMETERS DETAILS
------- ---------- -------
help Show this help
list_devices List Bluetooth LE devices in range
connect mac_address Connect to light bulb
disconnect Disconnect from current light bulb
set_color name|hexvalue Change bulb's color
set_warm_light intensity[0.0-1.0] Set warm light
turn on|off Turn on / off the bulb
exit Exit the script
> list_devices
Listing Bluetooth LE devices in range. Press CTRL+C to stop searching.
Name Mac address
---- -----------
LEDBLE-1D433903 C7:17:1D:43:39:03
---------------
COMMAND PARAMETERS DETAILS
------- ---------- -------
help Show this help
list_devices List Bluetooth LE devices in range
ls // //
connect mac_address or ID Connect to light bulb
disconnect Disconnect from current light bulb
set_color name or hexadecimal value Change bulb's color
set_warm_light intensity[0.0-1.0] Set warm light
turn on|off Turn on / off the bulb
exit Exit the script
> ls
Listing Bluetooth LE devices in range for 5 minutes.Press CTRL+C to stop searching.
ID Name Mac address
-- ---- -----------
1 LEDBLE-1D433903 c7:17:1d:43:39:03
^C
> connect C7:17:1D:43:39:03
INFO:__main__:Connected : True
> connect 1
INFO:magicblue.magicblueshell:Connected
> set_color red
> exit
Bye !
```

#### Passing command as an option
Expand All @@ -90,6 +90,9 @@ Usage is defined as follow :

```
usage: magicblueshell [-h] [-l LIST_COMMANDS] [-c COMMAND] [-m MAC_ADDRESS]
[-a BLUETOOTH_ADAPTER] [-b BULB_VERSION]
Python tool to control MagicBlue bulbs over Bluetooth
optional arguments:
-h, --help show this help message and exit
Expand All @@ -98,14 +101,15 @@ optional arguments:
-c COMMAND, --command COMMAND
Command to execute
-m MAC_ADDRESS, --mac_address MAC_ADDRESS
Device mac address. Must be set if command given in -c needs you to be connected
Device mac address. Must be set if command given in -c
needs you to be connected
-a BLUETOOTH_ADAPTER, --bluetooth_adapter BLUETOOTH_ADAPTER
Bluetooth adapter name as listed by hciconfig command
Bluetooth adapter name as listed by hciconfig
-b BULB_VERSION, --bulb-version BULB_VERSION
Bulb version as displayed in the official app
```
```
So if you want to change the color of bulb with mac address "C7:17:1D:43:39:03", just run :

> sudo magicblueshell -c 'set_color red' -m C7:17:1D:43:39:03
2 changes: 1 addition & 1 deletion magicblue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

from magicblue.magicbluelib import MagicBlue

__version__ = "0.2.1"
__version__ = "0.2.2"

0 comments on commit 21f6ad5

Please sign in to comment.