-
Notifications
You must be signed in to change notification settings - Fork 10
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
Test and add support for Yeelight Bluetooth Dimmer #86
Comments
Hi @BMOtheConsole, this is an interesting device. Afaik it's got nice design and potentially good functionality. I ordered 220v version a while ago, but I burnt it straight away. There is not any documentation/manual on how you install/connect it, so I assumed it works like MiLight switches, e.g. directly connect power like it is normal appliance. I did that and it burned straight away with a magic smoke. Anyways, I think what's burned is only AC-DC converter, so 3.3v logic should be still working I hope. So I should be able to help you. First of all you will need to identify all GATT services and characteristics it has by using something like Nordic NRF Toolbox android app. Also try to identify what characteristics get changed when you interact with it. |
You may also use the binding for identifying GATT characteristics by setting "GATT serivices and characteristics parsing strategy" to All binary: Then find your device in the inbox, add it and enable "Connection control". If this device does not have any authentication requirements, you should be able to see all channels. Make a screenshot and post it here. Also try to interact with the device and notice what values get changed. |
It clearly shows that your device is not connected ("Connected" channel), that's why you do not see any updates. Does it get enabled/disabled periodically (the "Connected")? |
EDIT: I does show "Connected" until i push the Button on the Dimmer Switch, than i have to push the Pair Button again The "Connected" Channel is showing as OFF, but the Last Value is still updating if i turn or push the Button to wat looks like partially Random HEX-Values. Here is a List of Moves i made and the Value it changed to. [58, 30, b6, 03, ee, 78, 6f, c2, 41, 24, f8, ce, 10, 0b, 0c, 5f, 12, 00, 00, 00, c6] Turn Left |
Right, strange behaviour re connect/disconnect. Are there any error logs in OH? When you use nordic app and connect to your device, does it stay connected all the time? If so, could you please take the device close to your BT adapter that is used by OH? It might be that it is too far and that's why you get sporadic disconnections. Anyways could you please be more specific. Those 6 readings, are they from which channel (characterisitc)? From what I can see, those values look very similar to Xiaomi devices, we should be able to decode it. Please also do another separate test. In your nordic app, go to Scanner tab, find your device there, tap on it (do not tap "Connect"), then tap on "MORE". You should see something like that: There must be that FE95 service somewhere there (check also "FLAGS & SERVICES" tab). When you find it, observe values that get changed when you interact with the device. |
Just so you know, this is what I see from your examples: [58, 30, - flags and version In that remaining part, there should be a flag (a few bytes) that specifies what event it is (e.g. dimmer, colour, push button etc). Do some experiments and try to match a few readings and identify event. There could be much more events generated, e.g. not only triggered by you (those are some system events) so you will have to capture quite a few readings. |
After that flag, there should be actual data. |
Not sure how proficient you are in software engineering, anyways here is where the structure defined: And actual data payload (this is what we will need to extend): |
Further to it. These are two first bytes:
Combined together: Another screenshot that you attached of the binding contains a reading that is NOT encrypted, this one we should be able to read easily: Raw: First two bytes
combined together:
Which is: Which says that it is not encrypted and the event is present. The even goes after MAC address. Here are some details: Raw:
Please disable "Connection control" in the binding and observe how that FE95 channel changes, try to map the values to actual interaction with the device. More importantly try to match |
I bought this Dimmer Switch from Yeelight (https://tinyurl.com/y48jvmne) and would like to implement this to Openhab with your binding. How can i contribute and help to add this thing?
The text was updated successfully, but these errors were encountered: