{"_id":"@agilatech/zetta-si1145-linux-driver","_rev":"6-ee1bc3df8187d85a74c5cf9c65be2eb0","name":"@agilatech/zetta-si1145-linux-driver","description":"Zetta SI1145 driver for Linux","dist-tags":{"latest":"0.8.0"},"versions":{"0.8.0":{"name":"@agilatech/zetta-si1145-linux-driver","version":"0.8.0","description":"Zetta SI1145 driver for Linux","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"license":"MIT","dependencies":{"zetta-device":"*","zetta-scout":"*","@agilatech/si1145":"*"},"directories":{"example":"example"},"keywords":["zetta","sensor","IR","infrared","visible light","UV index","beaglebone","raspberry pi"],"gitHead":"cdd8403589f4e7574f3af7b1096c4f4836391437","_id":"@agilatech/zetta-si1145-linux-driver@0.8.0","_shasum":"89dc086f91ed522f011ec56d04d16e33ca907ebf","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"agilatech","email":"scott@agilatech.com"},"dist":{"shasum":"89dc086f91ed522f011ec56d04d16e33ca907ebf","tarball":"https://registry.npmjs.org/@agilatech/zetta-si1145-linux-driver/-/zetta-si1145-linux-driver-0.8.0.tgz","integrity":"sha512-xCC1mQtq2FEau7mMFBzScfWZ9BEphTsm8C9ybnodb5Qe4O+Cfmw0hqX2JGqY8R9yzo8N0Rh9wH8gPb7rO+M+Ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsttNzEGPAnbv1aJp7yNfm11tEGgTbnoy/9IAQx1P05AiEA2XY2HoMryDaQkfALGBkGpISILUocbWJBe7R7KrkQF7A="}]},"maintainers":[{"name":"agilatech","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/zetta-si1145-linux-driver-0.8.0.tgz_1477511522469_0.6693215337581933"}}},"readme":"##Zetta si1145 IR/Visible/UV light sensor driver for Linux\n\nThis driver should work on any Linux platform, and has been thouroghly tested on BeagleBone Black\n\n###Install\n```\n$> npm install @agilatech/zetta-si1145-linux-driver\n```\nOR\n```\n$> git clone https://github.com/Agilatech/zetta-si1145-linux-driver zetta-si1145-linux-driver\n```\n###Usage\n\n```\nvar zetta = require('zetta');\nvar si1145 = require('@agilatech/zetta-si1145-linux-driver');\n\nzetta()\n.use(si1145, [options])  // where [options] define operational paramters -- omit to accept defaults\n.listen(<port number>)   // where <port number> is the port on which the zetta server should listen\n```\n\n####[options]\nThese options are defined in a file named 'options.json' which may be overridden by program definitions\n\n```\n\"bus\":\"<i2c bus device>\"\n/dev/i2c-0, /dev/i2c-1, /dev/i2c-2, etc...  Defaults to /dev/i2c-1\n\n\"chronPeriod\":<period>\nPeriod in milliseconds for monitored isochronal data\n\n\"streamPeriod\":<period>\nPeriod in milliseconds for streaming data. A value of 0 disables streaming.\n```\n\n####&lt;port number&gt;\nAgilatech has definied the open port number 1107 as its standard default for IIOT (Industrial Internet \nOf Things) server application. In practice, most any port above 1024 may be used by other organizations.\n\n###Example\nUsing directly in the zetta server:\n```\nconst zetta = require('zetta');\nconst light_sensor = require('@agilatech/zetta-si1145-linux-driver');\nzetta().use(light_sensor).listen(1337);\n```\nInitializes the si1145 driver on i2c bus /dev/i2c-1 with a data monitoring period of 60 seconds and streaming data every second\n\nTo override the options defined in the options.json file, supply them in an object in the use statement like this:\n```\nzetta().use(light_sensor, { \"bus\":\"/dev/i2c-1\", \"chronPeriod\":30000, \"streamPeriod\":15000 });\n```\nOverrides the defaults to initialize the bus on **/dev/i2c-1** with a data monitoring period of **30 seconds** and streaming data every **1.5 seconds**\n\n###Properties\nAll drivers contain the following 5 core properties:\n1. **state** : the current state of the device, containing either the value *chron-on* or *chron-off* \nto indicate whether the device is monitoring data isochronally (a predefinied uniform time period of device data query).\n2. **active** : a boolean value indicating whether of not the underlying hardware is operational and active.\n3. **id** : the unique id for this device.  This device id is used to subscribe to this device streams.\n4. **name** : the given name for this device.\n5. **type** : the given type for this device, usually containing the category of either *Sensor* or *Actuator*.\n\n####Monitored Properties\nIn the *chron-on* state and *active* operation, the driver software for this device monitors three values in isochronal \nfashion with a period defined by *chronPeriod*:\n1. **ir** - infrared light\n2. **visible** - visible light\n3. **uv** - ultraviolet exposure index\n\n####Streaming Properties\nIf the hardware is *active*, the driver software continuously streams three values with a frequency defined by \n*streamPeriod*. Note that a *streamPeriod* of 0 disables streaming.\n1. **irStream**\n2. **visibleStream**\n3. **uvStream**\n\n###State\n**chron-off** is the beginning state.  The driver also enters this state after a transition '*stop-isochronal*' command.  \nIn this state, all monitored data values are set to 0, and no sensor readings are updated.\n\n**chron-on** is the state after a transition '*start-isochronal*' command.  In this state, all monitored data values are \nupdated every time period as specified by '*chronPeriod*'.\n\n###Transitions\n1. **start-isochronal** : Sets the device state to *chron-on* and begins the periodic collection of sensor data. \nProperty values are monitored, with a period defined by the 'chronPeriod' option (defaults to 60 sec).\n2. **stop-isochronal** : Sets the device state to *chron-off* and stops data collection for the monitored values.\n\n###Design\n\nThis device driver is designed for both streaming and periodic monitored data collection from the Silicon Labs SI1145 sensor.\n\nThe driver software does not include any functionality for proximity sensing.  This feature may be enabled in a future release, \nbut don't count on it. The main purpose of this addon is for simple light sensing.\n\nThe UV Index provided by the SI1145 sensor is not based on direct UV measurement, but is calculated by the linear releationship \nof combined IR and Visible sunlight and is weighted according to the CIE Erythemal Action Spectrum.  The resulting UV index \nis the standardized World Health Organization simplified consumer UV exposure level ranging from 1 to 11.\n\nIn any case, this sensor is uncalibrated, so none of the returned values should be considered accurate. The values returned are \nin the right ballpark within a 15-20% tolerance.\n\n### Hardware\n\n* Beaglebone Black\n* Beaglebone Green\n* Should also work on Raspberry Pi as well as other Linux SBC\n\n###Copyright\nCopyright © 2016 Agilatech. All Rights Reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation \nfiles (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, \nmodify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the \nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE \nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR \nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, \nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","maintainers":[],"time":{"modified":"2022-06-12T14:21:38.310Z","created":"2016-10-26T19:52:05.064Z","0.8.0":"2016-10-26T19:52:05.064Z"},"keywords":["zetta","sensor","IR","infrared","visible light","UV index","beaglebone","raspberry pi"],"license":"MIT","readmeFilename":"README.md"}