{ "info": { "author": "Gareth Howell", "author_email": "gareth.howell@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Other Audience", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2 :: Only", "Topic :: Other/Nonlisted Topic" ], "description": "PiDashCam - Raspberry Pi DashCam\n================================\n\nA python package to deliver dashcam functionality using a Raspberry Pi.\n\nPrerequisites\n-------------\n\n- various standard libraries\n- python-camera\n- python-gps\n- python-rpi.gpio\n\nHardware\n--------\n\n- Raspberry Pi (I used a Model B+)\n- Raspberry Pi Camera Module V2\n- Adafruit Ultimate GPS breakout board connected using the UART on GPIO\n 14 and 15\n- UPS PIco with 450mAh battery from\n `ModMyPi `__. PICo uses GPIO 22 and 27\n- Pi Camera HDMI extender from `Tindie `__\n- Two momentary push buttons\n\n - Button A uses GPIO 23\n - Button B uses GPIO 24\n\n- One LED\n\n - LED1 uses GPIO 16\n\nFunctional Overview\n-------------------\n\n- On startup, the camera starts recording to an in-memory buffer\n of configurable size (default 60s).\n The video stream is overlaid with current date-time, speed, location and\n direction of travel.\n- LED1 flashes slowly whenever the camera is recording.\n\n- If button A is pressed, the current contents of the buffer are\n flushed to a file, together with the following few seconds of video.\n (This can be used to capture the before and after of some event). The\n camera then goes back to recording into the buffer.\n LED1 flashes faster whilst the buffer is being saved.\n\n- If button B is pressed, the current contents of the buffer are\n flushed to a file and recording stopped. LED1 is switched off.\n\n- If button B is pressed again, recording is re-started from new and\n LED1 flashes slowly again.\n\n- The UPS PIco ensures that recording can continue even if power has been\n lost (e.g. in a crash)\n\nSyncing videos files from PiDashCam to some other PC/Mac\n--------------------------------------------------------\n\n- In the background, Resilio Sync monitors the folder containing\n the h264 format video files. If the Pi is connected to my home Wi-Fi,\n Resilio syncs the contents of the folder to a Mac in the house.\n\n- If the power if switched off (e.g.\u00a0ignition is turned off) and the Pi\n is connected to Wi-Fi, the attached UPS keeps the Pi powered for long\n enough to allow the video files to be synced to my Mac. It then shuts\n the Pi down gracefully.\n\n- On the Mac, Hazel is monitoring the sync folder. When it sees h264\n format files appear, it moves them to another non-syncing folder and\n converts them to mpeg4 using ffmpeg. By moving the videos to another\n folder, the limited disk space on the Pi is preserved.\n\nPiDashCam Code Overview\n-----------------------\n\nThe code comprises an installed system daemon with four threads: 1. Main\nthread 2. Timer thread that is kicked off as needed 3. Camera thread 4.\nGPS thread\n\nThere are interrupt routines to handle the two buttons.\n\nThere are also Events to manage communications to and from the threads\n\nPseudo Code\n-----------\n\n::\n\n Button A interrupt handler (notable event)\n Start Timer thread\n set flushBuffer flag on timeout\n\n Button B interrupt handler (toggle recording)\n If we are recording\n flush the buffer immediately\n clear the recording flag\n Else\n set the recording flag\n EndIf\n\n Camera thread\n While shutdown flag is not set\n While recording flag is set\n Initialise Camera\n start recording into buffer\n While recording flag is set - inner recording loop\n update annotation with current date-time, position and speed\n If flushBuffer is set\n flush buffer to new file\n EndIf\n EndWhile\n wait for 1 second\n EndWhile\n Exit\n\n GPS Thread\n Initialise connection to gpsd\n While shutdown flag is not set\n add current GPS fix to inter-thread queue\n Exit\n\n Power failure\n Start Timer thread\n set shutdown Event on timeout\n\n Main thread\n Set the record flag\n Kick off Camera thread\n Kick off GPS thread\n\n While shutdown flag is not set\n wait for 1 second\n While LAN is connected and there are videos in the sync folder\n wait for 1 second\n Kill threads\n Initiate system shutdown\n Exit\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/garethhowell/pidashcam", "keywords": "dashcam raspbian python RaspberryPi", "license": "GPL3", "maintainer": "", "maintainer_email": "", "name": "pidashcam", "package_url": "https://pypi.org/project/pidashcam/", "platform": "", "project_url": "https://pypi.org/project/pidashcam/", "project_urls": { "Homepage": "https://www.github.com/garethhowell/pidashcam" }, "release_url": "https://pypi.org/project/pidashcam/1.0.0.b2/", "requires_dist": null, "requires_python": "", "summary": "A Raspberry Pi dashboard camera", "version": "1.0.0.b2" }, "last_serial": 3474998, "releases": { "1.0.0.b1": [ { "comment_text": "", "digests": { "md5": "f61080c91f7b93a1ec008ea8cc704efe", "sha256": "4ae524f018d9be394ecee05c7e0e01679b3c98b0061ae852817a25b06cd33bbe" }, "downloads": -1, "filename": "pidashcam-1.0.0.b1.tar.gz", "has_sig": false, "md5_digest": "f61080c91f7b93a1ec008ea8cc704efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19475, "upload_time": "2018-01-09T17:37:07", "url": "https://files.pythonhosted.org/packages/7b/fd/fca29117200bce748bb898839cae200a8c1071331abae6f37f60f05374eb/pidashcam-1.0.0.b1.tar.gz" } ], "1.0.0.b2": [ { "comment_text": "", "digests": { "md5": "2f253b014de8a8f982e96625641030aa", "sha256": "946a0126bee4cda3a4ff9e65d96e77183ddeee13d2be156588006db3b9737cba" }, "downloads": -1, "filename": "pidashcam-1.0.0.b2-cp27-none-linux_armv7l.whl", "has_sig": false, "md5_digest": "2f253b014de8a8f982e96625641030aa", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 19657, "upload_time": "2018-01-09T17:45:27", "url": "https://files.pythonhosted.org/packages/4e/62/ecbe610817331315bb17c42357c536db69ff6bfff6577ead748b2fb1e90b/pidashcam-1.0.0.b2-cp27-none-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "81e68917ffa682e0fbe71e3b1a42aab0", "sha256": "a82bfe93b99432fa73e96dd3fa0c1e8e27e4eece3d30f51cb6bebd6364fe546b" }, "downloads": -1, "filename": "pidashcam-1.0.0.b2.tar.gz", "has_sig": false, "md5_digest": "81e68917ffa682e0fbe71e3b1a42aab0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19467, "upload_time": "2018-01-09T17:45:28", "url": "https://files.pythonhosted.org/packages/dd/86/cae4551baa99d68181ad85078a34d871ede00397a9bcaa477782629e96c3/pidashcam-1.0.0.b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f253b014de8a8f982e96625641030aa", "sha256": "946a0126bee4cda3a4ff9e65d96e77183ddeee13d2be156588006db3b9737cba" }, "downloads": -1, "filename": "pidashcam-1.0.0.b2-cp27-none-linux_armv7l.whl", "has_sig": false, "md5_digest": "2f253b014de8a8f982e96625641030aa", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 19657, "upload_time": "2018-01-09T17:45:27", "url": "https://files.pythonhosted.org/packages/4e/62/ecbe610817331315bb17c42357c536db69ff6bfff6577ead748b2fb1e90b/pidashcam-1.0.0.b2-cp27-none-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "81e68917ffa682e0fbe71e3b1a42aab0", "sha256": "a82bfe93b99432fa73e96dd3fa0c1e8e27e4eece3d30f51cb6bebd6364fe546b" }, "downloads": -1, "filename": "pidashcam-1.0.0.b2.tar.gz", "has_sig": false, "md5_digest": "81e68917ffa682e0fbe71e3b1a42aab0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19467, "upload_time": "2018-01-09T17:45:28", "url": "https://files.pythonhosted.org/packages/dd/86/cae4551baa99d68181ad85078a34d871ede00397a9bcaa477782629e96c3/pidashcam-1.0.0.b2.tar.gz" } ] }