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
Microsoft Azure CLI - Azure Command-Line Interface

A great cloud needs great tools; we're excited to introduce Azure CLI, our next generation multi-platform command line experience for Azure.

Microsoft Azure 3.4k Dec 30, 2022
Linux commands Interpreter for Windows and Mac based systems using Python

DBHTermEcIbP Linux commands Interpreter for Windows and Mac based systems using Python Basic Linux commands supported viewing current working director

Vraj Patel 1 Dec 26, 2021
Gamestonk Terminal is an awesome stock and crypto market terminal

Gamestonk Terminal is an awesome stock and crypto market terminal. A FOSS alternative to Bloomberg Terminal.

Gamestonk Terminal 18.6k Jan 03, 2023
Tidier - a simple command line tool that helps you make your files tidy up

Tidier - a simple command line tool that helps you make your files tidy up

AmirMohammad Hosseini Nasab 8 Aug 16, 2022
slipit is a command line utility for creating archives with path traversal elements.

slipit is a command line utility for creating archives with path traversal elements. It is basically a successor of the famous evilarc utility with an extended feature set and improved base functiona

usd AG 35 Dec 23, 2022
A CLI based task manager tool which helps you track your daily task and activity.

CLI based task manager tool This is the simple CLI tool can be helpful in increasing your productivity. More like your todolist. It uses Postgresql as

ritik 1 Jan 19, 2022
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

AD995 305 Dec 17, 2022
Projeto Reverse Shell For Python

Use com sabedoria!!! Modo de uso: Linux (inclui Android e Mac): - apt-get update - apt install python3 (ou "python" apenas) - git clone https://github

1 Jan 03, 2022
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

pre.empt.dev 305 Dec 17, 2022
keep your machine's shell history synchronize

SyncShell Yet another tool for laziness Keep your machine's shell history synchronize Get SyncShell Currently, SyncShell is just available on PyPi and

Masoud Ghorbani 53 Dec 12, 2022
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 interacting and testing warehouse components

Warehouse debug CLI Example usage for Zumo debugging See all messages queued and handled. Enable by compiling the zumo-controller with -DDEBUG_MODE_EN

1 Jan 03, 2022
PipeCat - A command line Youtube music player written in python.

A command line Youtube music player written in python. It's an app written for Linux. It also supports offline playlists that are stored in a

34 Nov 27, 2022
Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juan Carlos Juárez 1 Feb 02, 2022
QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Quera is an Iranian Learning management system (LMS) that has an online judge for programming languages. Some Iranian universities use it to automate the evaluation of programming assignments.

Amirmahdi Namjoo 16 Nov 11, 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
A small system that allow you to manage hosts stored in your .ssh/config file

A small system that allow you to manage hosts stored in your .ssh/config using simple commands.

Simone Ostini 1 Jan 24, 2022
A powerful, colorful, beautiful command-line-interface for pypi.org

pypi-command-line pypi-command-line is a colorful, powerful, and beautiful command line interface for pypi.org that is actively maintained Detailed Do

Wasi Master 32 Jun 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
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