EthemAcar-Dev/OpenYeeLight

Decode/encode base64 names

Closed this issue · 4 comments

Hi,
Internally, the bulbs store their name in base64. Your program should be able to send an encoded name and decode it when reading from the bulb.

image

Not sure about this, internally base64 encode happens inside Yeelight API. You can give and take plaintext from it. I don't think you have to encode and decode, the API already does that.

As stated in the documentation:
image

This is what happens when you use special characters in your program and try to get properties from the bulb's memory via telnet:
image

If you encode and decode in base64 you can properly view those special characters. This is from the tool I developed:
image

Another example:

First I set the character ñ as the name
image

Then I just hit refresh, nothing else, and your program doesn't know what to do with it
image

New version with this feature in settings is live.