MikeCoder96 / HappyLighting-py

HappyLight BLE communication using Bleak (QHM Led Controller)
GNU Affero General Public License v3.0
20 stars 5 forks source link

happy lightning module #5

Closed supersheepop closed 1 year ago

supersheepop commented 1 year ago

hey is it possible to use the functions without the gui? if not, could you maybe find a way to do it? (I want to link my led strips to google assistant but I don't know how to use the functions without the gui and i don't know much about bluethooth ble devices)

use >>


scan() output> names QHM_d51

Connect(name) #QHM_d51 Change_color(RGB value)# 255,255,255 Change_mode(MODE)


LEDS_on() LEDS_off()


and is it possible to turn on and off the led strips with the app?

MikeCoder96 commented 1 year ago

Yes, it is already in my roadmap but I need to complete all function first. You are welcome to work on it and make eventually a PR

supersheepop commented 1 year ago

can i have a look at the files?

MikeCoder96 commented 1 year ago

What you mean my files? You can see already my repo

supersheepop commented 1 year ago

o sorry i see it

read-0nly commented 1 year ago

Just wanted to jump in to thank you for this - I couldn't actually run it because i'm missing QT stuff, but some gutting and reorg of the code and I can run it from the command line. One thing I did notice, and it might not matter as much when you actually have the GUI, it couldn't identify my lights. I had to modify the code and hardcode the mac address in - my device, even though it's listed in windows as QHM-0274, doesn't actually have a populated Name on the device so the startswith doesn't see it.

It took some work to get it working for me, but everything that matters is there, thanks again!

MikeCoder96 commented 1 year ago

glad you like this project. There is a already Command Line branch so, if you want, you can start from there and maybe make a merge request

read-0nly commented 1 year ago

I seem to not see the command line branch - or is it "custom_mode_test"? pyhl's main still seems to only build the window, should i be starting from CustomMode.py?

MikeCoder96 commented 1 year ago

I seem to not see the command line branch - or is it "custom_mode_test"? pyhl's main still seems to only build the window, should i be starting from CustomMode.py?

Sorry, I haven't pushed new branch. Here: https://github.com/MikeCoder96/HappyLighting-py/tree/nogui

read-0nly commented 1 year ago

Brilliant, thanks! I like where this idea is going already - I'll fork it and work on exposing the rest of the commands, then maybe something like custom mode, where a file could be fed in and run like a script with timing cues

MikeCoder96 commented 1 year ago

https://github.com/MikeCoder96/HappyLighting-py/commits/nogui