{ "info": { "author": "tangliufeng@LabPlus", "author_email": "137513285@qq.com", "bugtrack_url": null, "classifiers": [], "description": " \n\n## \u6982\u8ff0\n\n`yeelight` \u662f\u638c\u63a7\u677f\u6216micropython\u9a71\u52a8\u5e93\uff0c\u7528\u4e8e\u63a7\u5236\u5c40\u57df\u7f51\u5185\u7684YeeLight\u667a\u80fd\u706f\u6ce1/\u5c0f\u7c73\u667a\u80fd\u706f\u5177\u8bbe\u5907\u3002\n\n## \u5e93\u7684\u5b89\u88c5\u65b9\u6cd5\n\n\u53ef\u901a\u8fc7\u4ee5\u4e0b\u4efb\u4e00\u65b9\u6cd5\u8fdb\u884c\u5b89\u88c5\u3002\n1. \u5c06\u9879\u76ee\u4e2d\u7684`yeelight.py` \n2. \u5728\u638c\u63a7\u677fREPL\u754c\u9762\u4e2d\uff0c\u4f7f\u7528upip\u5b89\u88c5\uff0c\u6b65\u9aa4\u5982\u4e0b\uff1a\n * \u524d\u7f6e\u6761\u4ef6\u9700\u8981\u638c\u63a7\u677f\u8fde\u63a5\u7f51\u7edc\n * \u5bfc\u5165upip\u6a21\u5757\uff0c\u6267\u884c`import upip`\n * \u6267\u884c`upip.install('mPython-yeelight'\uff09\n\n```python\n>>> import upip\n>>> upip.install('mPython-yeelight')\n```\n\n## \u4f7f\u7528\n\n\u51c6\u5907\u5de5\u4f5c\uff1a\n\n* YeeLight\u667a\u80fd\u706f\u6ce1\u5728\u4f7f\u7528\u524d\uff0c\u987b\u8981\u5148\u914d\u7f6e\u597d\u8fde\u63a5\u597dwifi\uff0c\u5e76\u5c06 `\u5c40\u57df\u7f51\u63a7\u5236` \u529f\u80fd\u6253\u5f00\u3002\n* \u638c\u63a7\u677f\u786e\u4fdd\u5df2\u4e0e\u667a\u80fd\u706f\u6ce1\u5728\u540c\u4e2a\u5c40\u57df\u7f51\u5185\uff0c\u5e76\u7f51\u7edc\u901a\u7545\u3002\n\nyeelight Library Documentation\uff1ahttps://mpython-yeelight.readthedocs.io
\n\nYeeLight\u7b2c\u4e09\u65b9\u63a7\u5236\u534f\u8bae\uff1ahttps://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf\n\n## \u7b80\u5355\u793a\u4f8b\n\n```python\nfrom mpython import *\nfrom yeelight import *\n\nmy_wifi = wifi() # \u8fde\u63a5\u5230\u4e0eYeeLight\u76f8\u540c\u7684\u5c40\u57df\u7f51\u5185\nmy_wifi.connectWiFi(\"\",\"\") \n\n\ndiscover_bulbs() # \u53d1\u73b0\u5c40\u57df\u7f51\u5185YeeLight\u7684\u8bbe\u5907\u4fe1\u606f\n\nbulb=Bulb(\"192.168.0.7\") # \u6784\u5efaBulb\u7c7b\u7528\u4e8e\u63a7\u5236\uff0c\u4f20\u5165IP\u53c2\u6570\n\nbulb.turn_on() # \u5f00\u706f\nsleep(2)\nbulb.turn_off() # \u5173\u706f\nsleep(2)\nbulb.toggle() # \u7ffb\u8f6c\nsleep(2)\nbulb.set_rgb(255,0,0) # \u8bbe\u7f6eRGB\u503c\nbulb.set_brightness(50) # \u8c03\u8282\u4eae\u5ea6\nsleep(2)\nbulb.set_hsv(180,100) # \u8bbe\u7f6eHSV\u503c\nsleep(2)\n```\n\n## \u6267\u7167\n\n\u6240\u6709\u4ee3\u7801\u5747\u5728MIT\u8bb8\u53ef\u4e0b\u53d1\u5e03\u3002", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/labplus-cn/mPython_yeelight", "keywords": "", "license": "MIT", "maintainer": "LabPlus Developers", "maintainer_email": "", "name": "mPython-yeelight", "package_url": "https://pypi.org/project/mPython-yeelight/", "platform": "", "project_url": "https://pypi.org/project/mPython-yeelight/", "project_urls": { "Homepage": "https://github.com/labplus-cn/mPython_yeelight" }, "release_url": "https://pypi.org/project/mPython-yeelight/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Yeelight LAN Control for mPython/micropython", "version": "0.0.1" }, "last_serial": 4957136, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "42397ba5ab3e72d723941b61111f30e6", "sha256": "d67ae057038378716493883c40e5f85b27ef761354b810abca7f32612b507a74" }, "downloads": -1, "filename": "mPython-yeelight-0.0.1.tar.gz", "has_sig": false, "md5_digest": "42397ba5ab3e72d723941b61111f30e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5601, "upload_time": "2019-03-19T05:59:08", "url": "https://files.pythonhosted.org/packages/32/f1/9a3edd615b2b743bbec0e775c608ea1163c5afc5e699bdf0904beb421f4d/mPython-yeelight-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42397ba5ab3e72d723941b61111f30e6", "sha256": "d67ae057038378716493883c40e5f85b27ef761354b810abca7f32612b507a74" }, "downloads": -1, "filename": "mPython-yeelight-0.0.1.tar.gz", "has_sig": false, "md5_digest": "42397ba5ab3e72d723941b61111f30e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5601, "upload_time": "2019-03-19T05:59:08", "url": "https://files.pythonhosted.org/packages/32/f1/9a3edd615b2b743bbec0e775c608ea1163c5afc5e699bdf0904beb421f4d/mPython-yeelight-0.0.1.tar.gz" } ] }