{ "info": { "author": "Kevin Glasson", "author_email": "kevinglasson+icp_opc_add@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7" ], "description": "# **opc_app**\n\nThis is a simple API that exposes a few routes to request information from the KEP\n\nThis app will make the following routes available at:\n\n```\nhttp://:5000\n```\n\nDepending on the router configuration you will be able to access this gateway from outside the local network as well, i.e. if it is NAT'd out.\n\n# Routes\n\n## **GET** / OR /api\n\n#### Test if the API is alive\n\n```json\n{\n \"message\": \"opc http endpoint is alive\"\n}\n```\n\n## **GET** /api/sensor/\\\n\n#### Fetch the list of available servers to connect to\n\n```json\n{\n \"quality\": \"Good\",\n \"time\": \"02/01/19 07:08:28\",\n \"value\": 10614\n}\n```\n\n## **GET** /api/servers\n\n#### Fetch the list of available servers to connect to\n\n```json\n{\n \"servers\": [\"Kepware.KEPServerEX.V6\"]\n}\n```\n\n## **GET** /api/nodes/\\\n\n#### Fetch the list of nodes\n\n```json\n{\n \"nodes\": [\n \"_AdvancedTags\",\n \"_ConnectionSharing\",\n \"_CustomAlarms\",\n \"_DataLogger\",\n \"_EFMExporter\",\n \"_IDF_for_Splunk\",\n \"_IoT_Gateway\",\n \"_LocalHistorian\",\n \"_Redundancy\",\n \"_Scheduler\",\n \"_SecurityPolicies\",\n \"_SNMP Agent\",\n \"_System\",\n \"Channel1\",\n \"Data Type Examples\",\n \"Simulation Examples\",\n \"XMPro\"\n ]\n}\n```\n\n# Pre-requisites\n\n_Make sure everything installed is 32-bit (even on a 64-bit os)_\n\n## Git BASH\n\nInstall [git BASH](https://github.com/git-for-windows/git/releases/download/v2.20.1.windows.1/Git-2.20.1-32-bit.exe). We will use this terminal emulator to run our program that will communicate with the PLC server.\n\nThere is no need to change any of the default settings during the installation process **except** the below caveats.\n\nWhen installing git BASH the installer will ask you how you would like to use it from the command line. Select the option the same as the image below.\n\n![git-bash-command-prompt](docs/images/git-bash-command-prompt.jpg)\n\nThe installer will also ask you which terminal emulator you would like to use, we will use Winows' default console.\n\n![git-bash-console-window](docs/images/git-bash-console-window.jpg)\n\n## Python 2.7\n\nInstall [Python 2.7 32-bit](https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi) (if it is not already).\n\nEnsure that python gets added to Path. Make sure the small symbol next to `Add python..exe to Path` does _not_ have a cross through.\n\n![python-install-path](docs/images/python-install-path.jpg)\n\nCheck the installation is working by opening git BASH and executing the following.\n\n```bash\npython\n```\n\nExpected output.\n\n![python-command-check](docs/images/python-command-check.jpg)\n\n## Pywin32\n\nInstall the 32-bit version of [pywin32](https://github.com/mhammond/pywin32/releases/download/b224/pywin32-224.win32-py2.7.exe) for python 2.7.\n\n## OpenOPC\n\nInstall the [OpenOPC](https://sourceforge.net/projects/openopc/files/openopc/1.3.1/OpenOPC-1.3.1.win32-py2.7.exe/download) library.\n\nDuring the installation you'll be asked to choose the components you want to install. _Uncheck_ the OPC Gateway service.\n\n![open-opc-gateway-uncheck](docs/images/openopc-gateway-uncheck.jpg)\n\n## Quick Start\n\nAfter all pre-requisites the following steps should get the API up and running\n\n### Install the app\n\nOpen git BASH and run the following command to install the app.\n\n```\npip install opc-app\n```\n\n### Run it!\n\n```bash\nxmpro-demo-app\n```\n\nOn the first time you run this program you may be prompted by Windows about allowing python to communicate through the firewall. We want to allow incoming connections so we need to make sure both boxes are checked like in the image below.\n\n![windows-firewall](docs/images/windows-firewall.jpg)\n\n### Test it!\n\nOpen the browser and browse to any of the routes. Try browsing to `http://localhost:5000/api` and you should see the following.\n\nIf you are using edge you will need to make sure you type the `http://` in front of the web adress or it will _probably_ not work.\n\n![check-edge](docs/images/check-edge.jpg)\n\n### Close it!\n\nYou will need to close git BASH by clicking the red cross. Ctrl-c does not appear to be working at this point.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://gitlab.icentralau.com.au/xmpro/opchttpgateway.git", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "opc-app", "package_url": "https://pypi.org/project/opc-app/", "platform": "", "project_url": "https://pypi.org/project/opc-app/", "project_urls": { "Homepage": "http://gitlab.icentralau.com.au/xmpro/opchttpgateway.git" }, "release_url": "https://pypi.org/project/opc-app/1.0.0.0/", "requires_dist": null, "requires_python": ">=2.7.*, <=3.0", "summary": "API that communicates with KEP server for XMPro demo machine", "version": "1.0.0.0" }, "last_serial": 4768567, "releases": { "0.1.0.0": [ { "comment_text": "", "digests": { "md5": "1187f5a4ba7b65d91fa6a774990d3a65", "sha256": "f24f7b2555c1f1ab416b624701fd9f98bbf19656f47c5d6efa564c872c6820e3" }, "downloads": -1, "filename": "opc_app-0.1.0.0-py2.7.egg", "has_sig": false, "md5_digest": "1187f5a4ba7b65d91fa6a774990d3a65", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": "==2.7", "size": 29971, "upload_time": "2019-02-01T13:58:17", "url": "https://files.pythonhosted.org/packages/03/8a/0fee2b3c958c7c80dbe5d171c423a91fdb22eb8df31258ba321d676efa3a/opc_app-0.1.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "dc7e0c481959652613a7188455b213ae", "sha256": "d703b396226d182778219c6917625fe3bfbacfb976345c1055febd4844f4bfa6" }, "downloads": -1, "filename": "opc_app-0.1.0.0.tar.gz", "has_sig": false, "md5_digest": "dc7e0c481959652613a7188455b213ae", "packagetype": "sdist", "python_version": "source", "requires_python": "==2.7", "size": 14210, "upload_time": "2019-02-01T02:41:28", "url": "https://files.pythonhosted.org/packages/e7/a8/acb6fb8cd4c2b760c5433bb7f8caa8f33fba5ff01df60d30f9d4610633ab/opc_app-0.1.0.0.tar.gz" } ], "0.1.0.1": [ { "comment_text": "", "digests": { "md5": "d8e88ffb9db05df1fe5115567a471b26", "sha256": "6233a5d317e90f35fe0b405e5409903d3012741f74cbb518288b795fee01708d" }, "downloads": -1, "filename": "opc_app-0.1.0.1.tar.gz", "has_sig": false, "md5_digest": "d8e88ffb9db05df1fe5115567a471b26", "packagetype": "sdist", "python_version": "source", "requires_python": "==2.7", "size": 14203, "upload_time": "2019-02-01T02:41:31", "url": "https://files.pythonhosted.org/packages/03/a6/f3fd266366b0ae07c4d81b695110ba594e5d958266baf761dd6879deb07f/opc_app-0.1.0.1.tar.gz" } ], "0.2.0.0": [ { "comment_text": "", "digests": { "md5": "522f4ddc0ea47e320517545e49d52c8c", "sha256": "899a1374ccf4ba67c67350689d4346c0c87314b503323be890a5551112b3ff9b" }, "downloads": -1, "filename": "opc_app-0.2.0.0.tar.gz", "has_sig": false, "md5_digest": "522f4ddc0ea47e320517545e49d52c8c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.*, <=3.0", "size": 15461, "upload_time": "2019-02-01T12:46:40", "url": "https://files.pythonhosted.org/packages/af/db/3ced536ab1c5486e58cbe1bc1351f67f9b736cdccd627c470436cf3e82ba/opc_app-0.2.0.0.tar.gz" } ], "0.2.0.1": [ { "comment_text": "", "digests": { "md5": "188f54ca5a503c04f4fe5737cf41b852", "sha256": "f766bba7826b488ff8718f5b56c62f5ca82539df6a78ca19b6cdac0db6287668" }, "downloads": -1, "filename": "opc_app-0.2.0.1.tar.gz", "has_sig": false, "md5_digest": "188f54ca5a503c04f4fe5737cf41b852", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.*, <=3.0", "size": 15797, "upload_time": "2019-02-01T13:58:59", "url": "https://files.pythonhosted.org/packages/bf/24/c05807ff08814a5e035e247bc78dc50e75a48f7bdb48f35974321825c641/opc_app-0.2.0.1.tar.gz" } ], "1.0.0.0": [ { "comment_text": "", "digests": { "md5": "bd5afcd3329ca5d85ea3ea22db36abad", "sha256": "ae593dfd0540f8cb79b6f82a92c5b72143b1a038eddfd758105e46592aed756a" }, "downloads": -1, "filename": "opc_app-1.0.0.0.tar.gz", "has_sig": false, "md5_digest": "bd5afcd3329ca5d85ea3ea22db36abad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.*, <=3.0", "size": 16664, "upload_time": "2019-02-01T14:31:31", "url": "https://files.pythonhosted.org/packages/01/46/1f76de7bc4315b87e2107479b45e61a94f7e3feef3722e89aca39bddac80/opc_app-1.0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bd5afcd3329ca5d85ea3ea22db36abad", "sha256": "ae593dfd0540f8cb79b6f82a92c5b72143b1a038eddfd758105e46592aed756a" }, "downloads": -1, "filename": "opc_app-1.0.0.0.tar.gz", "has_sig": false, "md5_digest": "bd5afcd3329ca5d85ea3ea22db36abad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.*, <=3.0", "size": 16664, "upload_time": "2019-02-01T14:31:31", "url": "https://files.pythonhosted.org/packages/01/46/1f76de7bc4315b87e2107479b45e61a94f7e3feef3722e89aca39bddac80/opc_app-1.0.0.0.tar.gz" } ] }