Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question regarding connecting and controlling a Nanoleaf Essentials HomeKit A60 E27 Smart Bulb using Python over BLE #1

Open
iyuvalk opened this issue Nov 20, 2024 · 0 comments

Comments

@iyuvalk
Copy link

iyuvalk commented Nov 20, 2024

First and foremost - I watched your three(!) AWESOME tutorials on BLE on YouTube and I must say WOW!!! THANKS a TON for all the time and resources you had to put into making these. It helped me a lot! Thanks!

I have a Nanoleaf Essentials HomeKit A60 E27 Smart Bulb (https://nanoleaf.me/en-EU/products/essentials/bulbs/a60-or-e27-smart-bulb-each/) which is currently only connected to my phone via Bluetooth and from my phone I can turn it on and off and change its colour.

The thing is that I want to do it from a computer by using Python to do all that based on some logic. I tried using bleak and I was able to connect and to get a list of the available UUIDs and handles of all the characteristics and services. Thanks to your amazing work I was also able to sniff the communication from my phone to the light bulb and see all the UUIDs on Wireshark.

However, unlike in your case with your heart rate monitor, it seems that all of my light bulb's UUIDs are custom UUIDs and it seems that there's no documentation available on what action do they trigger on the light bulb or what data should I write to each such UUID to get it to work properly. I also tried your tools from this repo and received mostly only a bunch of UUIDs which when I tried to read from them I didn't get anything useful and when trying to write to them some common data (e.g. zero for turning off and one for turning on or RGB codes for changing color to red) I only got errors which led me nowhere...

You can see the various data in the screenshots below. Any ideas what I can do to find out a way to control this light bulb using Python and a BLE enabled computer?

Thanks a lot in advance!

With Wireshark (based on the packets captured on my phone):
wireshark_main_screen
wireshark_wireless_bt_att_srvr_attributes

With BLE Tools (from this repo, Because I saw some errors due to multiple Characteristics with the same UUID I tried to convert the handle to hex and use that - these are the short hex values you see in the Read.py commands):
bletools_scan
bletools_services
bletools_read

The BLE packets between my phone and the light bulb:
nanoleaf_light_bulb.log.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant