{ "info": { "author": "Tobias Gawron-Deutsch", "author_email": "tobias@strix.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Home Automation", "Topic :: Utilities" ], "description": "Archippe is a data persistence micro service for pelops. It uses\ninfluxdb to store incoming values and publishes the history a series\nupon request.\n\nFor example, ``archippe`` should store all values from topic\n``\\room\\temperature``. For this purpose a series with the same name is\nused in influxdb. To retrieve data a message must be sent to\n``\\dataservice\\request\\room\\temperature``. The message can either be a\nsingle float or a simple json structure. In the first case, the float\nvalue defines the time span in seconds (from=now()-floatvalue,\nto=now()). The json structure consists of two timestamps and group-by in\nseconds (optional):\n``{\"from\": \"2009-11-10T22:00:00Z\", \"to\": \"2009-11-10T23:00:00Z\", \"group-by\": 60}``\n(timestamp are inclusive: ``where t<=to and t>=from``; time format is\n``%Y-%m-%dT%H:%M:%S.%fZ``, ``group-by`` must be integer). The result\nfrom the query will be published to\n``\\dataservice\\response\\room\\temperature``. It contains a list of a\nvalues and their timestamp that are available for the given period:\n``[{\"time\": 10, \"value\": 0.1}, {\"time\": 11, \"value\": 0.2}, ...]``.\n\nRequest json-message:\n\n::\n\n {\n \"from\": \"2009-11-10T22:00:00Z\", \n \"to\": \"2009-11-10T23:00:00Z\", \n \"group-by\": 60 # optional (equal to 0)\n }\n\nResponse json-message:\n\n::\n\n {\n \"first\": \"2009-11-10T22:00:01Z\",\n \"last\": \"2009-11-10T22:59:23Z\",\n \"len\": 49, # entries in data list\n \"topic\": \"/test/example\", \n \"version\": 2, # version of the response format\n \"group-by\": 0,\n \"data\": [\n {\"time\": \"2009-11-10T22:00:01Z\", \"value\": 17.98},\n {\"time\": \"2009-11-10T22:01:50Z\", \"value\": 13.98},\n {\"time\": \"2009-11-10T22:03:00Z\", \"value\": 11.98},\n ...\n {\"time\": \"2009-11-10T22:59:23Z\", \"value\": 20.0}\n ]\n }\n\nIn `pelops `__ exists a\n``HistoryAgent``-class that implements a client side interaction with\nthis dataservice. A usage example can be found in\n`nikippe `__ - the charts\n``CircularChart`` and ``SequentialChart`` rely on ``HistoryAgent`` to\nkeep track of old data.\n\n.. figure:: img/Microservice%20Overview.png\n :alt: Pelops Overview\n\n Pelops Overview\n\n``Archippe`` is part of the collection of mqtt based microservices\n`pelops `__. An overview on the microservice\narchitecture and examples can be found at\n(http://gitlab.com/pelops/pelops).\n\nFor Users\n=========\n\nInstallation Core-Functionality\n-------------------------------\n\nPrerequisites for the core functionality are:\n\n::\n\n sudo apt install python3 python3-pip\n\nInstall via pip:\n\n::\n\n sudo pip3 install archippe\n\nTo update to the latest version add ``--upgrade`` as prefix to the\n``pip3`` line above.\n\nInstall via gitlab (might need additional packages):\n\n::\n\n git clone git@gitlab.com:pelops/archippe.git\n cd archippe\n sudo python3 setup.py install\n\nThis will install the following shell scripts: \\* ``archippe``\n\nThe script cli arguments are: \\* '-c'/'--config' - config file\n(mandatory) \\* '--version' - show the version number and exit\n\ninfluxdb\n--------\n\nInstallation\n~~~~~~~~~~~~\n\nInstall influx database and client. For example in ubuntu to install\nthem use:\n\n::\n\n sudo apt install influxdb influxdb-client\n\nand start the influx client with ``\u00ecnflux``.\n\nConfiguration\n~~~~~~~~~~~~~\n\nWe need to create a database (``archippe``), an admin user, and a\nnon-admin user with write access to this database.\n\nWithin the influx client:\n\n::\n\n create database archippe\n use archippe\n create user admin with password 'supersecret' with all privileges\n create user pelops with password 'secret'\n grant all on archippe to pelops\n exit\n\nYAML-Config\n-----------\n\nA yaml [1]_ file must contain four root blocks:\n\n- mqtt - mqtt-address, mqtt-port, and path to credentials file\n credentials-file (a file consisting of the entry ``mqtt`` with two\n sub-entries ``mqtt-user``, ``mqtt-password``) [2]_\n- logger - which log level and which file to be used\n- influx - influx-address, influx-port, and path to credentials file\n credentials-file (a file consisting of the entry ``influx`` with two\n sub-entries ``influx-user``, ``influx-password``) [3]_\n- data-persistence\n\n - topics - list of topics that should be persisted and their types\n - prefix - prefix for each topic to request historic data\n - response - prefix for each topic to publish historic data\n\n::\n\n mqtt:\n mqtt-address: localhost\n mqtt-port: 1883\n credentials-file: ~/credentials.yaml\n log-level: INFO\n\n logger:\n log-level: DEBUG\n log-file: archippe.log\n\n data-persistence:\n influx:\n influx-address: homebase.w.strix.at\n influx-port: 8086\n credentials-file: ~/credentials.yaml\n database: archippe # influx database\n log-level: INFO\n topics: # list of topics that should be persisted\n - topic: /test/temperature\n type: float # float, integer, string, boolean\n - topic: /test/humidity\n type: float # float, integer, string, boolean\n topic-request-prefix: /dataservice/request # prefix for each topic to request historic data\n topic-response-prefix: /dataservice/response # prefix for each topic to publish historic data\n\nsystemd\n-------\n\n- add systemd example.\n\nFor Developers\n==============\n\nGetting Started\n---------------\n\nThis service consists of two classes ``DataPersistence`` and ``Topic``.\nFor each topic that should be peristet an instance of ``Topic`` is\ncreated in ``DataPersistence``.\n\nChanges in the yaml structure must be mirrored in\n``archippe/schema.py``. It is a json-schema that verifies the provided\nyaml.\n\nMyInfluxDBClient\n----------------\n\nWrapper for influxdb.InfluxDBClient. Takes care initializing and writing\nof single datapoints to the db.\n\nNext to the raw connectivity, this client provides two methods: \\*\n``write_point``: Write a single measurement value to the database\n(wrapper for influxdb.write\\_points method). \\* ``write_points``: Write\na list of entries (timestamp, value) into the measurement of the\ndatabase.\n\nTodos\n-----\n\n- none currently planed\n\nMisc\n----\n\nThe code is written for ``python3`` (and tested with python 3.5 on an\nRaspberry Pi Zero with Raspbian Stretch).\n\n`Merge requests `__ /\n`bug reports `__ are always\nwelcome.\n\n.. [1]\n Currently, pyyaml is yaml 1.1 compliant. In pyyaml On/Off and Yes/No\n are automatically converted to True/False. This is an unwanted\n behavior and deprecated in yaml 1.2. In copreus this autoconversion\n is removed. Thus, On/Off and Yes/No are read from the yaml file as\n strings (see module baseclasses.myconfigtools).\n\n.. [2]\n Mqtt and influx credentials can be stored in one file.\n\n.. [3]\n Mqtt and influx credentials can be stored in one file.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/pelops/archippe/", "keywords": "mqtt influxdb persistence", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "Archippe", "package_url": "https://pypi.org/project/Archippe/", "platform": "", "project_url": "https://pypi.org/project/Archippe/", "project_urls": { "Homepage": "https://gitlab.com/pelops/archippe/" }, "release_url": "https://pypi.org/project/Archippe/0.1.12/", "requires_dist": null, "requires_python": "", "summary": "Archippe is a data persistence micro service for pelops. It uses influxdb to store incoming values and publishes the history a series upon request.", "version": "0.1.12" }, "last_serial": 5162139, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d7a9d68d27bdde403b58e32aceb63ddb", "sha256": "f4d5b1e0546439b30b93b88acbfa1b8109171b6b553d1759437c3c808f92c12c" }, "downloads": -1, "filename": "Archippe-0.1.tar.gz", "has_sig": false, "md5_digest": "d7a9d68d27bdde403b58e32aceb63ddb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9433, "upload_time": "2018-06-22T22:45:05", "url": "https://files.pythonhosted.org/packages/f1/1f/57acc5ecf2f8cbcba1609ca0bae57ccbe12f5a3d8f66ecf0e9fcb1468987/Archippe-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "44216127ee958df51f9576929cea57da", "sha256": "b1aa766158eec52c1b918e11d1571dfce2f392368ad407de775a4a6e42a5bbc5" }, "downloads": -1, "filename": "Archippe-0.1.1.tar.gz", "has_sig": false, "md5_digest": "44216127ee958df51f9576929cea57da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9982, "upload_time": "2018-07-04T21:17:32", "url": "https://files.pythonhosted.org/packages/97/c4/6a6faa23a5293b5239a373af1c0a3447cea7c82686e16336d171c8d78a32/Archippe-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "f0eab18f07bb4865cf30238bb2c1485f", "sha256": "25d8385dde09581fad56ecbf690cfd6724ada98e73342bd3986ecb3047bddcec" }, "downloads": -1, "filename": "Archippe-0.1.10.tar.gz", "has_sig": false, "md5_digest": "f0eab18f07bb4865cf30238bb2c1485f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12461, "upload_time": "2019-04-04T21:29:52", "url": "https://files.pythonhosted.org/packages/cf/af/4ff5b208fd06e945ca504ce95190d3fc8083750ec68b06085735220db916/Archippe-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "b49fa82017b51ac9c00e07400bafc23a", "sha256": "8bc7aab198741fc579dad0474c82118aedbd33b64f1b9f71e4f12247f1894fae" }, "downloads": -1, "filename": "Archippe-0.1.11.tar.gz", "has_sig": false, "md5_digest": "b49fa82017b51ac9c00e07400bafc23a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12450, "upload_time": "2019-04-07T20:15:02", "url": "https://files.pythonhosted.org/packages/6a/70/7eca9d4a465c0c17715c627535590bcc5f9c5a5bec561b4e9059239c6302/Archippe-0.1.11.tar.gz" } ], "0.1.12": [ { "comment_text": "", "digests": { "md5": "101f67b2e9ecbb2779341a89a89fa80e", "sha256": "8b2ff4e0f82800602c43fefa525b785fe8e2daad5e4ae5af763b9a03472f4d14" }, "downloads": -1, "filename": "Archippe-0.1.12.tar.gz", "has_sig": false, "md5_digest": "101f67b2e9ecbb2779341a89a89fa80e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12460, "upload_time": "2019-04-18T20:58:57", "url": "https://files.pythonhosted.org/packages/a4/15/a6e34c7a631fd135d8615c434ff9d7be31db5a0caf204a649c944e2a9b7e/Archippe-0.1.12.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2809604926ad5ac0c34baa8a9e9813d8", "sha256": "8f8b72549264e83fad4f0faca82ab668d80af2d3532d1ee409080c3954891f21" }, "downloads": -1, "filename": "Archippe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2809604926ad5ac0c34baa8a9e9813d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10280, "upload_time": "2018-08-08T21:06:02", "url": "https://files.pythonhosted.org/packages/43/c1/534c94e9f13e682deea90e46b583c8558dc934395b0e2cf974364a628483/Archippe-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c69c0ff82408d2d16a50432af3d0d8cb", "sha256": "02219f3903a13efb4fb72d2522ac8431e73a61e98edc756ccad3bb77112da6e6" }, "downloads": -1, "filename": "Archippe-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c69c0ff82408d2d16a50432af3d0d8cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11825, "upload_time": "2018-11-09T10:11:24", "url": "https://files.pythonhosted.org/packages/97/4c/0e3813bbf23858d6678cde9a9481c162871aa11584b8a44cb3f76952b6e7/Archippe-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "4b41dbe986dc78b24dc675c2ed37706d", "sha256": "aecf8b233b93daa58731e4c7e86c1ac8db066670579ba9d8cadf5afd60e88808" }, "downloads": -1, "filename": "Archippe-0.1.4.tar.gz", "has_sig": false, "md5_digest": "4b41dbe986dc78b24dc675c2ed37706d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12017, "upload_time": "2018-11-22T20:23:19", "url": "https://files.pythonhosted.org/packages/62/c6/b023a05e24e0ba2049c0b6f5899b7fd8cd024bbee852a529f265b05d7378/Archippe-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "2a4d4e3c38b28c8e3906fbac0a8880ba", "sha256": "08063313fb0260824e9b7c3f5496ee3d081a5a13859e8460cde43521f1d92402" }, "downloads": -1, "filename": "Archippe-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2a4d4e3c38b28c8e3906fbac0a8880ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13608, "upload_time": "2018-12-02T22:16:10", "url": "https://files.pythonhosted.org/packages/46/c7/e9913e37df5edffe4231aad1d6b51e5c4c3015e1fd50d5b4dadf67b26b19/Archippe-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "e9b7103115594d9cbae04e47ff71035b", "sha256": "222593345c9d43643114e16e3c93c1369148ae2078454a07dfa7324b0a0e94b1" }, "downloads": -1, "filename": "Archippe-0.1.6.tar.gz", "has_sig": false, "md5_digest": "e9b7103115594d9cbae04e47ff71035b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12022, "upload_time": "2018-12-02T22:46:47", "url": "https://files.pythonhosted.org/packages/cd/2c/d410f190191fcbba63cf14bfcb2d9d5893f749a06e4dbb65142bf01a268b/Archippe-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "391315cf0493340c33231d8b154db6ae", "sha256": "9f7f38ea19869a7239fd02eda8c1ec9edae23ba8d6030a171c528d4fe591456a" }, "downloads": -1, "filename": "Archippe-0.1.7.tar.gz", "has_sig": false, "md5_digest": "391315cf0493340c33231d8b154db6ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12108, "upload_time": "2018-12-02T23:26:10", "url": "https://files.pythonhosted.org/packages/e0/dc/0a89622b5f309db61a84734d03a461fdb701ca9fc0bec7efcd63c9b6f3ca/Archippe-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "6184bf7be21f20974b38370b5e8c4eca", "sha256": "0d841749a20ec6267549715a8971d4572ee0876afcc21730997acdb041382d5e" }, "downloads": -1, "filename": "Archippe-0.1.8.tar.gz", "has_sig": false, "md5_digest": "6184bf7be21f20974b38370b5e8c4eca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12285, "upload_time": "2018-12-29T21:06:08", "url": "https://files.pythonhosted.org/packages/ec/9f/854514ff1fe3e58de23ebee80b6dee7a910da7e35a52e9078521e4ef3b33/Archippe-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "2f10c3cb965daa9c74db7f28ab4c6b89", "sha256": "d75d1af153a4339a4c5d7ae7f2e0bce66ee255269babcfb3d7c7ce7338dbdba8" }, "downloads": -1, "filename": "Archippe-0.1.9.tar.gz", "has_sig": false, "md5_digest": "2f10c3cb965daa9c74db7f28ab4c6b89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12426, "upload_time": "2019-03-09T23:07:11", "url": "https://files.pythonhosted.org/packages/3b/0e/c79913e6b7bf5599e342776d5f3df0fc561ccf526e7df4e1d10c7733bd72/Archippe-0.1.9.tar.gz" } ], "0.1a0": [ { "comment_text": "", "digests": { "md5": "ad578a3786d45187ce4d2b2628f9a093", "sha256": "c573bdb6ef8ebfff7bbf09cdfd4a30d04d7082f6e78298d6afc7dc6ff166ca77" }, "downloads": -1, "filename": "Archippe-0.1a0.tar.gz", "has_sig": false, "md5_digest": "ad578a3786d45187ce4d2b2628f9a093", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1434, "upload_time": "2018-04-09T20:59:33", "url": "https://files.pythonhosted.org/packages/f1/75/dd397f89e5ecb24c519b7f023836dc7fe26b7d741022f0c7fd944e6c3209/Archippe-0.1a0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "101f67b2e9ecbb2779341a89a89fa80e", "sha256": "8b2ff4e0f82800602c43fefa525b785fe8e2daad5e4ae5af763b9a03472f4d14" }, "downloads": -1, "filename": "Archippe-0.1.12.tar.gz", "has_sig": false, "md5_digest": "101f67b2e9ecbb2779341a89a89fa80e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12460, "upload_time": "2019-04-18T20:58:57", "url": "https://files.pythonhosted.org/packages/a4/15/a6e34c7a631fd135d8615c434ff9d7be31db5a0caf204a649c944e2a9b7e/Archippe-0.1.12.tar.gz" } ] }