This project is a fork of this repo with added support for bluetooth 5 modules and glib to store configurations.
This is a simple CLI application you can use to control your Bluetooth Low Energy (BLE) lamp.
The project offers the following functionality:
- Turning the lamp on / off
- Controlling lamp brightness
- Controlling lamp temperature
- Sending initial setup signal
- Supports newer bluetooth modules
lampify was tested with the lamp Victoria Lighting Losange/PL500, hovewer a lot of chinese lamps have common control algorithm, so lampify should be compatible with all BLE lamps that can be controlled via Android applications from the list below (the list may be incomplete).
-
Developed by XuRenNan
-
Developed by ShangHai All Link Microelectronics Co., Ltd
This is the list of packages providing the files required to compile lampify. Be aware that package names usually do vary across different linux distributions.
-
Arch Linux
- bluez-libs
- make
- gcc
-
Debian / Ubuntu
- libbluetooth-dev
- make
- gcc
The compilation process is pretty simple:
git clone https://github.com/MasterDevX/lampify.git
cd lampify
make
To install (places executable in /usr/local/bin and sets up permissions):
sudo make install
To uninstall (removes executable from /usr/local/bin):
sudo make uninstall
Before you can control your lamp, you have to perform an initial setup so the lamp will remember the unique ID of your device generated by lampify. The ID is being generated based on your machine's hostname.
To perform the initial setup:
-
Turn the lamp on using the power switch
-
Within a few seconds after powering the lamp on, send a setup signal from your device:
lampify setup
-
If you see the lamp flashing, the connection is established
Turn the lamp on (without notification):
lampify on
Turn the lamp off (with notification):
lampify off