Ever been so lazy that you’ve automated your desk?

Hello fellow idlers,TL;DR: I’ve made an app to schedule and automate the toggling between seated/standing positions on an IKEA Idasen/Linak height adjustable desk.I’ve had this IKEA Idasen/Linak height adjustable desk for a while now, but I’ve noticed that I don’t really use it that much in the standing position. I just forget about it.So I’ve had this idea to automate the desk to switch positions on a scheduled interval for a couple months now, but I just couldn’t figure out how that’d work. I’m a web dev, so I didn’t understand how one would connect to a bluetooth device. Until last week, when I’ve actually found another project which did something similar.IKEA actually provides a mobile app for controlling the desk, but its features are very primitive. You can only switch to a position by holding up/down. You can’t switch to a predefined position without holding a button until the desk reaches that position, that mimics exactly how the physical controller works, and that’s pretty limited. Also, you can’t schedule the desk to automatically switch positions from their app.Anyway, turns out that there’s an API for bluetooth connectivity built into browsers, called navigator.bluetooth. After inspecting the project I’ve mentioned, I’ve noticed that the desk can only receive 3 instructions: up, down or stop. Up raises the desk for 700ms, or about 1cm / 0.4in.I thought that it was pretty lame that they didn’t have an option to instruct the desk to go to a specific height, so I had to create that.My initial idea was to create just the controller (preview), but that meant that I’d have to hard code my schedules for toggling between seated/standing positions, as well as hard code the positions themselves. Not very useful for other people that might want to use it as well. Therefore, I’ve ended up creating an options page for the app, to define the favorite positions and the schedules for toggling between the defined positions.You can find the app here: https://ift.tt/unpS6bH free and available under the MIT license. I’m curious if there are other people using this desk and if you’d find this useful.If you have suggestions to improve it, please let me know, and I’ll try to implement them when I’ll have the time. via /r/webdev https://ift.tt/R5Kmtx8