{"id":19278366,"url":"https://github.com/icewhaletech/7th-bay","last_synced_at":"2026-03-04T05:01:59.356Z","repository":{"id":251359037,"uuid":"783600388","full_name":"IceWhaleTech/7th-bay","owner":"IceWhaleTech","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-02T10:47:43.000Z","size":12476,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-19T09:40:48.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/IceWhaleTech.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":"2024-04-08T08:00:25.000Z","updated_at":"2025-01-17T03:16:08.000Z","dependencies_parsed_at":"2024-08-02T13:37:26.351Z","dependency_job_id":null,"html_url":"https://github.com/IceWhaleTech/7th-bay","commit_stats":null,"previous_names":["icewhaletech/7th-bay"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/IceWhaleTech/7th-bay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceWhaleTech%2F7th-bay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceWhaleTech%2F7th-bay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceWhaleTech%2F7th-bay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceWhaleTech%2F7th-bay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IceWhaleTech","download_url":"https://codeload.github.com/IceWhaleTech/7th-bay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceWhaleTech%2F7th-bay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30071895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T03:25:38.285Z","status":"ssl_error","status_checked_at":"2026-03-04T03:25:05.086Z","response_time":59,"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-11-09T21:09:23.904Z","updated_at":"2026-03-04T05:01:59.328Z","avatar_url":"https://github.com/IceWhaleTech.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\n## Project Overview\n\nThe ZimaCube 7th Bay is designed not only to provide essential SSD expansion capabilities for flagship devices but also to bring a greater sense of vitality to home computing through customizable lighting. The integration of customizable lighting opens up a world of possibilities: use the 7th Bay light strip to indicate system status, show data transfer speeds, indicate download progress, signal local AI activity, or even sync with your desktop music.\n\nTo realize these ideas, the ZimaCube 7th Bay is built on Espressif Systems' ESP32 microcontroller. The onboard Bluetooth and WiFi capabilities allow independent control of the lighting through ZimaOS or other IoT devices. The ESP32 is solely dedicated to controlling the lights and is isolated from all network and storage functions of the ZimaCube. Additionally, the ESP32 serves as a small web server, offering OTA (Over The Air) firmware updates for customizing light effects.\n\n### Customizing ZimaCube 7th Bay Lighting\n\nThere are two ways to customize the ZimaCube 7th Bay lighting effects:\n\n1. Using the official firmware protocol to DIY light control by writing scripts on ZimaOS.\n2. Developing your own ESP32 firmware and protocol for full control of the 7th Bay light strip.\n\n### Advantages and Disadvantages of Each Method:\n\n**Method 1:**\n\n- **Advantages:** Simple, quick implementation, utilizes existing features, low risk.\n- **Disadvantages:** Limited functionality and performance.\n\n**Method 2:**\n\n- **Advantages:** Full control, high flexibility, independent operation, optimized performance.\n- **Disadvantages:** High development difficulty, long development cycle.\n\n## How to Write a Script for Light Control\n\n### 7th Bay Firmware Protocol Introduction\n\n**WiFi Connection:** The ESP32 creates a WiFi network that ZimaOS connects to for remote control and OTA updates.\n\n**JSON Control:** Control the lighting effects using JSON commands, providing flexibility and easy customization.\n\n**OTA Updates:** Supports OTA updates, allowing firmware updates without physical access to the device.\n\n**Various Lighting Effects:** Supports multiple predefined lighting effects, such as breathing effect, constant light mode, custom mode, etc.\n\n### Light Control Methods\n\n#### Connecting to ZimaCube's Wi-Fi\n\n1. Connect to the Wi-Fi network:\n    - Wi-Fi Name: \"ZimaCube\"\n    - Wi-Fi Password: \"homecloud\"\n\n#### Using the Color Picker\n\nTo facilitate color selection, use the following online color picker tool: [Online Color Picker](https://www.w3schools.com/colors/colors_picker.asp).\n\n#### Steps:\n\n1. Open the Online Color Picker.\n2. Use the mouse to select the desired color.\n3. The corresponding HSV (Hue, Saturation, Value) values will be displayed in the color picker interface.\n4. Record these HSV values and convert them to a range suitable for JSON data:\n    - **Hue (H):** h = (Hue value / 360) * 255\n    - **Saturation (S):** s = (Saturation value / 100) * 255\n    - **Value (V):** v = (Value / 100) * 255\n\n#### Example:\n\nSelecting orange in the color picker provides the following HSV values:\n- **Hue (H):** 30\n- **Saturation (S):** 100\n- **Value (V):** 100\n\nConverted values:\n- **Hue (H):** h = (30 / 360) * 255 ≈ 21\n- **Saturation (S):** s = 255\n- **Value (V):** v = 255\n\nApply these values to JSON data for light control.\n\n#### Control Modes\n\n##### Mode 1: Breathing Mode\n\nIn breathing mode, the light strip displays a single color gradient effect. Adjust the speed and color parameters to control the effect.\n\n- **Speed:** Range 0 ~ 10\n- **Color Parameters:**\n    - **Hue (H):** Range 0 ~ 255\n    - **Saturation (S):** Range 0 ~ 255\n    - **Value (V):** Range 0 ~ 255\n\n**Example JSON Data:**\n\n```json\n{\n  \"id\": 1,  // ID for breathing mode\n  \"speed\": 4,  // Speed of the color transition, range 0-10\n  \"data\": [\n    {\"h\": 21, \"s\": 255, \"v\": 255}\n  ]\n}\n```\n\n*** Sending Data to ESP32:***\n\n1. The ESP32 creates a default WiFi network that ZimaOS connects to. Verify connection with:\n    ```bash\n    ping 172.16.1.1\n    ```\n2. Send an HTTP POST request to `172.16.1.1` with the JSON data:\n    ```bash\n    curl -X POST -H \"Content-Type: application/json\" -d @yourfile.json http://172.16.1.1/post\n    ```\n\n3. Check the lighting effect.\n\n#### Mode 2: Constant Light Mode\n\nIn constant light mode, the light strip remains a single color.\n\n**Color Parameters:**\n\n- **Hue (H):** Range 0 ~ 255\n- **Saturation (S):** Range 0 ~ 255\n- **Value (V):** Range 0 ~ 255\n\n**Example JSON Data:**\n```json\n{\n  \"id\": 2,\n  \"data\": [\n    {\"h\": 21, \"s\": 255, \"v\": 255}\n  ]\n}\n```\n\n*** Sending Data to ESP32:***\n\n1. The ESP32 creates a default WiFi network that ZimaOS connects to. Verify connection with:\n    ```bash\n    ping 172.16.1.1\n    ```\n2. Send an HTTP POST request to `172.16.1.1` with the JSON data:\n    ```bash\n    curl -X POST -H \"Content-Type: application/json\" -d @yourfile.json http://172.16.1.1/post\n    ```\n\n3. Check the lighting effect.\n\n ##### Modes 3 and 4\n\n  - Under development.\n\n##### Mode 5: Custom Mode\n\nIn custom mode, you can control the color and brightness of each light individually.\n\n- Color Parameters:\n  - Hue (H): Range 0 ~ 255\n  - Saturation (S): Range 0 ~ 255\n  - Value (V): Range 0 ~ 255\n\n***Example JSON Data:***\n```json\n{\n  \"id\": 5,  // ID for custom mode\n  \"data\": [\n    // Each object represents the color and brightness settings for one light\n    {\"h\": 0, \"s\": 255, \"v\": 255},  // Light 1 Red\n    {\"h\": 85, \"s\": 255, \"v\": 255},  // Light 2 Green\n    {\"h\": 168, \"s\": 255, \"v\": 255},  // Light 3 Blue\n    {\"h\": 42, \"s\": 255, \"v\": 255},  // Light 4 Yellow\n    {\"h\": 212, \"s\": 255, \"v\": 255},  // Light 5 Purple\n    {\"h\": 128, \"s\": 255, \"v\": 255},  // Light 6 Cyan\n    {\"h\": 21, \"s\": 255, \"v\": 255},  // Light 7 Orange\n    {\"h\": 128, \"s\": 255, \"v\": 255},  // Light 8 Cyan\n    {\"h\": 212, \"s\": 255, \"v\": 255},  // Light 9 Purple\n    {\"h\": 42, \"s\": 255, \"v\": 255},  // Light 10 Yellow\n    {\"h\": 168, \"s\": 255, \"v\": 255},  // Light 11 Blue\n    {\"h\": 85, \"s\": 255, \"v\": 255},   // Light 12 Green\n    {\"h\": 0, \"s\": 255, \"v\": 255}   // Light 13 Red\n  ]\n}\n\n```\n*** Sending Data to ESP32:***\n\n1. The ESP32 creates a default WiFi network that ZimaOS connects to. Verify connection with:\n    ```bash\n    ping 172.16.1.1\n    ```\n2. Send an HTTP POST request to `172.16.1.1` with the JSON data:\n    ```bash\n    curl -X POST -H \"Content-Type: application/json\" -d @yourfile.json http://172.16.1.1/post\n    ```\n\n3. Check the lighting effect.\n\n##  How to Develop Your Own 7th Bay Firmware\n\n### Introduction\n\nUsing a Windows computer, we demonstrate how to develop your own ESP32 firmware and light effects, as well as how to upload your new firmware.\n\n### Hardware Requirements\n\n- ZimaCube's 7th Bay\n- Type-C data cable\n- Windows computer\n\n### Hardware Information\n\n- Number of LEDs: 13\n- GPIO 2: Connects to the data line of the WS2812B LED strip\n- 5V and GND: Connects to the power and ground of the ESP32 development board\n\n### ESP32 Details:\n\n- **ESP32 Block Diagram:** [Download](https://github.com/IceWhaleTech/7th-bay/blob/main/Hardware/ESP32-C3Dimensions.png)\n- **ESP32 Schematic:** [Download](https://github.com/IceWhaleTech/7th-bay/blob/main/Hardware/ESP32_C3Schematic.png)\n- **ESP32 Altium Designer Files:** [Download](https://github.com/IceWhaleTech/7th-bay/blob/main/Hardware/Super Mini-ESP32C3-Form Factor.PcbDoc)\n\n### Usage Guide\n\n#### System Requirements\n\n- Operating System: Windows 10\n- Necessary Tools: Arduino IDE\n\n#### Installation Steps\n\n1. Install Arduino IDE: [Download](https://www.arduino.cc/en/software)\n\n2. Install the ESP32 Board\n\n    ![esp32](./images/install.png)\n\n3. Download and install the libraries:\n\n   1. Adafruit_NeoPixel\n   2. ArduinoJson\n   3. Metro\n   4. Place them in the `libraries` folder of your Arduino IDE installation.\n\n#### Development Configuration\n\n1. Open Arduino IDE.\n\n2. Select the board: Tools -\u003e Board -\u003e ESP32 -\u003e ESP32C3 Dev Module\n\n3. Select the correct port: Tools -\u003e Port\n\n4. Compile and upload code to the ESP32: Click the Upload button\n\n5. Successful upload result:\n\n    ![esp32](./images/run.png)\n\n#### OTA Update Tutorial\n\n1. Connect to WiFi\n   1. Connect your computer to the WiFi network:\n      - Name: \"ZimaCube\"\n      - Password: \"homecloud\"\n2. Enter the URL\n   1. Open a browser and go to `172.16.1.1`\n3. Upload Firmware\n   1. Obtain the firmware from the following address: [Firmware Download](https://github.com/IceWhaleTech/7th-bay/tree/main/Firmware)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficewhaletech%2F7th-bay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficewhaletech%2F7th-bay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficewhaletech%2F7th-bay/lists"}