{ "info": { "author": "Tom Faulkner", "author_email": "tomfaulkner@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Home Automation" ], "description": "# SenseMe\nPython Library for Haiku SenseMe app controlled fans/lights\n\nThis library is useful to control Haiku SenseMe fans with light kits. I would expect it will probably also work with their lights.\n\nIt might also be useful for controlling DIY projects as the protocol is very simple and would be easy to clone. And, if you were to use their API the Android and iOS apps may work to control DIY devices. A suggested idea would be to add an Arduino or Raspberry Pi and a relay or two to your own fan and use this or the Haiku Home app to control them. I've read that doing this sort of thing [with a resistor is a dangerous idea, so don't do that.](https://arstechnica.com/civis/viewtopic.php?t=1263401)\n\nSniffing the packets and documenting the protocol were the work of [Bruce](http://bruce.pennypacker.org/tag/senseme-plugin/). Much of the code was based on his work on making [an Indigo plugin](https://github.com/bpennypacker/SenseME-Indigo-Plugin)\n\nSee [Issues](issues) for known issues or if you want to contribute but don't know where to start. Some easy fixes are labeled.\n\nI am not affiliated with Haiku Home or Big Ass Fans. Their support rep said this project seemed cool in it's infancy, and they even answered a technical question regarding the protocol for me, so hopefully they still approve.\n\n# Future\nSome ideas for future related projects and features:\n\n 1. Plex plugin (dim the fans when the movie starts and light up when it is paused or ends? Yes, please!)\n\n 2. Alexa / Google Home plugins (see REST API below)\n\n 3. Store information in a database (sqlite, or even json, would be fine) rather than discovering each time.\n\n 4. Track usage and temperatures\n\n 5. Other automation system plugins\n\n 6. REST API backend with a CLI client (a basic direct to fan command line client was added in 0.1.3)\n\n 7. React or other web based client for the above API\n\n 8. Docker image for the above\n\n 9. Use protocol to control other devices by attaching an Arduino or Pi\n\n 10. Discover the rest of the protocol. (Run strings on the apps and some packet sniffing.)\n\n 11. More examples\n\n 12. ~~Command Line Client~~ Basic client added in 0.1.3, see [SenseMe CLI](#cli) below\n \n 13. Unit Tests\n\n\n# Usage\n from senseme import discover\n # discover devices, returns list of SenseMe devices\n devices = discover()\n fan = devices[0]\n repr(fan)\n\nSenseMe(name='Living Room Fan', ip='192.168.1.50', model='FAN,HAIKU', series='HSERIES', mac='20:F8:5E:E3:AB:00')\n\n\n # Statically assign the fan? Probably not, but you would do it this way:\n from senseme import SenseMe\n fan = SenseMe('192.168.1.50', 'Living Room Fan', model='FAN')\n # or, this might be easier\n fan = SenseMe(name=\"Living Room Fan\")\n\nControl the fan:\n\n # Turn the light off / on\n fan.light_powered_on = False\n fan.light_powered_on = True\n # or, if you just want to toggle it\n light_status = fan.light_toggle()\n\n # Increase light level by 2 levels\n fan.inc_brightness(2)\n\n # Get Light level\n print(fan.brightness)\n\n # Fan Speeds\n fan.fan_powered_on = True\n fan.fan_powered_on = False\n print(fan.speed)\n\n # whoosh mode\n fan.whoosh = True\n\n # want an increasing light effect? Do this.\n # But, really, probably don't, I don't think Haiku intended strobe effects.\n # I'm not responsible if you make a strobe light and break the fan or worse\n for intensity in range(1,16):\n fan.brightness = intensity\n time.sleep(1)\n\n # export details to json / xml / str(dict)\n fan.json\n fan.xml\n fan.dict # nested dict\n fan.flat_dict # flattened\n\n # Listen for broadcasts, useful for debugging,\n # wouldn't suggest using it for anything else\n fan.listen()\n\n# SenseMe CLI \nIn version 0.1.3 a script was added to control HaikuHome SenseMe devices from a command line.\n\nSet the following environment variables:\n\n SENSEME_DEFAULT_FAN_IP\n SENSEME_DEFAULT_FAN_NAME\n\nThen run `senseme_cli` with one of the following options.\n\n fan x - set speed to x (0-7)\n fan on|off - fan on/off\n light x - set light brightness to x\n light on|off - light on/off\n whoosh [on|off] - whoosh mode on/off\n\n# Requirements\nPython 3.6 is required to use this library.\nSenseMe devices communicate on UDP port 31415 using broadcast and unicast traffic. Any firewall will have to allow this through.", "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/TomFaulkner/SenseMe", "keywords": "HaikuHome SenseMe fan light home automation bigassfans", "license": "GPL3", "maintainer": "", "maintainer_email": "", "name": "SenseMe", "package_url": "https://pypi.org/project/SenseMe/", "platform": "", "project_url": "https://pypi.org/project/SenseMe/", "project_urls": { "Homepage": "https://github.com/TomFaulkner/SenseMe" }, "release_url": "https://pypi.org/project/SenseMe/0.1.5/", "requires_dist": null, "requires_python": ">=3.6", "summary": "HaikuHome SenseMe API for fans and lights", "version": "0.1.5" }, "last_serial": 4060179, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "484afa6ee01476de470f04789fed37fb", "sha256": "338a0661ef5e524d70126b611d8b48cc3754f00f4a2cba97f82a9ee027ed5f8e" }, "downloads": -1, "filename": "SenseMe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "484afa6ee01476de470f04789fed37fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8547, "upload_time": "2018-03-07T03:53:38", "url": "https://files.pythonhosted.org/packages/e0/4d/e0da982efbdd44bf99c264968183abc74922fcece1ce1cd6adee5ad65cb5/SenseMe-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "837c00a789845405cfa508b8fef6579d", "sha256": "95f04606a73748795ea8dd61137fdd365d036beaac602e9e5c00405f354e0ac4" }, "downloads": -1, "filename": "SenseMe-0.1.1.tar.gz", "has_sig": false, "md5_digest": "837c00a789845405cfa508b8fef6579d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8633, "upload_time": "2018-03-12T23:02:37", "url": "https://files.pythonhosted.org/packages/d4/26/72858f0a8e4a849b7f641dd8c872f7342986d5c07201aed3a4d8648b36d5/SenseMe-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b779d18b91afced21a88cb74c99496f5", "sha256": "2f68831f1e1af61c35bdd2497df53f75b23d37e68e4e6237c786fe5607848f10" }, "downloads": -1, "filename": "SenseMe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b779d18b91afced21a88cb74c99496f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9328, "upload_time": "2018-06-24T18:47:51", "url": "https://files.pythonhosted.org/packages/ba/13/b6f8b802f71ed7d9121bb0305699e731875c6baad1c25f180666b8e861aa/SenseMe-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cad23257be31b8fb1c25c87c873044b8", "sha256": "9fc57b9ddfa23090d3efc8fec75bc15234df478cecfff0af7a8ab71f3d762c91" }, "downloads": -1, "filename": "SenseMe-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cad23257be31b8fb1c25c87c873044b8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11852, "upload_time": "2018-07-06T03:06:02", "url": "https://files.pythonhosted.org/packages/51/fb/0745d9fb1d71427197615685d98a6f868081168dea15d7b61a21a3a90f40/SenseMe-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "3c9140e2ae5db1aa7f80b1218681d28b", "sha256": "fc91b5a4cd04b98077484911e393039c606c328e92cc6a689cfc47f8f95cba96" }, "downloads": -1, "filename": "SenseMe-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3c9140e2ae5db1aa7f80b1218681d28b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12339, "upload_time": "2018-07-11T02:06:32", "url": "https://files.pythonhosted.org/packages/e7/f4/69ad73d9a99ad6e319ecb80cb711b3994ef9e58c6d1817c8ca2dc63a6d81/SenseMe-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "62f64d99502a58fae7a45efa640f9aa3", "sha256": "a2cff52c8d567aace8e14ce82fd257cc8a7bdc3e1ea3076473770372014360a3" }, "downloads": -1, "filename": "SenseMe-0.1.5.tar.gz", "has_sig": false, "md5_digest": "62f64d99502a58fae7a45efa640f9aa3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 14891, "upload_time": "2018-07-14T00:04:01", "url": "https://files.pythonhosted.org/packages/30/1f/eabbab531259ade7928cb99b1f7842ff58e899c32c56bfa435c1916b335e/SenseMe-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62f64d99502a58fae7a45efa640f9aa3", "sha256": "a2cff52c8d567aace8e14ce82fd257cc8a7bdc3e1ea3076473770372014360a3" }, "downloads": -1, "filename": "SenseMe-0.1.5.tar.gz", "has_sig": false, "md5_digest": "62f64d99502a58fae7a45efa640f9aa3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 14891, "upload_time": "2018-07-14T00:04:01", "url": "https://files.pythonhosted.org/packages/30/1f/eabbab531259ade7928cb99b1f7842ff58e899c32c56bfa435c1916b335e/SenseMe-0.1.5.tar.gz" } ] }