{"id":22611403,"url":"https://github.com/webcooltz/buddy-lamp","last_synced_at":"2026-04-10T17:06:25.874Z","repository":{"id":176534594,"uuid":"657333864","full_name":"webcooltz/buddy-lamp","owner":"webcooltz","description":"Buddy lamp project for Raspberry Pi - Server (Node JS) and Client (Python)","archived":false,"fork":false,"pushed_at":"2023-06-26T16:40:46.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T09:47:51.891Z","etag":null,"topics":["buddy-lamp","express","iot","nodejs","python","raspberry-pi","rpi","rpi-zero-w","rpi3","rpi4","server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/webcooltz.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-22T20:47:24.000Z","updated_at":"2023-06-23T21:52:32.000Z","dependencies_parsed_at":"2023-10-12T23:55:59.162Z","dependency_job_id":null,"html_url":"https://github.com/webcooltz/buddy-lamp","commit_stats":null,"previous_names":["webcooltz/buddy-lamp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcooltz%2Fbuddy-lamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcooltz%2Fbuddy-lamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcooltz%2Fbuddy-lamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcooltz%2Fbuddy-lamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webcooltz","download_url":"https://codeload.github.com/webcooltz/buddy-lamp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246112660,"owners_count":20725302,"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":["buddy-lamp","express","iot","nodejs","python","raspberry-pi","rpi","rpi-zero-w","rpi3","rpi4","server"],"created_at":"2024-12-08T16:10:41.752Z","updated_at":"2025-12-30T23:19:35.616Z","avatar_url":"https://github.com/webcooltz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# buddy-lamp\n\nA wifi lamp project.\n\n## Server\n\n### Setup\n\n* Download the buddy-lamp folder (only onto one machine in the network).\n* Put buddy-lamp folder in the Documents folder.\n* Follow the directions below to start up the server on boot.\n\n### Port Forwarding\n\n* You will need to forward ports on your router to allow the server to be accessed from outside your home network.\n\n### Start Server on Boot\n\n#### Create Server Start Script\n\n* Create a shell script called start-server.sh in ~/Documents:\n`nano ~/Documents/start-server.sh`\n\n* Paste the following into it:\n```\n#!/bin/bash\n\n# Navigate to the server folder\ncd /home/pi/Documents/buddy-lamp/server || { echo \"Server folder not found!\"; exit 1; }\n\n# Run npm (use full path to npm)\n /usr/bin/npm run start\n```\n\n* Make the script executable:\n`chmod +x ~/Documents/start-server.sh`\n\n* Create a systemd service:\n`sudo nano /etc/systemd/system/buddy-lamp.service`\n\n* Paste the following into it:\n```\n[Unit]\nDescription=Buddy Lamp Node Server\nAfter=network.target\n\n[Service]\nType=simple\nUser=pi\nWorkingDirectory=/home/pi/Documents/buddy-lamp/server\nExecStart=/home/pi/Documents/start-server.sh\nRestart=on-failure\nRestartSec=5s\n\n[Install]\nWantedBy=multi-user.target\n```\n\n#### Enable and Start the Service\n\n* Reload systemd to detect the new service:\n`sudo systemctl daemon-reload`\n\n* Enable the service to start on boot:\n`sudo systemctl enable buddy-lamp.service`\n\n* Start the service immediately:\n`sudo systemctl start buddy-lamp.service`\n\n* Check its status:\n`sudo systemctl status buddy-lamp.service`\n\n## Client Setup\n\n### Installing/Running\n\n* Download the `client` repo to your Raspberry Pi.\n* Alter the values (see the section below this).\n* Open a terminal, go to the directory where the file is.\n* Run `python main.py`.\n\n### Customizing\n\nHard-coding\n* Hard-code the values for API URL, household name, and lamp color.\n\u003cimg width=\"246\" height=\"92\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b094d7ce-7fe7-48a5-b04a-539bc4cb198a\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcooltz%2Fbuddy-lamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebcooltz%2Fbuddy-lamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcooltz%2Fbuddy-lamp/lists"}