{ "info": { "author": "Sebastian Gottfried", "author_email": "sebastian.gottfried@posteo.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Pi Dawn\n=======\n\nUse a Raspberry Pi connected to WS2801-based RGB LED strip to\nwake you up in the morning.\n\nSetup\n-----\n\nHardware\n~~~~~~~~\n\n...\n\nSoftware\n~~~~~~~~\n\nThese instructions install Pi Dawn for the default Raspbian user ``pi``. Run all command as this user.\n\n1. Download Raspbian, flash it to a SD card and configure the system\n to your liking (network configuration, SSH access, locale etc.)\n\n2. Setup Raspbian for Pi Dawn\n\n Run::\n\n sudo raspi-config\n\n Then select *Localisation Options* \u2192 *Change Timezone*. Pick the\n timezone you are living in from the list.\n\n Then select *Interfacing Options* \u2192 *P4 SPI*. Answer *Yes* to\n enable the SPI interface.\n\n3. Allow the user ``pi`` to access the SPI interface::\n\n sudo gpasswd -a pi spi\n\n In order to become effective, you have to log in again.\n\n4. Install required Raspbian packages::\n\n sudo apt -y install python3 python3-venv redis-server nginx\n\n This installs Python 3 with the ``venv`` module, Redis and Nginx.\n\n5. Create an virtual Python environment for Pi Dawn::\n\n cd ~\n python3 -m venv pi-dawn\n\n6. Install Pi Dawn::\n\n ./pi-dawn/bin/pip install pi_dawn\n\n7. Create the database::\n\n mkdir pi-dawn/var\n FLASK_APP=pi_dawn ./pi-dawn/bin/flask initdb\n\n8. Setup services::\n\n sudo -s\n FLASK_APP=pi_dawn ./pi-dawn/bin/flask setup_nginx\n FLASK_APP=pi_dawn ./pi-dawn/bin/flask install_services\n exit\n\n The first command will add a new site to act as a proxy for the\n Flask web application, disable the conflicting default site,\n validate the NGINX configuration for good measure and reload\n NGINX to make the changes effective.\n\n This second command will install Systemd service units for the\n web frontend and the alarm daemon. After this, it starts the\n services and configures them for automatic launch at boot.\n\nThat's it. You can access the web interface on port 80 of your\nRaspberry Pi. Use it to configure alarms or as a light switch.\n\nDevelopment\n-----------\n\nPrerequisites\n~~~~~~~~~~~~~\n\nMake sure you have the following software packages available\non your system:\n\n* Python (\u2265 3.5)\n* Node.js (\u2265 10.x)\n* Redis\n\nGet the source code\n~~~~~~~~~~~~~~~~~~~\n\nClone this repository::\n\n git clone git@github.com:sebasgo/pi-dawn.git\n\nInstallation\n~~~~~~~~~~~~\n\nExecute the following commands inside your working copy\nof the repository:\n\n1. Setup a new Python virtual environment::\n\n python3 -m venv venv\n\n2. Activate the environment::\n\n source venv/bin/activate\n\n3. Install the package with its dependencies::\n\n pip install -e .[dev]\n\n4. Create the database::\n\n FLASK_APP=pi_dawn flask initdb\n\n5. Install the dependencies for the frontend::\n\n cd pi_dawn/frontend\n npm install\n\nRunning\n~~~~~~~\n\nThe application consists of three distinct components which\nall have to be running at the same time in order to function\nproperly. Also, you need to start a Redis server.\n\n1. Redis::\n\n redis-server\n\n This command can be executed from any working directory.\n\n\n2. Backend Flask application::\n\n FLASK_APP=pi_dawn FLASK_DEBUG=1 flask run\n\n While developing the Flask application only serves the backend API.\n\n3. Frontend Vue.js application::\n\n cd pi_dawn/frontend\n npm run serve\n\n You can access the web frontend at: http://127.0.0.1:8081/\n\n4. Execute the daemon::\n\n DEBUG=1 pi-dawn-daemon\n\n The daemon controls the LED stripe and makes sure it\n lights up at the programmed alarms.\n\n In debug mode, the daemon won't actually try\n to program a LED stripe. Instead, it will use\n Pygame to display the intended result in a window.\n\nChangelog\n---------\n\nVersion 1.0 (Unreleased)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Initial release.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sebasgo/pi-dawn", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pi-dawn", "package_url": "https://pypi.org/project/pi-dawn/", "platform": "", "project_url": "https://pypi.org/project/pi-dawn/", "project_urls": { "Homepage": "https://github.com/sebasgo/pi-dawn" }, "release_url": "https://pypi.org/project/pi-dawn/1.0/", "requires_dist": [ "adafruit-ws2801", "attrs", "click", "Flask", "Flask-SQLAlchemy", "redis", "check-manifest ; extra == 'dev'", "pygame ; extra == 'dev'" ], "requires_python": "", "summary": "Pi Dawn", "version": "1.0" }, "last_serial": 4861832, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "46b891e888aff579ae4fffd541beb6e7", "sha256": "8378f59a80e1796215250869ed1d80b835ab6fbdf4d614bc03040f62fd4193e7" }, "downloads": -1, "filename": "pi_dawn-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "46b891e888aff579ae4fffd541beb6e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1156920, "upload_time": "2019-02-24T19:36:17", "url": "https://files.pythonhosted.org/packages/b1/73/39a498290a56ba109b90c921e2010ac95964e7b02ace417ff0ce4ce68c1a/pi_dawn-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acdca1dffa912b8129266d74a718b7b3", "sha256": "d848d8563699573f5dca1bcd297025b2eabedc35a82c11a6da87f24a1d12e282" }, "downloads": -1, "filename": "pi-dawn-1.0.tar.gz", "has_sig": false, "md5_digest": "acdca1dffa912b8129266d74a718b7b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1133538, "upload_time": "2019-02-24T19:36:22", "url": "https://files.pythonhosted.org/packages/0c/c2/4a300ebf2fec44326e3ce62656717af2843a65e540509d5ad0979299f85b/pi-dawn-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46b891e888aff579ae4fffd541beb6e7", "sha256": "8378f59a80e1796215250869ed1d80b835ab6fbdf4d614bc03040f62fd4193e7" }, "downloads": -1, "filename": "pi_dawn-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "46b891e888aff579ae4fffd541beb6e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1156920, "upload_time": "2019-02-24T19:36:17", "url": "https://files.pythonhosted.org/packages/b1/73/39a498290a56ba109b90c921e2010ac95964e7b02ace417ff0ce4ce68c1a/pi_dawn-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acdca1dffa912b8129266d74a718b7b3", "sha256": "d848d8563699573f5dca1bcd297025b2eabedc35a82c11a6da87f24a1d12e282" }, "downloads": -1, "filename": "pi-dawn-1.0.tar.gz", "has_sig": false, "md5_digest": "acdca1dffa912b8129266d74a718b7b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1133538, "upload_time": "2019-02-24T19:36:22", "url": "https://files.pythonhosted.org/packages/0c/c2/4a300ebf2fec44326e3ce62656717af2843a65e540509d5ad0979299f85b/pi-dawn-1.0.tar.gz" } ] }