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
A lightweight Python module and command-line tool for generating NATO APP-6(D) compliant military symbols from both ID codes and natural language names

Python military symbols This is a lightweight Python module, including a command-line script, to generate NATO APP-6(D) compliant military symbol icon

Nick Royer 5 Dec 27, 2022
Redial is a simple shell application that manages your SSH sessions on Unix terminal.

redial redial is a simple shell application that manages your SSH sessions on Unix terminal. What's New 0.7 (19.12.2019) Basic support for adding ssh

Bahadır Yağan 186 Oct 28, 2022
A minimal ascii-representation of your local weather.

Ascii-Weather A simple, ascii-based weather visualizer for the terminal. The ascii-art updates to match the current weather and conditions. Uses ipinf

Aaron R. 12 Jan 29, 2022
🎮 An easy to use tool to change the mapping of your input device buttons.

Input Remapper Formerly Key Mapper An easy to use tool to change the mapping of your input device buttons. Supports mice, keyboards, gamepads, X11, Wa

Tobi 1.9k Jan 05, 2023
Regis-ltmpt-auto - Program register ltmpt 2022 automatis

LTMPT Register Otomatis 2022 Program register ltmpt 2022 automatis dibuat untuk

1 Jan 13, 2022
ctree - command line christmas tree

ctree ctree - command line christmas tree It is small python script that prints a christmas tree in terminal. It is colourful and always gives you a d

15 Aug 15, 2022
Convert ACSM files to DRM-free EPUB files with one command on Linux

Knock Convert ACSM files to DRM-free EPUB files using one command. This software does not utilize Adobe Digital Editions nor Wine. It is completely fr

Benton Edmondson 622 Dec 09, 2022
f90nml - A Fortran namelist parser, generator, and editor

f90nml - A Fortran namelist parser, generator, and editor A Python module and command line tool for parsing Fortran namelist files Documentation The c

Marshall Ward 110 Dec 14, 2022
AlienFX is a CLI and GUI utility to control the lighting effects of your Alienware computer.

AlienFX is a Linux utility to control the lighting effects of your Alienware computer. At present there is a CLI version (alienfx) and a gtk GUI versi

Stephen Harris 218 Dec 26, 2022
A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

ADI 4 Nov 17, 2022
Universal Command Line Interface for Amazon Web Services

This package provides a unified command line interface to Amazon Web Services.

Amazon Web Services 13.3k Jan 07, 2023
🌈 Generate color palettes based on Neovim colorschemes.

Iris Iris is a Neovim plugin that generates a normalized color palette based on your colorscheme. It is named for the goddess Iris of Greek mythology,

N. G. Scheurich 45 Jul 28, 2022
CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc)

dc6006l - CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc) What is this? FNIRSI DC6006L is a programmable DC power supply that is quite c

Taisuke Yamada 7 Sep 25, 2022
Colors in Terminal - Python Lang

🎨 Colorate - Python 🎨 About Colorate is an Open Source project that makes it easy to use Python color coding in your projects. After downloading the

0110 Henrique 1 Dec 01, 2021
Investing library and command-line interface inspired by the Bogleheads philosophy

Lakshmi (Screenshot of the lak command in action) Background This project is inspired by Bogleheads forum. Bogleheads focus on a simple but powerful p

Sarvjeet Singh 108 Dec 26, 2022
Program Command Line Interface (CLI) Sederhana: Pemesanan Nasi Goreng Hekel

Program ini merupakan aplikasi yang berjalan di dalam command line (terminal). Program ini menggunakan built-in library python yaitu argparse yang dapat menerima parameter saat program ini dijalankan

Habib Abdurrasyid 5 Nov 19, 2021
Faza - Faza terminal, Faza help to beginners for pen testing

Faza terminal simple tool for pen testers Use small letter only for commands Don't use space after command 'help' for more information Installation gi

Ag3ntQ 5 Feb 20, 2022
A Yahtzee-solving python package and command line tool.

yahtzee A Yahtzee-solving python package and command line tool. The algorithm is mathematically guaranteed to have the best strategy. That is, it maxi

David Merrell 0 Aug 19, 2022
A CLI password generator

passgen - A CLI password generator Usage python3 main.py arguments Arguments Argument Short Description --length -l The length of the password to ge

1 Nov 13, 2021
Pequeno joguinho pra você rodar no seu terminal

JokenPython Pequeno joguinho pra você rodar no seu terminal Olá! Joguinho legal pra vc rodar no seu terminal!! (rode no terminal, pra melhor experienc

Scott 4 Nov 25, 2021