{"id":17942744,"url":"https://github.com/b1f6c1c4/e-curtain","last_synced_at":"2025-03-24T14:32:53.717Z","repository":{"id":37178644,"uuid":"214971321","full_name":"b1f6c1c4/e-curtain","owner":"b1f6c1c4","description":"Minimalistic IoT on Raspberry Pi, C++, Matlab/Simulink, Rust, JavaScript","archived":false,"fork":false,"pushed_at":"2023-07-12T14:21:03.000Z","size":3333,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-07-12T15:30:51.137Z","etag":null,"topics":["home-automation","iot","raspberry-pi","smarthome"],"latest_commit_sha":null,"homepage":"","language":"C++","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/b1f6c1c4.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}},"created_at":"2019-10-14T07:03:07.000Z","updated_at":"2022-11-25T15:52:00.000Z","dependencies_parsed_at":"2024-10-29T03:17:32.681Z","dependency_job_id":null,"html_url":"https://github.com/b1f6c1c4/e-curtain","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Fe-curtain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Fe-curtain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Fe-curtain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Fe-curtain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b1f6c1c4","download_url":"https://codeload.github.com/b1f6c1c4/e-curtain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289812,"owners_count":20591137,"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":["home-automation","iot","raspberry-pi","smarthome"],"created_at":"2024-10-29T03:07:11.203Z","updated_at":"2025-03-24T14:32:53.222Z","avatar_url":"https://github.com/b1f6c1c4.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# e-curtain\n\n\u003e Minimalistic IoT on Raspberry Pi\n\n## Features\n\n- **Everything is DIY**\n- Automatic bedroom temperature control for optimal sleep quality\n- Automatic room ventilation for optimal air quality\n- Automatic weather information retrival\n- Automatic room temperature measurement\n- Automatic curtain control\n- Automatic window control\n- Automatic AC cooling/heating/ventilating/off mode selection\n- Automatic duct gate (cut-off) control\n- Automatic fan control (on/off)\n- Automatic space heater control using IR\n- Keyfobs for easy global mode selection\n- Web-based dashboard for monitoring\n\n## Hardware requirement\n\n- Raspberry Pi Zero W (x3)\n- I2C-based temperature sensor\n- Continuous rotation servo\n    - For curtain control\n- Stepper with controller\n    - For window control\n- Servo (x4)\n    - For AC mode selection (x2)\n    - For duct gate control (x2)\n- Relay\n    - For fan control\n- IR transmitter\n    - For space heater remote control\n- Photoresistor\n    - For space heater control feedback\n- RF keyfob(s) with receiver\n    - For global mode selection\n- Other stuff (electrical)\n    - Power adapters (x3)\n    - Resistors, capacitors, transistors\n    - Breadboards\n    - Jump wires\n    - Headers\n- Other stuff (mechanical)\n    - AC unit\n    - Space heater\n    - Curtain with pulleys\n    - Duct gate (x2)\n    - Lead screw, copper nut, shaft coupler\n    - Screws, washers, nuts\n    - Duct tapes\n- Auxilliary tools\n    - Oscilloscope and probes\n    - RF receiver\n    - Glue gun\n    - Screw driver\n    - Power drill\n\n## Layout\n\n- `HOST0`: The central controller, running `F-G0`\n    - Servo x4\n    - RF receiver\n- `HOST1`: The bedroom controller, running `H1-G1`\n    - Temperature sensor\n    - Continuous rotation servo\n    - Stepper with controller\n    - Relay\n    - IR transmitter\n    - Photoresistor\n- `HOST2`: The living room controller, running `H2` and `H0-C`\n    - Temperature sensor\n\n## Hardware setup\n\nRead the source code and you will figure out.\n\n## Software setup\n\nYou need `cmake`, `make`, `ssh`, `bash`, `node/npm`, `rustc/cargo`\n\n### Prepare cross-compile toolchain\n\n1. **On a Linux machine**, install [crosstools-ng](https://crosstool-ng.github.io/)\n1. Get the source code:\n\n    ```bash\n    git clone --depth=1 https://github.com/b1f6c1c4/e-curtain.git\n    cd e-curtain\n    ```\n\n1. Run the following:\n\n    ```bash\n    cd ct-ng\n    ct-ng build.128 # Depends on how many cores you have\n    ```\n\n### Prepare toolchain for rust\n\n```bash\nsudo systemctl start docker\ncargo install cross\n```\n\n### MATLAB Simulink code generation\n\nYou simply generate `script/libdumbac.slx` and put the result in a folder called `libdumbac`.\nYou may need licences for doing this.\n\nWe also need you know your MATLAB installation, so run the following:\n\n```bash\nln -s /opt/MATLAB/R2020a matlab\n```\n\n### Compile\n\n```bash\nmake build -j128 # Depends on how many cores you have\n```\n\n### Deploy\n\n```bash\nmake HOST0=192.168.x.x HOST1=192.168.x.x HOST2=192.168.x.x deploy\n```\n\nYou need to put weather API key into `$HOST2:/etc/e-curtain/weather.json`.\n\nData log are written to `$HOST2:/var/log/e-curtain.bin`.\n\nWe are also utilizing `$HOST2:/var/lib/e-curtain/` for persistent storage.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1f6c1c4%2Fe-curtain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb1f6c1c4%2Fe-curtain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1f6c1c4%2Fe-curtain/lists"}