Page 1 of 1

changing colors on a zipato rgbw bulb in LUA

Posted: Saturday 24 September 2016 14:31
by JuanUil
Hi there,

I want to use the zipato rgbw bulb as a burglar prevention.
when i put it behind the television and randomly change the colors it looks like some is at home.

Anybody any idea how to do this in LUA?

Thanx in advance
Jan

Re: changing colors on a zipato rgbw bulb in LUA

Posted: Sunday 25 September 2016 18:14
by JuanUil
Anyone any idea please?

Re: changing colors on a zipato rgbw bulb in LUA

Posted: Friday 07 October 2016 11:52
by JuanUil
Realy nobody can help me with this?

Re: changing colors on a zipato rgbw bulb in LUA

Posted: Sunday 09 October 2016 12:27
by mbtr
Hi there,

I'm not sure about the zipato bulb, but the Fibaro RGBW-controller (often used for LED-strips) can be set by one of the following. I bet one of these could help you as well.
- A scene (commandArray['Scene:MyScene'] in LUA, where the scene is defined using the RGBW-device*
- Individual Set Levels for R, G, B, W (commandArray['device_R'] = 'Set Level 20'), if those devices are available for your bulb
- Calling the Domoticz API from LUA, see this post (I haven't tested thisone)

* Something to remember: You can't detect which scene is activated, so you may want to use User Variables for the purpose of changing scenes.

As far as I'm aware, we don't have a "Set RGBW" operation in LUA at the moment, although I'd love to have it.

Re: changing colors on a zipato rgbw bulb in LUA

Posted: Monday 10 October 2016 9:31
by JuanUil
Thanks, I will try this!

Re: changing colors on a zipato rgbw bulb in LUA

Posted: Thursday 12 October 2017 18:18
by verdeel
Hi JuanUil,

Did you get this working in LUA?

Re: changing colors on a zipato rgbw bulb in LUA

Posted: Friday 13 October 2017 22:32
by verdeel
I've managed to change the color of the bulb using the following command:
commandArray['OpenURL']='http://ip:port/json.htm?type=command&param=setcolbrightnessvalue&idx=IDX&hex=0000FF' --blue
use your own ip:port and device idx

But I'm confused on the correct way to determine hex values for the different colors. When trying the command in a browser The returned status is ok with any hex value, and seems to change between 00000000 and FFFFFFFF. But cannot find any real logic in why a value results in a color. Some regions of the hex value appear to switch the bulb off or to a normal bulb color.
Spoiler: show
the following were determined using the domoticz color picker
--7fb9ff --lightblue
--ff7f7f --lightred
--824141 --darkred
--ffee00 --darkyellow
--fff99e --lightish yellow
--9effa3 --lightish green
--19ff25 --darker green
--ff19e8 --darker purple
--db34ca --lighter purple
--000000 --off
--ffffff --on (normal light)