[WIP] Adapter for Bluetooth "HappyLighting" / "Triones" bulbs

Hi all,

I’m going to get some of these cheapo Bluetooth bulbs and try and get them working with the WebThings Gateway: https://fr.aliexpress.com/item/4000154953584.html

The bulbs should arrive by 17th December and I want to get them working with the Gateway before I go away for two weeks on the 21st. I’ve not written an adapter before so I’ve got my work cut out to do it in this time! I’ll start working on the adapter before I get the bulbs but obviously won’t be able to test until I get them. If anyone has any helpful tips they will be much appreciated!

The Bluetooth bulbs are controlled by an app called “HappyLighting”. The same company makes the app for the Wifi bulbs which I’m not interested in, but maybe some elements of the control are similar for those of you that are. https://play.google.com/store/apps/developer?id=tek-q

Edit: And the iOS app (https://apps.apple.com/us/app/happylighting-life-with-smart/id1145694075) seems like it links to the manufacturer: https://www.qh-tek.com/en
So I will contact them and hopefully get some info on how to control them!

The same company make other Bluetooth bulb control apps called “Triones” and “Filight” and all three apps look the same. After looking Github I found someone who had reverse engineered the control for HappyLighting and possibly found that it’s the same as Triones: https://github.com/function61/hautomo/issues/26

And from there another which had reverse-engineered the protocol: https://gitlab.com/madhead/saberlight/blob/master/protocols/Triones/protocol.md

This project may also prove useful: https://github.com/IlyaZaprutski/triones-bluetooth

Edit: Found these methods which may prove useful to verify the above: https://github.com/moosd/ReverseEngineeredMiLightBluetooth

And this is a general guide to reverse engineering a BLE bulb using another bulb as an example: https://learn.adafruit.com/reverse-engineering-a-bluetooth-low-energy-light-bulb/overview. There are (obvious now!) apps which can scan BLE devices and return info about their interface, which will definitely be helpful.

As for writing an adapter, the wiki will obviously be a starting point (is it up to date?): https://github.com/mozilla-iot/wiki/wiki and @t1m1 suggested I start off by looking at the Xiaomi temperature and humidity adapter as an example: https://github.com/tim-hellhake/xiaomi-temperature-humidity-sensor-adapter

I’ll also look at these other adapters for bluetooth devices:

Are there any other adapters for bluetooth devices which could be useful examples?

Cheers :slight_smile:

I’ve not got very far with this but note that there may some similarities with this little project:

1 Like

Hi, Did you get anywhere with this? I’m trying to do the same. The app is not great… and no option to pair with alexa

Hello @luthis,

No I’ve not got anywhere with it yet but I did find a few more useful links from people who have got somewhere:

Overall though, I think the bulbs are not that good and I don’t think I would recommend them to anyone except as a novelty. They are advertised in a range of wattages, I bought 15W and 20W and they turned out to be the same as each other, identical to these:

The 15W refers to the total power of the LEDs installed, so counts both white and colour ones, so just white I think is 9W, and certainly no more than 800 lumens.

About pairing, I think that these bulbs are intended not to pair. Before I really knew what I was doing with them I tried to pair two of them to my smartphone and now those bulbs cannot be controlled by the app at all and nor do they show as paired to my phone! I haven’t found a way to unpair them yet, so currently they’re no use to me.

And because there’s no pairing, there is also no security. If anyone comes within range of the bulb’ BLE signal they can control it and snoop on any communication with it, so it makes them quite useless for any proper security lighting control.

Or have you managed to pair and unpair to them by other means?

As a novelty bulb they’re okay, but there are cheaper options available I think.

Cheers :slightly_smiling_face:

Hey everyone,

I just want to say thank you for all this helpful information on “Triones” devices. I’m currently building out an electron app using the protocols and info listed above.

It currently has color & mode selection, listens to audio, and changes brightness based on audio, and screen capture (takes the average color of your screen and displays it on the LEDS/bulb)

Here is a sample for now - https://www.youtube.com/watch?v=Qr76kJdmqsE&feature=youtu.be

I will share the repo and finished app once the bugs and features are finalized

1 Like

Hi all,

A little more feedback on these bulbs. In less than one year two of them have started to flicker in white mode. One of them has degraded so much it is now flickering severely and can no longer be connected to the HappyLighting app, so I presume it is a fault affecting power to the microcontroller as well as the LEDs. When these bulbs are turned off they flash brightly after the switch has been pressed, which suggests that the power supply/rectifier has degraded and after turning off a capacitor discharges through the LEDs.

I have 15 bulbs in total and in less than one year 2 are faulty, which is a 13% failure rate, pretty poor.

Cheers :slightly_smiling_face:

I seem to have gotten a lot of replies from my post earlier about the project I was working on. I have decided to actually stop working on this project since I’ve moved away from the Troines device and am using something else for my LED strips.

But since a lot of you were interested, I’ll be sharing the repo - https://github.com/vinceroti/bt-troines

As of right now. It is currently working and only tested on the latest version of macOS. To download the DMG and install it to your machine you can find it here - https://github.com/vinceroti/bt-troines/releases/tag/0.1.0

This is nowhere near finished and DOES have bugs but feel free to clone the repo if you feel so desired. If there is an interest to get this working on Windows or Linux, I can look into seeing how to build and compile those versions. It is using Electron/Vue so it shouldn’t be that hard.

1 Like

Just published a new release.

For all releases if there are any more, they can be found here - https://github.com/vinceroti/bt-troines/releases

1 Like