Skip to content

How to make an IKEA IDASEN Standing desk Smart using Home Assistant

Smart Desk IKEA labels and Kiril Peyanski aside

I bought an IKEA IDASEN standing desk which can be moved up and down with a push of a button and I love it. But there is one major problem – the IKEA desk have no memory and I cannot set it to a predefined fixed height.

However, thanks to Home Assistant, ESPHome and an ESP32 device I made my IDASEN IKEA Desk smart. 

What is the main problem?

Just a quick story before I start the actual implementation:

I’m working from home most of the time lately and I spend most of my time sitting on a chair. The problem is that my neck and back are not very happy about that fact, as they started to shudder and hurt.

That is why I tried to change my old chair with a better one (I’m a big fan of IKEA and I also bought the chair from there), but then my desk turns out to be low in height, so I started to look around for a new desk as well. I had read somewhere about the standing desks and their benefits, so I dig into the topic more and then I decided to go for it.

Many known and unknown persons are using standing desks as they provide some health benefits. The humans are not designed to sit for a long period of time everyday...
Many known and unknown people are using standing desks as they provide health benefits. The humans are not designed to sit for a long periods of time everyday…

It turns out that the IKEA is selling one of the best desks with motors, so you can have a stand desk and when you get tired to – lower it down and to sit on a chair as usual (and vice versa).

Using this switch you can move the IKEA IDASEN desk up and down to whatever position you wish
Using this switch you can move the IKEA IDASEN desk up and down to whatever position you wish

These IKEA standing desks doesn’t come cheap, quite the opposite they are freaking expensive, but I prefer to spend my money now on a standing desk, than later on doctors.

So I bought one.

IDASEN vs BEKANT Standing Desks

Quick tip here, if you decide to buy similar standing desk from IKEA have in mind that they have two very similar models:

  • One is called – IDASEN
  • The other is called – BEKANT

Price-wise they are almost the same here in Europe\Bulgaria, but try to avoid BEKANT as it is problematic and it is not as stable as IDASEN. I test them both and I read and watched a lot of reviews, so to save you some time – go for IDASEN standing desk and ignore the other.

IDASEN Desks are coming from one of the biggest and trusted desk manufacturers called Linak. This is not the case for BEKANT.
IKEA IDASEN Desks are coming from one of the biggest and trusted desk manufacturers in Europe called Linak. This is not the case for BEKANT.

What is the end goal?

The IDASEN standing desk is having up and down switch and Bluetooth support, but as I said in the beginning, there is no memory and you cannot move the desk to a certain fixed height.

IDASEN have one issue - the lack of memory, but soon this issue will be fixed...
IDASEN have one issue, which is the lack of memory, but soon this issue will be fixed…

The lack of memory buttons is not such a big of deal, but as I love to automate things, I decided to try adding the IDASEN standing desk to my Home Assistant.

What is needed to make the IKEA IDASEN Desk smart?

Here is what is used to make my IKEA standing desk smart. Have in mind that I’m sharing affiliate links to the needed products. If you buy something from these links I will receive a small commission from your purchase with no additional cost for you.

D1 Mini ESP32 (the brain)

First thing that is needed is a D1 Mini ESP32 board that cost around $4-6 in AliExpress website and a little more in Amazon.

D1 Mini ESP32 close shot
D1 Mini ESP32 close shot

The above board (D1 Mini ESP32) will be used to communicate with the IDASEN standing desk from one side and with Home Assistant from the other. This will be become possible after installation of the ESPHome software on the D1 Mini ESP32. Do not worry the procedure is very simple, as you will see later.

Micro USB cable

Also a Micro USB cable is needed to initially flash and to power the D1 Mini ESP32.

Quick Tip: Some Micro USB cables are cheaper and for charging purposes only (some wires are missing inside them). Try to avoid the charging only cables and buy DATA Micro USB cables, as they can be used for both flashing and charging.

Micro USB cable
Micro USB cable

USB adapter / wall charger (optional)

Optionally, an USB adapter / wall charger is also needed. The D1 Mini ESP32 can be powered from any standard USB Socket, but if there is no free socket available, then an USB wall charger may be needed.

USB Wall Charger with Two USB-A Slots. For this project only one USB slot is enough.
USB Wall Charger with Two USB-A Slots. For this project only one USB slot is enough.

Home Assistant & ESPHome Dashboard

Apart from the parts listed above – Home Assistant & ESPHome Dashboard is also needed. ESPHome Dashboard can be easily installed as Home Assistant add-on, but of course other methods are also possible. Check my article for ESPHome if you need more info – Complete ESPHome Installation Guide: 4 different ways to install ESPHome

About Home Assistant, what can I say? I’m talking about it all the time, because it is such a great and free Smart Home Hub.

If you still don’t have it or you want to understand what are the 4 official & supported ways to get Home Assistant + 1 secret and super easy way to start it on your PC in under 5 minutes, then go and register for my free Webinar which is available on my other website – https://automatelike.pro/webinar

How to get the IDASEN Bluetooth MAC address?

Before I continue to the installation of the ESPHome software on the D1 Mini ESP32 device, I have to pair my IDASEN desk with my computer or with my phone, so I can get the Bluetooth MAC address of the desk and later to use that address in the ESPHome configuration.

Possible ways to get the IDASEN Bluetooth MAC address are the following:

Using a phone and BLE Scanner app

I’ve heard that BLE Scanner 4.0 app for iOS and Android can help extract the Bluetooth address of the IDASEN desk, but I never tried it. Let me know if you have any experience with any of the above apps.

Using Windows

I’m pretty sure that getting the IDASEN Bluetooth MAC address from Windows OS is as easily possible, but to be honest I don’t know what are the possible methods there, if you happen to know that let me know in the comments section.

Using macOS

I’m using macOS and I will use the Desk Remote Control application available in the macOS App Store to get the IDASEN Bluetooth MAC address. Here are the steps that I did:

  • I downloaded and started the Desk Remote Control
  • I put the IDASEN Desk into a pairing mode by holding the Bluetooth button until the blue LED start flashing.
Holding the Bluetooth Button until Blue LED start flashing
Holding the Bluetooth Button until Blue LED start flashing
  • Inside Desk Remote Control, I searched for a new Bluetooth desk and I connected to it.
Connected IDASEN Desk to the Desk Remote Control app
Connected IDASEN Desk to the Desk Remote Control app
  • I opened the Terminal app in macOS and I typed:
system_profiler SPBluetoothDataTyp
  • I searched for my IKEA desk Bluetooth Mac address within the result of the above command.
This is where I found my IDASEN Desk Bluetooth Mac Address
This is where I found my IDASEN Desk Bluetooth Mac Address

Installation and Configuration of the ESPHome Software on D1 Mini ESP32

Now, I have everything that is needed to install the ESPHome software on my D1 Mini ESP32, so I can make the IKEA IDASEN desk – smart. 

Here is what I did:

  • I connected the D1 Mini ESP32 to the computer where Home Assistant & ESPHome Dashboard are installed, so I can flash the ESPhome firmware on the ESP32-CAM. 
  • I entered a device name (in my case: Idasen), as well as my WIFI name and password.
Entering the ESPHome device name and WIFI Credentials
Entering the ESPHome device name and WIFI Credentials
  • On the next dialog, as device type I selected ESP32 and I clicked Next.
I'm selecting ESP32 device type here, but it is not really matter as I will erase everything in a minute
I’m selecting ESP32 device type here, but it is not really matter as I will erase everything in a minute
  • The basic ESPHome configuration was created and I was able install it on the D1 Mini ESP32, but before that, I wanted to modify the ESPHome configuration, so I clicked on the SKIP button.
I skipped installing the ESPHome initially.
I skipped installing the ESPHome initially.
  • I clicked the Edit button on the newly created IDASEN ESPHome Device.
Editing the IDASEN ESPHome configuration
Editing the IDASEN ESPHome configuration
  • Below is the ESPHome configuration that I used. I put it in on GitHub (as gist file), so it can be easily accessed. The only thing that have to be changed inside the YAML code is the MAC address of the IDASEN desk.

https://gist.github.com/peyanski/260e5ee2744ff080e6ac80cba46b5751

This is where the IDASEN desk MAC address should be added in the ESPHome code
This is where the IDASEN desk MAC address should be added in the ESPHome code
  • Then I clicked on the Save and then Install buttons.
This will Save and Install the ESPHome Firmware on the D1 Mini ESP32
This will Save and Install the ESPHome Firmware on the D1 Mini ESP32
  • At this point, I selected the third option from the dialog (Plug into the computer running ESPHome Dashboard)
Don’t forget to plug the D1 Mini ESP32 into the device running ESPHome Dashboard
Don’t forget to plug the D1 Mini ESP32 into the device running ESPHome Dashboard
  • I picked the server port where the D1 Mini ESP32 adapter was connected and the ESPHome installation began.
This how the server ports looks like in my case, your can be a little different.
This how the server ports looks like in my case, your can be a little different
  • After several minutes the ESPHome installation was finished and my ESPhome Device (called Idasen) become online in the ESPHome Dashboard
Idasen ESPHome controller is online and ready to be used
Idasen ESPHome controller is online and ready to be used
  • I restarted the D1 Mini ESP32 (from the USB cable just in case) and I checked the logs of the device form the ESPHome Dashboard.
  • I didn’t saw nothing interesting at first, but then I put the IDASEN desk in pairing mode again by holding the Bluetooth button for several seconds and Voila – I saw the Idasen Desk height in the ESPHome logs.
ESPHome Logs showing the current height of the IDASEN desk
ESPHome Logs showing the current height of the IDASEN desk

All of the above means that my ESPHome device is ready to be added in Home Assistant, so I can start making Home Assistant Automations & Scripts & Scenes that will move the Idasen desk to my desired positions

How to add the IDASEN D1 Mini ESP32 controller in Home Assistant?

  • Inside Home Assistant I pressed the “c” button to invoke the Home Assistant command search bar. 
  • Then I typed: integration and I selected Navigate Integrations
5$ live streaming camera for Home Assistant | ESP32-CAM tutorial 3
  • There is a big chance the Idasen ESPHome device to be auto discovered in the Home Assistant Integrations section. In such a case clicking on the Configure button will setup the device in seconds.
Auto-discovered ESPHome Idasen device
Auto-discovered ESPHome Idasen device
  • If the device is not auto-discovered, it has to be added manually. This can happen by clicking on the + Add Integrations, then searching for ESPHome and selecting No, set up an other instance of ESPHome
5$ live streaming camera for Home Assistant | ESP32-CAM tutorial 4
  • As Host, idasen.local have to be typed, because this was the name of the ESPHome device in the configuration that I shared above. It is also possible here the IP address to be used, which can be seen in the logs of the device or in the wireless router interface.
  • Finally, the Submit button have to be pressed.

Help is needed

One quick remark, before I move on.

I’m using a custom ESPHome component that creates a Bluetooth bridge between the IKEA Idasen desk, D1 Mini ESP32 device and Home Assistant. Many thanks to Julien who is the author of this component. All the credits for this project are going to him and his contributors.

However, the code of the component is a little outdated, as there are no new commits in the last 6 months or so. Meanwhile, a lot of Bluetooth changes happened in the ESPHome and Home Assistant space during these last 6 months. That means the project needs a little push to stay on track. 

I will leave the link of the Julien’s Project GitHub repo below, so if you have the ability and time – maybe you can help and make it up to date again.

https://github.com/j5lien/esphome-idasen-desk-controller

What is working and workarounds

Anyways, as end result I managed to extract from the current state of the project a cover entity with two binary sensors in Home Assistant.

Default IDASEN controls in Home Assistant
Default IDASEN controls in Home Assistant

Usually, the Home Assistant covers can be moved up and down, but in this case with the configuration that I have and after all of the tests that I did, I managed to make the desk to move only up. Maybe it’s just me and it will work just fine for you, I don’t know.

Nevertheless, I found a workaround, which is to use cover set position Home Assistant service and that way I can move the desk up & down to a specific percentage from 0 to 100. The best of all, is that I can use this approach in any Home Assistant Automations, scripts & scenes. 

Calling set cover position in Home Assistant to move the IDASEN desk up and down
Calling set cover position in Home Assistant to move the IDASEN desk up and down

Below is the YAML code of the set cover service that will move the IDASEN desk to 50% of its max possible height. Of course, the position number can be changed to whatever percentage/number is needed.

service: cover.set_cover_position
entity_id: cover.idasen_desk
data: {
  position: 50
}

How to create a Home Assistant Script that moves the IKEA IDASEN Desk?

On top, I managed to find a great custom card in Home Assistant Community Store, which have sit and stand buttons that are also working fine. But enough sweet talks I will first show you how I created a quick Home Assistant script that set a custom height of the IDASEN Standing desk and then I will show you the custom card from HACS.

And this is a simple Home Assistant script that will move the IDASEN desk to 70% of its height. The percentage is adjustable.

alias: Move idasen to 70%
sequence:
  - device_id: 7916a8fbd977fae5bf91263e7920946c 
    domain: cover
    entity_id: cover.idasen_desk 
    type: set_position
    position: 70
mode: single
icon: mdi:arrow-down-bold
Creating a Home Assistant script that will set the IDASEN desk height to desired position
Creating a Home Assistant script that will set the IDASEN desk height to desired position

Linak Desk Card in Home Assistant Community Store (HACS)

This Is the section in which I will talk about the custom card available in HACS or Home Assistant Community Store that I told you about. If you don’t have HACS or you want to know more about it, you can check this HACS article of mine.

To find the card you have to search for Linak Desk card in the Frontend section of the HACS and to install that custom card.

Because I didn’t manage to get the current desk height sensor working, this digit below on the card is not changing.

Desk Height Digit is not accurate as the Sensor Height is not working correctly
Desk Height Digit is not changing as the Sensor Height is not working correctly

The up button is working, but down button is down and out of order. Fortunately, stay and sit buttons are working just fine and setting a desired height is easily possible by just editing the Card.

What is working in the HACS card
What is working in the HACS card

This below is an example card code

type: custom:linak-desk-card
desk: cover.idasen_desk
height_sensor: sensor.desk_height
moving_sensor: binary_sensor.idasen_desk_moving
connection_sensor: binary_sensor.idasen_desk_moving
min_height: 62
max_height: 127
presets:
  - label: Stay
    target: 127
  - label: Sit
    target: 100
name: ''

3D Printed case for the D1 Mini ESP32

Next optional thing is a 3D case for the D1 Mini ESP32.

Printed 3D Case for D1 Mini ESP32
Printed 3D Case for D1 Mini ESP32

Below you can find a link to this 3D model if you want to print the same.

https://www.thingiverse.com/thing:3740349

Of course, it is also fine to leave the D1 Mini as it is, without any case, that is if it is not fighting with your Feng Shui design. 

Bare metal D1 Mini ESP32 is also fine
Bare metal D1 Mini ESP32 is also fine

Smart Home Glossary

One more thing, because I’m constantly using some Smart Home words and abbreviations that may sound strange to you, I made a Smart Home glossary in a form of a PDF document. I want to give you that document free of any charge, so it can help you further in your Smart Home journey.

Inside that glossary you will find simple, but useful explanations of a lot of Smart Home stuff. Basically, everything that I can think of.

So, go to my other website and download it right now.

Link to the Smart Home Glossary -> https://automatelike.pro/glossary

Thank you for reading. I’m Kiril and I’m done writing. Bye!

1 thought on “How to make an IKEA IDASEN Standing desk Smart using Home Assistant”

Leave a Reply

Your email address will not be published. Required fields are marked *