This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How to use new datatype RGB-W
#21
You are probably using DALI RGBW not 4-byte RGBW data type
Reply
#22
(18.09.2020, 08:09)Daniel. Wrote: Paste the script as a code not image


I already resolved, thanks!
Reply
#23
It's very strange: when I pickup a preseted colour (I preseted 6)  everything is working fine.  If I choose a color from RGB Palette, it returns a wrong color.

Can you help me?

Here are my RGB Scripts:

--- mergeRGBW ----

if event.sender == 'se' then
  return
end


IndRichiesta = event.dst

len = string.len(IndRichiesta)

suffisso = string.sub(IndRichiesta, -(len-5))

--log(IndRichiesta)

R = grp.getvalue('11/4/'..suffisso)

G = grp.getvalue('12/4/'..suffisso)

B = grp.getvalue('13/4/'..suffisso)

W = grp.getvalue('10/4/'..suffisso)


RGBW = R * 0x1000000 + G * 0x10000 + B * 0x100 + W


grp.checkupdate('40/4/'..suffisso, RGBW) --- icon address




-------   splitRGBW   ----- 

if event.sender == 'se' then
return
end

value = event.getvalue() ---- from 32/1/20  icon address

-- Split
R = bit.rshift(bit.band(value,0xff000000),24)
G = bit.rshift(bit.band(value,0x00ff0000),16)
B = bit.rshift(bit.band(value,0x0000ff00),8)
W = bit.band(value,0x000000ff)



IndRichiesta = event.dst

len = string.len(IndRichiesta)

suffisso = string.sub(IndRichiesta, -(len-5))



  grp.checkwrite('11/3/'..suffisso, R)

  grp.checkwrite('12/3/'..suffisso, G)

  grp.checkwrite('13/3/'..suffisso, B)

  grp.checkwrite('10/3/'..suffisso, W)



-------------------------------


Thanks, Peppe
Reply
#24
The script works fine and it doesn't matter where I select color. Clear browser cache.
------------------------------
Ctrl+F5
Reply
#25
(22.09.2020, 13:52)Daniel. Wrote: The script works fine and it doesn't matter where I select color. Clear browser cache.


Sorry, it isn't about the color RGBW Icon shows.... It's the real colors we can observe in the field that are mostly wrong!
Anyway, I cleaned the cache... 

Peppe
Reply
#26
Whit hit we can't help. We only send the telegram with specific values. This is mostly to your lights.
------------------------------
Ctrl+F5
Reply
#27
(22.09.2020, 15:20)Daniel. Wrote: Whit hit we can't help. We only send the telegram with specific values. This is mostly to your lights.

Ok, but it seems very strange to me ALL lights are defective... I will investigate.

by the way, what can you explain me the exactly function indicated by the red arrow? Could it get involved?

Thanks

Peppe

Attached Files Thumbnail(s)
   
Reply
#28
I'm not saying that lights are defective. They do not mix the color as you would want to.
------------------------------
Ctrl+F5
Reply
#29
(23.09.2020, 07:55)Daniel. Wrote: I'm not saying that lights are defective. They do not mix the color as you would want to.
ok but if I send the value by ETS it works fine.   Please, explain me the fuction "send after each color pick".

Now I will try to use RGB instead of RGBW, just to check if the 3 colour mixture works....
Reply
#30
Compare the values we send with the ones in ETS.
It just send telegram each time you select a color.
------------------------------
Ctrl+F5
Reply
#31
(23.09.2020, 08:18)Daniel. Wrote: Compare the values we send with the ones in ETS.
It just send telegram each time you select a color.

Yes, the values are the same. 
I noticed the if I choose a color from palette (i.e. red) the light turns in red for milliseconds... then become white... or very clear.. or another color.
But we are very on trouble now... Dodgy maybe it depends they are DALI RGBW? Should I use another datatype/script?
Reply
#32
Maybe the light needs the values to be send in special order? In your script you send white as last. Maybe your dali gateway supports the RGBW object? Might be better to use this one instead of 4x 1 byte.
------------------------------
Ctrl+F5
Reply
#33
Today I will try to invert the order of sending, I will let you know.

I don't know if my DALI GATEWAY supports RGBW object... anyway, I think I should use a different conversion script, isn't?
Reply


Forum Jump: