{"_id":"@agilatech/si1145","_rev":"14-2b42270ba09af3621803a275066a7381","name":"@agilatech/si1145","description":"A driver for the SiLabs SI1145 Visible / IR / UV sensor","dist-tags":{"latest":"0.10.0"},"versions":{"0.8.0":{"name":"@agilatech/si1145","version":"0.8.0","description":"Driver for the SI1145 Sensor","main":"./build/Release/si1145","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/Agilatech/si1145.git"},"keywords":["Sensor","SI1145","UV index","light","IR infrared","visible light"],"author":{"name":"Scott Erholm","email":"scott@agilatech.com"},"license":"MIT","gitHead":"04cc885871fdd2d237036674a22a89bb6c8207bc","bugs":{"url":"https://github.com/Agilatech/si1145/issues"},"homepage":"https://github.com/Agilatech/si1145#readme","_id":"@agilatech/si1145@0.8.0","_shasum":"a173bbe1e17c7d8309cbf0190593118489539605","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"agilatech","email":"scott@agilatech.com"},"dist":{"shasum":"a173bbe1e17c7d8309cbf0190593118489539605","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.8.0.tgz","integrity":"sha512-XgHUPmL+0zRH5ih4uGigDbjMfdJ9PebLlhPMW13isCltewZCcdrRHmJ05afXbHSjyHmf4RPYO4ujPZGwzcANdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4666F+B85AeWJS2vxsKQtHGnTQPB7vfVvuaXrsPZPtgIhAJ92TrIbxjvK2cn7FJABWfxAXgPWQmNfTO8nZ5W1mh52"}]},"maintainers":[{"name":"agilatech","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/si1145-0.8.0.tgz_1477418298041_0.3806301311124116"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.0":{"name":"@agilatech/si1145","version":"0.9.0","description":"Driver for the SI1145 Sensor","main":"./build/Release/si1145","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/Agilatech/si1145.git"},"keywords":["Sensor","SI1145","UV index","light","IR infrared","visible light"],"author":{"name":"Scott Erholm","email":"scott@agilatech.com"},"license":"MIT","gitHead":"3bbe4c00c77f30246d4cb23c1d35282be67209f0","bugs":{"url":"https://github.com/Agilatech/si1145/issues"},"homepage":"https://github.com/Agilatech/si1145#readme","_id":"@agilatech/si1145@0.9.0","_shasum":"7fbf2d98e809d6cbaf2632faed8e9cdb26384038","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"agilatech","email":"scott@agilatech.com"},"dist":{"shasum":"7fbf2d98e809d6cbaf2632faed8e9cdb26384038","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.9.0.tgz","integrity":"sha512-GmimOdZqwobybA5X1YcIK+jydz2RY2DtwKBX7/h/oAh7bzFl+Oelq/kCIWdfZ04DZy0LHmlnKup0NX1YD0mWTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTKCuylpvwxG3yWapsw2l6a1VFa/oFPv6atKa0yV5NgAiEAvFPiEWRsGCpwIQs3h0+EtbTmjiuj8N82fD1yZ2kK5A4="}]},"maintainers":[{"name":"agilatech","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/si1145-0.9.0.tgz_1477423388348_0.2752507745753974"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.1":{"name":"@agilatech/si1145","version":"0.9.1","description":"Driver for the SI1145 Sensor","main":"./build/Release/si1145","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/Agilatech/si1145.git"},"keywords":["Sensor","SI1145","UV index","light","IR infrared","visible light"],"author":{"name":"Scott Erholm","email":"scott@agilatech.com"},"license":"MIT","gitHead":"a778f4a552ba99518134948db309bcc54d1bc8b4","bugs":{"url":"https://github.com/Agilatech/si1145/issues"},"homepage":"https://github.com/Agilatech/si1145#readme","_id":"@agilatech/si1145@0.9.1","_shasum":"a876d51958b28da98c6c3129b31d4c979855bc0c","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"agilatech","email":"scott@agilatech.com"},"dist":{"shasum":"a876d51958b28da98c6c3129b31d4c979855bc0c","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.9.1.tgz","integrity":"sha512-3jS7V+xN35Q/tfZ2JgXh4tE4xAusLeKqWOrphCqKecAAdd/ozDmpt9qZD93LZ5bXQJ08x4HnULyH4hUhY8xlYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHd5cNdQu+pMcS0yoOKeAhcFWEVM6VRkUUJGuqDMSCA7AiA5nAtvE4NETcCsil0E2C9aqR8sxz+RnDMq8hcf6iI2+Q=="}]},"maintainers":[{"name":"agilatech","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/si1145-0.9.1.tgz_1477437768035_0.1653194420505315"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.2":{"name":"@agilatech/si1145","version":"0.9.2","description":"Driver for the SI1145 Sensor","main":"./build/Release/si1145","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/Agilatech/si1145.git"},"keywords":["Sensor","SI1145","UV index","light","IR infrared","visible light"],"author":{"name":"Scott Erholm","email":"scott@agilatech.com"},"license":"MIT","gitHead":"b124771a60653a5cf5fab1b54b2e916673fd10d0","bugs":{"url":"https://github.com/Agilatech/si1145/issues"},"homepage":"https://github.com/Agilatech/si1145#readme","_id":"@agilatech/si1145@0.9.2","_shasum":"0cd36d3bc219118cbf754387701b4e98637e1e95","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"agilatech","email":"scott@agilatech.com"},"dist":{"shasum":"0cd36d3bc219118cbf754387701b4e98637e1e95","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.9.2.tgz","integrity":"sha512-llKg/+jeAsmScOM0x9uDJvwRVE4CCcv9VSjh1L+SqrHdwi6ypVSJZcWbTm0lMHTdjIqcRh3YVvnef8q67zrEvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPH0PsggIQt5vrAg++9Xrbgx4nZaggc6pmXLCRYne0vgIgIf3hNHXODAjWO5EvS3AVTCjna4A5epzr8/lQvplmhAs="}]},"maintainers":[{"name":"agilatech","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/si1145-0.9.2.tgz_1480378636717_0.7664072751067579"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.3":{"name":"@agilatech/si1145","version":"0.9.3","description":"Driver for the SI1145 Sensor","main":"./build/Release/si1145","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/Agilatech/si1145.git"},"keywords":["Sensor","SI1145","UV index","light","IR infrared","visible light"],"author":{"name":"Scott Erholm","email":"scott@agilatech.com"},"license":"MIT","gitHead":"03a3a24577cc2e3d1c19a7b253d929c1b6dfd6d0","bugs":{"url":"https://github.com/Agilatech/si1145/issues"},"homepage":"https://github.com/Agilatech/si1145#readme","_id":"@agilatech/si1145@0.9.3","_shasum":"c37e0139e76985567b9267d731a3a10b40487fee","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"agilatech","email":"scott@agilatech.com"},"dist":{"shasum":"c37e0139e76985567b9267d731a3a10b40487fee","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.9.3.tgz","integrity":"sha512-y/MolBVnCj+H5dY1bhJJm449jbZAUqqTPN3uAw17LmZwmfoYSjAs2YTCYEL7MsPfBtDsTLc8ZOZtNx3Kwz2F1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgz7dhdgxSDi8nKbgJJ1PHdFXKHu8y+CO5r0xOpqUmnwIgHus1mArJom/nfNtKX+pDkC7qXnp1gah46zu5SojmOxk="}]},"maintainers":[{"name":"agilatech","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/si1145-0.9.3.tgz_1480717953097_0.7685184609144926"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.4":{"name":"@agilatech/si1145","version":"0.9.4","description":"Driver for the SI1145 Sensor","main":"./build/Release/si1145","gypfile":true,"scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/Agilatech/si1145.git"},"keywords":["Sensor","SI1145","UV index","light","IR infrared","visible light"],"author":{"name":"Scott Erholm","email":"scott@agilatech.com"},"license":"MIT","gitHead":"127826cdbc7b1f9b1387704d1e678fc7ed2c38f3","bugs":{"url":"https://github.com/Agilatech/si1145/issues"},"homepage":"https://github.com/Agilatech/si1145#readme","_id":"@agilatech/si1145@0.9.4","_shasum":"c9a3883ff2c6b1c7727553840e981ae4b45947e2","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.2.2","_npmUser":{"name":"scotty","email":"scott@agilatech.com"},"dist":{"shasum":"c9a3883ff2c6b1c7727553840e981ae4b45947e2","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.9.4.tgz","integrity":"sha512-Y2VupvaMQpAQ0CY6GKXrikuc3mzTJL9IRck+43oXiGNtm52Pd71NethKvfv5Yc/OeEz53oOHfX5xpIsJ6t/kzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnimerMj5tNkq1t+DqF6Pe68cEzl8vVtlChhJCOFSaSQIgPujisZtNyOUw19rqklcCVIX0I+NXP1Q0rLPwrjSLTIw="}]},"maintainers":[{"name":"scotty","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/si1145-0.9.4.tgz_1488833592692_0.18039872962981462"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0":{"name":"@agilatech/si1145","version":"0.10.0","description":"A driver for the SiLabs SI1145 Visible / IR / UV sensor","main":"si1145.js","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/AgilatechSystems/si1145.git"},"keywords":["si1145","SI1145","sensor","IR","infrared","UV","ultraviolet","visible","light","raspberry","beaglebone","pi"],"author":{"name":"scotty","email":"scott@agilatech.com","url":"http://agilatech.com"},"license":"MIT","bugs":{"url":"https://github.com/AgilatechSystems/si1145/issues"},"homepage":"https://github.com/AgilatechSystems/si1145#readme","devDependencies":{"chai":"^4.2.0","mocha":"^5.2.0"},"dependencies":{"i2c-bus":"^4.0.5"},"gitHead":"46227555c97f9324fe38b32c7381440b3f27c949","_id":"@agilatech/si1145@0.10.0","_npmVersion":"6.4.1","_nodeVersion":"10.8.0","_npmUser":{"name":"scotty","email":"scott@agilatech.com"},"dist":{"integrity":"sha512-BXmkX0xqfgtQFnIzaX1LfQC2vdKkmIEsLCScwgsC7JpG+h5ZRpmBY/9AHalyceuxCIBvmo00KDeGC8eFeGMMCQ==","shasum":"8a3a8a2f8e482247f75ebc6b4ec88f9210a12324","tarball":"https://registry.npmjs.org/@agilatech/si1145/-/si1145-0.10.0.tgz","fileCount":5,"unpackedSize":25329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5KrTCRA9TVsSAnZWagAAm40P/RqZCXrt/pc8sHqGlonM\ngUaHpz5lnJ3x4axeU07HkaJQlWOCoY0zNYbVC/rrX2NZeDFrLjhLhhbkojbd\nEE7jP208MOUrPq3UfPgiFdfgRJ6v1fDCvSTP/r4sdmqPe27ZBdzX51AKUrp+\neDw1gksJTI89RSJ5VR1wMzMMiCjBPoIXcWkvQfTdGla6zY3LQnKKK1O2csuV\n/gVkfV2GZQEMm57YwHP2ueEV4ErrzckD03iSCjOJc37CpMXq1xKYBsmH2i2D\nN3G+bqH6s7IjvnQXh59kKLXiSQ/mCZi6oEZ5tP8ulaPcN1PLQGcWYBQla5TA\nqN92Ht3L6zvuoizZmmXkzaaipXDkw0qybPhIW8O8fBx3WTk8jcieByZmutkS\nltfSC/ofsgigcV85bMdz/1zE+PFsPBDp2vUl849ADRXog0M4+CFTTnVEHa65\n1HOZKFP0oB49LXoyOIHlF7zW1IBOuEWkG7VUHXf+5ScV5fi//t3Hm/4KlxNL\nRatPa+wq6xlbLQ8OZxFoo7agaF7Adj370Tmkcfqp7aFHC1ctA10T7HzN8PSD\nLfbUc6tQok26elKud3F1xzfdFPdKnRTb5tLENv+It029VPc8iCqN3aYaFRLf\nVMeYDGqB9cUhw+rPWfldF/hd923eYo19XhzWa54r/vUrH0JU/asUSivhsI7B\n/ZbG\r\n=NKzn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFwXUjKuiQ3vh7+RCZ3T4OBB5AYkFouor5WB2BysRMgcAiAhUUenZLzxNHQRD5rOfWnhmSOoh7ELyfLFzqSWcQw6tg=="}]},"maintainers":[{"name":"scotty","email":"scott@agilatech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/si1145_0.10.0_1541712594680_0.11802381909747717"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"## Driver for SI1145 sensor\n\n##### This driver should work on any Linux platform, and has been thoroughly tested on BBB and RPi\n\n### Install\n```\nnpm install @agilatech/si1145\n```\n\n### Usage\n##### Load the module and create an instance\n```\nconst Si1145 = require('@agilatech/si1145');\nconst si1145 = new Si1145();\n// creates an driver with all default options, including i2c-1 bus at 0x60 address.\n\nif (si1145.isActive()) {\n    si1145.getDataFromDevice((err) => {\n        if (!err) {\n            const visible = si1145.device.parameters[0].value;\n            const ir      = si1145.device.parameters[1].value;\n            const uvIdx   = si1145.device.parameters[2].value;\n        }\n    });\n}\n```\n\n**Options**\n```\nSi1145([options])\n```\nThe constructor can be supplied with options to specify certain driver characteristics. The options object allows the following parameters:\n* bus : The number of the I2C bus. The number 1 indicates '/dev/i2c-1'. Defaults to 1.\n* addr : The device address on the bus. Defaults to 0x60\n* name : The name given to this particular driver instance. Defaults to 'Si1145'.\n* type : The type given to this particular driver instance. Defaults to 'sensor'.\n\n\n### Get basice device info\n```\nconst name = si1145.deviceName();  // returns string with name of device\nconst type = si1145.deviceType();  // returns string with type of device\nconst version = si1145.deviceVersion(); // returns this driver software version\nconst active = si1145.deviceActive(); // true if initialized and acgtive, false if inactive\nconst numVals =  si1145.deviceNumValues(); // returns the number of paramters sensed\n```\n\n### Take measurement and load results in device object\n```\nSi1145.getDataFromDevice(callback)\n```\nAsyncronously polls the device, stores the results in the device parameters object, and then calls the optional callback. The given callback function takes an error paramter through which to report errors.  Upon completion, the device object may be examined for new values.\n\n```\nSi1145.getDataFromDeviceSync()\n```\nSynchronously polls the device, stores the results in the device parameters object, returning true on success and false on failure.\n\n#### device object\nThe Si1145.device object contains basic information about the device itself, and also the 'parameters' array. The 'parameters' array contains the name, data type, and current value of each parameter for the device.\n```\nSi1145.device.parameters[0] = {\n    name: 'visible',\n    type: 'integer',\n    value: <current visible light lux>\n    }\n\nSi1145.device.parameters[1] = {\n    name: 'ir',\n    type: 'integer',\n    value: <current infrared lux>\n    }\n \nSi1145.device.parameters[2] = {\n    name: 'uv',\n    type: 'integer',\n    value: <current UV index from 0-11>\n    }\n```\n\n\n### Get individual parameter values by index\nAsynchronously:\n```\nsi1145.valueAtIndex(index, (err, value) => {\n    if (!err) {\n        val = value;\n    }\n});\n```\nSynchronously:\n```\nval = si1145.getValueAtIndexSync(index);\n// returns NaN if upon error\n```\n\n\n#### Get parameter info and values\nThe SI1145 Sensor has Visible, IR, and UV parameters, so there are three corresponding indicies.\n```\n// index 0 is visible light in lux\nconst paramName0 = si1145.nameAtIndex(0);\nconst paramType0 = si1145.typeAtIndex(0);\nconst paramVal0  = si1145.valueAtIndexSync(0);\n\n// index 1 is IR light in lux\nconst paramName1 = si1145.nameAtIndex(1);\nconst paramType1 = si1145.typeAtIndex(1);\nconst paramVal1  = si1145.valueAtIndexSync(1);\n\n// index 2 is UV index weighted according to the CIE Erythemal Action Spectrum\nconst paramName2 = si1145.nameAtIndex(2);\nconst paramType2 = si1145.typeAtIndex(2);\nconst paramVal2  = si1145.valueAtIndexSync(2);\n```\n\n\n### Startup time\nThe constructor initializes the hardware device, but this takes some time. Usually less than 25ms is required for startup, and during this time other operations will fail.  Therefore, it is a best practice to check 'deviceActive()' returns true before initiating any measurement.\n\n\n### Reset\nThe device is reset and initialized on startup, and it is not normally necessary to reset the device after this time.  However, the initialize function can be explicitly called:\n```\nsi1145.initialize()\n```\nWill reset the device, and initialize. Normal startup time delay applies.\n\n\n### Operation Notes\nThe driver software does not include any functionality for proximity sensing.  This feature may be enabled in a future release, but 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 of combined IR and Visible sunlight and is weighted according to the CIE Erythemal Action Spectrum. The resulting UV index is 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 in the right ballpark within a 15-20% tolerance.\n\n\n### Dependencies\n* i2c-bus is used to communicate with the device on the i2c bus\n\n\n### Copyright\nCopyright © 2017-2018 Agilatech. All Rights Reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software 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 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"scotty","email":"scott@agilatech.com"}],"time":{"modified":"2023-10-25T22:44:36.598Z","created":"2016-10-25T17:58:19.885Z","0.8.0":"2016-10-25T17:58:19.885Z","0.9.0":"2016-10-25T19:23:10.317Z","0.9.1":"2016-10-25T23:22:50.198Z","0.9.2":"2016-11-29T00:17:18.476Z","0.9.3":"2016-12-02T22:32:35.022Z","0.9.4":"2017-03-06T20:53:14.669Z","0.10.0":"2018-11-08T21:29:54.794Z"},"homepage":"https://github.com/AgilatechSystems/si1145#readme","keywords":["si1145","SI1145","sensor","IR","infrared","UV","ultraviolet","visible","light","raspberry","beaglebone","pi"],"repository":{"type":"git","url":"git+https://github.com/AgilatechSystems/si1145.git"},"author":{"name":"scotty","email":"scott@agilatech.com","url":"http://agilatech.com"},"bugs":{"url":"https://github.com/AgilatechSystems/si1145/issues"},"license":"MIT","readmeFilename":"README.md"}