{ "info": { "author": "Naomi Most", "author_email": "naomi@nthmost.com", "bugtrack_url": null, "classifiers": [], "description": "***************************************\r\nSensate: sensaphone interaction library\r\n***************************************\r\n\r\nSensate provides a pythonic interaction layer for Sensaphone hubs\r\nand sensors\r\n\r\nCurrently supporting the WSG30 (Wireless Sensor Gateway) and the \r\nWeb600 (wired sensor hub) (new in version 0.2).\r\n\r\nIf you'd like to help develop Sensate for use with other Sensaphone \r\nmodels, the infrastructure of this library has been designed with \r\nmodularity in mind. \r\n\r\n\r\nAs most open source libraries, changes should be submitted via\r\ndiff or pull request, and you should formally accept the terms of\r\nthe packaged license (in this case, the MIT license).\r\n\r\n\r\nPurpose\r\n-------\r\n\r\nThe Sensaphone family of equipment communicates over the SNMP protocol,\r\na protocol generally considered to be bothersome for humans to work with.\r\n\r\nEven python libraries for SNMP tend to be a pain.\r\n\r\nThis library allows you to work with \"SensorHub\" and \"SensorCheck\" objects\r\nin a much more programmatically natural way.\r\n\r\n\r\nSetup\r\n-----\r\n\r\nTo start playing with sensate, it's recommended (though not required) to\r\nuse a virtual environment:\r\n\r\n\r\nNext you can run a \"build install\", which will pull in all the dependencies\r\nit needs. There aren't many dependencies, so it shouldn't take long.\r\n\r\npython setup.py build install\r\n\r\nThat's it!\r\n\r\nTest your installation by...\r\n\r\n\r\nUsage\r\n-----\r\n\r\nIn most cases, the following code should work for you. Set HOSTNAME to a \r\nreachable hostname on your network or over the internet::\r\n\r\n from sensate.sensorhub import SensorHub\r\n hub = SensorHub(HOSTNAME)\r\n print hub.checks\r\n print hub.alarms\r\n\r\nThat's it.\r\n\r\n`hub.alarms` prints out a map of type of alarm ('alarmhigh', 'alarmlow', 'low_battery',\r\n'trouble') to a list of SensorCheck objects for sensors exhibiting this condition. \r\n\r\n`hub.checks` contains a list of SensorCheck objects with as many\r\naddressable attributes as the hub will provide. For example::\r\n\r\n SensorCheck for Sensor 1 at wsg30.lan.company.net\r\n { 'lastalarm': '2/27/2014 1:08:57pm', \r\n 'checktime': datetime.datetime(2014, 3, 7, 23, 23, 1, 90909), \r\n 'hostname': 'wsg30.lan.company.net',\r\n 'name': 'CLIA Reagent Freezer', \r\n 'idx': 1, \r\n 'measurement': -19.2, \r\n 'units': 'C', \r\n 'alarmlow': -25.0, \r\n 'alarmhigh': -15.0, \r\n 'alarm_status': 'OK',\r\n 'measurement_type': 'Temp 2.8k C',\r\n 'serial': '123456' }\r\n\r\nThe `idx` attribute (int) represents the numerical index of the sensor on the hub.\r\n\r\nThe `serial` attribute (string) is the physical sensor device's unique identifier.\r\n\r\nNote: The WSG30 serial numbers come from the wireless sensor's XBee transmitter, whereas\r\nthe Web600's serial numbers are generated from the last 4 characters of the device's\r\nMAC address followed by 1-2 numbers indicating which Zone the sensor belongs to.\r\n\r\n`alarm_status` will be one of 'OK', 'High', 'Low', 'Low Battery', or 'Trouble' \r\n(the latter meaning that the sensor has become completely unresponsive).\r\n\r\nYou'll also notice the `checktime` attribute, which will be set by sensate\r\nat `datetime.utcnow()`.\r\n\r\nBoth SensorCheck and SensorHub objects have to_dict and to_json methods.\r\n\r\nAs of version 0.1.2, the JSON conversion uses pyRFC3399 to generate strings for\r\nJSON and convert them back into Python datetime objects again.\r\n\r\n\r\nTips and Tricks\r\n---------------\r\n\r\nYou may not want to connect to the hub immediately upon establishing the SensorHub\r\nobject. That's fine -- just supply `auto=False` as a keyword argument to SensorHub.\r\n\r\nThen when you want to perform the checks, use the `SensorHub.reload()` method.\r\n\r\nYou can get even more granular about your data retrieval: `reload()` is just a\r\nconvenience interface to the following two methods::\r\n\r\n SensorHub.discover()\r\n SensorHub.check()\r\n\r\nThe first method (discover) populates a dictionary called sensors_by_idx which you\r\ncan access as an attribute of the SensorHub object. `discover` performs one poll\r\nper possible index point (0 to MAX_SENSORS_PER_HUB) to see if there's a 'name' \r\nattribute for this index point. Only indexes with names are added to sensors_by_idx\r\n\r\nAlso, if you supply match='foo' to SensorHub instantiation, only those sensors\r\nwhose name matches 'foo' will be collected. This is useful when trying to ignore\r\nBattery and Power level on the hubs, or when collecting logically grouped sensors.\r\n\r\nThe second method (check) uses the sensors_by_idx dictionary to construct SensorCheck\r\nobjects, which in turn perform the work of collecting values and statuses.\r\n\r\nAfter SensorHub.check() has been run, there are two dictionaries formed for \r\nconvenient access to the data:\r\n\r\n `checks_by_idx`\r\n `checks_by_serial`\r\n\r\nBoth of the above are simply dictionary mappings to the SensorCheck objects, \r\nwith keys being the index point (idx) or the serial number (serial), respectively.\r\n\r\n\r\nFuture\r\n------\r\n\r\nPlanned features for sensate include::\r\n\r\n SNMP _set_ capabilities (writing parameters to the Sensaphone hub)\r\n\r\n\r\nDesireable but reliant on outside contributions::\r\n\r\n Support for more Sensaphone equipment.\r\n\r\n\r\nSupport and Maintenance\r\n-----------------------\r\n\r\nSensate is being actively developed and maintained at Invitae by its creator,\r\nNaomi Most (@nthmost). \r\n\r\nYou are welcome to file issues on the bitbucket issue tracker. \r\n\r\nPull requests will be reviewed by the package maintainer and approved on a \r\ncase-by-case basis. Submissions entail acceptance of the MIT License on the\r\npart of the submitter.\r\n\r\nQuestions? Comments? Swear words? Email naomi.most@invitae.com", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/ILMN8/sensate", "keywords": "", "license": "MIT", "maintainer": "Naomi Most", "maintainer_email": "naomi@nthmost.com", "name": "sensate", "package_url": "https://pypi.org/project/sensate/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sensate/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/ILMN8/sensate" }, "release_url": "https://pypi.org/project/sensate/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Sensaphone hub and sensor abstraction library", "version": "0.2.1" }, "last_serial": 1720495, "releases": { "0.0.2.5": [ { "comment_text": "", "digests": { "md5": "af31b0c9b78da1c9f1a4d1c2d231cc04", "sha256": "e9c01429f992db2644513f3dc724f2786933b08acba61b977d1460098ebb103b" }, "downloads": -1, "filename": "sensate-0.0.2.5.tar.gz", "has_sig": false, "md5_digest": "af31b0c9b78da1c9f1a4d1c2d231cc04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13178, "upload_time": "2014-05-20T03:52:58", "url": "https://files.pythonhosted.org/packages/f7/42/895389a5bbcc6350e54e71790349df43eaeb374f11b00c2ae5c0dea951a9/sensate-0.0.2.5.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "614b57bba6c1962332c459299c67fa63", "sha256": "9787c7dd26386dfb9b3c369ea948514778f732ed5899c2cfe0663e0085839b70" }, "downloads": -1, "filename": "sensate-0.0.3.tar.gz", "has_sig": false, "md5_digest": "614b57bba6c1962332c459299c67fa63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14001, "upload_time": "2014-07-01T06:31:00", "url": "https://files.pythonhosted.org/packages/ca/37/c7786c559ae93531f350eaff7c4f734ace2352cd934fbd85ed55a05dbd1b/sensate-0.0.3.tar.gz" } ], "0.0.3.1": [ { "comment_text": "", "digests": { "md5": "4a499883b68d65f381ae750b633565d0", "sha256": "dc23f3da746ae9449363581adb8c5c167256ef5e66295bed6df7ff034776eb20" }, "downloads": -1, "filename": "sensate-0.0.3.1.tar.gz", "has_sig": false, "md5_digest": "4a499883b68d65f381ae750b633565d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14279, "upload_time": "2014-07-01T06:43:32", "url": "https://files.pythonhosted.org/packages/e7/46/77d7a37c680d3d24fdd143de5c22f8d3b6da1c6349792d791ff557b0dcf2/sensate-0.0.3.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "76eacc42c73ac20566814b7595702235", "sha256": "3bf856ceafff29676a1163a73b3a05e34acdc9f84fba4ac73c2e16be0e7d1853" }, "downloads": -1, "filename": "sensate-0.1.0.tar.gz", "has_sig": false, "md5_digest": "76eacc42c73ac20566814b7595702235", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14206, "upload_time": "2014-07-09T04:25:33", "url": "https://files.pythonhosted.org/packages/94/9c/214ca3bd277c38e8185be31d957d1c35d3e5b9489156443e2dcb94d65498/sensate-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0a4d93bb0741dc685a65e91221793a6f", "sha256": "eb7c44c3abff371c9381f2a302d41fe50bd56b0ab086f8a81bfde360c18b44fd" }, "downloads": -1, "filename": "sensate-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0a4d93bb0741dc685a65e91221793a6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14222, "upload_time": "2014-07-09T05:16:27", "url": "https://files.pythonhosted.org/packages/08/74/c3990bced01dfa84702c0e34af636ee2b8924ebe1d826a93de9f85c1b51a/sensate-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "374087319320de05d3aa06809c3165ca", "sha256": "2b6c32e5d3d8ba97462ffab242b52a26f4f14dbb19ca5e0a645c651f188e128a" }, "downloads": -1, "filename": "sensate-0.1.2.tar.gz", "has_sig": false, "md5_digest": "374087319320de05d3aa06809c3165ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14616, "upload_time": "2014-07-24T19:37:23", "url": "https://files.pythonhosted.org/packages/28/14/09fbd9a6c85985d21a5dea71f26fd971a270f048069b977c6c12327a2856/sensate-0.1.2.tar.gz" } ], "0.1.2.1": [ { "comment_text": "", "digests": { "md5": "266a430b7a7e01bca3ec2b8d2b652c31", "sha256": "608f0c7aa67d66fdd57214c3004b3e774541034ff7d3a1fcfda76ed65908047d" }, "downloads": -1, "filename": "sensate-0.1.2.1.tar.gz", "has_sig": false, "md5_digest": "266a430b7a7e01bca3ec2b8d2b652c31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14546, "upload_time": "2014-07-25T06:11:14", "url": "https://files.pythonhosted.org/packages/9d/32/4ad5ad40217e98605b1593b3b849abf682f2c837c5d01f6ae389f59408cd/sensate-0.1.2.1.tar.gz" } ], "0.1.2.2": [ { "comment_text": "", "digests": { "md5": "7e515ab980fd149e030917b70f7b4174", "sha256": "e88fa4140ccc22b78a8a3956753149e7f5e40ae7cea67a2bdbdbfdff12fa56d0" }, "downloads": -1, "filename": "sensate-0.1.2.2.tar.gz", "has_sig": false, "md5_digest": "7e515ab980fd149e030917b70f7b4174", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14571, "upload_time": "2014-08-06T18:19:14", "url": "https://files.pythonhosted.org/packages/ac/82/75d3502fa4ea63eebffb5afd6673ad62a33d04ca798806df759d5761d4a4/sensate-0.1.2.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "e7a7ff0e3a5424e7ce60bf1ea5d1edbf", "sha256": "0df842723cec4bdab040c22dfb7d9d5ea085fc439ded86e5be512db55b6aecbc" }, "downloads": -1, "filename": "sensate-0.2.tar.gz", "has_sig": false, "md5_digest": "e7a7ff0e3a5424e7ce60bf1ea5d1edbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16078, "upload_time": "2015-01-14T22:27:48", "url": "https://files.pythonhosted.org/packages/cd/3c/4b09f70d9e507aa37df3d5c6dc003fb3630d7b8b9f3613d8080ed18936e7/sensate-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ccf6c32297715394bfe0e7cc1b36118c", "sha256": "b2b71223b1babcc85e161f3cd1779b5ae69982d7e8851e1081fef062a9ba4eeb" }, "downloads": -1, "filename": "sensate-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ccf6c32297715394bfe0e7cc1b36118c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16269, "upload_time": "2015-01-14T22:31:41", "url": "https://files.pythonhosted.org/packages/25/4f/6fc436429ab37f154156c9e77b8906f204af2ad13c396af67fa7fc52647b/sensate-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccf6c32297715394bfe0e7cc1b36118c", "sha256": "b2b71223b1babcc85e161f3cd1779b5ae69982d7e8851e1081fef062a9ba4eeb" }, "downloads": -1, "filename": "sensate-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ccf6c32297715394bfe0e7cc1b36118c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16269, "upload_time": "2015-01-14T22:31:41", "url": "https://files.pythonhosted.org/packages/25/4f/6fc436429ab37f154156c9e77b8906f204af2ad13c396af67fa7fc52647b/sensate-0.2.1.tar.gz" } ] }