I’m quite new to Home Assistant and smart home automation in general. Only starting playing with all this a few weeks ago. If I end up asking trivial things please forgive me but any help would be greatly appreciated .
I would like to have my Ikea standing desk controlled from HA.
In my phase of research I have found this:
- https://github.com/j5lien/esphome-idasen-desk-controller to create a bluetooth bridge using ESPHome and an ESP32 device
- https://github.com/IhorSyerkov/linak-desk-card to have a nice card on the dashboard
I first thought that
esphome-idasen-desk-controller add-on would let me connect to my desk using a simple bluetooth dongle. But I realised later on that it’s probably not going to work this way and that I need a special kind of device (ESP32) in order to use that repo, my dongle won’t be of any use here (?).
I’m not too keen on buying another device to control my desk and would like to control it directly using my bluetooth dongle.
- Is this a bad idea?
- What would be the advantage of using an ESP32 device if any?
Based on that fact, I started to look into building my own solution that’d just use a bluetooth dongle.
Then I found: https://github.com/alex20465/deskbluez
I’ve given a go to that project and was able to connect to my desk and change the height using the CLI (itself connected to the desk using the bluetooth dongle).
What I’d like to do from there would be a new HA add-on that’d bundle a tiny nodejs docker image where I could run a modified version of that CLI in order to make it headless and that I could interact with over maybe some kind of node HTTP API?
But as I’m quite new with how HA ecosystem works, I’m not 100% sure how to plan for a good architecture here.
I’ve read HA add-on doc here and it did answer a few questions I had but not all of them.
For example I was afraid that I would be able to run a docker container with both
--privileged arguments but looking at the optional configuration options I was reassured (as it’s needed to have access to the bluetooth dongle).
Now, about the architecture:
- I’m planning on using the custom lovelace card I shared earlier. I’m assuming that it’ll be fine to just set the correct sensors in here
- I’m not clear what I need exactly between an “add-on” and an “integration”. My guess is an add on to have a NodeJS server running which can then be used by an integration for multiple devices?
I guess it may actually be easier to make a schema for me to explain:
Is there something that really doesn’t add up there? Are there simpler options? Can you think of a better architecture?
As you probably guessed from the picture I’m not 100% comfortable with the integration and add-on concept.
Thanks for any guidance .
PS: One thing I forgot to mention. I’m guessing I should make some interface to transform the stream of data (height of the desk) and actions (like go up/down) into some MQTT events. Where would that be done exactly? I’m planning on reading the MQTT doc but haven’t done so just yet.