KaKu Bridge ( Klik-aan Klik-uit )
by hansiart in Circuits > Arduino
1603 Views, 1 Favorites, 0 Comments
KaKu Bridge ( Klik-aan Klik-uit )
This KakuBridge is a very cheap (< $8 ) and very simple to build domotica system for Klik-aan Klik-uit devices, (CoCo). You can control up to 9 devices via a remote control on a webpage. Moreover with the KakuBridge you can schedule each device. For instance switch on 10 minutes after sunset, switch off 10 minutes before sunrise. All together this is a fairly complete domotica system for Klik-aan Klik-uit devices.
A summary of the possibilities:
- Simple to connect to wifi via a wifi config portal.
- All settings can be done via its webpages.
- Registering of remotes easely via webinterface.
- Control up to 9 Kaku ( CoCo ) devices via one virtual remote.
- User defined number of buttons on the virtual remote.
- The user can grant labels to the buttons..
- Software can be updated over the air.
- Can completely work alone but also works with domoticz via usb, http or mosquitto.
- For each button on the remote you can set 3 advanced timers to schedule your lamps.
Now you can say goodby to those hardware remotes. Switch with your phone from anywhere, make a schedule for your garden light, connect it with your domotica software, etc.
Supplies
a NodeMCU v3 or Wemos d1 (mini) board ( $2,50 )
a set of an rf433 receiver and transmitter ($1,40 )
6 dupont wires
an usb to micro usb cable (for the power supply)
an USB wallplug power supply
This together you can buy for less than 8 dollar.
How Do We Build It
THE HARDWARE
This is not a long story. Simply connect the receiver and the transmitter to the Wemos. See the schematic and the hardware picture. Thats all.
Optional, when you build it in a housing, it can be conveniant to use the external led. This led signals:
- that the hardwarebutton is long-pressed ( to reboot or wipe the wificredentials)
- when the AP mode is started (continuously on)
- when an rf signal is received (short flashes)
The blue onboard LED has the same funtionallity. Also you can connect a tactile pushbutton. With this button you can reboot the Wemos or you can put it in the AP mode. This can be handy when you can't remember its IP address.
THE SOFTWARE
The software comes in 2 languages, Dutch and English.
I made it extremely simple to install the software on your ESP device. Please follow these steps:
- Download and unzip the file in a folder on your computer.
- Enter this folder and click on Serial_Communicator.exe, the program will start.
- Connect the ESP via the usb cable to your computer
- You can test now on which com port the ESP is connected.
- Read the help text to proceed.
When the software is installed, the blue onboard led wil light up. Now you can proceed to the chapter "how does it work".
serial_communicator
In the download package i included a nice tool to communicate with the ESP through serial. Connect the esp with the usb cable to your windows computer. You can issue all kinds of commands, analize boot information, IP address, analize rf signals, put lamps on and off, etc.
DOWNLOAD.
Update dec 31 2020:
Some issues repaired, (logging, alloff, timers, dimming, cosmetic, mosquitto)
HOW DOES IT WORK
CONNECT TO WIFI
Once the software is uploaded, the wemos boots and the blue LED is lighted up continuously. This means an accesspoint (AP) is opened where you can connect it to your wifi. Now open the wifi settings on your laptop, phone or tablet. You'l see a netwerk called ESP-123456 or similar. Connect to this network with password 123456789 and browse to 192.168.4.1. Enter your credentials and follow the further instructions. Don't forget to set the adminitrators password. Default this is 000000000. When successfully connected, the ESP will reboot and the led flashes 3 times.
REGISTER A REMOTE
When rebooted you can now visit the homepage of the device. The next thing to do is to register a KaKu remote. Open the menu item "register" click enroll, push an ON- button on your kaku remote, click yes to register.
Now your kaku sockets should listen to the virtual remote. If not, you can learn them to listen. Put a socket in learning mode by putting it into a wall outlet. Now push a button on the virtual remote. This way you can teach up to 9 devices. You can set 3 timers for each button and by combining mutiple devices on one button you can configure more complex switching scenario's. Use your imagination....
CONTROL WITH API
The kakubridge listens to direct commands like "ip-of-kakubridge/SW1=ON" or "ip-of-kakubridge/SW3=OFF"
Housing
Since i own a 3d printer i can design a housing with a 3d drawing program. And print it of course. I am still working on a design that i will make available on this platform.
For those who not own a printer, a piece of mdf and some hotglue to fix the components would be enough. Normally you place this device somewhere central to you devices, For instance upon the cupboard where it will be out of sight.
TROUBLESHOOTING
In my home this device works flawlessly. If you however run into trouble i am willing to help of course.
First check if you have the latest softwareversion installed and upgrade if not.
If that doesn't help , please provide an understandable description of the problem, Check the serial monitor and the statuspage for debug information.
Problem: you cannot register your kaku remote control.
Check if the blue onboard led flashes when you press a button on the physical remote.
If not, check your receiver.
Check in the status page if there are files present. You should always see "wificonfig.json".
In the AP modus you can wipe and format the filesystem. For brand new ESP devices this can be usefull.
Connect to a serial monitor (Arduino IDE) to see tons of debug information.