{ "info": { "author": "Ryan Haas", "author_email": "haasrr@etsu.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Other Audience", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only" ], "description": "motioneyebot\n============\n\nA rudimentary Python program which utilizes a GroupMe bot to which can\nmake basic conversation with group members and provide functionality\nto a MotionEyeOS camera on a network by communicating with the GroupMe\nAPI through the requests library. The bot's responses represent the\npersonality -- and intelligence -- of my pet chicken, Popcorn, AKA Pops.\n\nThe CSV file which my weather_util module uses to get the coordinates\nof a city can be found at https://simplemaps.com/data/us-cities and\nis licensed under CC BY 4.0. All the text in the original file was\nconverted to lowercase for this project. View the license attribution\nin \"motioneyebot/data/csv_file_license.html\".\n\n\nRequires:\n---------\n- An internet connection.\n- Python 3.5 or higher.\n\nSetup:\n------\n\n**********************************************************\n1) Create a GroupMe bot and add it to your selected group.\n**********************************************************\n\nYou can create bots by registering an account on\nhttps://dev.groupme.com/. This is also where you may find your\naccess token, bot ID, and group ID which you will be prompted\nfor the first time you launch the program. It is recommended\nthat you paste these items in a text editor buffer for later use.\n\n\n******************************************************************\n2) Install a web server on the machine that will run this program.\n******************************************************************\n\nBelow demonstrates how to install Apache in Linux, though any\nweb server will suffice.\n\n.. code:: bash\n\n sudo apt install -y apache2\n\n\n*********************************************************************\n3) Ensure ownership of directory containing your server's index file.\n*********************************************************************\n\nBelow demonstrates giving user ownersip to Apache's html directroy\nin Linux. This is the location where the program will download an\nimage from the motion camera and post to GroupMe on a user's request.\nKeep note of this path as you will be asked to enter it the first time\nyou run the program.\n\n.. code:: bash\n\n sudo chown -R [username]:[username] /var/www/html\n\n\n*********************************************************************\n4) Ensure a static IP address and forward TCP port 80 to the address.\n*********************************************************************\n\nYou must ensure that the device which will run this program and\nhost your server has a static IP address. This process will vary\ndepending on the device you are using and the type of network/router\nbeing used.\n\nYou must then forward the HTTP/TCP port 80 to the device's\nstatic IP address. Port forwarding settings are available in most\nrouters' administrator settings. If you are already forwarding port\n80 to another device, try using a port such as port 8000 or 8080.\n\nYou will also need to find your public ip address. This will be used\nto allow GroupMe API to locate your HTTP server to download images\nfrom. If you used a port besides 80, record your public IP address\nin the form [IP]:[port] (i.e. 12.345.67.89:8000). This will be what\nyou enter in the 6th step of setup upon executing the program for\nthe first time.\n\n\n*******************************************************\n5) Configure the MotionEye camera's settings if needed.\n*******************************************************\n\nLocate the IP address of your MotionEyeOS camera. If you haven't\nalready, open the MotionEye system's settings and assign the camera's\nIP address as static. You will be asked to enter this IP address in\nthe first time you run the program so you may want to record it as well.\n\nOPTIONAL: If you have specified a Dropbox or Google Drive folder for\nyour MotionEye camera to upload content to, you may enter the URL in\nthe 'UPLOADS_URL' field. Otherwise, you may leave this section blank.\n\n\n****************\n6) Installation\n****************\n\n.. code:: bash\n\n pip3 install motioneyebot\n\n\n*************\n7) Execution\n*************\n\nThe program should now be able to execute successfully. Note that\nif your device has a power management feature that disconnects a\nnetwork interface (commonly WiFi), you will need to disable it to\nallow the program to run continuously without having to reconnect\nto the internet. The first time you execute the program, you will\nwalk through a setup process that looks like this:\n\n::\n\n motioneyebot\n\n ################ motioneyebot Configuration ################\n\n Thank you for using motioneyebot! If you haven't already,\n\n take the time to read README.rst before continuing with setup.\n\n Press Enter to continue or 'q' to quit. >>\n\n 1) Enter the your GroupMe access token >> f8ket0k3n\n 2) Now enter your GroupMe bot ID >> f8k31d\n 3) Now enter your GroupMe group ID >> f8kegr0up1d\n 4) Enter the path to your server's index page >> /var/www/html\n 5) Enter the IP address of your MotionEye camera >> 192.168.1.125\n 6) Enter the public IP address of this device >> 12.345.67.89:8000\n *Optional* Enter the URL to your camera uploads >> https://drive.\n google.com/fakeurl\n *Optional* Enter the name for your Bot (only\n displays in this program) >> Pops\n *Optional* Enter the name for your Group (only\n displays in this program) >> Pops Alerts\n\n\nAfter the initial setup, the program should start working automatically.\nIn the future, the program will look like the screen below after execution\nwherein the box of text printed will repeat every 5 seconds as long as the\nprogram was successfull in each attempt to fetch messages from the GroupMe\nAPI.\n\n.. code:: bash\n\n motioneyebot\n\n ####################\n # Bot: Pops\n # Group: Pops Alerts\n # Status: Listening\n ###################\n\n\n*****************************\n8) Editing the configuration.\n*****************************\n\nYou can rerun the configuration script from the first launch of motioneyebot\nany time by running the command below.\n\n.. code:: bash\n\n motioneyeconfig\n\n\n*************************************************\n9) Messaging the Pops Bot in your GroupMe group:\n*************************************************\n\nPopCam Utilities\n----------------\n\n - SNAP\n - Sends a recent snapshot from the PopCam.\n\n - STREAM\n - Sends URL to live stream (over LAN only).\n\n - UPLOADS\n - Sends URL to view all photos and videos captured.\n\nPops Weather Utility (US locations only)\n----------------------------------------\n\n - \u201cWhat\u2019s the weather\u201d\n - Sends weather at Pops\u2019 coop.\u201d\n\n - \u201cWhat\u2019s the forecast\u201d\n\n - Sends 5-day forecast of weather at Pops\u2019 coop.\n\n - \u201cWhat\u2019s the weather in [city]\u201d / \u201cWhat\u2019s the weather in\n [city, state or state ID]\u201d\n\n - Attempts to get weather data for the city specified and replies\n with weather or notifies that the location was not found.\n\n - \"What\u2019s the weather in [city, state or state ID]\u201d is a better format.\n (If Morristown, New Jersey were first in the list and you asked\n for weather in Morristown expecting Morristown, TN, you would get\n the weather for Morristown, NJ instead.\n\n - \u201cWhat\u2019s the forecast in [city]\u201d / \u201cWhat\u2019s the forecast in\n [city, state or state ID]\u201d\n\n - Attempts to get 5-day weather forecast data for the city specified\n and replies with forecast or notifies that the location was not found.\n\n - Again, specifying [city, state or state ID] will be more accurate.\n\nTalk to Popcorn. A few things to try:\n-------------------------------------\n- \u201d@pops What is the meaning of life?\u201d\n- \u201d@pops How are you?\u201d\n- \u201d@pops What\u2019s up\u201d\n- \u201d@pops What are you doing?\u201d\n- \u201d@pops Where are you?\u201d\n- \u201d@pops How\u2019s the weather?\u201d\n- \u201d@pops Tell me about your business\u201d\n- \u201d@pops Where are you from?\u201d\n- \u201d@pops Should I ___ or ___?\u201d\n- \u201d@pops Tell me a joke\u201d\n- \u201d@pops Tell me a proverb.\u201d\n- \u201d@pops Give me wisdom.\u201d", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/haasr/pops-bot-motioneye", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "motioneyebot", "package_url": "https://pypi.org/project/motioneyebot/", "platform": "", "project_url": "https://pypi.org/project/motioneyebot/", "project_urls": { "Homepage": "https://github.com/haasr/pops-bot-motioneye" }, "release_url": "https://pypi.org/project/motioneyebot/0.1.2/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Use a GroupMe bot to post images from a MotionEyeOS camera, chat with members, and provide US weather reports in your GroupMe group.", "version": "0.1.2" }, "last_serial": 5829594, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "d9cae7599e77ce1c4cc642d9540b4b03", "sha256": "a512ac87da3c85edff93c04011be4af396e36dbb3668e5ce87c945ab26504f05" }, "downloads": -1, "filename": "motioneyebot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d9cae7599e77ce1c4cc642d9540b4b03", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 332069, "upload_time": "2019-09-09T16:01:34", "url": "https://files.pythonhosted.org/packages/01/4a/4e2256cffa9a8c852f9d85ce0883ad4ea16a3802afdb6122597b7b0f074b/motioneyebot-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "15e5e34e37d135e52332cf101a2e6a39", "sha256": "8744726239a018f7b8904d3fbca0fea82b437cdc6e6c0d75490b52844ccba4e1" }, "downloads": -1, "filename": "motioneyebot-0.1.2.tar.gz", "has_sig": false, "md5_digest": "15e5e34e37d135e52332cf101a2e6a39", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 1187653, "upload_time": "2019-09-14T15:58:10", "url": "https://files.pythonhosted.org/packages/dd/7a/05353d9c947ab251ce3a921de39917a09d17f4b0cde5967c42076620e6e3/motioneyebot-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15e5e34e37d135e52332cf101a2e6a39", "sha256": "8744726239a018f7b8904d3fbca0fea82b437cdc6e6c0d75490b52844ccba4e1" }, "downloads": -1, "filename": "motioneyebot-0.1.2.tar.gz", "has_sig": false, "md5_digest": "15e5e34e37d135e52332cf101a2e6a39", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 1187653, "upload_time": "2019-09-14T15:58:10", "url": "https://files.pythonhosted.org/packages/dd/7a/05353d9c947ab251ce3a921de39917a09d17f4b0cde5967c42076620e6e3/motioneyebot-0.1.2.tar.gz" } ] }