ansluta-control/README.md

91 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2018-11-26 22:00:24 +01:00
# ansluta-control
2018-12-03 04:15:26 +01:00
#### Ikea Ansluta remote control by nodeMCU and CC2500 2.4Ghz transceiver via arduino
2018-11-26 22:00:24 +01:00
2018-12-01 06:39:28 +01:00
This project was created to control Ikea Omlopp/Utrusta lights by webbrowser or add it to a home automation system (FHEM)
2018-12-01 07:49:01 +01:00
The original remote has one Button. With every push the lights cycle -> 50% -> 100% -> 50% -> off
2018-12-01 07:53:23 +01:00
2018-12-01 08:00:13 +01:00
The remote send a series of data icluded two own address bytes.
- example: 0x55 0x01 0xD0 0x9A 0x02 0xAA (0xD0 & 0x9A my addressbytes)
2018-11-26 22:00:24 +01:00
2018-12-01 06:55:45 +01:00
<img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/ansluta_original.jpg" width="128"> <img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/leiterplatte.jpg" width="128">
2018-12-01 06:43:07 +01:00
2018-12-01 06:08:28 +01:00
2018-11-26 22:00:24 +01:00
## Hardware:
- Lolin NodeMCU V3 [az-delivery](https://www.az-delivery.de/collections/wifi-module/products/copy-of-nodemcu-lua-amica-v2-modul-mit-esp8266-12e?ls=de)
- CC2500 Transiver module (WLC24D) [ebay](https://www.ebay.com/itm/2PCS-1-8-3-6V-CC2500-IC-Wireless-RF-2400MHZ-Transceiver-Module-SPI-ISM-Demo-Code/401239287968)
2018-12-01 06:04:04 +01:00
<img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/NodeMCU_V3.jpg" width="128"> <img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/WLC-24D.png" width="128">
2018-12-01 06:01:35 +01:00
2018-11-26 22:00:24 +01:00
## Software:
- Arduino IDE [www.arduino.cc](https://www.arduino.cc/en/Main/Software)
2018-12-01 06:33:25 +01:00
#### Setup Arduino IDE
- Go to Tools -> Boards Manager and seach 'nodemcu'
2018-12-01 06:56:36 +01:00
- install -> 'esp8266 by ESP8266 Community'
2018-12-01 06:33:25 +01:00
<img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/arduino_boardmanager.png" width="64">
- Select Board: NodeMCU 1.0 (ESP.12E Module)
- Set CPU Frequency to 160 Mhz
- Select com port
<img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/arduino_esp8266_config.png" width="64">
2018-12-01 07:49:01 +01:00
## Get the Ansluta address bytes from your remote
2018-11-27 04:19:52 +01:00
- start Arduion ide, load project files
- edit ansluta.ino -> set your SSID and Wlankey at row 40, 41
- write project to nodeMCU
- determine your nodeMCU IP and connect browser. example: **192.168.178.130/ansluta/getAddress**
- press button on original remote
- note your AddressBytes
- edit ansluta.ino -> set your AddressByteA and AddressByteB at row 54, 55
- write project to nodeMCU
2018-11-26 22:00:24 +01:00
2018-11-28 19:14:45 +01:00
## Control the lights via webbrowser
2018-12-01 06:39:28 +01:00
connect to nodeMCU IP
2018-11-28 19:14:45 +01:00
press button: off, 50% or 100% to toggle the lights
2018-12-01 05:52:40 +01:00
<img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/webcontrol.jpg" width="128">
2018-11-28 19:14:45 +01:00
## Control the lights via FHEM
create dummy switch and notify to call the url
```
define AnslutaButton0 dummy
attr AnslutaButton0 alias Ansluta lights off
attr AnslutaButton0 devStateIcon .*:FS20.on@grey
attr AnslutaButton0 room Ansluta
attr AnslutaButton0 webCmd off
define anslutaButton0_notify notify AnslutaButton0:off { system("curl 192.168.178.130/ansluta/0") }
define AnslutaButton50 dummy
attr AnslutaButton50 alias Ansluta lights 50%
attr AnslutaButton50 devStateIcon .*:FS20.on@orange
attr AnslutaButton50 room Ansluta
attr AnslutaButton50 webCmd on
define ansluta50_notify notify AnslutaButton50:on { system("curl 192.168.178.130/ansluta/50") }
define AnslutaButton100 dummy
attr AnslutaButton100 alias Ansluta light 100%
attr AnslutaButton100 devStateIcon .*:FS20.on@yellow
attr AnslutaButton100 room Ansluta
attr AnslutaButton100 webCmd on
define ansluta100_notify notify AnslutaButton100:on { system("curl 192.168.178.130/ansluta/100") }
```
2018-12-01 07:00:19 +01:00
example pictures FHEM and Tablet-UI:
2018-12-01 05:52:40 +01:00
<img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/fhem_dummy.png" width="128"> <img src="https://github.com/matlen67/ansluta-control/blob/master/pictures/fhem-tablet-ui.png" width="128">
2018-11-28 19:14:45 +01:00
2018-11-26 22:00:24 +01:00