{"id":35214460,"url":"https://github.com/edenasharpie/sahayyen","last_synced_at":"2026-04-15T22:35:22.425Z","repository":{"id":330351677,"uuid":"1122492569","full_name":"edenasharpie/sahayyen","owner":"edenasharpie","description":"custom made personal home assistant ","archived":false,"fork":false,"pushed_at":"2025-12-29T19:36:08.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-07T09:07:21.952Z","etag":null,"topics":["assistant","cozy","domestic","globasa","home-assistant","iot","iot-application","language-processing","raspberry-pi"],"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/edenasharpie.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,"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":"2025-12-24T21:19:51.000Z","updated_at":"2025-12-29T19:33:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edenasharpie/sahayyen","commit_stats":null,"previous_names":["edenasharpie/sahayyen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edenasharpie/sahayyen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edenasharpie%2Fsahayyen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edenasharpie%2Fsahayyen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edenasharpie%2Fsahayyen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edenasharpie%2Fsahayyen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edenasharpie","download_url":"https://codeload.github.com/edenasharpie/sahayyen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edenasharpie%2Fsahayyen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":["assistant","cozy","domestic","globasa","home-assistant","iot","iot-application","language-processing","raspberry-pi"],"created_at":"2025-12-29T21:19:41.464Z","updated_at":"2026-04-15T22:35:22.417Z","avatar_url":"https://github.com/edenasharpie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **sahayyen**\n\n### sahayyen is a custom made personal home assistant made to run on a raspberry pi.\n\nThe project's name is from the globasa word for assistant or helper: sahay-yen ( \\[help/helping\\] - \\[animate-agent\\] )\n\n# Documentation Overview\n\nProject structure:\n\n### -/main.py\n\n```py\n(async) main()\n```\n\n## -/core/\n\n### \\_\\_init\\_\\_.py:\n#### class `Core` \n\n```py\ncleanup()\n```\nCleans up all scheduled tasks.\n\n---\n### event_bus.py:\n\n#### class `EventBus`\nAllows publishing and subscribing to events within the system.\n\n```py \nsubscribe(event_type: str, handler: Callable[[Event], Awaitable[None]])\n```\nSubscribes a handler to a specific event type.\n\n- `event_type` [`str`]:\nThe type of event to subscribe to.\n\n- `handler` [`Callable[[Event], Awaitable[None]]`]:\nAn async function that takes an Event as argument and returns None.\n\n\n```py \n(async) emit(event: Event)\n```\nEmits an event to all subscribed handlers.\n\n- `event` [`Event`]:\nThe Event instance to emit.\n\n---\n### event.py:\n\n#### @dataclass `Event`\nRepresents a single event in the system.\n\n**Member variables**:\n- `type`      [`str`]:        The type of the event\n- `data`      [`dict`]:       The data associated with the event\n- `source`    [`str | None`]: Optional source identifier of the event\n- `timestamp` [`float`]:      The time the event was created\n\n---\n### plugin_manager.py:\n\n#### class `PluginManager`\nCan load, unload, and list plugins\n\n**Initialization parameters**:\n- `event_bus` [`EventBus`]: The EventBus instance\n- `state_store` [`StateStore`]: The StateStore instance\n- `scheduler` [`Scheduler`]: The Scheduler instance\n\n```py\n(async) load(plugin_path: str) -\u003e str\n```\nLoads a plugin from a Python file.\n\n- `plugin_path` [`str`]: Path to the plugin Python file\n- returns [`str`]: The name of the loaded plugin\n\n```py\n(async) unload(name: str)\n```\nUnloads a plugin by name.\n\n- `name` [`str`]: Name of the plugin to unload\n\n```py\nlist() -\u003e list[dict[str, str]]\n```\nLists all loaded plugins with their names and versions.\n\n- returns [`list[dict[str, str]]`]:\nList of dictionaries with plugin names and versions\n\n---\n### plugin.py:\n\n#### class `Plugin(Protocol)`\nBase interface that all plugins must implement\n\n**Member variables**:\n- `name` [str]: name of the plugin\n- `version` [str]: version of the plugin\n\n\n```py\n(async) setup(event_bus: EventBus, state_store: StateStore, scheduler: Scheduler)\n```\nCalled when the plugin is loaded\n\n- `event_bus` [`EventBus`]: The EventBus instance\n- `state_store` [`StateStore`]: The StateStore instance\n- `scheduler` [`Scheduler`]: The Scheduler instance\n\n```py\n(async) stop()\n```\nCalled when the plugin is unloaded\n\n---\n### scheduler.py:\n\n#### class `Scheduler`\nAllows scheduling coroutines to be called later or periodically\n\n```py\ncall_later(delay: float, coroutine: Callable[[], Awaitable[Any]]) -\u003e asyncio.Task\n```\nSchedules a coroutine to be called once after a delay.\n\n- `delay` [`float`]: Delay in seconds before calling the coroutine\n- `coroutine` [`Callable[[], Awaitable[Any]]`]: The coroutine function to be called\n- returns: [`asyncio.Task`]: The created asyncio Task\n\n```py\ncall_every(interval: float, coroutine: Callable[[], Awaitable[Any]]) -\u003e asyncio.Task\n```\nSchedules a coroutine to be called repeatedly at an interval.\n\n- `interval` [`float`]: Interval in seconds between calls\n- `coroutine` [`Callable[[], Awaitable[Any]]`]: The coroutine function to be called\n- returns [`asyncio.Task`]: The created asyncio Task\n\n```py\ncancel_all()\n```\nCancels all scheduled tasks.\n\n---\n### state_store.py:\n\n#### class `StateStore`\nAllows getting, setting, and subscribing to state changes\n\n**Initialization parameters**:\n- `event_bus` [`EventBus`]: The EventBus instance to use for emitting state change events\n\n```py\nget(key: str, \u003cdefault: Any | None\u003e ) -\u003e Any | None\n```\nGets the current value for a key.\n\n- `key` [`str`]: The key to retrieve\n- `default` [`Any | None`] (optional): The default value to return if the key is not found\n- returns [`Any | None`]: The value associated with the key, or default if not found\n\n```py\n(async) set(key: str, value: Any, * \u003csource: Any | None\u003e )\n```\nSets a value and notify subscribers of the change.\n\n- `key` [`str`]: The key to seta\n- `value` [`Any`]: The value to set it as\n- `source` [`Any | None`] (optional, keyword-only): Optional source identifier for the change\n\n```py\nsubscribe(key: str, handler: Callable[[Any, Any], Awaitable[None]])\n```\nSubscribes to changes for a specific key.\n\n- `key` [`str`]: The key to subscribe to\n- `name` [`Callable[[Any, Any], Awaitable[None]]`]: An async function that takes old and new values as arguments and returns None","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedenasharpie%2Fsahayyen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedenasharpie%2Fsahayyen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedenasharpie%2Fsahayyen/lists"}