{"id":19094182,"url":"https://github.com/markuskooche/lightswitch","last_synced_at":"2025-09-26T13:07:00.156Z","repository":{"id":53008458,"uuid":"353056469","full_name":"markuskooche/LightSwitch","owner":"markuskooche","description":"A light switch with Apple HomeKit support.","archived":false,"fork":false,"pushed_at":"2021-04-09T21:46:26.000Z","size":453,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T23:43:13.430Z","etag":null,"topics":["apple","homekit","homekit-device","lightswitch"],"latest_commit_sha":null,"homepage":"","language":"Python","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/markuskooche.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}},"created_at":"2021-03-30T15:49:27.000Z","updated_at":"2023-03-10T12:08:49.000Z","dependencies_parsed_at":"2022-08-22T16:01:09.763Z","dependency_job_id":null,"html_url":"https://github.com/markuskooche/LightSwitch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FLightSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FLightSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FLightSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FLightSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markuskooche","download_url":"https://codeload.github.com/markuskooche/LightSwitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240143972,"owners_count":19754819,"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":["apple","homekit","homekit-device","lightswitch"],"created_at":"2024-11-09T03:27:55.032Z","updated_at":"2025-09-26T13:06:55.132Z","avatar_url":"https://github.com/markuskooche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LightSwitch\n\n## Table of Contents\n1. Installation\n    1. [Install Node.JS \u0026 Homebridge on a Raspberry PI](#install-node-and-homebridge)\n    2. [How to flash an ESP8266](#flash-a-esp)\n    3. [Preparing Homebridge On RaspberryPi](#preparing-homebridge-on-raspberrypi)\n    4. [Setting Up MQTT Server On RaspberryPi](#setting-up-mqtt-server-on-raspberrypi)\n    5. [Technologies](#technologies)\n    5. [Collaborator](#collaborator)\n2. ...\n\n\nPlease create a [config.json](./controller/boot/config.json) file\n```\n{\n    \"credentials\": {\n        \"ssid\": \"YOUR_SSID\",\n        \"password\": \"YOUR_PASSWORD\"\n    }\n}\n```\n\n\u003c/br\u003e\n\n## Flash an ESP8266\n1. Please make sure your controller is connected with a DATA CABLE.\n2. Open the terminal and navigate into this directory\n3. Run the init.sh script to install al dependencies and flash the controller.\n```\n#!/usr/bin/env bash\n\nbrew install --build-from-source python@3.9\nxcode-select --install\nbrew install picocom\nbrew install pip3\npip3 install esptool\npip3 install adafruit-ampy\n\nbinary='binary/esp8266-[0-9]*-v*.bin'\nport='/dev/cu.usbserial-1420'\n\nesptool.py --port $port erase_flash\nesptool.py --port $port --baud 460800 write_flash --flash_size=detect 0 $binary\n```\n\n\u003c/br\u003e\n## Install Node.JS \u0026 Homebridge on a Raspberry PI\n\n1. Setup the Repository\n```\ncurl -sL https://deb.nodesource.com/setup_14.16.0 | sudo bash -\n````\n\n2. Install node.js additional packages\n```\nsudo apt install -y nodejs gcc g++ make python net-tools\n```\n\n3. Upgrade node.js to the newest LTS version\n```\nwget http://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-armv7l.tar.xz\n```\n\n4. Unpack the node.js LTS version\n```\ntar -xvf node-v14.16.0-linux-armv7l.tar.xz\n```\n\n5. Navigate into the unpacked folder\n```\ncd node-v14.16.0-linux-armv7l.tar.xz\n````\n\n6. Transfer the folder and restart your device\n```\nsudo cp -R * /usr/local/\nshutdown -r now\n```\n\n7. Install Homebridge and Homebridge UI\n```\nsudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x\n```\n\n8. Setup Homebridge as a service that will start on boot\n```\nsudo hb-service install --user homebridge\n```\n\n9. Make sure that you have all npm packages are update to date\n```\nnpm install -g npm-check-updates\n```\n\n10. Restart your device\n```\nshutdown -r now\n```\n\n\u003c/br\u003e\n\nNow homebridge is runing on port 8581\nYou can get your IP Adress with this command\n```\nhostname -I\n```\n\n\u003c/br\u003e\n\n## Preparing Homebridge On RaspberryPi\n\n1. Execute [homebridge/install.sh](homebridge/install.sh) with\n    ````\n    ./homebridge/install.sh\n    ````\n2. Add the contents of [homebridge-config.json](homebridge/install.sh) to the accessories array in the homebridge config.json file at [/var/lib/homebridge/config.json](/var/lib/homebridge/config.json)\n3. Restart homebridge with command\n    ````\n    systemctl restart homebridge.service\n    ````\n\n## Setting Up MQTT Server On RaspberryPi\n\n1. Execute [mqtt/install.sh](mqtt/install.sh) with\n    ````\n    sudo ./mqtt/install.sh\n    ````\n\n\n## Technologies\nA list of technologies used within the project:\n* [Node.js](https://nodejs.org): Version 14.16.0\n* [Homebridge](https://homebridge.io): Version 1.3.4\n\n\u003c/br\u003e\n\n## Collaborator\n\n* [Valentin Falke](https://github.com/vale700)\u003c/br\u003e\n* [Markus Koch](https://github.com/markuskooche)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkuskooche%2Flightswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkuskooche%2Flightswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkuskooche%2Flightswitch/lists"}