A library and command-line tool to control the Holi SleepCompanion
pip install sleep360==0.2.0
This project allows to control the Holi SleepCompanion from a Linux computer.
The SleepCompanion is nice LED bulb that offers a lot of features to improve your sleep and your waking up. It is manufactured by Holi, a French company. A product description can be found by following these links:
This Sleep360 project is written in Python and can be used:
sleep360.Bulb()
objectpip install [--user] sleep360
cd python-sleep360
pip install [--user] .
pip install
installs a sleep360
binary.
Running it gives a prompt like this one:
Sleep360 shell (version x.y.z).
Type help or ? to list commands.
[sleep360] connect Bulb
Connecting to the Bulb...
[sleep360] set_color 0xff0000 0x00 0x00
[sleep360] disconnect
Disconnecting from the Bulb...
[sleep360] exit
bulb = Bulb(name="Bulb")
bulb.connect()
# Play with bulb commands
[...]
bulb.disconnect()
Examples are available in the tests directory.
The SleepCompanion bulb offers a lot of features. Among them, the following ones are currently supported by Sleep360:
This project has been developed by carefully studying the Bluetooth LE messages. The file BLE-protocol.md describes my understanding of these messages.