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 startpage configured aesthetically with terminal-esque link formatting

Terminal-y Startpage Setup Clone the repository, then make an unformatted.txt file following the specifications in example.txt. Run format.py Open ind

belkarx 13 May 01, 2022
A collection of command-line interface games written in python

Command Line Interface Python Games Collection of some starter python game projects for beginners How to play these games Clone this repository git cl

Paras Gupta 7 Jun 06, 2022
nbcommands bring the goodness of Unix commands to Jupyter notebooks.

nbcommands nbcommands bring the goodness of Unix commands to Jupyter notebooks. Installation You can simply use pip to install nbcommands: $ pip insta

Vinayak Mehta 181 Dec 23, 2022
Tiny command-line utility for mapping broken keys to other positions.

brokenkey Tiny command-line utility for mapping broken keys to other positions. Installation Clone this repository using git: git clone https://github

0 Oct 04, 2021
pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery.

pypinfo: View PyPI download statistics with ease. pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery. Installation pypin

Ofek Lev 351 Dec 26, 2022
A minimalist Vim plugin manager.

A minimalist Vim plugin manager. Pros. Easy to set up: Single file. No boilerplate code required. Easy to use: Concise, intuitive syntax Super-fast pa

Junegunn Choi 30.2k Jan 08, 2023
A CLI tool for creating disposable environments.

dispenv - Disposable Python Environments ⚠️ WIP Need to make an environment to work on a GitHub issue? Want to try out a new package and not leave the

Peter Baumgartner 3 Mar 14, 2022
💥 Share files easily over your local network from the terminal!

Fileshare 📨 Share files easily over your local network from the terminal! 📨 Installation # clone the repo $ git clone https://github.com/dopevog/fil

Dopevog 11 Sep 10, 2021
argofloats: Simple CLI for ArgoVis and Argofloats

argofloats: Simple CLI for ArgoVis and Argofloats Argo is an international program that collects information from inside the ocean using a fleet of ro

Samapriya Roy 2 Feb 13, 2022
Konsave lets use save your KDE Plasma customizatios and restore them very easily!

Konsave (Save Plasma Customization) A CLI program that will let you save and apply your KDE Plasma customizations with just one command! Als

439 Jan 02, 2023
Helicopter animation in terminal

helicopter-helicopter Helicopter animation in terminal (scroll down for instructions) Why does this exist? It's because of a meme Click for details Se

Wasi Master 7 Mar 14, 2022
Password manager for the CLI simps.

CLI Password Manager Password manager for the CLI simps. Free software: MIT license

1 Dec 30, 2021
Chat with Rem in Terminal!

Chat with Rem in Terminal!

bariscodefx 1 Dec 19, 2021
asciinema - Terminal session recorder 📹

asciinema - Terminal session recorder 📹

asciinema 11.1k Dec 27, 2022
A useful and easy to use Terminal Timer made with Python.

Terminal SpeedCubeTimer Installation ¡No requirements! Just Download and play Usage Starts timer.py and you will see this. python timer.py Scramble

Achalogy 5 Dec 22, 2022
Ntfy - 🖥️📱🔔 A utility for sending notifications, on demand and when commands finish.

About ntfy ntfy brings notification to your shell. It can automatically provide desktop notifications when long running commands finish or it can send

Daniel Schep 4.5k Jan 01, 2023
CLI program that allows you to change your Alacritty config with one command without editing the config file.

Pycritty Change your alacritty config on the fly! Installation: pip install pycritty By default, only the program itself will be installed, but you ca

Antonio Sarosi 184 Jan 07, 2023
Command-line tool for downloading and extending the RedCaps dataset.

Command-line tool for downloading and extending the RedCaps dataset.

RedCaps dataset 33 Dec 14, 2022
Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

i love my dog 2.8k Jan 05, 2023
Zecwallet-Python is a simple wrapper around the Zecwallet Command Line LightClient written in Python

A wrapper around Zecwallet Command Line LightClient, written in Python Table of Contents About Installation Usage Examples About Zecw

Priveasy 2 Sep 06, 2022