Remote Control of KAKU as command input

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
Toulon7559
Posts: 487
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Remote Control of KAKU as command input

Post by Toulon7559 » Thursday 25 January 2018 16:58

;-) 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?
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

hansies
Posts: 8
Joined: Thursday 04 January 2018 16:25
Target OS: Linux
Domoticz version: stable
Contact:

Re: Remote Control of KAKU as command input

Post by hansies » Thursday 25 January 2018 17:23

Yes, that's possible. I use my remote to switch a virtual named disco. That starts a lightshow with all my Yeelights.
Domoticz stable | Intel NUC | VirtualBox | Ubuntu 16.04
RPI2B | RFLink
Yeelight | Sonoff Tasmota

butchamon
Posts: 1
Joined: Tuesday 29 December 2015 22:28
Target OS: Raspberry Pi
Domoticz version: 2.3530
Location: Belgium
Contact:

Re: Remote Control of KAKU as command input

Post by butchamon » Sunday 09 December 2018 0:29

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.

Amsterdam020
Posts: 63
Joined: Saturday 05 March 2016 22:42
Target OS: Raspberry Pi
Domoticz version: 3.5629
Contact:

Re: Remote Control of KAKU as command input

Post by Amsterdam020 » Tuesday 11 December 2018 23:57

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
Rp3, youlesss, rfxcom, philips hue, dsb1820

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests