changing colors on a zipato rgbw bulb in LUA

Post Reply
JuanUil
Posts: 235
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi
Domoticz version: 2.xx
Location: Asten NB Nederland
Contact:

changing colors on a zipato rgbw bulb in LUA

Post by JuanUil » Saturday 24 September 2016 14:31

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
Your mind is like a parachute,
It only works when it is opened!

JuanUil
Posts: 235
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi
Domoticz version: 2.xx
Location: Asten NB Nederland
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by JuanUil » Sunday 25 September 2016 18:14

Anyone any idea please?
Your mind is like a parachute,
It only works when it is opened!

JuanUil
Posts: 235
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi
Domoticz version: 2.xx
Location: Asten NB Nederland
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by JuanUil » Friday 07 October 2016 11:52

Realy nobody can help me with this?
Your mind is like a parachute,
It only works when it is opened!

mbtr
Posts: 13
Joined: Tuesday 02 December 2014 21:49
Target OS: Raspberry Pi
Domoticz version: 2.3817
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by mbtr » Sunday 09 October 2016 12:27

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.
Controllers: Raspberry Pi 2B - RFXTrx433E - Aeon ZStick Gen5
Target devices: Fibaro RGBW - Philips Hue - Logitech Harmony - Google Nest
Triggers: Fibaro Motion Sensors - Fibaro Wall Plugs - KaKu Motion Sensors - KaKu Switches - Byron doorbell

JuanUil
Posts: 235
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi
Domoticz version: 2.xx
Location: Asten NB Nederland
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by JuanUil » Monday 10 October 2016 9:31

Thanks, I will try this!
Your mind is like a parachute,
It only works when it is opened!

verdeel
Posts: 5
Joined: Thursday 31 August 2017 19:06
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by verdeel » Thursday 12 October 2017 18:18

Hi JuanUil,

Did you get this working in LUA?

verdeel
Posts: 5
Joined: Thursday 31 August 2017 19:06
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by verdeel » Friday 13 October 2017 22:32

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)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests