changing colors on a zipato rgbw bulb in LUA

Moderator: leecollings

Post Reply
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

changing colors on a zipato rgbw bulb in LUA

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

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by JuanUil »

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

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by JuanUil »

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

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
mbtr
Posts: 4
Joined: Tuesday 02 December 2014 20:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3817
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post 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.
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: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by JuanUil »

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

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
verdeel
Posts: 6
Joined: Thursday 31 August 2017 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post by verdeel »

Hi JuanUil,

Did you get this working in LUA?
verdeel
Posts: 6
Joined: Thursday 31 August 2017 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: changing colors on a zipato rgbw bulb in LUA

Post 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)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests