{"id":20885313,"url":"https://github.com/lab11/soma-shade-control","last_synced_at":"2026-03-07T03:03:47.347Z","repository":{"id":145294085,"uuid":"132811279","full_name":"lab11/SOMA-Shade-Control","owner":"lab11","description":"Control the SOMA smart shades with HTTP.","archived":false,"fork":false,"pushed_at":"2018-05-24T22:09:56.000Z","size":26,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-12T19:37:29.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lab11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-05-09T20:48:36.000Z","updated_at":"2021-01-04T16:31:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"a42cb801-a510-4ee9-a356-90e6b4e68fa2","html_url":"https://github.com/lab11/SOMA-Shade-Control","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lab11/SOMA-Shade-Control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FSOMA-Shade-Control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FSOMA-Shade-Control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FSOMA-Shade-Control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FSOMA-Shade-Control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lab11","download_url":"https://codeload.github.com/lab11/SOMA-Shade-Control/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FSOMA-Shade-Control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-18T08:13:07.025Z","updated_at":"2026-03-07T03:03:47.341Z","avatar_url":"https://github.com/lab11.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"SOMA Shade Control\n======================\n\nThis project was created to control the SOMA smart shades using BLE.\nAdditionally, a basic HTTP/HTTPS interface allows control over the internet.\n\n# Local Control\n\nSOMA shades can be controlled using a BLE interface.\n\nIt refers heavily to [SOMA-Smart-Shades-HTTP-API](https://github.com/paolotremadio/SOMA-Smart-Shades-HTTP-API),\nbut is written as a node library using noble instead of invoking\nthe GATT Tool directly.\n\n## Installation\n\n```\ncd soma-shade-control\nnpm install\n```\n## Usage\n\nLocal control provides the following actions:\n\n* Get battery level\n```\nsoma.js battery -m \u003cMAC Address\u003e\n```\n* Get current shade position in percent\n```\nsoma.js position -m \u003cMAC Address\u003e\n```\n* Set a target for the shade position in percent\n```\nsoma.js target 50 -m \u003cMAC Address\u003e\n```\n* Move the shade up\n```\nsoma.js up -m \u003cMAC Address\u003e\n```\n* Move the shade down\n```\nsoma.js down -m \u003cMAC Address\u003e\n```\n* Stop the shade moving\n```\nsoma.js stop -m \u003cMAC Address\u003e\n```\n\n# HTTP Control\n\n## Installation\n\nFirst install the dependencies required for local control.\nTo install as a system service:\n\n```\nsudo cp systemd/* /etc/systemd/system/\nsudo systemctl daemon-reload\nsudo systemctl enable soma-http\nsudo systemctl start soma-http\n```\n\n## Usage\nMake sure to change the basic auth credentials `admin:password`, and if using\nhttps, to point the script to the correct cert and private key location.\nThen, just run the script:\n```\nsudo ./soma-http.js\n```\nor if using https:\n```\nsudo ./soma-https.js\n```\n\n### Interface\n\nThe HTTP/HTTPS application has a JSON interface and supports all of the local\ncontrol commands. Below are some examples using `curl`.\n\nJSON takes the format:\n```\n{\n  \"shade\": \u003cshade mac address\u003e,\n  \"action\": \u003cbattery/position/target\u003e,\n  \"value\": \u003ctarget value\u003e\n}\n```\n\n* Get battery level\n```\ncurl -L --header \"Content-Type: application/json\" --request GET -d '{\"shade\": \u003cshade address\u003e, \"action\": \"battery\" }' -u admin:password \u003cServer Address\u003e/shades\n```\n* Get current shade position in percent\n```\ncurl -L --header \"Content-Type: application/json\" --request GET -d '{\"shade\": \u003cshade address\u003e, \"action\": \"position\" }' -u admin:password \u003cServer Address\u003e/shades\n```\n* Set a target for the shade position in percent\n```\ncurl -L --header \"Content-Type: application/json\" --request POST -d '{\"shade\": \u003cshade address\u003e, \"action\": \"target\", \"value\": 50 }' -u admin:password \u003cServer Address\u003e/shades\n```\n* Move the shade up\n```\ncurl -L --header \"Content-Type: application/json\" --request POST -d '{\"shade\": \u003cshade address\u003e, \"action\": \"up\"}' -u admin:password \u003cServer Address\u003e/shades\n```\n* Move the shade down\n```\ncurl -L --header \"Content-Type: application/json\" --request POST -d '{\"shade\": \u003cshade address\u003e, \"action\": \"down\"}' -u admin:password \u003cServer Address\u003e/shades\n```\n* Stop the shade moving\n```\ncurl -L --header \"Content-Type: application/json\" --request POST -d '{\"shade\": \u003cshade address\u003e, \"action\": \"stop\"}' -u admin:password \u003cServer Address\u003e/shades\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flab11%2Fsoma-shade-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flab11%2Fsoma-shade-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flab11%2Fsoma-shade-control/lists"}