{ "info": { "author": "Matthew Baltrusitis", "author_email": "matthew@baltrusitis.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Topic :: Home Automation" ], "description": "######\nhueber\n######\n\n************\ndescription.\n************\n\nHueber is a fully type-checked Python API for the Philips Hue lighting system. Tooling is also included which enables you to declare update statements (also type-checked) and which can then be safely and efficiently pushed to a Philips Hue Bridge. You are free to use either parts of ``hueber`` together or seperately that is up to you (e.g. use the state builder tools with another API).\n\nplease note!\n============\n\nThat as of now this does not cover the full Philips Hue API and only covers ``/lights``, ``/groups`` and ``/config``. It would not take much work to add them but its just not a prioritiy for me now.\n\n**************\nprerequisites.\n**************\n\n* Python 3.6 (re: static typing annotation)\n* Philips Hue bridge ver2 (I have not tested this with the first generation) connected to your local network\n\n****************\ngetting started.\n****************\n\n\nOpen a REPL and start with instantiating a ``Bridge()`` by passing it the local IP address::\n\n >>> hue = Bridge(\"192.168.0.5\", \"r3aLLy-L0nG-Us3RName-H3r3\")\n >>> print(Bridge)\n Bridge(192.168.0.5, xxxxx...-H3r3)\n\nnote:\n=====\n\nPhilip's providse documenation on how to find your bridge on your network. Please consult `their documentation `_.\n\nFrom here all your lights and groups are accessible via the Bridge type (I have only shown an abridged version of the output below)::\n\n >>> print(hue.lights)\n {1: Light(1, Bedroom Dresser, ... ), 5: Light(5, Kitchen Cabinets, ... ) ... }\n >>> print(hue.groups)\n {1: Group(1, Kid's Bedroom, ...), 3: Group(3, Kitchen, ...) ... }\n\nAs you can see above the ``Bridge.lights`` and ``Bridge.groups`` attributes are a collection. An individual ``light`` or ``group`` can be accesed via its index which is the ID given to it by the Philips Hue Bridge::\n\n >>> hue.lights[1] # select light with id 1\n Light(1, Coffee Station, Dimmable light)\n >>> hue.lights[1].data # return a dict of all its attributes\n {'state': {'on': False, 'bri': 77, 'alert': 'select', 'reachable': True},\n 'type': 'Dimmable light', 'name': 'Coffee Station', 'modelid': 'LWB014',...\n }\n\nThis is all well and good but what if you want to change the state or your light or group? Use the Light-/GroupBuilders to easily construct update strings::\n\n >>> from hueber.lib import LightBuilder\n >>> new_update = LightBuilder()\n >>> new_update[\"on\"] = True\n >>> new_update[\"bri\"] = 254\n >>> hue.lights[1].push(new_update.update_str())\n [{'success': {'/lights/1/state/on': True}}, {'success': {'/lights/1/state/bri': 254}}]\n\nAll ``*Builder`` types are just a ``dict`` underneath so all of the methods and idioms you use for a ``dict`` should be available to a ``Builder``.\n\n**************\ngoing further.\n**************\n\nThis code is particularly well documented (I think) so please dig into the source if you have any more questions or, if you think something really does need further explanation open an issue and I will do my best to updated the README.\n\n*************\ncontributing.\n*************\n\nI am happy to accept a pull request, look into the TODO.rst file for gaps or features I am looking to implement down the road. Please make sure any PRs are off of the ``dev`` branch otherwise it will just not be accepted and be sure to include your name/handle in the contributors file. Additionally, make sure you run ``mypy`` over the project directory.\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mbaltrusitis/hueber.git/tarball/0.1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mbaltrusitis/hueber.git", "keywords": "philips", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hueber", "package_url": "https://pypi.org/project/hueber/", "platform": "", "project_url": "https://pypi.org/project/hueber/", "project_urls": { "Download": "https://github.com/mbaltrusitis/hueber.git/tarball/0.1.1", "Homepage": "https://github.com/mbaltrusitis/hueber.git" }, "release_url": "https://pypi.org/project/hueber/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Python API and tooling for Philips Hue.", "version": "0.1.1" }, "last_serial": 2644843, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2babbe4840530c09d585298f63b7f6b3", "sha256": "20ddf5450270486f1886e6f502f045e54864cfc3ab8718a0cc30ae570002d017" }, "downloads": -1, "filename": "hueber-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2babbe4840530c09d585298f63b7f6b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6698, "upload_time": "2017-02-15T18:49:47", "url": "https://files.pythonhosted.org/packages/bd/b2/95777eff5325e696472688e9956173c30f7f729eaa120837fd79d09c1ce4/hueber-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "cdfc13ed5e3307a547bd3282e3ebf432", "sha256": "ccede178b45635f0aeaa9d6ec00b0c900527a177abf3adf026a1b748586e9d38" }, "downloads": -1, "filename": "hueber-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cdfc13ed5e3307a547bd3282e3ebf432", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6911, "upload_time": "2017-02-15T19:21:30", "url": "https://files.pythonhosted.org/packages/7d/6e/aa617e7dd7681868dc1b4263fd01fc3ccaaab96142cff36299beb0c6e170/hueber-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cdfc13ed5e3307a547bd3282e3ebf432", "sha256": "ccede178b45635f0aeaa9d6ec00b0c900527a177abf3adf026a1b748586e9d38" }, "downloads": -1, "filename": "hueber-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cdfc13ed5e3307a547bd3282e3ebf432", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6911, "upload_time": "2017-02-15T19:21:30", "url": "https://files.pythonhosted.org/packages/7d/6e/aa617e7dd7681868dc1b4263fd01fc3ccaaab96142cff36299beb0c6e170/hueber-0.1.1.tar.gz" } ] }