Python API and CLI for the ikea IDÅSEN desk.

Overview

idasen

PyPi Version Build Status Documentation Status Black

This is a heavily modified fork of rhyst/idasen-controller.

The IDÅSEN is an electric sitting standing desk with a Linak controller sold by ikea.

The position of the desk can controlled by a physical switch on the desk or via bluetooth using an phone app.

This is a command line interface written in python to control the Idasen via bluetooth from a desktop computer.

Set Up

Prerequisites

The desk should be connected and paired to the computer.

Install

python3.8 -m pip install --upgrade idasen

Configuration

Configuration that is not expected to change frequently can be provided via a YAML configuration file located at ~/.config/idasen/idasen.yaml.

You can use this command to initialize a new configuartion file:

idasen init
mac_address: AA:AA:AA:AA:AA:AA
positions:
    sit: 0.75
    stand: 1.1

Configuartion options:

  • mac_address - The MAC address of the desk. This is required.
  • positions - A dictionary of positions with values of desk height from the floor in meters, sit and stand are provided as examples.

The program will try to find the device address, but if it fails, it has to be done manually.

The device MAC addresses can be found using blueoothctl and bluetooth adapter names can be found with hcitool dev on linux.

Usage

Command Line

To print the current desk height:

idasen height

To monitor for changes to height:

idasen monitor

To save the current height as the sitting position:

idasen save sit

To delete the saved sitting position:

idasen delete sit

Assuming the config file is populated to move the desk to sitting position:

idasen sit

Community

Related projects and packaging:

Comments
  • Discovery: use service UUID instead of device name

    Discovery: use service UUID instead of device name

    My desk was not discovered due to having a non-standard name (which I changed through the Linak app ages ago). Change discovery to use one of the advertised service UUIDs instead.

    opened by danielkza 6
  • Allow to save multiple positions

    Allow to save multiple positions

    I don't want to hijack the project, so feel free to reject my proposal.

    In general, if someone doesn't want to change how to use the program - no problem, the old behavior stays the same. The new behavior is to allow users to save multiple desk positions, or just update the current one without modifying the config file manually.

    This allows users to save additional positions by simply typing idasen save position-name. This command will save the current desk height into the config file under the desired name. No manual changes in config files involved. If the position already exists, it will be overwritten. The idasen delete position-name command will remove the position from the config file.

    This is a work in progress - it does work, but certainly requires some polishing. If you do want it merged, I'll finish it to pass all the checks. If not, just let me know by closing this PR, and I'll just implement it in my fork.

    opened by aklajnert 6
  • Bump pytest-asyncio from 0.16.0 to 0.17.0

    Bump pytest-asyncio from 0.16.0 to 0.17.0

    Bumps pytest-asyncio from 0.16.0 to 0.17.0.

    Release notes

    Sourced from pytest-asyncio's releases.

    pytest-asyncio 0.17.0


    title: 'pytest-asyncio: pytest support for asyncio'

    image

    image

    image

    Supported Python versions

    image

    pytest-asyncio is an Apache2 licensed library, written in Python, for testing asyncio code with pytest.

    asyncio code is usually written in the form of coroutines, which makes it slightly more difficult to test using normal testing tools. pytest-asyncio provides useful fixtures and markers to make testing easier.

    @pytest.mark.asyncio
    async def test_some_asyncio_code():
        res = await library.do_something()
        assert b"expected result" == res
    

    pytest-asyncio has been strongly influenced by pytest-tornado.

    Features

    • fixtures for creating and injecting versions of the asyncio event loop
    • fixtures for injecting unused tcp/udp ports
    • pytest markers for treating tests as asyncio coroutines
    • easy testing with non-default event loops
    • support for [async def]{.title-ref} fixtures and async generator fixtures
    • support auto mode to handle all async fixtures and tests automatically by asyncio; provide strict mode if a test suite should work with different async frameworks simultaneously, e.g. asyncio and trio.

    Installation

    ... (truncated)

    Commits
    • 2e2d5d2 Bump to 0.17 release
    • 90436c9 Fix pandoc installation procedure
    • d291c66 Convert README.rst to Markdown for making githun release
    • 141937b Fix release artifacts
    • 696cf7d Fix trove classifier for asyncio
    • 8ccb306 Build on tag
    • cd84987 Release process automation (#252)
    • 2eb12a7 Setup GitHub Workflows linter and yaml-reformatter (#253)
    • d28b826 Bump codecov/codecov-action from 1 to 2.1.0 (#251)
    • 2f523ba Configure dependabot version updater (#250)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 4
  • Long execution time

    Long execution time

    Hey.

    Thank you for great package. This issue isn't issue per se. I want to ask you guys how long is your execution time? I'm kind of worried because on my computer it takes around 20 seconds to execute a command, even if it's simple 'idasen height'. I can somehow live with that but I wonder if there is anything I can do to speed that up?

    Thanks

    opened by bilbobag 4
  • Python 3.8?

    Python 3.8?

    Hi,

    I tried to install this package on a Raspbian PI system which only has Python 3.7 and get this error: "Could not find a version that satisfies the requirement idasen (from versions: ) No matching distribution found for idasen"

    Does this package only work for Python 3.8? If so, could it be made available for Python 3.7 as well?

    Thx Matthias

    opened by magicmatt007 3
  • Linak Bluetooth Adapter

    Linak Bluetooth Adapter

    Hi! I have a standing desk with a Linak controller, but it doesn't have bluetooth. However, I can buy an Bluetooth® Adapter BLE2LIN002 for it. Should it also work with this application? I am running Linux, so I'd like to know before I'm going to buy it. :)

    Thank you!

    question 
    opened by siers 3
  • Bump types-pyyaml from 5.4.2 to 5.4.3

    Bump types-pyyaml from 5.4.2 to 5.4.3

    Bumps types-pyyaml from 5.4.2 to 5.4.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 3
  • Superfluous dependencies?

    Superfluous dependencies?

    I dont fully understand several dependencies in the poetry build process and the installation.

    Why are the following tools needed: six <= code is pure python 3.8? twisted <= code uses asyncio? constantly zope.interface pyhamcrest hyperlink Automat - (but thank you for using this because it is quiet interesting :) ) attrs (same as automat)

    Not that they are bad to have but diskspace and cpu power is sparse on a raspberry pi zero :) I don't know anything about the internals on how poetry works so before messing around with it to maybe clean it up myself i just wanted to know if these attempts would be futile because above dependencies are there for nonobvious reasons?

    opened by blackcoffeerider 3
  • build(deps): bump abatilo/actions-poetry from 2.1.6 to 3.7.4

    build(deps): bump abatilo/actions-poetry from 2.1.6 to 3.7.4

    Bumps abatilo/actions-poetry from 2.1.6 to 3.7.4.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • build(deps-dev): bump sphinx-rtd-theme from 1.1.0 to 1.1.1

    build(deps-dev): bump sphinx-rtd-theme from 1.1.0 to 1.1.1

    Bumps sphinx-rtd-theme from 1.1.0 to 1.1.1.

    Changelog

    Sourced from sphinx-rtd-theme's changelog.

    1.1.1

    Fixes

    • Fix wrapping bug on cross references (#1368)

    .. _release-1.1.0:

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • build(deps-dev): bump sphinx from 5.1.1 to 5.2.1

    build(deps-dev): bump sphinx from 5.1.1 to 5.2.1

    Bumps sphinx from 5.1.1 to 5.2.1.

    Release notes

    Sourced from sphinx's releases.

    v5.2.1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v5.2.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 5.2.1 (released Sep 24, 2022)

    Bugs fixed

    • #10861: Always normalise the pycon3 lexer to pycon.
    • Fix using sphinx.ext.autosummary with modules containing titles in the module-level docstring.

    Release 5.2.0.post0 (released Sep 24, 2022)

    • Recreated source tarballs for Debian maintainers.

    Release 5.2.0 (released Sep 24, 2022)

    Dependencies

    • #10356: Sphinx now uses declarative metadata with pyproject.toml to create packages, using PyPA's flit project as a build backend. Patch by Adam Turner.

    Deprecated

    • #10843: Support for HTML 4 output. Patch by Adam Turner.

    Features added

    • #10738: napoleon: Add support for docstring types using 'of', like type of type. Example: tuple of int.
    • #10286: C++, support requires clauses not just between the template parameter lists and the declaration.
    • #10755: linkcheck: Check the source URL of raw directives that use the url option.
    • #10781: Allow :rst:role:ref role to be used with definitions and fields.
    • #10717: HTML Search: Increase priority for full title and subtitle matches in search results
    • #10718: HTML Search: Save search result score to the HTML element for debugging
    • #10673: Make toctree accept 'genindex', 'modindex' and 'search' docnames
    • #6316, #10804: Add domain objects to the table of contents. Patch by Adam Turner
    • #6692: HTML Search: Include explicit :rst:dir:index directive index entries in the search index and search results. Patch by Adam Turner
    • #10816: imgmath: Allow embedding images in HTML as base64
    • #10854: HTML Search: Use browser localstorage for highlight control, stop storing highlight parameters in URL query strings. Patch by Adam Turner.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Failed to connect when device is already connected

    Failed to connect when device is already connected

    As per the Prerequisites

    The desk should be connected and paired to the computer.

    However, I was unable to execute a command until I specifically DISCONNECTED the device.

    My theory: When f.e. executing bluetoothctl I'm directly on the desk already, so the script is likely trying to connect the desk with another device; instead of just doing its thing

    As being connected already would avoid scanning & connecting; thus significantly reducing execution time (especially for simple commands) I'd propose to actually check if we're already connected, and just communicate directly in that case, instead of trying to scan & connect

    OS: Ubuntu 20.04 bleak is using bluez as backend (in my case) edit: regarding timing, a no-op (simple read) takes 4-5 seconds currently

    opened by jlsjonas 7
Releases(v0.9.4)
Owner
Alex
Alex
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple commands.

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple com

null 1 Jan 10, 2022
This CLI give the possibility to do a queries in Star Wars API and returns a JSON in a terminal.

Star Wars CLI (swcli) This CLI give the possibility to do a queries in Star Wars API and returns a JSON in a terminal. Install $ pip install swcli Qu

Pery Lemke 5 Nov 5, 2021
A CLI/Shell supporting OpenRobot API and more!

A CLI/Shell supporting JeyyAPI, OpenRobot API and RePI API.

OpenRobot Packages 1 Jan 6, 2022
Simple CLI prompt for easy I/O with OpenAI's API

openai-cli-prompt Simple CLI prompt for easy I/O with OpenAI's API Quickstart Create a .env file with: OPENAI_API_KEY=<Your OpenAI API Key> Configure

Erik Nomitch 1 Oct 12, 2021
CLI translator based on Google translate API

Translate-CLI CLI переводчик основанный на Google translate API как пользоваться ? запустить в консоли скомпилированный скрипт (exe - windows, bin - l

null 7 Aug 13, 2022
A simple cli utility for importing or exporting dashboard json definitions using the Grafana HTTP API.

grafana-dashboard-manager A simple cli utility for importing or exporting dashboard json definitions using the Grafana HTTP API. This may be useful fo

Beam Connectivity 31 Jan 6, 2023
Python wrapper and CLI utility to render LaTeX markup and equations as SVG using dvisvgm and svgo.

latex2svg Python wrapper and CLI utility to render LaTeX markup and equations as SVG using dvisvgm and svgo. Based on the original work by Tino Wagner

Matthias C. Hormann 4 Feb 18, 2022
A python script that enables a raspberry pi sd card through the CLI and automates the process of configuring network details and ssh.

This project is one script (wpa_helper.py) written in python that will allow for the user to automate the proccess of setting up a new boot disk and configuring ssh and network settings for the pi

Theo Kirby 6 Jun 24, 2021
pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget

Currently, all the work is being done inside the refactoring branch. pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget P

Everton Correia 45 Dec 11, 2022
A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

TruncatedDinosour 3 Feb 22, 2022