{"id":21634501,"url":"https://github.com/arceryz/gsm-agent","last_synced_at":"2026-05-16T13:08:02.861Z","repository":{"id":155215116,"uuid":"560586669","full_name":"arceryz/gsm-agent","owner":"arceryz","description":"Linux daemon that allows commands to be executed on a server through SMS text messages.","archived":false,"fork":false,"pushed_at":"2022-11-25T11:11:32.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T22:40:45.486Z","etag":null,"topics":["daemon","diy","diy-electronics","gsm","linux","python","server","sim800l","sms"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arceryz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-01T20:27:05.000Z","updated_at":"2023-12-02T13:03:00.000Z","dependencies_parsed_at":"2023-04-26T12:47:30.472Z","dependency_job_id":null,"html_url":"https://github.com/arceryz/gsm-agent","commit_stats":null,"previous_names":["kairature/gsm-agent","arceryz/gsm-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arceryz/gsm-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arceryz%2Fgsm-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arceryz%2Fgsm-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arceryz%2Fgsm-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arceryz%2Fgsm-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arceryz","download_url":"https://codeload.github.com/arceryz/gsm-agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arceryz%2Fgsm-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265455825,"owners_count":23768631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["daemon","diy","diy-electronics","gsm","linux","python","server","sim800l","sms"],"created_at":"2024-11-25T03:16:56.809Z","updated_at":"2026-05-16T13:07:57.840Z","avatar_url":"https://github.com/arceryz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gsm-agent\nLinux daemon that allows a set of shell scripts to be executed on the server and echoed back via\nSMS. Supports authority-level checking and users/usernames for security.\n\n# How to use\n\nGive this daemon a working directory (/usr/share/gsm-agent) and put two files in there:\n- `users` file csv in format `user, phonenumber, authoritylevel` where authority\nlevel is an integer that grants the user privilege to run certain commands.\nAdd a user `unknown` for the privileges of unregistered users.\n\n- `auth` file csv in format `command, authoritylevel` which tells which commands are allowed to be run\nunder which minimum authoritylevel. E.g, an authority of 0 tells that anyone can run this command.\n\n- Put the scripts you want to run remotely in the `/scripts` subdirectory (you can change this).\n\nThese files are currently hard-coded in the python. You can edit [gsm-agent.py](gsm-agent.py) to change\nthe filenames if you want. By default, the `unknown` user is used as fallback if no user is present,\nmake sure to add this entry to your users file.\n\nThe way that this daemon works is \n1. Receive SMS messages on the SIM800L chip connected on `/dev/serial0`.\nThe SMS messages should be formatted as `[command] args...` as a normal linux command.\n2. The server checks if the sending phonenumber is a registered user, if so uses that users\nauthority level, otherwise falls back to the authority of `unknown` user.\n3. If `authority \u003e= minauthority` of the command, then the command is executed and output is captured.\n4. The command stdout+stderr is echoed back to the sender as an SMS message. Make sure you have enough\nprepaid on your SIM card.\n5. The user receives the output.\n\nBy default, the polling interval for new messages is set to 10 seconds. So be aware that the\nresponse time depends on this. Setting it to 1 minute is too extreme, since then the user might\nhave to wait for up to a minute.\n\n# Installation\n\nThis library builds upon my SMS/GSM library [ATLib](https://github.com/swordstrike1/ATlib).\nThe library must be installed on your machine or in the working directory of the daemon.\nYou can simply run the daemon using python. Be aware that the serial port needs to be accessed,\nso add the daemon user to the `dialout` group (Debian).\n\nYou can create a systemd service script for the daemon to make it run automatically:\n```conf\n[Unit]\nDescription=GSM Agent Server\n\n[Service]\nType=simple\nUser=gsm-agent\nWorkingDirectory=/usr/share/gsm-agent\nExecStart=python -u /usr/share/gsm-agent/gsm-agent.py\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farceryz%2Fgsm-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farceryz%2Fgsm-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farceryz%2Fgsm-agent/lists"}