This is a GUI controller for a Kasa Smart Bulb. The idea is to control the brightness remotely for various scientific reasons.
Use the following command to execute the script
python3 bulb_control/bulb_control.py
Or you can use a shorter version
./bc
The main function that the GUI offers are to following,
- Changing the brightness of the bulb manually,
- Setting up a day-to-night shift and have the brightness being changed automatically.
More features are being added.
- Input the IP address of the bulb, and uncheck the "Simulate Bulb" box.
- Click "connect" button, if the connection were correct, the indicator will be a green sphere, otherwise it would be a red cross.
- To change the brightness manually, drag the brightness slide.
- To start the automatic mode, check the "Automated Control" box.
The communication between the bulb and the GUI is achieved using Brain Dorey's code. Very cool project.
I want to remote control the smart bulb whom located in a university lab in UK. It is not very straightforward because there are some restrictions for the internet access using the eduroam system.
There is a built-in WiFi network from the Kasa smart bulb. Thanks to this extra WiFi, I managed to connect everything together. Firstly, I connected my Raspberry Pi to this WiFi to access this smart bulb. Then I physically connected my PC to the Raspberry Pi, while the PC had Internet access using eduroam. See the following chat for what I meant.
┌─────────────┐
│ Me │
└────┬───▲────┘
│ │
Any Method ┌─────────────┐
│ │ │ │
┌────▼───┴────┐ │ Smart Bulb │
│ Internet │ │ │
└────┬───▲────┘ └────┬───▲────┘
│ │ │ │
Eduroam Local WiFi
│ │ │ │
┌────▼───┴────┐ ┌──────▼───┴───────┐
│ │ SSH │ │
│ My PC ├──────▶ Raspberry Pi │
│ │ │ │
└─────────────┘ └──────────────────┘
This is only way I figured out to remotely control a device, while bypassing the restrictions from Eduroam. I am really bad with internet, and you probably will have better solutions.