{"id":13581259,"url":"https://github.com/NicNull/BTphone","last_synced_at":"2025-04-06T06:32:57.814Z","repository":{"id":217510337,"uuid":"241149438","full_name":"NicNull/BTphone","owner":"NicNull","description":"Bluetooth RSSI phone monitor script to activate screen saver","archived":false,"fork":false,"pushed_at":"2020-02-26T15:17:07.000Z","size":22,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T20:47:02.962Z","etag":null,"topics":["auto-login","bash","bash-script","bluetooth","macos","phone","phone-detector","presence-detection","rssi","screensaver","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/NicNull.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}},"created_at":"2020-02-17T16:03:42.000Z","updated_at":"2022-12-20T22:59:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"c10b7d23-d3ee-49c3-ab2f-da91cbd0b275","html_url":"https://github.com/NicNull/BTphone","commit_stats":null,"previous_names":["nicnull/btphone"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicNull%2FBTphone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicNull%2FBTphone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicNull%2FBTphone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicNull%2FBTphone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicNull","download_url":"https://codeload.github.com/NicNull/BTphone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445661,"owners_count":20939953,"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":["auto-login","bash","bash-script","bluetooth","macos","phone","phone-detector","presence-detection","rssi","screensaver","ubuntu"],"created_at":"2024-08-01T15:01:59.739Z","updated_at":"2025-04-06T06:32:57.800Z","avatar_url":"https://github.com/NicNull.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# BTphone\nBluetooth RSSI phone monitor script to activate screen saver.\\\nScript for MACOS and Ubuntu 18.04 to run periodically from crontab.\n\n## MACOS (Tested on Catalina)\nRequires /usr/local/opt/blueutil/bin/blueutil via homebrew:\n```bash\nbrew install blueutil\n```\n\n## Ubuntu (Tested on 18.04)\nRequires hcitool and bluetoothctl:\n```bash\napt install bluez\n```\n\n## Install:\nRequires that a active phone pairing exists from MACOS/Ubuntu to enable RSSI polling.\\\nLocate and write down your phone BT MAC address when you set up the pairing.\n\nUpdate the ```MAC=\"00:00:00:00:00:00\"``` field in the script.\\\nSet the number of loops per crontab call to scan for phone more than once a minute.\\\nDefault is ```LOOPS=1```.\\\nAlternativly set ``POLL=1`` to continuously scan for phone presence, this will ignore ``LOOPS`` setting.\\\nTo use longer cron call intervals update the ``TIMESLOT=60`` setting corresponding to your set crontab interval, converted to seconds.\n\nCopy script to /usr/local/bin/ and make sure that it is executable\\\nRun ```crontab -e``` and add:\n```bash\n* * * * *  /usr/local/bin/btphone.sh\n```\n\nCheck your RSSI level manually via ``btphone.sh -v`` and update the ``RSSIlevel=\"\"`` parameter in the script somewhat higher.\\\n``\nFor MACOS the raw RSSI value is available but for Ubuntu the value is almost always 0 when close to the BT radio.\n``\n\nThe file ``/tmp/btphone`` holds the last query result and the file ``/tmp/nophone`` exists if phone has been not been detected or RSSI value is over RSSIlevel.\n\nThe script sends notifications to the desktop whenever the phone is away or comes close again, just comment those lines out if it gets annoying.\n\n\nThat should be it... \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNicNull%2FBTphone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNicNull%2FBTphone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNicNull%2FBTphone/lists"}