{"id":32955290,"url":"https://github.com/LelandSindt/teslacam","last_synced_at":"2025-11-13T06:01:42.108Z","repository":{"id":67597318,"uuid":"154746541","full_name":"LelandSindt/teslacam","owner":"LelandSindt","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-21T01:38:38.000Z","size":24,"stargazers_count":36,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-26T16:32:17.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LelandSindt.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}},"created_at":"2018-10-25T22:44:14.000Z","updated_at":"2024-04-25T14:32:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7057e18-3c72-429e-a95d-98bd38035f95","html_url":"https://github.com/LelandSindt/teslacam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LelandSindt/teslacam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LelandSindt%2Fteslacam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LelandSindt%2Fteslacam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LelandSindt%2Fteslacam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LelandSindt%2Fteslacam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LelandSindt","download_url":"https://codeload.github.com/LelandSindt/teslacam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LelandSindt%2Fteslacam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284162996,"owners_count":26957899,"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","status":"online","status_checked_at":"2025-11-13T02:00:06.582Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-11-12T22:00:42.722Z","updated_at":"2025-11-13T06:01:42.102Z","avatar_url":"https://github.com/LelandSindt.png","language":"Shell","funding_links":[],"categories":["Projects"],"sub_categories":[],"readme":"# TeslaCam\nTesla's Version 9 [2018.39.x] introducted a feature allowing users to store 1 rolling hour (60, one minute files) of video from the front facing autopilot camera. This project attempts to extend (and ultimately archive) the video storage beyond 1 hour.\n\nUpdate: 2019.9.x is now supported but requires 3x the storage as it uses 3 cameras.\n\n# Hardware Requirements\n* Raspberry Pi Zero W\n* PiJuice HAT\n* USB A to Micro B cable\n\n# How it works\n\nThe ```teslacam``` service creates and makes available a 8GB USB Mass Storage device with the required \"TeslaCam\" directory. The Tesla sees, mounts and writes video files from the front camera to the USB Mass Stroage device.\n\nEvery 5 minutes the ```teslacam``` service mounts (read only) the 8GB Mass Storage device and rsyncs the files to ```/data/TeslaCam``` and the 50 oldest files in ```/data/TeslaCam``` are removed until ~20GB of storage is available on / (root)\n\nWhen the ```powermonitor``` service sees that the the Tesla has cut power to the Raspberry Pi it sets the PiJuice to start the Raspberry Pi when power is restored and instructs the Raspberry Pi to shut down. \n\nWhen the ```teslacam``` service recives a ```SIGTERM``` it takes the 8GB USB Mass Storage device offline, mounts it, and complets a final rsync to ```/data/TeslaCam```\n\nIf ```/home/pi/remotesync.sh``` exists and is excutable it is executed...\n\nOnce the ```teslacam``` service is complete the Raspberry Pi shuts down. \n\n# Installation\n\nAdd/Solder 40 pins to the GPIO header of the Raspberry Pi Zero W.\n\nAttach the PiJuice HAT to the Raspberry Pi Zero W, be sure to include the ```run pin``` (pogo pin) connecting TP2 on the Raspberry Pi. https://github.com/PiSupply/PiJuice/blob/master/Hardware/README.md#unpopulated\n\nWrite the rasbian image to a sufficiently large SD card. (I would suggest 128GB at minimum)\n\n```dd if=2018-10-09-raspbian-stretch-lite.img of=/dev/sdX bs=1MB```\n\nMount the 'boot' partition.. \n\nEdit ```config.txt``` in the boot partition and add the following line to the bottom\n\n```dtoverlay=dwc2```\n\nEdit ```cmdline.txt``` in the boot partition and add the following after ```rootwait```\n\n```modules-load=dwc2```\n\nCreate and empty file called ```ssh``` in the boot partition\n\n```touch /path/to/sd/boot/ssh```\n\nCreate ```wpa_supplicant.conf``` in the boot partition and add the followig config.\n\n```\nctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nnetwork={\n    ssid=\"YOURSSID\"\n    psk=\"YOURPSK\"\n    key_mgmt=WPA-PSK\n}\n```\n\nUnmount/Eject the SD card from your PC and use it to boot your Raspberry Pi Zero W.\n\nAt this point the Rraspberry Pi should boot and join your Wifi Network. You can find the IP address of your device from your router/DHCP server -or- you can attempt to resolve the device using the netowrk name ```raspberrypi.local```\n\nSSH to your Raspberry Pi. (Default password is ```raspberry``` )\n\n```ssh pi@raspberrypi.local```\n\nInstall the PiJuice command utilities/libraries \n\n```sudo apt-get install pijuice-base```\n\nEnable the PiJuice ```Run Pin```\n\n```pijuice_cli.py``` -\u003e General -\u003e Run pin -\u003e INSTALLED -\u003e Back -\u003e Apply Settings -\u003e Back -\u003e Exit\n\nInstall the ```teslacam```  and ```powermonitor``` services\n\n```\ncurl -o /home/pi/service.sh https://raw.githubusercontent.com/LelandSindt/teslacam/master/service.sh\ncurl -o /home/pi/powermonitor.py https://raw.githubusercontent.com/LelandSindt/teslacam/master/powermonitor.py\nchmod -v +x powermonitor.py service.sh\nsudo curl -o /etc/systemd/system/teslacam.service https://raw.githubusercontent.com/LelandSindt/teslacam/master/teslacam.service\nsudo curl -o /etc/systemd/system/powermonitor.service https://raw.githubusercontent.com/LelandSindt/teslacam/master/powermonitor.service\nsudo systemctl daemon-reload\nsudo systemctl enable teslacam\nsudo systemctl start teslacam\nsudo systemctl enable powermonitor\nsudo systemctl start powermonitor\n```\n\n\nDeveloped for/Tested on: 2018-10-09-raspbian-stretch-lite\n\nCredit for some of the command/installation procedure goes to: https://www.reddit.com/r/raspberry_pi/comments/9mbgzn/tesla_v9_dash_cam_archiver/\n\nCredit for some of the 2018.5.x support goes to: https://github.com/cimryan/teslausb/pull/125, thank you @rounders for bringing it to my attention.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLelandSindt%2Fteslacam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLelandSindt%2Fteslacam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLelandSindt%2Fteslacam/lists"}