{"_id":"@agilatech/lynxari-rmy85000-device","_rev":"1-2f0f51350434482200e9fbe7656543c9","name":"@agilatech/lynxari-rmy85000-device","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@agilatech/lynxari-rmy85000-device","version":"1.0.1","description":"RMY85000 Ultrasonic Anemometer device driver for use in the Agilatech Lynxari system","main":"rmy85000-scout.js","repository":{"type":"git","url":"git+https://github.com/Agilatech/lynxari-rmy85000-device.git"},"keywords":["sensor","Wind Speed","Wind Direction","Ultrasonic Anemometer","RMY 85000"],"author":{"name":"Agilatech","email":"scott@agilatech.com","url":"http://agilatech.com"},"license":"MIT","dependencies":{"@agilatech/rmy85000":"*"},"gitHead":"8bb9ea5cd27cd91962f5a99b0850356cf0814303","bugs":{"url":"https://github.com/Agilatech/lynxari-rmy85000-device/issues"},"homepage":"https://github.com/Agilatech/lynxari-rmy85000-device#readme","_id":"@agilatech/lynxari-rmy85000-device@1.0.1","_npmVersion":"6.0.0","_nodeVersion":"6.2.2","_npmUser":{"name":"scotty","email":"scott@agilatech.com"},"dist":{"integrity":"sha512-k8mNIpxOHEmOLQ4UW9ut7cojhrludBT9jiCfs6+nHWKTO5I1izGsxKV6f0TfmBfmTMIcux9Obf/4LM4Xm4RXeA==","shasum":"f773a8253df08e3e9da271bb185ae7bcc7c85b72","tarball":"https://registry.npmjs.org/@agilatech/lynxari-rmy85000-device/-/lynxari-rmy85000-device-1.0.1.tgz","fileCount":6,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ9gOCRA9TVsSAnZWagAApUIP/1HTRGjfgspBoGZ9IunE\nVv/M4EavizqvrzsnLZADxNW/5gaprSWR32zmQcATmdDodV/qP+J+H7G5rW/Z\nASJdMqK3M2X1JtpKx7Ke78+f/wYYJXk8ZBFJ1EyaIHR32Lf9yvPnCnvNcge0\nlH5H02E83d1yF2Cl+BNUclPMSKKGIkiU6GB2dEAgZBNzZl/KEEl1FzwEWuJh\ncJ6lJatjeQQoBz/wfgqUQsUi0HIHYf2K6JtTzuBL08dT0NcFJjNSxZEfgEcH\nrPwP/Ts+185gp+cE8Gw2KD5j0REr12yaDMWBcYVQyYyXrC8uYvMGno3ZK6Ij\nNqCXbzY+x7onTbKUqfqz8/qpQn10lF0oJI8PoYch7F1fDxdp2I2aMJqFRtqd\nFBNb5jB56p3pFg2D6BtI8OGCFp+PCKVlz0Mr1y2ivm5DXxVYECARuL5Vytoz\najvptGPc4JtgFwKSm+FchR8FByyAs+93aaZKIU6waol5GssQIRQst9+joUiR\nnvNvfjsYjtkwFegJH5VGdN/Y3gXha0ZN43Du19HQD5yEZvuyds2ZZ6joB7JS\n84nE2E9A8CTGsI7Qwvpp0nhj510PxAJuGAlIuMK8ePNDm7L8+wYkKCILEASp\nurUqFyzzl/Dnkgm6i4tzZR4TG+Ra4y7wubGKlOajcYBFYpjxrKQicGna9XHl\npB8V\r\n=U71o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBb8nDk1rdcAnKauFeoginF7Tr7Epstdm3UOp8lFUymhAiAwl4wiuovMVvBnkykBC/2Zji8SEfX7xR8ctGBsrEoZzA=="}]},"maintainers":[{"name":"scotty","email":"scott@agilatech.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lynxari-rmy85000-device_1.0.1_1529337869749_0.9240071345715268"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-18T16:04:29.539Z","1.0.1":"2018-06-18T16:04:29.810Z","modified":"2022-04-04T11:57:14.829Z"},"maintainers":[{"name":"scotty","email":"scott@agilatech.com"}],"description":"RMY85000 Ultrasonic Anemometer device driver for use in the Agilatech Lynxari system","homepage":"https://github.com/Agilatech/lynxari-rmy85000-device#readme","keywords":["sensor","Wind Speed","Wind Direction","Ultrasonic Anemometer","RMY 85000"],"repository":{"type":"git","url":"git+https://github.com/Agilatech/lynxari-rmy85000-device.git"},"author":{"name":"Agilatech","email":"scott@agilatech.com","url":"http://agilatech.com"},"bugs":{"url":"https://github.com/Agilatech/lynxari-rmy85000-device/issues"},"license":"MIT","readme":"![Lynxari IoT Platform](https://agilatech.com/images/lynxari/lynxari200x60.png) **IoT Platform**\n## Lynxari RMY85000 Ultrasonic Anemometer sensor device driver\n\nThis device driver is specifically designed to be used with the Agilatech® Lynxari IoT Platform.\nPlease see [agilatech.com](https://agilatech.com/software) to download a copy of the system. \n\n\n### Install\n```\n$> npm install @agilatech/lynxari-rmy85000-device\n```\n\n\n### Design\n\nThis device driver is designed for both streaming and periodic monitored data collection from the RM Young 85000 \nseries ultrasonic anemometer.  The hardware measures wind speed from 0-60 m/s with an accuracy of ±0.1 m/s. Wind \ndirection is measured from 0-360 degrees with an accuracy of ±3 degrees.\n\nWind speed and direction values are instantaneous, with no averaging or time weighting performed.  Any analysis \nof averages and gusts will need to be performed downstream of this driver.  Because of this, consider frequent streaming, but infrequent monitoring, and then averaging streams for more accurate time-based averages as well as gust speeds and directions.\n\nThe hardware interfaces via RS-232 or RS-485, so your hardware must support one of these protocols.  The serial \ndevice file can be specified in the constructor.\n\nAlthough Lynxari can run on most any operating system, this driver uses Linux-specific protocols, so it will not work directly on Windows.\n\n\n### Usage\nThis device driver is designed to be consumed by the Agilatech® Lynxari IoT system.  As such, it is not really applicable or useful in other environments.\n\nTo use it with Lynxari, insert its object definition as an element in the devices array in the _devlist.json_ file.\n```\n{\n  \"name\": \"RMY85000\",\n  \"module\": \"@agilatech/lynxari-rmy85000-device\",\n  \"options\": {\n    \"streamPeriod\": 60000,\n    \"devicePoll\": 1000,\n    \"deltaPercent\": 0.5,\n    \"file\":\"/dev/ttyO0\",\n    \"speed_range\":40,\n    \"direction_range\":360,\n    \"avg_speed_range\":40,\n    \"avg_direction_range\":360,\n    \"gust_speed_range\":40,\n    \"gust_direction_range\":360\n  }\n}\n```\n\n\n#### Device config object\nThe device config object is an element in the devlist.json device configuration file, which is located in the Lynxari root directory.  It is used to tell the Lynxari system to load the device, as well as several operational parameters.\n\n_name_ is simply the name given to the device.  This name can be used in queries and for other identifcation purposes.\n\n_module_ is the name of the npm module. The module is expected to exist in this directory under the _node_modules_ directory.  If the module is not strictly an npm module, it must still be found under the node_modules directory.\n\n_options_ is an object within the device config object which defines all other operational parameters.  In general, any parameters may be defined in this options object, and most modules will have many several.  The three which are a part of every Lynxari device are 'devicePoll', 'streamPeriod', and 'deltaPercent'. The rmy85000 options also can define the tty file.  Finally, all parameter values can have a range defined by specifying '<parameter>\\_range'.\n\n```\n\"streamPeriod\":<period>\nPeriod in milliseconds for broadcast of streaming values\n\n\"devicePoll\":<period>\nPeriod in milliseconds in which device will be polled to check for new data\n\n\"deltaPercent\":<percent>\nPercent of the data range which must be exceeded (delta) to qualify as \"new\" data\n\n\"file\":<serial device file>\nSerial device file descriptor, i.e. /dev/ttys0\n```\n\n#### devicePoll and streamPeriod\n_devicePoll_ is given in milliseconds, and defines how often the device will be polled for new values.  This paramter is primary useful in sensors which sit idle waiting to be polled, and not for devices which supply values on their own schedule (i.e. for pull ranther that push).\n\n_streamPeriod_ is also given in milliseconds, and defines how often the device will publish its values on the data stream.  Streaming is disabled if this parameter is set to 0. \n\n#### deltaPercent explained\n_deltaPercent_ is the percentage of the current numerical data range which a polled data value must exceed to be considred \"new\". As an example, consider a temperature range of 100, a deltaPercent of 2, and the current temerature of 34.  In such a case, a device poll must produce a value of 36 or greater, or 32 or less than in order to be stored as a current value.  35 or 33 will be ignored.  deltaPercent may be any value greater than 0 or less than 100, and may be fractional. If not defined, the default is 5 percent.\n\n\n#### Defining the value ranges\nValue ranges may also be defined in the config, and are closely related to deltaPercent.  If not defined, the software will keep track of minimum and maximum values and derive the range from them.  However, that takes time for the software to \"learn\" the ranges, so they can be defined in the config object:\n```\n\"speed_range\":<numeric range>\n\"direction_range\":<numeric bearing range>\n```\nwhere the &lt;numeric range&gt; is a number representing the absolute range of the value.\n\n\n#### module config \nEvery module released by Agilatech includes configuration in a file named 'config.json' and we encourage any other publishers to follow the same pattern.  The parameters in this file are considered defaults, since they are overriden by definitions appearing in the options object of the Lynxari devlist.json file.\n\nThe construction of the config.json mirrors that of the options object, which is simply a JSON object with key/value pairs.\nHere is an example of an 'config.json' file which streams values every 10 seconds, polls the device every second, requires an 8% delta change to register a new monitored value, and defines valid ranges on all parameters:\n```\n{\n    \"streamPeriod\":10000, \n    \"devicePoll\":1000, \n    \"deltaPercent\":8,\n    \"file\":\"/dev/ttyS1\",\n    \"speed_range\":40,\n    \"direction_range\":360\n}\n```\n\n  \n#### Default values\nIf not specified in the config object, the program uses the following default values:\n* _streamPeriod_ : 10000 (10,000ms or 10 seconds)\n* _devicePoll_ : 1000 (1,000ms or 1 second)\n* _deltaPercent_ : 5 (polled values must exceed the range by &plusmn; 5%)\n\n\n### Properties\nAll drivers contain the following 4 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. **id** : the unique id for this device.  This device id is used to subscribe to this device streams.\n3. **name** : the given name for this device.\n4. **type** : the given type category for this device,  (_sensor_, _actuator_, etc)\n\n\n#### Monitored Properties\nIn the *on* state, the driver software for this device monitors three values.\n1. **speed** - wind speed in m/s\n2. **direction** - wind direction from 0-360 degrees\n\n  \n#### Streaming Properties\nIn the *on* state, the driver software continuously streams three values in isochronal \nfashion with a period defined by *streamPeriod*. Note that a *streamPeriod* of 0 disables streaming.\n1. **speed_stream**\n2. **direction_stream**\n\n\n### State\nThis device driver has a binary state: __on__ or __off__. When off, no parameter values are streamed or available, and no commands are accepted other than the _turn-on_ transition. When on, the device is operations and accepts all commands.  The initial state is _off_.\n  \n  \n### Transitions\n1. **turn-on** : Sets the device state to *on*. When on, the device is operational and accepts all commands. Values are streamed, and the device is polled periodically to keep monitored values up to date.\n\n2. **turn-off** : Sets the device state to *off*, When off, no parameter values are streamed or available, and no commands are accepted other than the _turn-on_ transition.\n\n\n### Compatibility\nThis driver is designed to run within the Lynxari IoT platform.  While Lynxari will run on nearly any operating system, this driver employs UNIX-specific protocols and as such will run on the following operating systems:\n* 32 or 64-bit Linux\n* macOS and OS X\n* SunOS\n* AIX\n\n\n### Copyright\nCopyright © 2018 [Agilatech®](https://agilatech.com). 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","readmeFilename":"README.md"}