{"id":16129736,"url":"https://github.com/maxmacstn/synology-smarthome-container-guide","last_synced_at":"2026-03-18T18:02:03.430Z","repository":{"id":176757367,"uuid":"659567403","full_name":"maxmacstn/Synology-smarthome-container-guide","owner":"maxmacstn","description":"แนะนำการติดตั้ง Smarthome Software บน Synology NAS ด้วยระบบ Docker","archived":false,"fork":false,"pushed_at":"2023-09-28T15:55:54.000Z","size":212,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T13:47:11.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=q0dCeiZnlak","language":null,"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/maxmacstn.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":"2023-06-28T05:41:15.000Z","updated_at":"2024-08-19T09:18:46.000Z","dependencies_parsed_at":"2023-09-28T17:39:37.913Z","dependency_job_id":null,"html_url":"https://github.com/maxmacstn/Synology-smarthome-container-guide","commit_stats":null,"previous_names":["maxmacstn/synology-smarthome-container-guide"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxmacstn/Synology-smarthome-container-guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmacstn%2FSynology-smarthome-container-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmacstn%2FSynology-smarthome-container-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmacstn%2FSynology-smarthome-container-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmacstn%2FSynology-smarthome-container-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxmacstn","download_url":"https://codeload.github.com/maxmacstn/Synology-smarthome-container-guide/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmacstn%2FSynology-smarthome-container-guide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"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":[],"created_at":"2024-10-09T22:12:14.625Z","updated_at":"2026-01-20T12:33:09.602Z","avatar_url":"https://github.com/maxmacstn.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Home on Synology NAS Installation Guide  \nใน Repository นี้จะแนะนำการติดตั้ง Software สำหรับระบบ Smart Home บน Synology NAS ด้วยระบบ Docker Container\n\n\n\u003cimg src=\"https://raw.githubusercontent.com/maxmacstn/Synology-smarthome-container-guide/main/images/docker-page.png\" width=\"700\"\u003e\n\n## Docker Container คืออะไร\nDocker คือแพลตฟอร์ม Software สำหรับการติดตั้ง Application ลงไป Container คล้ายกับการใช้ VM แต่ว่า Docker จะรันแค่ตัว Application ไม่ใช่ทั้ง OS เหมือน VM\n\n## NAS ที่แนะนำ\nควรใช้ Synology NAS รุ่น [Plus](https://www.synology.com/th-th/products/series/home) ขึ้นไป (CPU ใช้เป็น intel หรือ AMD)\n\n## การติดตั้ง\n1. สร้าง Shared folder สำหรับเก็บข้อมูล Docker\n   1. ไปที่ Control Panel \u003e Shared Folder \u003e Create Shared Folder\n   2. ตั้งชื่อ Folder เป็น `docker` และเลือก Storage pool ที่ต้องการ\n   3. Config ตัว Permission ของ Drive และ Apply\n\n2. ติดตั้งโปรแกรมจาก Package Center\n   1. Docker\n   2. Text Editor\n\n3. สร้าง Container ใน Docker โดยใช้การตั้งค่าดังนี้\n   \n   \u003cdetails\u003e\n     \u003csummary\u003e\u003cb\u003eHome Assistant\u003c/b\u003e\u003c/summary\u003e\n     \n   * Port Mapping: HOST\n      | Purpose               | Port                  |\n      |-----------------------|-----------------------|\n      | Home Assistant UI     | 8123                  |\n   \n   * Volume:\n      | Local Folder                         | Mount Path            |\n      |--------------------------------------|-----------------------|\n      | /`Your NAS Folder`/homeassistant     | /config               |\n   \n   * การติดตั้ง Integration\n     * HACS\n        1. ไปที่ Docker Container \u003e Home Assistant Container \u003e Terminal\n        2. Create \u003e Launch with command \u003e ใส่ `bash`\n        3. พิมพ์ `wget -O - https://get.hacs.xyz | bash -` และ enter เพื่อทำการติดตั้ง\n        4. Restart Container\n        5. ไปที่ Home Assistant Web \u003e integration \u003e ค้นหาว่า HACS และติดตั้ง\n     * NUT UPS - อ่านค่าสถานะ UPS ที่เชื่อมต่อกับ NAS\n        1. ไปที่ Control Panel ของ NAS และเลือก Hardware \u0026 Power \u003e UPS\n        2. เลือก Enable network UPS Server\n        3. ใส่ `127.0.0.1` ลงใน Permitted Synology NAS Devices \n        4. Apply\n        5. ค้นหา Integration NUT ใน Home Assistant และใส่ host เป็น `localhost`\n   \u003c/details\u003e\n   \n   \n   \u003cdetails\u003e\n     \u003csummary\u003e\u003cb\u003eEMQX MQTT Broker\u003c/b\u003e\u003c/summary\u003e\n   \n   * Port Mapping: BRIDGE\n      | Purpose               | Local Port      | Container Port     |\n      |-----------------------|-----------------|--------------------|\n      | MQTT/WebSocket        | 1883            | 1883               |\n      | Dashboard Management  | 18083           | 18083              |\n   \n   * Volume: No set\n   \n   \u003c/details\u003e\n   \n   \u003cdetails\u003e\n     \u003csummary\u003e\u003cb\u003eZigbee2MQTT\u003c/b\u003e\u003c/summary\u003e\n   \n   * Port Mapping: HOST\n      | Purpose               | Port                  |\n      |-----------------------|-----------------------|\n      | Dashboard Management  | 8080                  |\n   \n   * Volume:\n      | Local Folder                         | Mount Path            |\n      |--------------------------------------|-----------------------|\n      | /`Your NAS Folder`/zigbee2mqtt       | /app/data             |\n   \n   * สร้างไฟล์ **configuration.yaml** ในโฟลเดอร์  `/Your NAS Folder/zigbee2mqtt/` \n   ```\n   # Home Assistant integration (MQTT discovery)\n   homeassistant: true\n   \n   # Web Front End\n   frontend:\n      # Optional, default 8080\n      port: 8080\n   \n   # allow new devices to join\n   permit_join: true\n   \n   # MQTT settings\n   mqtt:\n      # MQTT base topic for zigbee2mqtt MQTT messages\n      base_topic: zigbee2mqtt\n      # MQTT server URL\n      server: 'mqtt://127.0.0.1:1883'\n      # MQTT server authentication, uncomment if required:\n      user: mqtt\n      password: mqtt\n   \n   # Serial settings\n   serial:\n      # Location of SLZB-06\n      port: tcp://xxx.xxx.xxx.xxx:6638\n      baudrate: 115200\n      # Disable green led?\n      disable_led: false\n      # Set output power to max 20\n      advanced:\n      transmit_power: 20\n   \n   ```\n   \n   \u003c/details\u003e\n   \n   \n   \u003cdetails\u003e\n     \u003csummary\u003e\u003cb\u003eESPHome\u003c/b\u003e\u003c/summary\u003e\n   \n   * Port Mapping: HOST\n      | Purpose               | Port                  |\n      |-----------------------|-----------------------|\n      | Dashboard Management  | 6052                  |\n   \n   * ตัวอย่าง YAML สำหรับเปิดปิดไฟบนบอร์ด ESP32 (เพิ่มลงไปด้านล่างของไฟล์ yaml)\n      ```\n      switch:\n      -  platform: gpio\n         pin: GPIO2\n         name: \"Onboard LED\"\n      ```\n   * สำหรับการติดตั้งครั้งแรก\n     1.  กด install \u003e Manual Download \u003e Modern Format.\n     2.  บันทึกไฟล์ `.bin` \n     3.  เปิด [ESPHome Web](https://web.esphome.io/)\n     4.  เชื่อมต่อบอร์ดเข้ากับ USB ขอบคอมพิวเตอร์, กด CONNECT, และเลือก serial device.\n     5.  กด INSTALL, และเลือกไฟล์ `.bin` ที่โหลดมา\n     6.  กด INSTALL.\n     **หลังการติดตั้งในครั้งแรก บอร์ดจะขึ้น Online ในหน้า Dashboard และในครั้งต่อไป สามารถลง Firmware แบบ OTA ได้**\n   \n   \u003c/details\u003e\n   \n   \u003cdetails\u003e\n     \u003csummary\u003e\u003cb\u003eNode-red\u003c/b\u003e\u003c/summary\u003e\n      \n   * Port Mapping: BRIDGE\n      | Purpose               | Local Port      | Container Port     |\n      |-----------------------|-----------------|--------------------|\n      | Node-red web          | 1880            | 1880               |\n   \n   \n   * Volume:\n      | Local Folder                         | Mount Path            |\n      |--------------------------------------|-----------------------|\n      | /`Your NAS Folder`/node-red          | /data                 |\n   \n      **Note**: ถ้ารันเจอ error **EACCESS: permission denied** ให้ทำการ ssh ไปเปลี่ยน permission ของ node-red folder โดยใช้ command `sudo chmod -R 777 node-red/`\n   \n   * การติดตั้งและเชื่อมต่อกับ Home Assitant\n      1. ไปที่ Node-RED setting \u003e palette\n      2. ติดตั้ง `node-red-contrib-home-assistant-websocket`\n      3. ไปที่ Home Assistant \u003e Profile (กดตรงชื่อ username ตรง sidebar) \u003e สร้าง long-lived access token\n      4. ใน Node-Red Home Assistant palette, เพิ่ม Home Assistant server base URL เป็น `http://192.168.1.xx:8123` และเพิ่ม Access token.\n   \n   \u003c/details\u003e\n   \n   \n   \u003cdetails\u003e\n     \u003csummary\u003e\u003cb\u003eHomebridge\u003c/b\u003e\u003c/summary\u003e\n   \n   * Port Mapping: HOST\n   \n      | Purpose     | Port                  |\n      |-------------|-----------------------|\n      | Web UI      | 8581                  |\n   \n   * Volume:\n      | Local Folder                         | Mount Path            |\n      |--------------------------------------|-----------------------|\n      | /`Your NAS Folder`/homebridge        | /homebridge           |\n   \n   \u003c/details\u003e\n\n## เพิ่ม Shortcut ไปที่ Sidebar ของ Home Assistant\n\n\u003cimg src=\"https://raw.githubusercontent.com/maxmacstn/Synology-smarthome-container-guide/main/images/ha-sidebar.png\" width=\"400\"\u003e\n\nเพิ่มส่วนนี้ไปที่ด้านล่างของไฟล์ `configuration.yaml` ของ Home Assistant\n\n```\npanel_iframe:\n   zigbee2mqtt:\n      title: \"Zigbee2MQTT\"\n      url: \"http://192.168.1.XXX:8080\"\n      icon: mdi:zigbee\n\n   esphome:\n      title: \"ESPHome\"\n      url: \"http://192.168.1.XXX:6052\"\n      icon: mdi:memory\n\n   nodered:\n      title: \"node-red\"\n      url: \"http://192.168.1.XXX:1880\"\n      icon: mdi:resistor-nodes\n\n   emqx:\n      title: \"EMQX\"\n      url: \"http://192.168.1.XXX:18083\"\n      icon: mdi:lan-connect\n\n   homebridge:\n      title: \"Homebridge\"\n      url: \"http://192.168.1.XXX:8581\"\n      icon: mdi:apple\n```\n\n## การอัปเดต container\n   1. ไปที่ Synology Docker App.\n   2. ไปที่ Registry และ Download image เวอร์ชั่นล่าสุด\n   3. หยุดการทำงานของ container และไปที่ action \u003e reset.\n      \n      **ไฟล์และข้อมูลของ container จะไม่สุญหายหากได้ทำการ mount volume ไว้แล้ว**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmacstn%2Fsynology-smarthome-container-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmacstn%2Fsynology-smarthome-container-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmacstn%2Fsynology-smarthome-container-guide/lists"}