{"id":23728078,"url":"https://github.com/kipe/miplant","last_synced_at":"2025-09-04T05:30:50.853Z","repository":{"id":57441900,"uuid":"72025070","full_name":"kipe/miplant","owner":"kipe","description":"A Python-library for reading cheap plant monitoring sensors manufactured by Xiaomi.","archived":false,"fork":false,"pushed_at":"2017-08-03T14:38:31.000Z","size":11,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-20T04:38:14.796Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kipe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-26T17:00:50.000Z","updated_at":"2023-08-14T03:21:04.000Z","dependencies_parsed_at":"2022-09-26T17:20:53.776Z","dependency_job_id":null,"html_url":"https://github.com/kipe/miplant","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Fmiplant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Fmiplant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Fmiplant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Fmiplant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kipe","download_url":"https://codeload.github.com/kipe/miplant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231933147,"owners_count":18448050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-31T01:48:48.363Z","updated_at":"2024-12-31T01:48:49.071Z","avatar_url":"https://github.com/kipe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiPlant #\n\nA Python-library for reading cheap plant monitoring sensors manufactured by Xiaomi.\n\n## Installation\n\n```sh\n# There's a issue with bluepy-helper not being built in v1.0.5 in PyPi\n#   -\u003e install bluepy from github\npip install git+https://github.com/IanHarvey/bluepy.git\npip install miplant\n```\n\n## Usage\n\nScripts using the library need to be run as `root`, as using BLE typically requires it.\n```python\nfrom miplant import MiPlant\n\nfor plant in MiPlant.discover():\n    print(plant.temperature)\n```\n\n## Overview\n\nThe sensors read 4 values:\n\n- temperature in degrees Celsius (float, with 1 decimal precision)\n- light level in lux (integer)\n- moisture level in percent (integer)\n- conductivity in µS/cm (integer)\n    - presented as \"fertility\" in many places, even the official app\n\nThe values are only read when the `MiPlant.read()` -function is called, or\nwhen one of the values is requested for the first time.\n\n## Notes\n\n- The scripts using this library need to be (at least typically) run as `root`,\n  as `gattlib` requires setting up some options for Bluetooth Low Energy.\n- Currently only tested with Python 2.7, but should work if `gattlib` works...\n- The sensors seem to have some kind of internal cache, so don't even bother reading them too frequently.\n\n## Thanks\n\nBig thanks goes to\n[Reverse engineering the Mi flora plant sensor](https://www.open-homeautomation.com/2016/08/23/reverse-engineering-the-mi-plant-sensor/)!\nI wouldn't have bothered with reverese engineering the messages myself :P\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkipe%2Fmiplant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkipe%2Fmiplant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkipe%2Fmiplant/lists"}