Page 1 of 1
Switch on LED strip with KAKU switch
Posted: Thursday 10 December 2020 23:17
by henk99
I have a LED strip in my kitchen, which is controled by a Mi-Light (Ibox2). From the domoticz page i can switch this on/off normally. However, I had the idea to add a physical wall switch (KAKU AWST-8802) to switch the strip on/off, so I don't have to go into my phone everytime I want to switch.
I Installed the wall swith into domoticz as well and I can see it responding in the log when I press on/off. In the swtch menu I added the LED strip as a sub/slave. It was my view that this would switch the LED on when the switch was switched on. But it doesn't work. All the elements are working fine on their own, but I can't get them to work together.
Can anyone help me out? When I search for switching I see a lot of scripts and perhaps it is like cursing in here, but I know very little about programming. I thought that it would be very simple to control this action with a KAKU switch

Re: Switch on LED strip with KAKU switch
Posted: Friday 11 December 2020 0:18
by waaren
henk99 wrote: ↑Thursday 10 December 2020 23:17
I have a LED strip in my kitchen, which is controled by a Mi-Light (Ibox2). From the domoticz page i can switch this on/off normally. However, I had the idea to add a physical wall switch (KAKU AWST-8802) to switch the strip on/off, so I don't have to go into my phone everytime I want to switch.
Can anyone help me out?
Probably the easiest way to do this is to define an on and off task for the "master" like below
On action: http://127.0.0.1:<domoticz port>/json.htm?type=command¶m=switchlight&idx=<led id>&switchcmd=On
Off action: http://127.0.0.1:<domoticz port>/json.htm?type=command¶m=switchlight&idx=<led id>&switchcmd=Off

- master.png (81.72 KiB) Viewed 643 times
You will have to allow access to IP 127.0.0.1 or 127.0.0.* (local) without password for this to work

- allow.png (75.16 KiB) Viewed 642 times
Re: Switch on LED strip with KAKU switch
Posted: Friday 11 December 2020 1:06
by henk99
Thanks for your help waaren!
Some questions:
In the pictures where you have 127.0.0.1 written, do I have to change for the IP of my domoticz?
With 'master' you mean the actual switch right?
Re: Switch on LED strip with KAKU switch
Posted: Friday 11 December 2020 6:50
by waaren
henk99 wrote: ↑Friday 11 December 2020 1:06
In the pictures where you have 127.0.0.1 written, do I have to change for the IP of my domoticz?
You can but not likely needed.
"127.0. 0.1 is the loopback Internet protocol (IP) address also referred to as the localhost. The address is used to establish an IP connection to the same machine or computer being used by the end-user."
Also see
this wiki for a full explanation.
btw. I use
Code: Select all
127.0.0.*;192.168.192.*;::1
127.0.0.* : to allow password less access when it originates from local host (on my system that can be 127.0.0.1 and 127.0.0.10)
192.168.192.* : to allow password less access when it originates from any device on my local area network
::1 : same as 127.0.0.1 but from IPv6 type of access
With 'master' you mean the actual switch right?
Yes
Re: Switch on LED strip with KAKU switch
Posted: Friday 11 December 2020 13:49
by henk99
Ha! It works now. I filled in the localhost (127.0.0.1) in settings and also put in the rule you supplied earlier. Thank you, waaren!