{"id":16316525,"url":"https://github.com/bizley/pi-mirror","last_synced_at":"2026-04-29T10:34:19.475Z","repository":{"id":61600628,"uuid":"55632744","full_name":"bizley/pi-mirror","owner":"bizley","description":"m-mirror interface","archived":false,"fork":false,"pushed_at":"2023-08-01T08:08:13.000Z","size":332,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T12:46:32.379Z","etag":null,"topics":["camera","hacktoberfest","mirror","pi","raspberry-pi","weather"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bizley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-04-06T18:56:39.000Z","updated_at":"2023-07-19T05:59:47.000Z","dependencies_parsed_at":"2023-10-01T23:39:58.352Z","dependency_job_id":null,"html_url":"https://github.com/bizley/pi-mirror","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.4666666666666667,"last_synced_commit":"cb191c04e6da7ecbfa38d7aeae60fa5c6d822bef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bizley/pi-mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizley%2Fpi-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizley%2Fpi-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizley%2Fpi-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizley%2Fpi-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bizley","download_url":"https://codeload.github.com/bizley/pi-mirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizley%2Fpi-mirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["camera","hacktoberfest","mirror","pi","raspberry-pi","weather"],"created_at":"2024-10-10T22:04:53.568Z","updated_at":"2026-04-29T10:34:19.459Z","avatar_url":"https://github.com/bizley.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PI Mirror Display Interface\n===========================\n\n## Yii 2 config:\n\nCreate `./config/param-local.php` file with:\n\n```php\n\u003c?php\n\nreturn [\n    'apiKey' =\u003e 'Open Weather Map API Key',\n    'units' =\u003e 'metric', // *OWM\n    'lang' =\u003e 'pl', // *OWM\n    'cacheDuration' =\u003e 600, // Yii cache duration\n    'latitude' =\u003e 0.000, // Your location latitude\n    'longitude' =\u003e 0.000, // Your location longitude\n];\n```\n\n`*OWM` = See https://openweathermap.org/api/one-call-api for options \n\n### Docker Env\n\n`docker-compose` is located in `./docker` folder.\n\n## Raspbian:\n\n### /boot/config.txt\n\nDisable camera LED:\n```shell script\ndisable_camera_led=1\n```\n\nRotate HDMI display 90 degrees:\n```shell script\ndisplay_hdmi_rotate=1\n```\n\n### ~/.config/lxsession/LXDE-pi/autostart\n\nRun Chromium in kiosk mode with Open Weather Map interface:\n```shell script\n@chromium-browser -kiosk -noerrdialogs --disable-session-crashed-bubble http://localhost:8000\n```\n\nHide cursor:\n```shell script\n@unclutter -idle 0\n```\n\nRequires `unclutter` to be installed (`sudo apt-get install unclutter`).\n\n### Motion:\n\n```shell script\nsudo apt-get install motion\n```\n\nRun:\n```shell script\nsudo systemctl enable motion\n```\n\nVerify with:\n```shell script\nsudo service motion status\n```\n\nPrepare a folder for images and videos:\n```shell script\nmkdir ~/motion\n```\n\n#### /etc/default/motion\n\n```shell script\nstart_motion_daemon=yes\n```\n\n#### /etc/motion/motion.conf\n\n```shell script\ndaemon on\nwidth 800\nheight 600\noutput_pictures best\nlocate_motion_mode on\nlocate_motion_style cross\ntarget_dir /home/pi/motion\nstream_port 0\nwebcontrol_localhost off\non_picture_save mpack -s \"Motion detected!\" %f your@gmail.com\n```\n\n### Email alerts:\n\n```shell script\nsudo apt-get install ssmtp\nsudo apt-get install mailutils\nsudo apt-get install mpack\n```\n\n#### /etc/ssmtp/ssmtp.conf\n\n```shell script\nroot=postmaster\nmailhub=smtp.gmail.com:587\nhostname=ras-pi\nAuthUser=yourGmailUser@gmail.com\nAuthPass=YourGmailPass\nFromLineOverride=YES\nUseSTARTTLS=YES\n```\n\nThis may require switching less secured apps access on your Gmail account.\n\n### Controlling Motion\n\nGo to the URL: `http://your-pi-local-ip:8080/`\n\n### PIR Sensor script for powering monitor\n\n#### ~/pir.py\n\n```python\nimport RPi.GPIO as GPIO\nimport time\nimport subprocess\n\nSENSOR_PIN = 23\nscreenOn = 1\neventTime = time.time()\n\nGPIO.setmode(GPIO.BCM)\nGPIO.setup(SENSOR_PIN, GPIO.IN)\n\ndef powerOn(channel):\n    global screenOn\n    global eventTime\n    eventTime = time.time()\n    if screenOn == 0:\n        subprocess.run([\"vcgencmd\", \"display_power\", \"1\"])\n        screenOn = 1\n\ntry:\n    GPIO.add_event_detect(SENSOR_PIN , GPIO.RISING, callback=powerOn)\n    while True:\n        time.sleep(10)\n        if screenOn == 1 and time.time() - eventTime \u003e 30:\n            subprocess.run([\"vcgencmd\", \"display_power\", \"0\"])\n            screenOn = 0\nexcept KeyboardInterrupt:\n    print(\"Motion detector switched off...\")\nGPIO.cleanup()\n```\n\n#### /etc/rc.local\n\nAdd before `Exit 0`\n```shell script\npython3 /home/pi/pir.py \u003e /dev/null 2\u003e\u00261 \u0026\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbizley%2Fpi-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbizley%2Fpi-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbizley%2Fpi-mirror/lists"}