{ "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": "This software subscribes to mqtt-topics that contain raw sensor data and\npublishes e.g. average values for configurable time spans.\n\nAvailable algorithms are: \\* ``Average`` - Vanilla average/mean\nimplementation. \\* ``WeightedAverage`` - The weighted average of all\nvalid data points within the time window. The weight is the inverse time\ndifference to the time\\_to time stamp. \\* ``Count`` - Count how many\nvalid data points are within the give time window. \\* ``Maximum`` - The\nmaximum value of all valid data points within the time window. \\*\n``Minimum`` - The minimum value of all valid data points within the time\nwindow.\n\nAlcathous [1]_ is the brother of Copreus. Both are sons of Pelops.\n[`wiki `__]\n\n.. figure:: img/Microservice%20Overview.png\n :alt: Pelops Overview\n\n Pelops Overview\n\n``Alcathous`` 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 pelops alcathous\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/alcathous.git\n cd alcathous\n sudo python3 setup.py install\n\nThis will install the following shell scripts: \\* ``alcathous``\n\nThe script cli arguments are: \\* '-c'/'--config' - config file\n(mandatory) \\* '--version' - show the version number and exit\n\nYAML-Config\n-----------\n\nA yaml [2]_ file must contain three root blocks: \\* mqtt - mqtt-address,\nmqtt-port, and path to credentials file credentials-file (a file\nconsisting of two entries: mqtt-user, mqtt-password) \\* logger - which\nlog level and which file to be used \\* data-preparation \\* general -\nparameters for the manager \\* methods - mapping of algorithms,\nparameters and topic-pub suffix \\* datapoints - which topics should be\nused and which methods should be applied\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: alcathous.log\n\n data-preparation: # alcathous root node\n no_data_behavior: last_valid # mute, last_valid, empty_message\n update_cycle: 30 # new values published each ... seconds\n number_worker: 2 # how many worker threads should be spawned to process task queue\n\n methods:\n - name: avg_5min # unique name for method\n topic-pub-suffix: avg_5min\n algorithm: avg # avg - average, wavg - weighted average, count, min, max\n time_window: 5 # use the values from the last ... minutes\n\n - name: wavg_5min # unique name for method\n topic-pub-suffix: wavg_5min\n algorithm: wavg # avg - average, wavg - weighted average, count, min, max\n time_window: 5 # use the values from the last ... minutes\n\n - name: count_2min # unique name for method\n topic-pub-suffix: count_2min\n algorithm: count # avg - average, wavg - weighted average, count, min, max\n time_window: 2 # use the values from the last ... minutes\n\n - name: min_3min # unique name for method\n topic-pub-suffix: min_3min\n algorithm: min # avg - average, wavg - weighted average, count, min, max\n time_window: 3 # use the values from the last ... minutes\n\n - name: max_3min # unique name for method\n topic-pub-suffix: max_3min\n algorithm: max # avg - average, wavg - weighted average, count, min, max\n time_window: 3 # use the values from the last ... minutes\n\n datapoints:\n - topic-sub: /test/0/raw\n topic-pub-prefix: /test/0/aggregated/\n zero_is_valid: False # 0 is valid or rejected\n methods: wavg_5min, avg_5min, count_2min, min_3min, max_3min\n\n - topic-sub: /test/1/raw\n topic-pub-prefix: /test/1/aggregated/\n zero_is_valid: False # 0 is valid or rejected\n methods: wavg_5min, avg_5min\n\nsystemd\n-------\n\n- add systemd example.\n\nFor Developers\n==============\n\nGetting Started\n---------------\n\nThe project consists of three main modules: \\* ``datapointmanager`` -\nloads the config and create all ``Datapoint`` instances. Hosts the main\nloop. \\* ``datapoint`` - ``Datapoint`` is one of the datapoints in the\nconfig. it holds all data received for the given topic, has its own set\nof method instances. \\* ``algorithms`` - The configureable algorithms\nare then used as data preparation methods in ``DataPoint``. Currently,\ntwo algorithms are implemented: Average and WeightedAverage. The first\none treats all values in a time window equivalent, the later one weights\nthem with the time span between ``time_from`` and ``time_value``.\n\n``DataPointManager`` has two lists: references to the ``process``\nfunctions from all instantiated methods and a references to the\n``purge`` functions from all instantiated ``DataPoint``\\ s. The first\nlist is ordered by an execution cost estimation (highest value first).\nBoth lists are applied to worker threads (``general.number_worker``) -\nplease adapt the number of the workers to your needs.\n\nTodos\n-----\n\n- Add better validity check for incoming values\n- ...\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\nalways welcome.\n\n.. [1]\n The icon used for this project is in fact not Alcathous. Moreover, it\n is Odysseus and resembles perfectly my failed journey to find a\n fitting symbol.\n\n.. [2]\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", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/pelops/alcathous/", "keywords": "mqtt average maximum minimum stream data preparation", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "Alcathous", "package_url": "https://pypi.org/project/Alcathous/", "platform": "", "project_url": "https://pypi.org/project/Alcathous/", "project_urls": { "Homepage": "https://gitlab.com/pelops/alcathous/" }, "release_url": "https://pypi.org/project/Alcathous/0.3.8/", "requires_dist": null, "requires_python": "", "summary": "This software subscribes to mqtt-topics that contain raw sensor data and publishes average values for configurable time spans.", "version": "0.3.8" }, "last_serial": 5110851, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ae4266a09206c521c2cc650d78a8eff8", "sha256": "a7c1ec4e8c61b7a6d9f4ca91193a8b8bd640c70a94f14a782eb24d86feee8b6f" }, "downloads": -1, "filename": "Alcathous-0.1.tar.gz", "has_sig": false, "md5_digest": "ae4266a09206c521c2cc650d78a8eff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9172, "upload_time": "2018-02-24T09:41:23", "url": "https://files.pythonhosted.org/packages/23/21/38be321b57f4bec5d835863d3cd0d4f8235b9eeff0197f27f4c43cde1084/Alcathous-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "94f52acd38b3deec642b79753bd64c70", "sha256": "e853a3f6b0ade8535f62204f29c7b642872311c6ef1a08d6c10c290fd6211f8b" }, "downloads": -1, "filename": "Alcathous-0.1.1.tar.gz", "has_sig": false, "md5_digest": "94f52acd38b3deec642b79753bd64c70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9241, "upload_time": "2018-03-03T20:31:21", "url": "https://files.pythonhosted.org/packages/1d/59/32fe31982db938dd9301739708f8ab3f87f5015541f5fe7dbc207f216417/Alcathous-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7eaa69625358dd8d892cdf28752cde23", "sha256": "3e017b4661ff7d5632d06bc029cba4eccb27ae5e583f15a9c3e93f2d29a9f17c" }, "downloads": -1, "filename": "Alcathous-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7eaa69625358dd8d892cdf28752cde23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9235, "upload_time": "2018-03-29T22:18:40", "url": "https://files.pythonhosted.org/packages/44/99/f79362fab5702220da8e0247aaa816f45af1dc936250ac101b2265ad84c1/Alcathous-0.1.2.tar.gz" } ], "0.1a0": [ { "comment_text": "", "digests": { "md5": "b3616c5d34982d4756134e7fc27548ff", "sha256": "5d2b524695cbf2ee7e57b76bfefe52509e5ef3cc9ddbaaca69ef576b6002815d" }, "downloads": -1, "filename": "Alcathous-0.1a0.tar.gz", "has_sig": false, "md5_digest": "b3616c5d34982d4756134e7fc27548ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9160, "upload_time": "2018-02-24T09:11:31", "url": "https://files.pythonhosted.org/packages/f9/62/7377610dc933a92ae144801d23b4aa36fb9b66fa9e2725a6426c60421986/Alcathous-0.1a0.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "cdf33f60fe069996fd71228d3bf11587", "sha256": "4d49a0c1e1737bdd046defee252a6ae1b0e2c09c9329f91f0174d71b13d078da" }, "downloads": -1, "filename": "Alcathous-0.3.tar.gz", "has_sig": false, "md5_digest": "cdf33f60fe069996fd71228d3bf11587", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14486, "upload_time": "2018-05-20T20:25:21", "url": "https://files.pythonhosted.org/packages/da/40/54418f2a9f4f7748ef37e1d6f4685ef9e98ab5e9ca482155e736340b30eb/Alcathous-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "a8d3006da8940a2e13a3752e28dc4a1a", "sha256": "edb83a0a4387b0189a2f52100307e9cd5fee441f968ef4d7588f63926f3ff54c" }, "downloads": -1, "filename": "Alcathous-0.3.1.tar.gz", "has_sig": false, "md5_digest": "a8d3006da8940a2e13a3752e28dc4a1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15643, "upload_time": "2018-05-23T09:55:21", "url": "https://files.pythonhosted.org/packages/95/dc/ecbb5626edeba6ddbcb208849af0bc4fb32c9836cfcafffdafab5bee1329/Alcathous-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9dbf442876280f267d91402a188e0c29", "sha256": "2f4d8edf60e427c3666ab40c1ffbb0e57222e0ac829f815a95c35daa5438d42b" }, "downloads": -1, "filename": "Alcathous-0.3.2-py3.5.egg", "has_sig": false, "md5_digest": "9dbf442876280f267d91402a188e0c29", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 65490, "upload_time": "2018-06-07T21:08:50", "url": "https://files.pythonhosted.org/packages/5b/59/46d3a0298af55101e867c2fbd77568f167988d35cf40d250e538f8be2000/Alcathous-0.3.2-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "84a76ae7529f550eebe2a91b3e48f495", "sha256": "3977457471626baf6b29420ad8b169e6c2417c5235031b0094a0743f0fd7dadb" }, "downloads": -1, "filename": "Alcathous-0.3.2.tar.gz", "has_sig": false, "md5_digest": "84a76ae7529f550eebe2a91b3e48f495", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16139, "upload_time": "2018-06-07T21:08:48", "url": "https://files.pythonhosted.org/packages/24/85/f03c20ee99098ff9eb746b6fd6ce5f6081cec2d52e35857682fad798e5e8/Alcathous-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "6dcc98a71638bbd3656ecf66d662e2c4", "sha256": "23224cece98508bb71bcd8f905925946f2edbd86f7215a402c8b8cfa190ab1aa" }, "downloads": -1, "filename": "Alcathous-0.3.3-py3.5.egg", "has_sig": false, "md5_digest": "6dcc98a71638bbd3656ecf66d662e2c4", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 65546, "upload_time": "2018-06-07T21:16:27", "url": "https://files.pythonhosted.org/packages/e7/cb/03bf8ccc54314a96e04061f9a482d7dcfe063423b616b9c345b4b4dbc39e/Alcathous-0.3.3-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "d9ffe14e6d34d1f0ff4f3158650baa8e", "sha256": "6b799187f85aa542c3251022070dc2a83b46e7e0d3993f7866fb083b852ce61d" }, "downloads": -1, "filename": "Alcathous-0.3.3.tar.gz", "has_sig": false, "md5_digest": "d9ffe14e6d34d1f0ff4f3158650baa8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16152, "upload_time": "2018-06-07T21:16:25", "url": "https://files.pythonhosted.org/packages/5b/0a/f1a545a91b2f005bec63435b5df4168171d2c6244a3ea6379eb1405760d5/Alcathous-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "0cab9f23464f0b0310c89b3f8554542b", "sha256": "9d806300544ddca7ba50d91348a55fd25c2ad304384c4f6f80c6098bcb112242" }, "downloads": -1, "filename": "Alcathous-0.3.4.tar.gz", "has_sig": false, "md5_digest": "0cab9f23464f0b0310c89b3f8554542b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15784, "upload_time": "2018-08-08T21:05:44", "url": "https://files.pythonhosted.org/packages/8d/84/28c0da23af9095998fe1b9674147538f6676075b435d386703ec348320bb/Alcathous-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "7028c2118065bcb99aade757d590df40", "sha256": "e21332c9c5c3daad135d10bee51c53b729ef37df3cf29ed0c0b97e2bfe1b5df8" }, "downloads": -1, "filename": "Alcathous-0.3.5.tar.gz", "has_sig": false, "md5_digest": "7028c2118065bcb99aade757d590df40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15999, "upload_time": "2019-02-15T21:19:36", "url": "https://files.pythonhosted.org/packages/3d/dc/d43aa17ea1f2a9ab954f5dc3c32f245bd4e865c4c3febee9e068e51c32cb/Alcathous-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "082fa03b597f5f04d8feef803b987381", "sha256": "ca01117b90890ef57cfed6761bf1c39b94614b5876b46337dc4ab4a45dc6cdc7" }, "downloads": -1, "filename": "Alcathous-0.3.6.tar.gz", "has_sig": false, "md5_digest": "082fa03b597f5f04d8feef803b987381", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16086, "upload_time": "2019-03-09T23:23:29", "url": "https://files.pythonhosted.org/packages/b7/22/0531a85cb0c4e335e1fc64d0cd38f5b3e03e51aeb8db3959387df8d08b1e/Alcathous-0.3.6.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "157bfac1c2473c855686a67c93dea742", "sha256": "d330401ff2bda6426f7009f0300cd8210574d9b0560bb6fa51ed88478abea43b" }, "downloads": -1, "filename": "Alcathous-0.3.7.tar.gz", "has_sig": false, "md5_digest": "157bfac1c2473c855686a67c93dea742", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16160, "upload_time": "2019-04-04T21:27:08", "url": "https://files.pythonhosted.org/packages/99/87/8765b24d406e494ed6a1e61305f05bd8f45d1a179541e6e3c3fc773a94da/Alcathous-0.3.7.tar.gz" } ], "0.3.8": [ { "comment_text": "", "digests": { "md5": "073adcad8dd65633b9c73ecf5c53f2cd", "sha256": "a4b974e06df03e35f11dde50c87b8af7f45f4445ba863cf723158ce98f55bc5f" }, "downloads": -1, "filename": "Alcathous-0.3.8.tar.gz", "has_sig": false, "md5_digest": "073adcad8dd65633b9c73ecf5c53f2cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16160, "upload_time": "2019-04-07T20:14:20", "url": "https://files.pythonhosted.org/packages/30/ed/8ab4f415db84b0ba2f52e85209f0ed7b6c73dc7a46a6533bf60a7337d16e/Alcathous-0.3.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "073adcad8dd65633b9c73ecf5c53f2cd", "sha256": "a4b974e06df03e35f11dde50c87b8af7f45f4445ba863cf723158ce98f55bc5f" }, "downloads": -1, "filename": "Alcathous-0.3.8.tar.gz", "has_sig": false, "md5_digest": "073adcad8dd65633b9c73ecf5c53f2cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16160, "upload_time": "2019-04-07T20:14:20", "url": "https://files.pythonhosted.org/packages/30/ed/8ab4f415db84b0ba2f52e85209f0ed7b6c73dc7a46a6533bf60a7337d16e/Alcathous-0.3.8.tar.gz" } ] }