{"id":15197613,"url":"https://github.com/classlfz/satoshi","last_synced_at":"2025-10-02T13:31:08.011Z","repository":{"id":98174415,"uuid":"355916343","full_name":"classLfz/satoshi","owner":"classLfz","description":"一个物联网小工具。","archived":true,"fork":false,"pushed_at":"2021-08-14T02:45:26.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-24T23:32:58.510Z","etag":null,"topics":["iot","raspberry-pi-3"],"latest_commit_sha":null,"homepage":"","language":"Go","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/classLfz.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":"2021-04-08T13:22:27.000Z","updated_at":"2023-01-28T07:14:03.000Z","dependencies_parsed_at":"2023-04-06T00:33:51.369Z","dependency_job_id":null,"html_url":"https://github.com/classLfz/satoshi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classLfz%2Fsatoshi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classLfz%2Fsatoshi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classLfz%2Fsatoshi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classLfz%2Fsatoshi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/classLfz","download_url":"https://codeload.github.com/classLfz/satoshi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875693,"owners_count":16554702,"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":["iot","raspberry-pi-3"],"created_at":"2024-09-28T01:00:43.260Z","updated_at":"2025-10-02T13:31:07.631Z","avatar_url":"https://github.com/classLfz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Satoshi\n\n## 项目不再维护\n\n**很遗憾，该项目将不再维护更新。介于作者在市面上找到了很多类似，甚至比该项目好的多的项目，其代码质量远胜该项目，作者已决定不再维护当前项目。**\n\n## 方案替代\n\n[Home Assistant](https://www.home-assistant.io/) 是一个很成熟的方案。\n\n当然，如果你跟作者类似，也是将设备接入到苹果的生态里边去的话，[homebridge](https://homebridge.io/)或许会是你的不二选择。\n\n## 简介\n\nSatoshi（宝可梦主角小智）目标是成为一个用于构建简易物联网系统的小工具。\n\nSatoshi 作用于树莓派上，仅需几个简单的命令与配置，即可轻松接入语音助手（目前仅支持了Siri）。同时，Satoshi也提供了HTTP接口，在不方便接入语音助手的情形，也可通过接口访问操控设备。\n\n## 使用说明\n\n**项目初期，配置，接口可能会有较大的改动**\n\n可通过 `help` 命令查看使用说明\n\n```bash\n$ satoshi --help\n```\n\n### 配置\n\n#### 配置命令说明\n\n```bash\n$ satoshi config\n```\n\n#### 配置文件初始化\n\n默认配置文件生成于 `~/.satoshi/config.yaml`\n\n```bash\n$ satoshi config init\n```\n\n#### 配置文件说明\n\n```yaml\nlircd:\n  lircd_path: /var/run/lirc/lircd\nsatoshi:\n  # 接口设备\n  http:\n    port: '8234' # 服务端口号\n    devices:\n      - id: '123' # 设备ID，调用时唯一标识\n      type: switch # 设备类型\n      name: device_name\n      switch_config: # 设备对应的配置信息\n        on_pin: 17 # GPIO口\n        on_lircd_cmd: xxx on # lircd 控制开命令\n        off_lircd_cmd: xxx off # lircd 控制关命令\n\n  # Siri设备列表\n  siri:\n    pin_code: '00102003'   # satoshi birdge 8位HomeKit设置代码\n    devices:\n      - id: 2 # accessory设备ID，数字且大于等于2\n      type: switch  # accessory设备类型\n      name: device1  # 设备名\n      switch_config: # 开关设备对应的配置信息\n        on_pin: 17   # GPIO口\n        update_interval: 5  # 定时更新状态间隔，单位秒\n        on_lircd_cmd: xxx on # lircd 控制开命令\n        off_lircd_cmd: xxx off # lircd 控制关命令\n      - id: 3\n      type: lightbulb\n      name: device2\n      lightbulb_config: # 灯泡设备对应的配置信息\n        on_pin: 26   # GPIO口\n        update_interval: 5  # 定时更新状态间隔，单位秒\n        on_lircd_cmd: xxx on # lircd 控制开命令\n        off_lircd_cmd: xxx off # lircd 控制关命令\n```\n\n### 开启服务\n\n```bash\n$ satoshi serve\n```\n\n#### http接口说明\n\n- 调用设备\n\n```bash\n$ curl -X POST http://satoshi-host/v1/deviceCallers -d '{\"id\": \"1\", \"toggle\": true}'\n```\n\n## 计划\n\n### 短期计划\n\n- [x] 定时更新Siri设备状态\n- [x] 接入lircd控制设备\n- [ ] 接入更多Siri设备类型\n- [ ] 完善http接口\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclasslfz%2Fsatoshi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclasslfz%2Fsatoshi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclasslfz%2Fsatoshi/lists"}