Page 1 of 1

Remote Control of KAKU as command input

Posted: Thursday 25 January 2018 15:58
by Toulon7559
;-) Sometimes an idea/question just pops up, but the answer remains hidden.

I have a KAKU-set with 3 Switch Units and 1 Remote Control Unit.
The Remote Control Unit has 5 command sets On&Off for A, B, C and D, and All.
The obvious application is to use A, B and C for On&Off for the 3 switches.
Is it possible to apply commands D_On and D_Off as input for a virtual switch in Domoticz?
Would be handy to 'toggle' a display etc.

Howto?

Re: Remote Control of KAKU as command input

Posted: Thursday 25 January 2018 16:23
by hansies
Yes, that's possible. I use my remote to switch a virtual named disco. That starts a lightshow with all my Yeelights.

Re: Remote Control of KAKU as command input

Posted: Saturday 08 December 2018 23:29
by butchamon
Hi there, could you please let me know how this can be done? (or point me to the correct section where I can look for this ?)
Thanks.

Re: Remote Control of KAKU as command input

Posted: Tuesday 11 December 2018 22:57
by Amsterdam020
Hi butchamon,

In the dashboard go to switches,
click on the right side on Learn Light/Switch
Press on the remote on the button you want to use and select the right type (for example on/off)

Go to setup
more options
events
click on the plus,
select lua,
select device
replace the code by

Code: Select all

commandArray = {}

-- replace KAKU_name
-- replace lamp_name
if      (devicechanged["KAKU_name"] == 'On' )  
then   commandArray['lamp_name'] ='Set Level: 50'  

elseif  (devicechanged["KAKU_name"]== 'off')
then   commandArray['lamp_name'] ='off' 
    
end

return commandArray
change KAKU_name and lamp_name
save the script
check if it works