Control your IKEA Ansluta 12V transformers remotely.
This code impersonates an IKEA Ansluta Remote.
Originally written by ksjoberg @ github in December 2018.
Runs on a NodeMCU build checked out on 1st December 2018, built by nodemcu-build.com using the bit, file, GPIO, MQTT, net, node, SPI, timer, UART and WIFI modules.
I used a CC2500 breakout module from ebay and hooked it up to a D1 Mini NodeMCU-compatible board, also ebay
The SPI part of the wiring is already defined in the NodeMCU documentation. I decided to go for interrupt driven RX, so I wired GDO0 and GDO2 to the NodeMCU. This is the wiring table:
Signal | IO index | ESP8266 pin | CC2500 pin |
---|---|---|---|
HSPI CLK | 5 | GPIO14 | SCL |
HSPI /CS | 8 | GPIO15 | CSn |
HSPI MOSI | 7 | GPIO13 | MOSI |
HSPI MISO | 6 | GPIO12 | MISO |
CHIP_RDYn | 2 | GPIO4 | GDO2 |
RX_RDY | 1 | GPIO5 | GDO0 |
- set up WiFi connection, MQTT topic etc. in config.lua
- upload the respecive lua files to your device
- run it; a restart will suffice since the
init.lua
launches it automatically. - Subscribe to the
ikea-ansluta-bridge/+/+/current
topic to receive updates from the regular round remotes. - Publish to
ikea-ansluta-bridge/chipid/remoteid/set
with a message corresponding to your required dim level. Only three levels are supported by the transformers: 0%, 50% and 100%. Replacechipid
with your NodeMCU's Chip ID, and theremoteid
with the Remote's ID that you want to send a message as. - If you want to attempt pairing, make up a Remote ID of your choice (16 bit hexadecimal value) and issue a dimming request setting the value to
-1
. (Untested)