{"id":39945042,"url":"https://github.com/daoo/autodesk","last_synced_at":"2026-01-18T19:45:10.310Z","repository":{"id":41322120,"uuid":"87717309","full_name":"daoo/autodesk","owner":"daoo","description":"Automatic standing desk positioning based on active session time.","archived":false,"fork":false,"pushed_at":"2025-10-07T14:03:25.000Z","size":1129,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-07T15:30:03.922Z","etag":null,"topics":["aiohttp","automatic","control","desk","ft232h","python","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-09T15:11:08.000Z","updated_at":"2025-10-07T14:03:29.000Z","dependencies_parsed_at":"2024-08-13T23:13:38.623Z","dependency_job_id":"0fd25fc7-bae1-407f-9a77-948d11c332a6","html_url":"https://github.com/daoo/autodesk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daoo/autodesk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daoo%2Fautodesk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daoo%2Fautodesk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daoo%2Fautodesk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daoo%2Fautodesk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daoo","download_url":"https://codeload.github.com/daoo/autodesk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daoo%2Fautodesk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28549722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T19:22:41.102Z","status":"ssl_error","status_checked_at":"2026-01-18T19:22:26.310Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","automatic","control","desk","ft232h","python","raspberry-pi"],"created_at":"2026-01-18T19:45:09.735Z","updated_at":"2026-01-18T19:45:10.304Z","avatar_url":"https://github.com/daoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoDesk\n\nAutomatic standing desk control over GPIO.\n\n[![Build](https://github.com/daoo/autodesk/workflows/build/badge.svg)](https://github.com/daoo/autodesk/actions?query=workflow%3Abuild)\n[![CodeCov](https://codecov.io/gh/daoo/autodesk/branch/master/graph/badge.svg)](https://codecov.io/gh/daoo/autodesk)\n[![License](https://img.shields.io/github/license/daoo/autodesk.svg)](https://github.com/daoo/autodesk/blob/master/LICENSE.txt)\n\n## Design\n\nThe software is built around an aiohttp server. It runs on a device with GPIO\npins which it uses to control controls the desk and it maintains the current\nstate (and history) in a SQLite database. The server also maintains a timer\nwhich fires when its time to change position.\n\nThe client observes the lock/unlock events of the used computer as an activity\nindicator and passes these events on to the server. The server then uses\nthem to calculate when to raise or lower the desk.\n\n## Connecting to the desk\n\nThe GPIO pins are wired up to control two electrical switches (relays,\ntransistors, opto-couplers or something with similar function). These\nelectrical switches are connected to the ports of the up/down buttons on the\ndesk's control dongle. If your desk use a more complicated control protocol,\nyou have to use a different approach.\n\nSeveral desks with different connectors have been tested.\n\n### TiMOTION TC11 10P10C connector\n\nThe TiMOTION TC11 desk controller uses the following wiring with a [10P10C\nconnector](https://en.wikipedia.org/wiki/Modular_connector#10P10C). Wiring of\nthe included two-button controller as follows (counting as in the [TIA-568\ntable on\nWikipedia](https://en.wikipedia.org/wiki/ANSI/TIA-568#T568A_and_T568B_termination),\nnot including the two unused pins at either end of the connector):\n\n| Pin | Desk connector | T568B color | Voltage | Function |\n|-----|----------------|-------------|---------|----------|\n| 1   | not connected  |             |         |          |\n| 2   | not connected  |             |         |          |\n| 3   | not connected  |             |         |          |\n| 4   | white          | blue        | +5V     | down     |\n| 5   | black          | white/blue  | +5V     | up       |\n| 6   | brown          | green       | 0V      | common   |\n| 7   | not connected  |             |         |          |\n| 8   | not connected  |             |         |          |\n\nBridging down/up to common moves the desk accordingly.\n\n### Unknown brand 8P8C connector (RJ45/Ethernet)\n\nThe tested desk (whose brand has since been forgotten) used the following\nwiring with a [8P8C\nconnector](https://en.wikipedia.org/wiki/Modular_connector#8P8C), colors being\nfrom the [T568A\nstandard](https://en.wikipedia.org/wiki/ANSI/TIA-568#T568A_and_T568B_termination):\n\n    blue \u003c-\u003e blue/white =\u003e up\n    blue \u003c-\u003e brown      =\u003e down\n\n### Unknown brand 7-pin DIN connector\n\nThe tested desk (whose brand has since been forgotten) used the following\nwiring for [7-pin DIN connector](https://en.wikipedia.org/wiki/DIN_connector):\n\n    1 \u003c-\u003e 2 =\u003e up\n    1 \u003c-\u003e 3 =\u003e down\n\n(numbering clockwise male connector):\n\n       4\n     3   5\n    2     6\n     1   7\n\n## Hardware controller\n\nBelow is an example schematic connecting the digital GPIO pins of a FT232H (can\nalso use a Raspberry Pi) with the desk controller using two `4N35`\noptocouplers. Additionally, the following features are included:\n\n  * LED to indicate that the desk is moving,\n  * LED to indicate the session state,\n  * override buttons for manually adjusting desk height,\n  * additional input button for software features.\n\n![autodesk controller schematic](./schematic.svg)\n\nA PCB have been designed for the schematic above:\n\n![autodesk controller PCB](./pcb.svg)\n\nSchematic and PCB design created with EasyEDA and available here:\n[easyeda.com/daoo/autodesk](https://easyeda.com/daoo/autodesk).\n\n## Software\n\nThere is two parts to get this running, client and server.\n\n### Server\n\nThe server runs on a raspberry or directly on the same PC as the client if you have\nfor example a [Adafruit FT232H](https://learn.adafruit.com/adafruit-ft232h-breakout/overview).\nIn general it needs to be a computer with access to GPIO pins.\n\nA HTTP API for manually controlling the desk, setting the session state and\nalso showing some nice statistics. The client must be able to reach this API\nover HTTP for the entire system to function. If running the server on a\nraspberry Pi it is recommended to use SSH for security.\n\n### Client\n\nThe client can be any computer that can make HTTP requests to set the session\nstate on the server. The tricky part is hooking in to the lock/unlock events.\nOn Linux a [pydbus](https://github.com/LEW21/pydbus) is used to listen to the\nsession activation events. On Windows the task scheduler can be set up to run\nspecific scripts on session activation events.\n\n## Installation and setup\n\nThe program can be setup on a Windows or a Linux computer using the following\ninstructions. Uses [uv](https://github.com/astral-sh/uv) for project\nmanagement.\n\n### Linux Server\n\nMake sure `libusb` is installed using the system package manager. For example,\non Arch Linux:\n\n    # pacman -S libusb\n\nUse the following commands to setup and start the server (in test mode):\n\n    $ cd ~/opt\n    $ git clone https://github.com/daoo/autodesk\n    $ cd autodesk\n    $ uv run autodesk\n\n### Linux Client\n\nOn Linux, run the `logger.py` script to listen for lock/unlock events via DBus.\nSupply it with the URL to the session API endpoint like this (`autodesk` is the\nhost name of the computer running the server):\n\n    $ uv run bin/logger.py http://autodesk/api/session\n\nThe host name could be localhost if using the previously mentioned FT232H.\n\n### Windows Server\n\nBefore running the autodesk server the USB driver needs to be configured.\nDownload [Zadig](http://zadig.akeo.ie/) and use it to change the driver to\n`libusbK` for the FT232H device. See [Adafruit's\nguide](https://learn.adafruit.com/circuitpython-on-any-computer-with-ft232h/windows#plug-in-ft232h-and-fix-driver-with-zadig-3-4)\nfor more information.\n\nUse the following commands to setup and start the server (in test mode):\n\n    $ cd ~/opt\n    $ git clone https://github.com/daoo/autodesk\n    $ cd autodesk\n    $ uv run autodesk\n\nSee [./bin/start-autodesk.ps1](./bin/start-autodesk.ps1) for start-up example.\n\n### Windows Client\n\nUse the Windows task scheduler to setup tasks that sets the session state using\nthe `bin/autodesk-activate.ps1` and `bin/autodesk-deactivate.ps1` scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaoo%2Fautodesk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaoo%2Fautodesk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaoo%2Fautodesk/lists"}