{"id":19627181,"url":"https://github.com/tunjid/android-home-hub","last_synced_at":"2025-07-01T09:04:58.295Z","repository":{"id":49021225,"uuid":"84703406","full_name":"tunjid/Android-Home-Hub","owner":"tunjid","description":"Android Home Automation Hub with support for ZigBee And 433 MHz RF devices","archived":false,"fork":false,"pushed_at":"2022-01-08T21:57:31.000Z","size":2173,"stargazers_count":29,"open_issues_count":3,"forks_count":17,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-28T05:36:37.177Z","etag":null,"topics":["433","android","android-gatt-client","arduino-gatt-server","home-automation","kotlin","nsd","rf-transceiver","rf-transmitter","sniffer","zigbee","zigbee-dongles"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/tunjid.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}},"created_at":"2017-03-12T05:51:58.000Z","updated_at":"2025-02-21T15:49:12.000Z","dependencies_parsed_at":"2022-09-20T08:33:42.912Z","dependency_job_id":null,"html_url":"https://github.com/tunjid/Android-Home-Hub","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/tunjid/Android-Home-Hub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunjid%2FAndroid-Home-Hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunjid%2FAndroid-Home-Hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunjid%2FAndroid-Home-Hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunjid%2FAndroid-Home-Hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tunjid","download_url":"https://codeload.github.com/tunjid/Android-Home-Hub/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunjid%2FAndroid-Home-Hub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933046,"owners_count":23386777,"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":["433","android","android-gatt-client","arduino-gatt-server","home-automation","kotlin","nsd","rf-transceiver","rf-transmitter","sniffer","zigbee","zigbee-dongles"],"created_at":"2024-11-11T11:48:40.964Z","updated_at":"2025-07-01T09:04:58.254Z","avatar_url":"https://github.com/tunjid.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"Android Home\n=======\n\n### About\n\nThis Project is an open source Android powered Home Automation Bus, heavily inspired by [OpenHAB](https://www.openhab.org/docs/).\nIt is nowhere near as fully featured as OpenHAB, nor does it aim to be; it's a hobby Android project.\n\nThere are 2 main components:\n\n1. An Android DNS-based Service Discovery (DNS-SD) Near Service Discovery (NSD) Server.\n2. An Android client that connects to the server.\n\nNOTE: It is highly recommended to run the server on an Android Things device to avoid permission prompts for Bluetooth or USB, and the availability of USB ports.\n\n#### Client\n\nEach connected client opens a socket on the server, and writes and reads lines over the socket's input and output streams. These lines contain\nserialized representations of the ```Payload``` class which hosts various properties to describe whatever communications have taken place.\n\n#### Server\n\nThe Android Server interfaces with end devices to be controlled via the ```CommsProtocol``` abstract class. Implementations of this class\nare responsible for liaising input commands from the client to the devices it connects to and reporting any results back to the client.\n\nClient requests are responded to synchronously for immediate feedback. Should a request require asynchronous processing, a ```PrintWriter``` is provided\nin the constructor of the class, which writes to the same socket output stream. Whatever is written out of these PrintWriter must also be a serialization of the\n```Payload``` class, else the client will fail to parse and interpret it.\n\nThe Server supports multiple client connections, limited only by the size of the thread pool in ServerNsdService.\n\n### Supported Protocols\n\n#### KnockKnockProtocol\n\nA demo protocol that tells knock knock jokes\n\n#### ZigBeeProtocol\nControls ZigBee Devices using Texas Instrument's CC2531 dongle running the Zstack, it interfaces with the dongle over USB.\nThis protocol pretty much just proxies [Zsmartsystems](https://github.com/zsmartsystems/com.zsmartsystems.zigbee) console app.\nTheoretically, any supported dongle there can be supported here provided a supported serial implementation is provided.\nThe current Serial implementation has no support for flow control, and so is limited to the TI CC2531.\n\n#### RcProtocols\n\nSniffs and controls 433 MHz devices with an Arduino, essentially replacing the device's bundled remote.\nA video overview can be see [here](https://youtu.be/FrNVvwTE1eg).\n\nThere are two implementations:\n\n1. Wired, using a USB serial.\n2. Wireless, using Bluetooth Low Energy and Silicon Lab's BLE112\n\nDescription of the wireless implementation follows:\n\n![](http://i.imgur.com/MnurD22.png \"Connections\")\n\n##### The Arduino GATT Server\n\nThe Arduino GATT server is comprised of:\n\n1. An Arduino Mega \n2. The BLE112 Module from Silicon Labs\n3. A Generic RF Receiver\n4. A Generic RF Transmitter\n\nAn Arduino Mega, while not necessary is preferred because of the avaialabilty of more than 1 hardware serial.\nAn Uno is fine provided debug messages are fed to a software serial, but the BLE communication should always use a hardware serial\nas it is way more Reliable.\n\n##### The Android GATT Client\n\nThe Android GATT client provides a convenient UI for the server. After following the prompts to \na connect to a Arduino server, the app will automatically attempt to connect to it whenever it is within range.\n\nThe app assumes the switches it controls has 2 states, ON and OFF. To Create a switch, the app prompts a user to sniff the ON code and OFF code\nconsecutively, after which a switch will be created with a UI to toggle between the ON and OFF states. Once a switch is created, it is persisted\nin the app unless it is deleted with a swipe on the UI. Long pressing a switch brings up a dialog to rename the switch.\n\n## License\n\nMIT License\n\nCopyright (c) 2019 Adetunji Dahunsi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftunjid%2Fandroid-home-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftunjid%2Fandroid-home-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftunjid%2Fandroid-home-hub/lists"}