RFLink MiLight codes to HEX code

Moderators: BertB, rtenklooster, Voyager, Stuntteam, Martinus

Post Reply
Message
Author
NietGiftig
Normal user
Posts: 103
Joined: 16 Sep 2015, 20:32

RFLink MiLight codes to HEX code

#1 Post by NietGiftig » 20 Dec 2016, 21:27

I have made some esp8266 LED devices for WS2812 LED lamps (not EasyESP)
I am using the FastLed library and have build in diverse color animations such fire & color waves

These devices are controlled with node-red and domoticz (domoticz via node-red)
For example I use the node-red dashboard color picker to set the color and/or brightness.

Now I want to use the Mi-Light remote to do the same, just using the remote without the bulbs or zone-controls.
These remotes have a nice build, use touch-control and are cheap.

The problem is that the codes which I get from RFLink are of course Mi-Light specific.

Code: Select all

20;29;MiLightv1;ID=DB48;SWITCH=04;RGBW=5390;CMD=COLOR;
20;2A;MiLightv1;ID=DB48;SWITCH=04;RGBW=4f90;CMD=COLOR;
20;2B;MiLightv1;ID=DB48;SWITCH=04;RGBW=8490;CMD=COLOR;
20;2C;MiLightv1;ID=DB48;SWITCH=04;RGBW=8b90;CMD=COLOR;
20;2D;MiLightv1;ID=DB48;SWITCH=04;RGBW=8c90;CMD=COLOR;
Is their somebody who knows how I can convert these Mi-Light codes to plain HEX colors cq brightness values
for example #3289c7 or for brightnes value 0 ....255
Or an indication how to proceed for a solution

User avatar
Stuntteam
Site Beheer
Posts: 530
Joined: 27 Jan 2016, 16:46

Re: RFLink MiLight codes to HEX code

#2 Post by Stuntteam » 06 Jan 2017, 00:28

Milight supports 256 colors 00-FF there is no specific RGB value
The brightness is controlled in 32 steps.
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8

vectah
Normal user
Posts: 7
Joined: 08 Nov 2015, 21:31

Re: RFLink MiLight codes to HEX code

#3 Post by vectah » 09 Feb 2017, 21:07

Stuntteam wrote:The brightness is controlled in 32 steps.
Could you clarify this a little bit? By saying it's controlled in 32 steps do you mean 8,16,24,32... up to 256 in HEX or I get it completely wrong?

I'm using RGBW FUT038 controller and I've tried this command

Code: Select all

'10;MiLightv1;F003;00;00FF;BRIGHT;'
with no success. In my case the highest value it picks up is D8 HEX

I don't have a remote so I can't check the values in the console by pressing buttons on the remote. I would like to know what is the highest value for brightness.

Lennyz1988
Normal user
Posts: 4
Joined: 24 Oct 2017, 20:27

Re: RFLink MiLight codes to HEX code

#4 Post by Lennyz1988 » 25 Oct 2017, 13:02

Stuntteam wrote:
06 Jan 2017, 00:28
Milight supports 256 colors 00-FF there is no specific RGB value
The brightness is controlled in 32 steps.
Could you clarify this more? I find it hard to understand how I can calculate the hexadecimal to a color.

alexsahka
Normal user
Posts: 3
Joined: 10 Nov 2017, 20:08

Re: RFLink MiLight codes to HEX code

#5 Post by alexsahka » 10 Nov 2017, 20:15

Stuntteam wrote:
06 Jan 2017, 00:28
Milight supports 256 colors 00-FF there is no specific RGB value
The brightness is controlled in 32 steps.
I have the same question: is any way to convert from Milight color/brightness to "normal" rgbw value?
Im doing flow in Node Red (from RfLink (MiLight remote in) to H801 RGBW controller with EspEasy), but struggling with this conversion.
If there any Java or other conversion code exist please let me know, it would be very helpful.
Thank you.

Fabje
Normal user
Posts: 4
Joined: 21 Oct 2017, 18:32

Re: RFLink MiLight codes to HEX code

#6 Post by Fabje » 13 Nov 2017, 16:40

alexsahka wrote:
10 Nov 2017, 20:15
Stuntteam wrote:
06 Jan 2017, 00:28
Milight supports 256 colors 00-FF there is no specific RGB value
The brightness is controlled in 32 steps.
I have the same question: is any way to convert from Milight color/brightness to "normal" rgbw value?
Im doing flow in Node Red (from RfLink (MiLight remote in) to H801 RGBW controller with EspEasy), but struggling with this conversion.
If there any Java or other conversion code exist please let me know, it would be very helpful.
Thank you.
See my post in this topic: viewtopic.php?f=11&t=3669#p20193
I think that might help you understand.

Lennyz1988
Normal user
Posts: 4
Joined: 24 Oct 2017, 20:27

Re: RFLink MiLight codes to HEX code

#7 Post by Lennyz1988 » 14 Nov 2017, 12:35

alexsahka wrote:
10 Nov 2017, 20:15

I have the same question: is any way to convert from Milight color/brightness to "normal" rgbw value?
Im doing flow in Node Red (from RfLink (MiLight remote in) to H801 RGBW controller with EspEasy), but struggling with this conversion.
If there any Java or other conversion code exist please let me know, it would be very helpful.
Thank you.
I don't think that's possible because as far as I understand Milight only has 256 different colors.

alexsahka
Normal user
Posts: 3
Joined: 10 Nov 2017, 20:08

Re: RFLink MiLight codes to HEX code

#8 Post by alexsahka » 18 Nov 2017, 21:20

Lennyz1988 wrote:
14 Nov 2017, 12:35
I don't think that's possible because as far as I understand Milight only has 256 different colors.
So, basically RFlink + Milight Remote = useless?

Fabje
Normal user
Posts: 4
Joined: 21 Oct 2017, 18:32

Re: RFLink MiLight codes to HEX code

#9 Post by Fabje » 20 Nov 2017, 13:01

alexsahka wrote:
18 Nov 2017, 21:20
Lennyz1988 wrote:
14 Nov 2017, 12:35
I don't think that's possible because as far as I understand Milight only has 256 different colors.
So, basically RFlink + Milight Remote = useless?
Not useless I would say, the RFLink can do the same as the milight remote can.
More features just aren't available in the lamps.

For a conversion function, you could implement something using lookup table and calculating the "nearest match".

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest