{ "info": { "author": "Eugenio Panadero", "author_email": "eugenio.panadero@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "License :: OSI Approved :: MIT License", "Operating System :: Unix", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Home Automation" ], "description": "\nAnother library to handle sensors connected via\n**I2c bus** (SDA, SCL pins) to the **Raspberry Pi**.\n\nThis library implements the following i2c sensors:\n- `Bosch BME280 Environmental sensor (temperature, humidity and pressure) `_\n- `HTU21D temperature and humidity sensor `_\n- `BH1750FVI light level sensor `_\n\nInstallation\n------------\n\nThis library needs the **i2c bus** to be enabled, and uses the\n``smbus-cffi`` module to communicate with it, so, before installing with\n``pip``, make sure the bus is enabled, and the necessary dependencies\nare available:\n\nDirections for installing smbus support on Raspberry Pi:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nEnable I2c interface with the Raspberry Pi config utility:\n\n.. code:: bash\n\n # Enable i2c interface\n sudo raspi-config\n\nSelect ``Interfacing options->I2C`` choose ```` and hit ``Enter``,\nthen go to ``Finish`` and you'll be prompted to reboot.\n\nInstall dependencies for use the ``smbus-cffi`` module and reboot:\n\n.. code:: bash\n\n sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev\n sudo reboot\n\nCheck the i2c address of the sensors\n\n\nAfter installing ``i2c-tools``, a new utility is available to scan the\naddresses of the connected sensors:\n\n.. code:: bash\n\n /usr/sbin/i2cdetect -y 1\n\nIt will output a table like this:\n\n.. code:: text\n\n 0 1 2 3 4 5 6 7 8 9 a b c d e f\n 00: -- -- -- -- -- -- -- -- -- -- -- -- --\n 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n 20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --\n 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n 70: -- -- -- -- -- -- -- 77\n\nSo you can see three sensors are present at **0x23 (BH1750)**, **0x40\n(HTU21D)** and **0x77 (BME280)** addresses.\n\nInstall with pip\n~~~~~~~~~~~~~~~~\n\nFinally, in your python environment,\n\n.. code:: bash\n\n pip install i2csense\n\nUsage\n-----\n\nThis library is intended to be used by other applications, where sensors\nare instantiated with their configuration parameters, to be read at the\ndesired intervals. However, if you want to use as a simple logger via\ncommand line, a simple CLI is also available to test the sensors.\n\n.. code:: python\n\n import smbus\n from i2csense.bme280 import BME280\n\n bus = smbus.Bus(1)\n sensor = BME280(bus)\n delta_secs = 5\n\n while True:\n sensor.update()\n if not sensor.sample_ok:\n print(\"An error has occured\")\n break\n print(sensor.current_state_str)\n sleep(delta_secs)\n\n**CLI usage**\n\nFind sensors:\n\n.. code:: bash\n\n i2csense\n # or specify the i2c bus:\n i2csense -b 0\n\nTest sensors:\n\n.. code:: bash\n\n # Test BME280 sensor with default params:\n i2csense -s bme280\n\n # Test BME280 sensor with custom params every 10 secs:\n i2csense -d 10 --bus 0 --address 0x77 --sensor bme280 --params osrs_t=4 osrs_p=4 osrs_h=4 mode=2 filter_mode=1\n\nChangelog\n---------\n\n- **v0.0.1**: First release with 3 sensors: **BME280, BH1750, HTU21D**.\n- **v0.0.2**: Minor fixes.\n- **v0.0.3**: Minor fixes for `BH1750`, fix `README.rst`.\n\nTODO:\n-----\n\n- **Append more sensors**.\n- finish CLI interface with better help and more configuration options.\n\nAlthough the library only covers three sensors, it would be ideal to\ncontinue completing it with more sensors or actuators running in the i2c\nbus, so I encourage you to contribute with more sensors, or to copy,\nchange, edit, or suggest any changes.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/azogue/i2csense", "keywords": "raspberry i2c sensors python3 bme280 bh1750 htu21d", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "i2csense", "package_url": "https://pypi.org/project/i2csense/", "platform": "", "project_url": "https://pypi.org/project/i2csense/", "project_urls": { "Homepage": "https://github.com/azogue/i2csense" }, "release_url": "https://pypi.org/project/i2csense/0.0.4/", "requires_dist": [ "smbus-cffi (==0.5.1)" ], "requires_python": "", "summary": "A library to handle i2c sensors with the Raspberry Pi", "version": "0.0.4" }, "last_serial": 2986927, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "d0b173fcb1464b791170bfca195552a1", "sha256": "4fd53333752308d6c990423e76cf5fde70c6adc621f28dae20c8c819d35435cc" }, "downloads": -1, "filename": "i2csense-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d0b173fcb1464b791170bfca195552a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16037, "upload_time": "2017-06-21T10:07:12", "url": "https://files.pythonhosted.org/packages/cd/72/b42437188a238f4173507cd71b7416f403d4ce8fe29b74e1158ff2dd52a8/i2csense-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69505740c745322efb57ddc7c0c6738e", "sha256": "fae9168c35e7ae5ecfd30b217da42d70f381986f11bf441f2e615a19ad9fdc54" }, "downloads": -1, "filename": "i2csense-0.0.3.tar.gz", "has_sig": false, "md5_digest": "69505740c745322efb57ddc7c0c6738e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10341, "upload_time": "2017-06-21T10:07:13", "url": "https://files.pythonhosted.org/packages/2b/24/9b6267c43b9f19328445bc21652c34ad910e0c90a1fef4aece8f17b3ff10/i2csense-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "2618546b3244cf1f949fb320ce5b1487", "sha256": "19b92e6334ffaf91a86e9ae75ca193a6617da07adb9aaf2f32ccf68b01330980" }, "downloads": -1, "filename": "i2csense-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2618546b3244cf1f949fb320ce5b1487", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15654, "upload_time": "2017-06-27T00:54:19", "url": "https://files.pythonhosted.org/packages/f6/08/c7a81dc1c773a5b7ef8ddaa5585f8166ed373c6336199ea1e6a1547d1ff0/i2csense-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ea49035340fa163741b43f14bfd5eb9", "sha256": "6f9c0a37d971e5b8a60c54982bd580cff84bf94fedc08c097e603a8e5609c33f" }, "downloads": -1, "filename": "i2csense-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9ea49035340fa163741b43f14bfd5eb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10395, "upload_time": "2017-06-27T00:54:20", "url": "https://files.pythonhosted.org/packages/1a/a3/3d5c3466836eb6833b79316654731191b029958fb40ab97e7370a2e9ebdf/i2csense-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2618546b3244cf1f949fb320ce5b1487", "sha256": "19b92e6334ffaf91a86e9ae75ca193a6617da07adb9aaf2f32ccf68b01330980" }, "downloads": -1, "filename": "i2csense-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2618546b3244cf1f949fb320ce5b1487", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15654, "upload_time": "2017-06-27T00:54:19", "url": "https://files.pythonhosted.org/packages/f6/08/c7a81dc1c773a5b7ef8ddaa5585f8166ed373c6336199ea1e6a1547d1ff0/i2csense-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ea49035340fa163741b43f14bfd5eb9", "sha256": "6f9c0a37d971e5b8a60c54982bd580cff84bf94fedc08c097e603a8e5609c33f" }, "downloads": -1, "filename": "i2csense-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9ea49035340fa163741b43f14bfd5eb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10395, "upload_time": "2017-06-27T00:54:20", "url": "https://files.pythonhosted.org/packages/1a/a3/3d5c3466836eb6833b79316654731191b029958fb40ab97e7370a2e9ebdf/i2csense-0.0.4.tar.gz" } ] }