{ "info": { "author": "Matthew Treinish", "author_email": "mtreinish@kortar.org", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "==========\ndallasMQTT\n==========\ndallasMQTT is a service that will periodically poll an arbitray number of\ndallas 1 wire sensors and publish the data to an MQTT broker.\n\nInstallation\n============\n\ndallasMQTT is availably via pypi, so all you need to do is run::\n\n pip install -U dallasMQTT\n\nassuming you have pip installed. (which is the recommended way to install.\nIf you need to use a development version of dallasMQTT you can clone the repo and install it locally with::\n\n git clone https://github.com/mtreinish/dallasMQTT.git\n\nand then install it with::\n\n pip install -e dallasMQTT\n\nwhich will install dallasMQTT in your python environment in editable mode for\nlocal development.\n\nIf you don't have pip installed you can manually install dallasMQTT by\ncloning the repo and installing it from the repo base dir with::\n\n python setup.py install\n\nbut, note installing via pip is the recommended and supported method of\ninstalling dallasMQTT. (even from a local git clone)\n\nConfiguration\n=============\nTo configure dallasMQTT you need to create configuration yaml file that will\ntell dallasMQTT how to access sensors, how to use MQTT, etc. The basic format\nof the file with the 3 sections is::\n\n mqtt:\n hostname: foo\n\n sensors:\n - id: id number\n name: 'My Sensor'\n\n default:\n poll_rate: 60\n base_topic: a_topic\n\n\nMQTT Section Configuration\n--------------------------\nThis section is used to configure how dallasMQTT will connect to an MQTT broker.\nTo configure the ``mqtt`` section there are 3 options it currently takes:\n\n * ``hostname``\n * ``username``\n * ``password``\n\nof these only ``hostname`` is **required**. The other 2 options are **optional**\nyou can use ``username and`` ``password`` if client auth is desired (or\nrequired by your mqtt broker).\n\nSensor Section Configuration\n----------------------------\nThe ``sensor`` section of the yaml config file is used to specify which sensors\nare to be polled and how to label them in the mqtt topics. It takes in a list\nof sensors of arbitrary size that takes in a combination of sensor ids and names\nfor example if there were 3 sensors it would look something like::\n\n sensors:\n - id: 28-000001\n name: Sensor1\n - id: 28-000002\n name: Sensor2\n - id: 28-000003\n name: Sensor3\n\nThis pattern is just repeated for how ever many sensors you want dallasMQTT to\npoll. The ``name`` field is fairly self explanatory, and it is just the name\nof the sensor that will be used as the second half of the topic on mqtt, like::\n\n $base_topic/$name\n\nThe id field is used to specify the sensor id to poll. dallasMQTT will poll\nthe sensor file at::\n\n /sys/bus/w1/devices/``$id``/w1_slave\n\nSo ensuring you put the proper id here is important otherwise dallasMQTT will\nnot be able to read the sensor data.\n\nThis section was written to be sufficiently broad so that in the future\nadditional sensor types could be added to dallasMQTT. This would be a very\nsimple addition and would just require adding an optional driver field to each\nlist element which would tell dallasMQTT which class to use for polling sensors.\n(these additional sensor wouldn't necessarily have to be dallas 1 wire either)\nBut, as of right now there is only 1 class, DallasTemp, for 1 wire temperature\nsensors, so this field doesn't exist. However, if/when dallasMQTT is updated\nto include other sensor types the documentation will be updated. (and backwards\ncompatibility will be adhered to so as to not break anyone)\n\nDefault Section configuration\n-----------------------------\nThe default section is where you configure settings that contol the basic\noperation of dallasMQTT. There are 3 options in this section right now:\n\n * ``base_topic``\n * ``poll_rate``\n * ``max_threads``\n\nAll 3 options are optional.\n\n``base_topic`` is used to set the basic topic used on MQTT for sending sensor\ndata. The messages will be sent on mqtt like::\n\n $base_topic/$sensor_name\n\nby default this is set to ``dallasMQTT``.\n\n``poll_rate`` is used to specify a time in seconds to wait between polling\nthe sensors on a worker thread. Note this is not time between individual sensors\nbut between polling all the sensors being handled by a single thread. Each\nsensor in that group will be polled serially without any wait time between\nthem.\n\n``max_threads`` is used to specify the maximum number of threads that dallasMQTT\nwill launch to poll sensors with. If there are less sensors in the configuration\nfile a single worker thread will be launched for each sensor. If there are more\nsensors than threads the sensors will be equally distributed to the number of\nworkers specified. Each worker will handle polling the list of sensors it\nreceived.\n\nUsage\n=====\n\nTo run dallasMQTT is fairly straightforward. After dallasMQTT is installed\nyou just run::\n\n dallasMQTT config.yaml\n\nwhere config.yaml is the path to your yaml config file.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dallasMQTT", "package_url": "https://pypi.org/project/dallasMQTT/", "platform": "", "project_url": "https://pypi.org/project/dallasMQTT/", "project_urls": null, "release_url": "https://pypi.org/project/dallasMQTT/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Publish readings from Dallas 1 wire sensors to MQTT", "version": "0.1.0" }, "last_serial": 2715220, "releases": { "0.0.0": [], "0.0.1": [ { "comment_text": "", "digests": { "md5": "25e69042b5cfc606784f3b3d37685068", "sha256": "0a69a9ffd562e78524c41c8a0cf3409e79db406b7fb038b15292672b3ff8c809" }, "downloads": -1, "filename": "dallasMQTT-0.0.1.tar.gz", "has_sig": false, "md5_digest": "25e69042b5cfc606784f3b3d37685068", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18816, "upload_time": "2016-08-02T18:12:01", "url": "https://files.pythonhosted.org/packages/91/7a/56e2c5666725a87fc155da92dde4204c9c5dfc808346e56584ac9f1f7962/dallasMQTT-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "e72850a36908aac827fb9d616b89ddc2", "sha256": "1128a2611052353073dbb664a1a960ca3964233fe5821c8577fcc568f17d2ce2" }, "downloads": -1, "filename": "dallasMQTT-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e72850a36908aac827fb9d616b89ddc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22645, "upload_time": "2017-03-19T01:56:18", "url": "https://files.pythonhosted.org/packages/26/d9/798f037ae68a92f8d6f1ea23cccac5ee491bd5d248c6efd0100b092323c6/dallasMQTT-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e72850a36908aac827fb9d616b89ddc2", "sha256": "1128a2611052353073dbb664a1a960ca3964233fe5821c8577fcc568f17d2ce2" }, "downloads": -1, "filename": "dallasMQTT-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e72850a36908aac827fb9d616b89ddc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22645, "upload_time": "2017-03-19T01:56:18", "url": "https://files.pythonhosted.org/packages/26/d9/798f037ae68a92f8d6f1ea23cccac5ee491bd5d248c6efd0100b092323c6/dallasMQTT-0.1.0.tar.gz" } ] }