├── .gitignore ├── LICENSE.md ├── README.md ├── example ├── DUALPIP4048 │ ├── calls.json │ ├── package-lock.json │ ├── package.json │ ├── pip.service │ ├── project.js │ ├── readme.md │ └── session.json ├── MPI10kWHybrid │ ├── calls.json │ ├── package.json │ ├── project.js │ └── session.json ├── PCM60x │ ├── calls.json │ ├── package.json │ ├── project.js │ └── session.json ├── PIP4084 │ ├── calls.json │ ├── package.json │ ├── project.js │ └── session.json ├── US2000B │ ├── calls.json │ ├── package.json │ ├── project.js │ └── session.json ├── US3000+US2000 │ ├── calls.json │ ├── package.json │ ├── project.js │ ├── readme.md │ ├── session.json │ └── us2000.service ├── calls.json └── session.json ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Erik Johansson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | sudo npm install --unsafe-perm# Solar serial inverter system (solar-sis) 2 | 3 | Universal inverter protocol handler specially for solar electricity systems 4 | 5 | ## Getting Started 6 | 7 | These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. 8 | 9 | The system is also included in a prebuilt Raspberry PI image supplied by [DIY Tech & Repairs](http://diytechandrepairs.nu/raspberry-solar) You can also find alot of information regarding the main project on his [Youtube channel](https://www.youtube.com/user/daromeresperyd) 10 | 11 | 12 | ### Prerequisites 13 | 14 | You will need to install Nodejs to run this project. Please visit [https://nodejs.org](https://nodejs.org) for more information how to install. You also need to install the nodejs package manager [npm](https://docs.npmjs.com/getting-started/installing-node) to get all dependencies. 15 | 16 | Currently it only works with serialport 4.0.7 if you are running with the built in USB to Serial converter on the MPP inverters and chargers. This is an big issue but if you stick with 4.0.7 it works and also if you go with the pure serial interface. (This need to be bugged and sorted). The correct version of nodejs serialport package for this project will be installed by the solar-sis npm package scripts. 17 | 18 | ``` 19 | serialport 4.0.7 20 | ``` 21 | 22 | ### Installing 23 | n 24 | You can install solar-sis with examples by clone this git repository or retrieve the [solar-sis npm package](https://www.npmjs.com/package/solar-sis). 25 | 26 | **Using Git and npm** 27 | 28 | Install by cloning git repository in your folder of choice. 29 | ``` 30 | git clone https://github.com/opengd/solar-sis.git 31 | 32 | or as sudo: 33 | 34 | sudo git clone https://github.com/opengd/solar-sis.git 35 | ``` 36 | This will retriev the solar-sis git repository. To use one of the example (MPI10kWHybrid, PCM60x, PIP4084..), go to the examaple of choice and retriev depended nodejs packages by using npm. 37 | 38 | Install nodejs dependencies in example folder. 39 | ``` 40 | npm install 41 | 42 | OR if you are using sudo or as root user: 43 | 44 | sudo npm install --unsafe-perm 45 | ``` 46 | Now all dependencies for solar-sis should have been installed and you can run the service using Nodejs. 47 | 48 | How to start a solar-sis example project. 49 | ``` 50 | node project.js 51 | 52 | OR as sudo: 53 | 54 | sudo node project.js 55 | 56 | OR if calls.json and session.json have been renamed: 57 | 58 | sudo node project.js my_new_calls.json my_new_session.json 59 | ``` 60 | 61 | Example installation: 62 | ``` 63 | sudo git clone https://github.com/opengd/solar-sis.git 64 | cd solar-sis/example/PIP4084 65 | sudo npm install --unsafe-perm 66 | sudo node project.js 67 | ``` 68 | 69 | **Using npm** 70 | 71 | Or you can use nodejs npm service to get solar-sis running, first get the solars-sis npm package in your folder of choice. 72 | ``` 73 | sudo npm install solar-sis --unsafe-perm 74 | ``` 75 | You should then find the example projects folder in "node_modules/solar-sis/example". 76 | 77 | Choose an example and start the service by running the project.js file using Nodejs. 78 | ``` 79 | sudo node project.js 80 | ``` 81 | 82 | Example installation using npm: 83 | ``` 84 | sudo npm install solar-sis --unsafe-perm 85 | cd node_modules/solar-sis/example/PIP4084 86 | sudo node project.js 87 | ``` 88 | 89 | ### Updating 90 | 91 | To update solar-sis scripts using git just pull for updates in the solar-sis folder. This will update the example projects but not the node modules. 92 | ``` 93 | sudo git pull 94 | ``` 95 | 96 | To update the node modules in one of the example folders you will have to go to folder then and run npm update. 97 | ``` 98 | sudo npm update --unsafe-perm 99 | ``` 100 | This will get any new dependencies and update the old against the solar-sis npm package. 101 | 102 | ## Running the tests 103 | 104 | No tests exist in this project 105 | 106 | ## Contributing 107 | 108 | Feel free to send in bugs/features or any other requests. We will take a look at them all and incorporate them as much as we can. 109 | If you want to contribute to the time its spent on this getting it here you can always contribute to the authors below via any of their Patreon/Paypal links 110 | 111 | ## Authors 112 | 113 | * **Erik Johansson** - *Main developer* - [opengd](https://github.com/opengd) 114 | * **Daniel Römer** - *Founder/brain/tester* - [daromer2](https://github.com/daromer2) 115 | 116 | See also the list of [contributors](https://github.com/opengd/solar-sis/contributors) who participated in this project. 117 | 118 | ## License 119 | 120 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details 121 | 122 | ## Acknowledgments 123 | 124 | * Hat tip to anyone who's code was used 125 | * Inspiration 126 | * etc 127 | 128 | -------------------------------------------------------------------------------- /example/DUALPIP4048/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": " ", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "(", 11 | "response_header_length": 0 12 | }, 13 | "query": { 14 | "general_status0": { 15 | "hide": false, 16 | "influx": true, 17 | "cache": true, 18 | "command": "QPGS0", 19 | "crc16": true, 20 | "response": { 21 | "parallel_mode": 1, 22 | "serial_num": 1, 23 | "work_mode": "string", 24 | "fualt_code": 1, 25 | "ac_in_volt": 1, 26 | "ac_in_freq": 1, 27 | "ac_out_volt": 1, 28 | "ac_out_freq": 1, 29 | "ac_out_power": 1, 30 | "ac_out_active_power": 1, 31 | "load_percent": 1, 32 | "battery_volt": 1, 33 | "battery_charging_current0": 1, 34 | "battery_capacity": 1, 35 | "pv_input_voltage_0": 1, 36 | "total_charging_current0": 1, 37 | "total_ac_output_apparent_power": 1, 38 | "total_ac_output_active_power": 1, 39 | "total_ac_output_percent": 1, 40 | "device_status": true, 41 | "output_mode": 1, 42 | "charger_source_priority": 1, 43 | "max_charge_current": 1, 44 | "max_charge_range": 1, 45 | "max_ac_charge_current": 1, 46 | "pv_input_current_for_battery0": 1, 47 | "battery_discharge_current": 1 48 | } 49 | }, 50 | "general_status1": { 51 | "hide": true, 52 | "influx": true, 53 | "cache": true, 54 | "command": "QPGS1", 55 | "crc16": true, 56 | "response": { 57 | "parallel_mode": 1, 58 | "serial_num": 1, 59 | "work_mode": "string", 60 | "fualt_code": 1, 61 | "ac_in_volt": 1, 62 | "ac_in_freq": 1, 63 | "ac_out_volt": 1, 64 | "ac_out_freq": 1, 65 | "ac_out_power": 1, 66 | "ac_out_active_power": 1, 67 | "load_percent": 1, 68 | "battery_volt": 1, 69 | "battery_charging_current1": 1, 70 | "battery_capacity": 1, 71 | "pv_input_voltage_1": 1, 72 | "total_charging_current1": 1, 73 | "total_ac_output_apparent_power": 1, 74 | "total_ac_output_active_power": 1, 75 | "total_ac_output_percent": 1, 76 | "device_status": true, 77 | "output_mode": 1, 78 | "charger_source_priority": 1, 79 | "max_charge_current": 1, 80 | "max_charge_range": 1, 81 | "max_ac_charge_current": 1, 82 | "pv_input_current_for_battery1": 1, 83 | "battery_discharge_current": 1 84 | } 85 | }, 86 | "extended_status": { 87 | "hide": true, 88 | "influx": true, 89 | "cache": true, 90 | "command": "QP2G0", 91 | "crc16": true, 92 | "response": { 93 | "pv_input_current_2": 1, 94 | "pv_input_voltage_2": 1, 95 | "battery_voltage_from_scc_2": 1, 96 | "pv_charging_power_2": 1, 97 | "device_status_2": 1, 98 | "ac_charging_current": 1, 99 | "ac_charging_power": 1, 100 | "pv_input_current_3": 1, 101 | "pv_input_voltage_3": 1, 102 | "battery_voltage_from_scc_3": 1, 103 | "pv_charging_power_3": 1, 104 | "pv_total_charging_power": 1 105 | } 106 | }, 107 | "device_rated_information": { 108 | "hide": true, 109 | "command": "QPIRI", 110 | "influx": true, 111 | "cache": true, 112 | "crc16": true, 113 | "response": { 114 | "grid_rating_voltage": 1, 115 | "grid_rating_current": 1, 116 | "ac_output_rating_voltage": 1, 117 | "ac_output_rating_frecuency": 1, 118 | "ac_output_rating_current": 1, 119 | "ac_output_rating_apparent_power": 1, 120 | "ac_output_rating_active_power": 1, 121 | "battery_rating_voltage": 1, 122 | "battery_recharge_voltage": 1, 123 | "battery_under_voltage": 1, 124 | "battery_bulk_voltage": 1, 125 | "battery_float_voltage": 1, 126 | "battery_type": 1, 127 | "current_max_ac_charging": 1, 128 | "current_max_charging_current": 1, 129 | "input_voltage_range": 1, 130 | "output_source_priority": 1, 131 | "charger_source_priority": 1, 132 | "parallel_max_num": 1, 133 | "machine_type": 1, 134 | "topology": 1, 135 | "output_mode": 1, 136 | "battery_re_discharge_voltage": 1, 137 | "pv_condition": 1, 138 | "pv_power_balance": 1 139 | } 140 | } 141 | }, 142 | "set_config": { 143 | "start_bit": "", 144 | "command_type": "S", 145 | "response_type": "", 146 | "data_length_bits": 0, 147 | "seperator": " ", 148 | "ending_character": "\r", 149 | "crc_length": 2, 150 | "response_accept_command": 1, 151 | "response_refuse_command": 0, 152 | "variable_length_fillout": "0", 153 | "response_start": "(", 154 | "response_header_length": 0 155 | }, 156 | "set": { 157 | "output_source_priority" : { 158 | "command" : "POP", 159 | "crc16": true, 160 | "variables": { 161 | "source": "" 162 | } 163 | }, 164 | "charger_priority": { 165 | "command" : "PCP", 166 | "crc16": true, 167 | "variables" : { 168 | "source" : "" 169 | } 170 | }, 171 | "bulk_charging": { 172 | "command" : "PCVV", 173 | "crc16": true, 174 | "variables" : { 175 | "voltage" : "" 176 | } 177 | }, 178 | "float_charging": { 179 | "command" : "PBFT", 180 | "crc16": true, 181 | "variables" : { 182 | "voltage" : "" 183 | } 184 | }, 185 | "utility_max_charging": { 186 | "command" : "MUCHGC0", 187 | "crc16": true, 188 | "variables" : { 189 | "current" : "" 190 | } 191 | }, 192 | "max_charging": { 193 | "command" : "MCHGC0", 194 | "crc16": true, 195 | "variables" : { 196 | "current" : "" 197 | } 198 | }, 199 | "back_to_grid": { 200 | "command" : "PBCV", 201 | "crc16": true, 202 | "variables" : { 203 | "voltage" : "" 204 | } 205 | }, 206 | "back_to_battery": { 207 | "command" : "PBDV", 208 | "crc16": true, 209 | "variables" : { 210 | "voltage" : "" 211 | } 212 | } 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /example/DUALPIP4048/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_pip", 3 | "version": "1.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@serialport/binding-abstract": { 8 | "version": "2.0.5", 9 | "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-2.0.5.tgz", 10 | "integrity": "sha512-oRg0QRsXJFKHQbQjmo0regKLZ9JhjLmTqc47ocJgYM5UtU9Q1VFrVPh0B2lr2pfm/tr3aNvTLX1eiVAvXyZ/bg==", 11 | "requires": { 12 | "debug": "^4.1.1" 13 | } 14 | }, 15 | "@serialport/binding-mock": { 16 | "version": "2.0.5", 17 | "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-2.0.5.tgz", 18 | "integrity": "sha512-1kD1qI686pIIolGZ6TPjAtvy8c3XIUlE4OXRZf7ZHaZgGaOUHAUMLKZt4tNTxsfedRTFyiYyHoe5QAbx82R9pQ==", 19 | "requires": { 20 | "@serialport/binding-abstract": "^2.0.5", 21 | "debug": "^4.1.1" 22 | } 23 | }, 24 | "@serialport/bindings": { 25 | "version": "2.0.8", 26 | "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-2.0.8.tgz", 27 | "integrity": "sha512-paKLa9JkoH5FAy2sATTdXLCiKpuKn0pN15/etcCqzX8vi25fnQgJ8Yx9Z6zdbcKe1No7s/9PuH9yfjDR61fbOQ==", 28 | "requires": { 29 | "@serialport/binding-abstract": "^2.0.5", 30 | "@serialport/parser-readline": "^2.0.2", 31 | "bindings": "^1.3.0", 32 | "debug": "^4.1.1", 33 | "nan": "^2.13.2", 34 | "prebuild-install": "^5.2.1" 35 | } 36 | }, 37 | "@serialport/parser-byte-length": { 38 | "version": "2.0.2", 39 | "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-2.0.2.tgz", 40 | "integrity": "sha512-cUOprk1uRLucCJy6m+wAM4pwdBaB5D4ySi6juwRScP9DTjKUvGWYj5jzuqvftFBvYFmFza89aLj5K23xiiqj7Q==" 41 | }, 42 | "@serialport/parser-cctalk": { 43 | "version": "2.0.2", 44 | "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-2.0.2.tgz", 45 | "integrity": "sha512-5LMysRv7De+TeeoKzi4+sgouD4tqZEAn1agAVevw+7ILM0m30i1zgZLtchgxtCH7OoQRAkENEVEPc0OwhghKgw==" 46 | }, 47 | "@serialport/parser-delimiter": { 48 | "version": "2.0.2", 49 | "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-2.0.2.tgz", 50 | "integrity": "sha512-zB02LahFfyZmJqak9l37vP/F1K+KCUxd1KQj35OhD1+0q/unMjVTZmsfkxFSM4gkaxP9j7+8USk+LQJ3V8U26Q==" 51 | }, 52 | "@serialport/parser-readline": { 53 | "version": "2.0.2", 54 | "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-2.0.2.tgz", 55 | "integrity": "sha512-thL26dGEHB+eINNydJmzcLLhiqcBQkF+wNTbRaYblTP/6dm7JsfjYSud7bTkN63AgE0xpe9tKXBFqc8zgJ1VKg==", 56 | "requires": { 57 | "@serialport/parser-delimiter": "^2.0.2" 58 | } 59 | }, 60 | "@serialport/parser-ready": { 61 | "version": "2.0.2", 62 | "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-2.0.2.tgz", 63 | "integrity": "sha512-6ynQ+HIIkFQcEO2Hrq4Qmdz+hlJ7kjTHGQ1E7SRN7f70nnys1v3HSke8mjK3RzVw+SwL0rBYjftUdCTrU+7c+Q==" 64 | }, 65 | "@serialport/parser-regex": { 66 | "version": "2.0.2", 67 | "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-2.0.2.tgz", 68 | "integrity": "sha512-7qjYd7AdHUK8fJOmHpXlMRipqRCVMMyDFyf/5TQQiOt6q+BiFjLOtSpVXhakHwgnXanzDYKeRSB8zM0pZZg+LA==" 69 | }, 70 | "@serialport/stream": { 71 | "version": "2.0.5", 72 | "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-2.0.5.tgz", 73 | "integrity": "sha512-9gc3zPoAqs/04mvq8TdZ7GxtnacCDuw3/u0u18UXXHgC/5tNDYkY+hXFIJB1fQFnP5yyNB1L2XLfX974ySJg9Q==", 74 | "requires": { 75 | "@serialport/binding-mock": "^2.0.5", 76 | "debug": "^4.1.1" 77 | } 78 | }, 79 | "accepts": { 80 | "version": "1.3.7", 81 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 82 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 83 | "requires": { 84 | "mime-types": "~2.1.24", 85 | "negotiator": "0.6.2" 86 | } 87 | }, 88 | "ajv": { 89 | "version": "6.10.2", 90 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", 91 | "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", 92 | "requires": { 93 | "fast-deep-equal": "^2.0.1", 94 | "fast-json-stable-stringify": "^2.0.0", 95 | "json-schema-traverse": "^0.4.1", 96 | "uri-js": "^4.2.2" 97 | } 98 | }, 99 | "ansi-regex": { 100 | "version": "2.1.1", 101 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 102 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 103 | }, 104 | "aproba": { 105 | "version": "1.2.0", 106 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 107 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" 108 | }, 109 | "are-we-there-yet": { 110 | "version": "1.1.5", 111 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", 112 | "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", 113 | "requires": { 114 | "delegates": "^1.0.0", 115 | "readable-stream": "^2.0.6" 116 | } 117 | }, 118 | "array-flatten": { 119 | "version": "1.1.1", 120 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 121 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 122 | }, 123 | "asn1": { 124 | "version": "0.2.4", 125 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 126 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 127 | "requires": { 128 | "safer-buffer": "~2.1.0" 129 | } 130 | }, 131 | "assert-plus": { 132 | "version": "1.0.0", 133 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 134 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 135 | }, 136 | "async-limiter": { 137 | "version": "1.0.1", 138 | "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", 139 | "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" 140 | }, 141 | "asynckit": { 142 | "version": "0.4.0", 143 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 144 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 145 | }, 146 | "aws-sign2": { 147 | "version": "0.7.0", 148 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 149 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 150 | }, 151 | "aws4": { 152 | "version": "1.8.0", 153 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", 154 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" 155 | }, 156 | "balanced-match": { 157 | "version": "1.0.0", 158 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 159 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 160 | }, 161 | "base64-js": { 162 | "version": "1.3.1", 163 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", 164 | "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" 165 | }, 166 | "bcrypt-pbkdf": { 167 | "version": "1.0.2", 168 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 169 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 170 | "requires": { 171 | "tweetnacl": "^0.14.3" 172 | } 173 | }, 174 | "bindings": { 175 | "version": "1.5.0", 176 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 177 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 178 | "requires": { 179 | "file-uri-to-path": "1.0.0" 180 | } 181 | }, 182 | "bl": { 183 | "version": "3.0.1", 184 | "resolved": "https://registry.npmjs.org/bl/-/bl-3.0.1.tgz", 185 | "integrity": "sha512-jrCW5ZhfQ/Vt07WX1Ngs+yn9BDqPL/gw28S7s9H6QK/gupnizNzJAss5akW20ISgOrbLTlXOOCTJeNUQqruAWQ==", 186 | "requires": { 187 | "readable-stream": "^3.0.1" 188 | }, 189 | "dependencies": { 190 | "readable-stream": { 191 | "version": "3.6.0", 192 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 193 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 194 | "requires": { 195 | "inherits": "^2.0.3", 196 | "string_decoder": "^1.1.1", 197 | "util-deprecate": "^1.0.1" 198 | } 199 | } 200 | } 201 | }, 202 | "body-parser": { 203 | "version": "1.19.0", 204 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 205 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 206 | "requires": { 207 | "bytes": "3.1.0", 208 | "content-type": "~1.0.4", 209 | "debug": "2.6.9", 210 | "depd": "~1.1.2", 211 | "http-errors": "1.7.2", 212 | "iconv-lite": "0.4.24", 213 | "on-finished": "~2.3.0", 214 | "qs": "6.7.0", 215 | "raw-body": "2.4.0", 216 | "type-is": "~1.6.17" 217 | }, 218 | "dependencies": { 219 | "debug": { 220 | "version": "2.6.9", 221 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 222 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 223 | "requires": { 224 | "ms": "2.0.0" 225 | } 226 | }, 227 | "ms": { 228 | "version": "2.0.0", 229 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 230 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 231 | } 232 | } 233 | }, 234 | "brace-expansion": { 235 | "version": "1.1.11", 236 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 237 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 238 | "requires": { 239 | "balanced-match": "^1.0.0", 240 | "concat-map": "0.0.1" 241 | } 242 | }, 243 | "buffer-from": { 244 | "version": "1.1.1", 245 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 246 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 247 | }, 248 | "bytes": { 249 | "version": "3.1.0", 250 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 251 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 252 | }, 253 | "callback-stream": { 254 | "version": "1.1.0", 255 | "resolved": "https://registry.npmjs.org/callback-stream/-/callback-stream-1.1.0.tgz", 256 | "integrity": "sha1-RwGlEmbwbgbqpx/BcjOCLYdfSQg=", 257 | "requires": { 258 | "inherits": "^2.0.1", 259 | "readable-stream": "> 1.0.0 < 3.0.0" 260 | } 261 | }, 262 | "caseless": { 263 | "version": "0.12.0", 264 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 265 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 266 | }, 267 | "chownr": { 268 | "version": "1.1.3", 269 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", 270 | "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==" 271 | }, 272 | "code-point-at": { 273 | "version": "1.1.0", 274 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 275 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" 276 | }, 277 | "combined-stream": { 278 | "version": "1.0.8", 279 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 280 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 281 | "requires": { 282 | "delayed-stream": "~1.0.0" 283 | } 284 | }, 285 | "commist": { 286 | "version": "1.1.0", 287 | "resolved": "https://registry.npmjs.org/commist/-/commist-1.1.0.tgz", 288 | "integrity": "sha512-rraC8NXWOEjhADbZe9QBNzLAN5Q3fsTPQtBV+fEVj6xKIgDgNiEVE6ZNfHpZOqfQ21YUzfVNUXLOEZquYvQPPg==", 289 | "requires": { 290 | "leven": "^2.1.0", 291 | "minimist": "^1.1.0" 292 | } 293 | }, 294 | "concat-map": { 295 | "version": "0.0.1", 296 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 297 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 298 | }, 299 | "concat-stream": { 300 | "version": "1.6.2", 301 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", 302 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", 303 | "requires": { 304 | "buffer-from": "^1.0.0", 305 | "inherits": "^2.0.3", 306 | "readable-stream": "^2.2.2", 307 | "typedarray": "^0.0.6" 308 | } 309 | }, 310 | "console-control-strings": { 311 | "version": "1.1.0", 312 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 313 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 314 | }, 315 | "content-disposition": { 316 | "version": "0.5.3", 317 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 318 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 319 | "requires": { 320 | "safe-buffer": "5.1.2" 321 | } 322 | }, 323 | "content-type": { 324 | "version": "1.0.4", 325 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 326 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 327 | }, 328 | "cookie": { 329 | "version": "0.4.0", 330 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 331 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 332 | }, 333 | "cookie-signature": { 334 | "version": "1.0.6", 335 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 336 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 337 | }, 338 | "core-util-is": { 339 | "version": "1.0.2", 340 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 341 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 342 | }, 343 | "crc16": { 344 | "version": "1.0.1", 345 | "resolved": "https://registry.npmjs.org/crc16/-/crc16-1.0.1.tgz", 346 | "integrity": "sha512-BRTVv6YykdLm1a5tMtCRoUI8hFXW8UaAJ0wf+Ta3hP4/W5TouN2GVIRTzu6aRTLCYlFMebsMAUMc/KPf3VDqmg==" 347 | }, 348 | "d": { 349 | "version": "1.0.1", 350 | "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", 351 | "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", 352 | "requires": { 353 | "es5-ext": "^0.10.50", 354 | "type": "^1.0.1" 355 | } 356 | }, 357 | "dashdash": { 358 | "version": "1.14.1", 359 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 360 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 361 | "requires": { 362 | "assert-plus": "^1.0.0" 363 | } 364 | }, 365 | "debug": { 366 | "version": "4.1.1", 367 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 368 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 369 | "requires": { 370 | "ms": "^2.1.1" 371 | } 372 | }, 373 | "decompress-response": { 374 | "version": "4.2.1", 375 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", 376 | "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", 377 | "requires": { 378 | "mimic-response": "^2.0.0" 379 | } 380 | }, 381 | "deep-extend": { 382 | "version": "0.6.0", 383 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 384 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 385 | }, 386 | "delayed-stream": { 387 | "version": "1.0.0", 388 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 389 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 390 | }, 391 | "delegates": { 392 | "version": "1.0.0", 393 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 394 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 395 | }, 396 | "depd": { 397 | "version": "1.1.2", 398 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 399 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 400 | }, 401 | "destroy": { 402 | "version": "1.0.4", 403 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 404 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 405 | }, 406 | "detect-libc": { 407 | "version": "1.0.3", 408 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", 409 | "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" 410 | }, 411 | "duplexify": { 412 | "version": "3.7.1", 413 | "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", 414 | "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", 415 | "requires": { 416 | "end-of-stream": "^1.0.0", 417 | "inherits": "^2.0.1", 418 | "readable-stream": "^2.0.0", 419 | "stream-shift": "^1.0.0" 420 | } 421 | }, 422 | "ecc-jsbn": { 423 | "version": "0.1.2", 424 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 425 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 426 | "requires": { 427 | "jsbn": "~0.1.0", 428 | "safer-buffer": "^2.1.0" 429 | } 430 | }, 431 | "ee-first": { 432 | "version": "1.1.1", 433 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 434 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 435 | }, 436 | "encodeurl": { 437 | "version": "1.0.2", 438 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 439 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 440 | }, 441 | "end-of-stream": { 442 | "version": "1.4.4", 443 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 444 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 445 | "requires": { 446 | "once": "^1.4.0" 447 | } 448 | }, 449 | "es5-ext": { 450 | "version": "0.10.52", 451 | "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.52.tgz", 452 | "integrity": "sha512-bWCbE9fbpYQY4CU6hJbJ1vSz70EClMlDgJ7BmwI+zEJhxrwjesZRPglGJlsZhu0334U3hI+gaspwksH9IGD6ag==", 453 | "requires": { 454 | "es6-iterator": "~2.0.3", 455 | "es6-symbol": "~3.1.2", 456 | "next-tick": "~1.0.0" 457 | } 458 | }, 459 | "es6-iterator": { 460 | "version": "2.0.3", 461 | "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", 462 | "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", 463 | "requires": { 464 | "d": "1", 465 | "es5-ext": "^0.10.35", 466 | "es6-symbol": "^3.1.1" 467 | } 468 | }, 469 | "es6-map": { 470 | "version": "0.1.5", 471 | "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", 472 | "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", 473 | "requires": { 474 | "d": "1", 475 | "es5-ext": "~0.10.14", 476 | "es6-iterator": "~2.0.1", 477 | "es6-set": "~0.1.5", 478 | "es6-symbol": "~3.1.1", 479 | "event-emitter": "~0.3.5" 480 | } 481 | }, 482 | "es6-set": { 483 | "version": "0.1.5", 484 | "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", 485 | "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", 486 | "requires": { 487 | "d": "1", 488 | "es5-ext": "~0.10.14", 489 | "es6-iterator": "~2.0.1", 490 | "es6-symbol": "3.1.1", 491 | "event-emitter": "~0.3.5" 492 | }, 493 | "dependencies": { 494 | "es6-symbol": { 495 | "version": "3.1.1", 496 | "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", 497 | "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", 498 | "requires": { 499 | "d": "1", 500 | "es5-ext": "~0.10.14" 501 | } 502 | } 503 | } 504 | }, 505 | "es6-symbol": { 506 | "version": "3.1.3", 507 | "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", 508 | "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", 509 | "requires": { 510 | "d": "^1.0.1", 511 | "ext": "^1.1.2" 512 | } 513 | }, 514 | "escape-html": { 515 | "version": "1.0.3", 516 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 517 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 518 | }, 519 | "etag": { 520 | "version": "1.8.1", 521 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 522 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 523 | }, 524 | "event-emitter": { 525 | "version": "0.3.5", 526 | "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", 527 | "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", 528 | "requires": { 529 | "d": "1", 530 | "es5-ext": "~0.10.14" 531 | } 532 | }, 533 | "expand-template": { 534 | "version": "2.0.3", 535 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 536 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" 537 | }, 538 | "express": { 539 | "version": "4.17.1", 540 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 541 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 542 | "requires": { 543 | "accepts": "~1.3.7", 544 | "array-flatten": "1.1.1", 545 | "body-parser": "1.19.0", 546 | "content-disposition": "0.5.3", 547 | "content-type": "~1.0.4", 548 | "cookie": "0.4.0", 549 | "cookie-signature": "1.0.6", 550 | "debug": "2.6.9", 551 | "depd": "~1.1.2", 552 | "encodeurl": "~1.0.2", 553 | "escape-html": "~1.0.3", 554 | "etag": "~1.8.1", 555 | "finalhandler": "~1.1.2", 556 | "fresh": "0.5.2", 557 | "merge-descriptors": "1.0.1", 558 | "methods": "~1.1.2", 559 | "on-finished": "~2.3.0", 560 | "parseurl": "~1.3.3", 561 | "path-to-regexp": "0.1.7", 562 | "proxy-addr": "~2.0.5", 563 | "qs": "6.7.0", 564 | "range-parser": "~1.2.1", 565 | "safe-buffer": "5.1.2", 566 | "send": "0.17.1", 567 | "serve-static": "1.14.1", 568 | "setprototypeof": "1.1.1", 569 | "statuses": "~1.5.0", 570 | "type-is": "~1.6.18", 571 | "utils-merge": "1.0.1", 572 | "vary": "~1.1.2" 573 | }, 574 | "dependencies": { 575 | "debug": { 576 | "version": "2.6.9", 577 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 578 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 579 | "requires": { 580 | "ms": "2.0.0" 581 | } 582 | }, 583 | "ms": { 584 | "version": "2.0.0", 585 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 586 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 587 | } 588 | } 589 | }, 590 | "ext": { 591 | "version": "1.2.0", 592 | "resolved": "https://registry.npmjs.org/ext/-/ext-1.2.0.tgz", 593 | "integrity": "sha512-0ccUQK/9e3NreLFg6K6np8aPyRgwycx+oFGtfx1dSp7Wj00Ozw9r05FgBRlzjf2XBM7LAzwgLyDscRrtSU91hA==", 594 | "requires": { 595 | "type": "^2.0.0" 596 | }, 597 | "dependencies": { 598 | "type": { 599 | "version": "2.0.0", 600 | "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", 601 | "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" 602 | } 603 | } 604 | }, 605 | "extend": { 606 | "version": "3.0.2", 607 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 608 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 609 | }, 610 | "extsprintf": { 611 | "version": "1.3.0", 612 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 613 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 614 | }, 615 | "fast-deep-equal": { 616 | "version": "2.0.1", 617 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", 618 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" 619 | }, 620 | "fast-json-stable-stringify": { 621 | "version": "2.0.0", 622 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 623 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 624 | }, 625 | "file-uri-to-path": { 626 | "version": "1.0.0", 627 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 628 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 629 | }, 630 | "finalhandler": { 631 | "version": "1.1.2", 632 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 633 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 634 | "requires": { 635 | "debug": "2.6.9", 636 | "encodeurl": "~1.0.2", 637 | "escape-html": "~1.0.3", 638 | "on-finished": "~2.3.0", 639 | "parseurl": "~1.3.3", 640 | "statuses": "~1.5.0", 641 | "unpipe": "~1.0.0" 642 | }, 643 | "dependencies": { 644 | "debug": { 645 | "version": "2.6.9", 646 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 647 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 648 | "requires": { 649 | "ms": "2.0.0" 650 | } 651 | }, 652 | "ms": { 653 | "version": "2.0.0", 654 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 655 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 656 | } 657 | } 658 | }, 659 | "forever-agent": { 660 | "version": "0.6.1", 661 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 662 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 663 | }, 664 | "form-data": { 665 | "version": "2.3.3", 666 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 667 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 668 | "requires": { 669 | "asynckit": "^0.4.0", 670 | "combined-stream": "^1.0.6", 671 | "mime-types": "^2.1.12" 672 | } 673 | }, 674 | "forwarded": { 675 | "version": "0.1.2", 676 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 677 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 678 | }, 679 | "fresh": { 680 | "version": "0.5.2", 681 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 682 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 683 | }, 684 | "fs": { 685 | "version": "0.0.1-security", 686 | "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", 687 | "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" 688 | }, 689 | "fs-constants": { 690 | "version": "1.0.0", 691 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 692 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" 693 | }, 694 | "fs.realpath": { 695 | "version": "1.0.0", 696 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 697 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 698 | }, 699 | "gauge": { 700 | "version": "2.7.4", 701 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 702 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 703 | "requires": { 704 | "aproba": "^1.0.3", 705 | "console-control-strings": "^1.0.0", 706 | "has-unicode": "^2.0.0", 707 | "object-assign": "^4.1.0", 708 | "signal-exit": "^3.0.0", 709 | "string-width": "^1.0.1", 710 | "strip-ansi": "^3.0.1", 711 | "wide-align": "^1.1.0" 712 | } 713 | }, 714 | "getpass": { 715 | "version": "0.1.7", 716 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 717 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 718 | "requires": { 719 | "assert-plus": "^1.0.0" 720 | } 721 | }, 722 | "github-from-package": { 723 | "version": "0.0.0", 724 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 725 | "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" 726 | }, 727 | "glob": { 728 | "version": "7.1.6", 729 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 730 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 731 | "requires": { 732 | "fs.realpath": "^1.0.0", 733 | "inflight": "^1.0.4", 734 | "inherits": "2", 735 | "minimatch": "^3.0.4", 736 | "once": "^1.3.0", 737 | "path-is-absolute": "^1.0.0" 738 | } 739 | }, 740 | "glob-parent": { 741 | "version": "3.1.0", 742 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", 743 | "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", 744 | "requires": { 745 | "is-glob": "^3.1.0", 746 | "path-dirname": "^1.0.0" 747 | } 748 | }, 749 | "glob-stream": { 750 | "version": "6.1.0", 751 | "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", 752 | "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", 753 | "requires": { 754 | "extend": "^3.0.0", 755 | "glob": "^7.1.1", 756 | "glob-parent": "^3.1.0", 757 | "is-negated-glob": "^1.0.0", 758 | "ordered-read-streams": "^1.0.0", 759 | "pumpify": "^1.3.5", 760 | "readable-stream": "^2.1.5", 761 | "remove-trailing-separator": "^1.0.1", 762 | "to-absolute-glob": "^2.0.0", 763 | "unique-stream": "^2.0.2" 764 | } 765 | }, 766 | "har-schema": { 767 | "version": "2.0.0", 768 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 769 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 770 | }, 771 | "har-validator": { 772 | "version": "5.1.3", 773 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", 774 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", 775 | "requires": { 776 | "ajv": "^6.5.5", 777 | "har-schema": "^2.0.0" 778 | } 779 | }, 780 | "has-unicode": { 781 | "version": "2.0.1", 782 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 783 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 784 | }, 785 | "help-me": { 786 | "version": "1.1.0", 787 | "resolved": "https://registry.npmjs.org/help-me/-/help-me-1.1.0.tgz", 788 | "integrity": "sha1-jy1QjQYAtKRW2i8IZVbn5cBWo8Y=", 789 | "requires": { 790 | "callback-stream": "^1.0.2", 791 | "glob-stream": "^6.1.0", 792 | "through2": "^2.0.1", 793 | "xtend": "^4.0.0" 794 | } 795 | }, 796 | "http-errors": { 797 | "version": "1.7.2", 798 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 799 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 800 | "requires": { 801 | "depd": "~1.1.2", 802 | "inherits": "2.0.3", 803 | "setprototypeof": "1.1.1", 804 | "statuses": ">= 1.5.0 < 2", 805 | "toidentifier": "1.0.0" 806 | }, 807 | "dependencies": { 808 | "inherits": { 809 | "version": "2.0.3", 810 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 811 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 812 | } 813 | } 814 | }, 815 | "http-signature": { 816 | "version": "1.2.0", 817 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 818 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 819 | "requires": { 820 | "assert-plus": "^1.0.0", 821 | "jsprim": "^1.2.2", 822 | "sshpk": "^1.7.0" 823 | } 824 | }, 825 | "iconv-lite": { 826 | "version": "0.4.24", 827 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 828 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 829 | "requires": { 830 | "safer-buffer": ">= 2.1.2 < 3" 831 | } 832 | }, 833 | "inflight": { 834 | "version": "1.0.6", 835 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 836 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 837 | "requires": { 838 | "once": "^1.3.0", 839 | "wrappy": "1" 840 | } 841 | }, 842 | "influx": { 843 | "version": "5.5.0", 844 | "resolved": "https://registry.npmjs.org/influx/-/influx-5.5.0.tgz", 845 | "integrity": "sha512-L8WXFyc+hRbOfgf/lXCyACRyHOm9o3I9eCjdHlezi2I2pQqEMB6cRsoGER1XJsYa2hcOzYNUv80NXPzVgTBkSg==" 846 | }, 847 | "inherits": { 848 | "version": "2.0.4", 849 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 850 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 851 | }, 852 | "ini": { 853 | "version": "1.3.8", 854 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 855 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" 856 | }, 857 | "ipaddr.js": { 858 | "version": "1.9.0", 859 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", 860 | "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" 861 | }, 862 | "is-absolute": { 863 | "version": "1.0.0", 864 | "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", 865 | "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", 866 | "requires": { 867 | "is-relative": "^1.0.0", 868 | "is-windows": "^1.0.1" 869 | } 870 | }, 871 | "is-extglob": { 872 | "version": "2.1.1", 873 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 874 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 875 | }, 876 | "is-fullwidth-code-point": { 877 | "version": "1.0.0", 878 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 879 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 880 | "requires": { 881 | "number-is-nan": "^1.0.0" 882 | } 883 | }, 884 | "is-glob": { 885 | "version": "3.1.0", 886 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", 887 | "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", 888 | "requires": { 889 | "is-extglob": "^2.1.0" 890 | } 891 | }, 892 | "is-negated-glob": { 893 | "version": "1.0.0", 894 | "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", 895 | "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" 896 | }, 897 | "is-relative": { 898 | "version": "1.0.0", 899 | "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", 900 | "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", 901 | "requires": { 902 | "is-unc-path": "^1.0.0" 903 | } 904 | }, 905 | "is-typedarray": { 906 | "version": "1.0.0", 907 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 908 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 909 | }, 910 | "is-unc-path": { 911 | "version": "1.0.0", 912 | "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", 913 | "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", 914 | "requires": { 915 | "unc-path-regex": "^0.1.2" 916 | } 917 | }, 918 | "is-windows": { 919 | "version": "1.0.2", 920 | "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", 921 | "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" 922 | }, 923 | "isarray": { 924 | "version": "1.0.0", 925 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 926 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 927 | }, 928 | "isstream": { 929 | "version": "0.1.2", 930 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 931 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 932 | }, 933 | "jsbn": { 934 | "version": "0.1.1", 935 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 936 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 937 | }, 938 | "json-schema": { 939 | "version": "0.2.3", 940 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 941 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 942 | }, 943 | "json-schema-traverse": { 944 | "version": "0.4.1", 945 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 946 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 947 | }, 948 | "json-stable-stringify-without-jsonify": { 949 | "version": "1.0.1", 950 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 951 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" 952 | }, 953 | "json-stringify-safe": { 954 | "version": "5.0.1", 955 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 956 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 957 | }, 958 | "jsprim": { 959 | "version": "1.4.1", 960 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 961 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 962 | "requires": { 963 | "assert-plus": "1.0.0", 964 | "extsprintf": "1.3.0", 965 | "json-schema": "0.2.3", 966 | "verror": "1.10.0" 967 | } 968 | }, 969 | "leven": { 970 | "version": "2.1.0", 971 | "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", 972 | "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" 973 | }, 974 | "media-typer": { 975 | "version": "0.3.0", 976 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 977 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 978 | }, 979 | "merge-descriptors": { 980 | "version": "1.0.1", 981 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 982 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 983 | }, 984 | "methods": { 985 | "version": "1.1.2", 986 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 987 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 988 | }, 989 | "mime": { 990 | "version": "1.6.0", 991 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 992 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 993 | }, 994 | "mime-db": { 995 | "version": "1.42.0", 996 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", 997 | "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==" 998 | }, 999 | "mime-types": { 1000 | "version": "2.1.25", 1001 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", 1002 | "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", 1003 | "requires": { 1004 | "mime-db": "1.42.0" 1005 | } 1006 | }, 1007 | "mimic-response": { 1008 | "version": "2.0.0", 1009 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.0.0.tgz", 1010 | "integrity": "sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ==" 1011 | }, 1012 | "minimatch": { 1013 | "version": "3.0.4", 1014 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1015 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1016 | "requires": { 1017 | "brace-expansion": "^1.1.7" 1018 | } 1019 | }, 1020 | "minimist": { 1021 | "version": "1.2.0", 1022 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", 1023 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" 1024 | }, 1025 | "mkdirp": { 1026 | "version": "0.5.1", 1027 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 1028 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 1029 | "requires": { 1030 | "minimist": "0.0.8" 1031 | }, 1032 | "dependencies": { 1033 | "minimist": { 1034 | "version": "0.0.8", 1035 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 1036 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" 1037 | } 1038 | } 1039 | }, 1040 | "moment": { 1041 | "version": "2.24.0", 1042 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", 1043 | "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" 1044 | }, 1045 | "mqtt": { 1046 | "version": "3.0.0", 1047 | "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-3.0.0.tgz", 1048 | "integrity": "sha512-0nKV6MAc1ibKZwaZQUTb3iIdT4NVpj541BsYrqrGBcQdQ7Jd0MnZD1/6/nj1UFdGTboK9ZEUXvkCu2nPCugHFA==", 1049 | "requires": { 1050 | "base64-js": "^1.3.0", 1051 | "commist": "^1.0.0", 1052 | "concat-stream": "^1.6.2", 1053 | "end-of-stream": "^1.4.1", 1054 | "es6-map": "^0.1.5", 1055 | "help-me": "^1.0.1", 1056 | "inherits": "^2.0.3", 1057 | "minimist": "^1.2.0", 1058 | "mqtt-packet": "^6.0.0", 1059 | "pump": "^3.0.0", 1060 | "readable-stream": "^2.3.6", 1061 | "reinterval": "^1.1.0", 1062 | "split2": "^3.1.0", 1063 | "websocket-stream": "^5.1.2", 1064 | "xtend": "^4.0.1" 1065 | } 1066 | }, 1067 | "mqtt-packet": { 1068 | "version": "6.2.1", 1069 | "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-6.2.1.tgz", 1070 | "integrity": "sha512-ZxG5QVb7+gMix5n4DClym9dQoCZC6DoNEqgMkMi/GMXvIU4Wsdx+/6KBavw50HHFH9kN1lBSY7phxNlAS2+jnw==", 1071 | "requires": { 1072 | "bl": "^1.2.2", 1073 | "inherits": "^2.0.3", 1074 | "process-nextick-args": "^2.0.0", 1075 | "safe-buffer": "^5.1.2" 1076 | }, 1077 | "dependencies": { 1078 | "bl": { 1079 | "version": "1.2.2", 1080 | "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", 1081 | "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", 1082 | "requires": { 1083 | "readable-stream": "^2.3.5", 1084 | "safe-buffer": "^5.1.1" 1085 | } 1086 | } 1087 | } 1088 | }, 1089 | "ms": { 1090 | "version": "2.1.2", 1091 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1092 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1093 | }, 1094 | "nan": { 1095 | "version": "2.14.0", 1096 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", 1097 | "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" 1098 | }, 1099 | "napi-build-utils": { 1100 | "version": "1.0.1", 1101 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", 1102 | "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==" 1103 | }, 1104 | "negotiator": { 1105 | "version": "0.6.2", 1106 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 1107 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 1108 | }, 1109 | "next-tick": { 1110 | "version": "1.0.0", 1111 | "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", 1112 | "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" 1113 | }, 1114 | "node-abi": { 1115 | "version": "2.12.0", 1116 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.12.0.tgz", 1117 | "integrity": "sha512-VhPBXCIcvmo/5K8HPmnWJyyhvgKxnHTUMXR/XwGHV68+wrgkzST4UmQrY/XszSWA5dtnXpNp528zkcyJ/pzVcw==", 1118 | "requires": { 1119 | "semver": "^5.4.1" 1120 | } 1121 | }, 1122 | "noop-logger": { 1123 | "version": "0.1.1", 1124 | "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", 1125 | "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" 1126 | }, 1127 | "npmdatelog": { 1128 | "version": "0.0.2", 1129 | "resolved": "https://registry.npmjs.org/npmdatelog/-/npmdatelog-0.0.2.tgz", 1130 | "integrity": "sha1-OrtRwnsvpUphebhSyinwGxMWvuM=", 1131 | "requires": { 1132 | "extend": ">=2.0.0", 1133 | "moment": ">=2.8.4", 1134 | "npmlog": ">=0.1.1" 1135 | } 1136 | }, 1137 | "npmlog": { 1138 | "version": "4.1.2", 1139 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 1140 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 1141 | "requires": { 1142 | "are-we-there-yet": "~1.1.2", 1143 | "console-control-strings": "~1.1.0", 1144 | "gauge": "~2.7.3", 1145 | "set-blocking": "~2.0.0" 1146 | } 1147 | }, 1148 | "number-is-nan": { 1149 | "version": "1.0.1", 1150 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 1151 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 1152 | }, 1153 | "oauth-sign": { 1154 | "version": "0.9.0", 1155 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 1156 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 1157 | }, 1158 | "object-assign": { 1159 | "version": "4.1.1", 1160 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1161 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 1162 | }, 1163 | "on-finished": { 1164 | "version": "2.3.0", 1165 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 1166 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 1167 | "requires": { 1168 | "ee-first": "1.1.1" 1169 | } 1170 | }, 1171 | "once": { 1172 | "version": "1.4.0", 1173 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1174 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1175 | "requires": { 1176 | "wrappy": "1" 1177 | } 1178 | }, 1179 | "ordered-read-streams": { 1180 | "version": "1.0.1", 1181 | "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", 1182 | "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", 1183 | "requires": { 1184 | "readable-stream": "^2.0.1" 1185 | } 1186 | }, 1187 | "parseurl": { 1188 | "version": "1.3.3", 1189 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1190 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 1191 | }, 1192 | "path-dirname": { 1193 | "version": "1.0.2", 1194 | "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", 1195 | "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" 1196 | }, 1197 | "path-is-absolute": { 1198 | "version": "1.0.1", 1199 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1200 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 1201 | }, 1202 | "path-to-regexp": { 1203 | "version": "0.1.7", 1204 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1205 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 1206 | }, 1207 | "performance-now": { 1208 | "version": "2.1.0", 1209 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1210 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 1211 | }, 1212 | "prebuild-install": { 1213 | "version": "5.3.3", 1214 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", 1215 | "integrity": "sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g==", 1216 | "requires": { 1217 | "detect-libc": "^1.0.3", 1218 | "expand-template": "^2.0.3", 1219 | "github-from-package": "0.0.0", 1220 | "minimist": "^1.2.0", 1221 | "mkdirp": "^0.5.1", 1222 | "napi-build-utils": "^1.0.1", 1223 | "node-abi": "^2.7.0", 1224 | "noop-logger": "^0.1.1", 1225 | "npmlog": "^4.0.1", 1226 | "pump": "^3.0.0", 1227 | "rc": "^1.2.7", 1228 | "simple-get": "^3.0.3", 1229 | "tar-fs": "^2.0.0", 1230 | "tunnel-agent": "^0.6.0", 1231 | "which-pm-runs": "^1.0.0" 1232 | } 1233 | }, 1234 | "process-nextick-args": { 1235 | "version": "2.0.1", 1236 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1237 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 1238 | }, 1239 | "proxy-addr": { 1240 | "version": "2.0.5", 1241 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", 1242 | "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", 1243 | "requires": { 1244 | "forwarded": "~0.1.2", 1245 | "ipaddr.js": "1.9.0" 1246 | } 1247 | }, 1248 | "psl": { 1249 | "version": "1.4.0", 1250 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", 1251 | "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==" 1252 | }, 1253 | "pump": { 1254 | "version": "3.0.0", 1255 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 1256 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 1257 | "requires": { 1258 | "end-of-stream": "^1.1.0", 1259 | "once": "^1.3.1" 1260 | } 1261 | }, 1262 | "pumpify": { 1263 | "version": "1.5.1", 1264 | "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", 1265 | "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", 1266 | "requires": { 1267 | "duplexify": "^3.6.0", 1268 | "inherits": "^2.0.3", 1269 | "pump": "^2.0.0" 1270 | }, 1271 | "dependencies": { 1272 | "pump": { 1273 | "version": "2.0.1", 1274 | "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", 1275 | "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", 1276 | "requires": { 1277 | "end-of-stream": "^1.1.0", 1278 | "once": "^1.3.1" 1279 | } 1280 | } 1281 | } 1282 | }, 1283 | "punycode": { 1284 | "version": "2.1.1", 1285 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1286 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 1287 | }, 1288 | "qs": { 1289 | "version": "6.7.0", 1290 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 1291 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 1292 | }, 1293 | "range-parser": { 1294 | "version": "1.2.1", 1295 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1296 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 1297 | }, 1298 | "raw-body": { 1299 | "version": "2.4.0", 1300 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 1301 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 1302 | "requires": { 1303 | "bytes": "3.1.0", 1304 | "http-errors": "1.7.2", 1305 | "iconv-lite": "0.4.24", 1306 | "unpipe": "1.0.0" 1307 | } 1308 | }, 1309 | "rc": { 1310 | "version": "1.2.8", 1311 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 1312 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 1313 | "requires": { 1314 | "deep-extend": "^0.6.0", 1315 | "ini": "~1.3.0", 1316 | "minimist": "^1.2.0", 1317 | "strip-json-comments": "~2.0.1" 1318 | } 1319 | }, 1320 | "readable-stream": { 1321 | "version": "2.3.6", 1322 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 1323 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 1324 | "requires": { 1325 | "core-util-is": "~1.0.0", 1326 | "inherits": "~2.0.3", 1327 | "isarray": "~1.0.0", 1328 | "process-nextick-args": "~2.0.0", 1329 | "safe-buffer": "~5.1.1", 1330 | "string_decoder": "~1.1.1", 1331 | "util-deprecate": "~1.0.1" 1332 | } 1333 | }, 1334 | "reinterval": { 1335 | "version": "1.1.0", 1336 | "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", 1337 | "integrity": "sha1-M2Hs+jymwYKDOA3Qu5VG85D17Oc=" 1338 | }, 1339 | "remove-trailing-separator": { 1340 | "version": "1.1.0", 1341 | "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", 1342 | "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" 1343 | }, 1344 | "request": { 1345 | "version": "2.88.0", 1346 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", 1347 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", 1348 | "requires": { 1349 | "aws-sign2": "~0.7.0", 1350 | "aws4": "^1.8.0", 1351 | "caseless": "~0.12.0", 1352 | "combined-stream": "~1.0.6", 1353 | "extend": "~3.0.2", 1354 | "forever-agent": "~0.6.1", 1355 | "form-data": "~2.3.2", 1356 | "har-validator": "~5.1.0", 1357 | "http-signature": "~1.2.0", 1358 | "is-typedarray": "~1.0.0", 1359 | "isstream": "~0.1.2", 1360 | "json-stringify-safe": "~5.0.1", 1361 | "mime-types": "~2.1.19", 1362 | "oauth-sign": "~0.9.0", 1363 | "performance-now": "^2.1.0", 1364 | "qs": "~6.5.2", 1365 | "safe-buffer": "^5.1.2", 1366 | "tough-cookie": "~2.4.3", 1367 | "tunnel-agent": "^0.6.0", 1368 | "uuid": "^3.3.2" 1369 | }, 1370 | "dependencies": { 1371 | "qs": { 1372 | "version": "6.5.2", 1373 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 1374 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 1375 | } 1376 | } 1377 | }, 1378 | "safe-buffer": { 1379 | "version": "5.1.2", 1380 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1381 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1382 | }, 1383 | "safer-buffer": { 1384 | "version": "2.1.2", 1385 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1386 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1387 | }, 1388 | "semver": { 1389 | "version": "5.7.1", 1390 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1391 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 1392 | }, 1393 | "send": { 1394 | "version": "0.17.1", 1395 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 1396 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 1397 | "requires": { 1398 | "debug": "2.6.9", 1399 | "depd": "~1.1.2", 1400 | "destroy": "~1.0.4", 1401 | "encodeurl": "~1.0.2", 1402 | "escape-html": "~1.0.3", 1403 | "etag": "~1.8.1", 1404 | "fresh": "0.5.2", 1405 | "http-errors": "~1.7.2", 1406 | "mime": "1.6.0", 1407 | "ms": "2.1.1", 1408 | "on-finished": "~2.3.0", 1409 | "range-parser": "~1.2.1", 1410 | "statuses": "~1.5.0" 1411 | }, 1412 | "dependencies": { 1413 | "debug": { 1414 | "version": "2.6.9", 1415 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1416 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 1417 | "requires": { 1418 | "ms": "2.0.0" 1419 | }, 1420 | "dependencies": { 1421 | "ms": { 1422 | "version": "2.0.0", 1423 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1424 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1425 | } 1426 | } 1427 | }, 1428 | "ms": { 1429 | "version": "2.1.1", 1430 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 1431 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 1432 | } 1433 | } 1434 | }, 1435 | "serialport": { 1436 | "version": "7.1.4", 1437 | "resolved": "https://registry.npmjs.org/serialport/-/serialport-7.1.4.tgz", 1438 | "integrity": "sha512-noYd5lfK5MZfyiuCx4o/3s/iaS076HaWDjmhsGJSfdNCGnxfVfDKQBK6xmXbtSlaJAwV7BPU12p844OTzHoA+Q==", 1439 | "requires": { 1440 | "@serialport/binding-mock": "^2.0.4", 1441 | "@serialport/bindings": "^2.0.7", 1442 | "@serialport/parser-byte-length": "^2.0.2", 1443 | "@serialport/parser-cctalk": "^2.0.2", 1444 | "@serialport/parser-delimiter": "^2.0.2", 1445 | "@serialport/parser-readline": "^2.0.2", 1446 | "@serialport/parser-ready": "^2.0.2", 1447 | "@serialport/parser-regex": "^2.0.2", 1448 | "@serialport/stream": "^2.0.4", 1449 | "debug": "^4.1.0" 1450 | } 1451 | }, 1452 | "serve-static": { 1453 | "version": "1.14.1", 1454 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 1455 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 1456 | "requires": { 1457 | "encodeurl": "~1.0.2", 1458 | "escape-html": "~1.0.3", 1459 | "parseurl": "~1.3.3", 1460 | "send": "0.17.1" 1461 | } 1462 | }, 1463 | "set-blocking": { 1464 | "version": "2.0.0", 1465 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1466 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 1467 | }, 1468 | "setprototypeof": { 1469 | "version": "1.1.1", 1470 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 1471 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 1472 | }, 1473 | "signal-exit": { 1474 | "version": "3.0.2", 1475 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 1476 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" 1477 | }, 1478 | "simple-concat": { 1479 | "version": "1.0.0", 1480 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", 1481 | "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" 1482 | }, 1483 | "simple-get": { 1484 | "version": "3.1.0", 1485 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", 1486 | "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", 1487 | "requires": { 1488 | "decompress-response": "^4.2.0", 1489 | "once": "^1.3.1", 1490 | "simple-concat": "^1.0.0" 1491 | } 1492 | }, 1493 | "solar-sis": { 1494 | "version": "1.0.10", 1495 | "resolved": "https://registry.npmjs.org/solar-sis/-/solar-sis-1.0.10.tgz", 1496 | "integrity": "sha512-lpz+6ksTkhyERVlRnckQ687vJTvIuso80ZpAsyD60K7zSA3xR5c5s5ROY8KhoHqC/58xeZNOO/JYsEiPi1d1cw==", 1497 | "requires": { 1498 | "@serialport/parser-readline": "^8.0.4", 1499 | "crc16": "^1.0.1", 1500 | "express": "^4.17.1", 1501 | "fs": "^0.0.1-security", 1502 | "influx": "^5.5.0", 1503 | "mqtt": "^3.0.0", 1504 | "npmdatelog": "^0.0.2", 1505 | "request": "^2.88.0", 1506 | "serialport": "7.1.4" 1507 | }, 1508 | "dependencies": { 1509 | "@serialport/parser-delimiter": { 1510 | "version": "8.0.4", 1511 | "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-8.0.4.tgz", 1512 | "integrity": "sha512-4XkOQD2uj7jj4q4CltAM74Rk3HNwCk8pqrgvfAtouA3Pmt0AdrC/n9OrpRY13ioZwv+Yjc54HWU2z9VOOGn45Q==" 1513 | }, 1514 | "@serialport/parser-readline": { 1515 | "version": "8.0.4", 1516 | "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-8.0.4.tgz", 1517 | "integrity": "sha512-STs0WnGKLBwlXbG3CnTiI+kuWxmHBzwcslrWA2su9G5pPYQJpKGCHs2URLDDhYKmGZtzTftCJXEXABpsTXfNxQ==", 1518 | "requires": { 1519 | "@serialport/parser-delimiter": "^8.0.4" 1520 | } 1521 | } 1522 | } 1523 | }, 1524 | "split2": { 1525 | "version": "3.1.1", 1526 | "resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz", 1527 | "integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==", 1528 | "requires": { 1529 | "readable-stream": "^3.0.0" 1530 | }, 1531 | "dependencies": { 1532 | "readable-stream": { 1533 | "version": "3.4.0", 1534 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", 1535 | "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", 1536 | "requires": { 1537 | "inherits": "^2.0.3", 1538 | "string_decoder": "^1.1.1", 1539 | "util-deprecate": "^1.0.1" 1540 | } 1541 | } 1542 | } 1543 | }, 1544 | "sshpk": { 1545 | "version": "1.16.1", 1546 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 1547 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", 1548 | "requires": { 1549 | "asn1": "~0.2.3", 1550 | "assert-plus": "^1.0.0", 1551 | "bcrypt-pbkdf": "^1.0.0", 1552 | "dashdash": "^1.12.0", 1553 | "ecc-jsbn": "~0.1.1", 1554 | "getpass": "^0.1.1", 1555 | "jsbn": "~0.1.0", 1556 | "safer-buffer": "^2.0.2", 1557 | "tweetnacl": "~0.14.0" 1558 | } 1559 | }, 1560 | "statuses": { 1561 | "version": "1.5.0", 1562 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1563 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 1564 | }, 1565 | "stream-shift": { 1566 | "version": "1.0.0", 1567 | "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", 1568 | "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" 1569 | }, 1570 | "string-width": { 1571 | "version": "1.0.2", 1572 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 1573 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 1574 | "requires": { 1575 | "code-point-at": "^1.0.0", 1576 | "is-fullwidth-code-point": "^1.0.0", 1577 | "strip-ansi": "^3.0.0" 1578 | } 1579 | }, 1580 | "string_decoder": { 1581 | "version": "1.1.1", 1582 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1583 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1584 | "requires": { 1585 | "safe-buffer": "~5.1.0" 1586 | } 1587 | }, 1588 | "strip-ansi": { 1589 | "version": "3.0.1", 1590 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1591 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1592 | "requires": { 1593 | "ansi-regex": "^2.0.0" 1594 | } 1595 | }, 1596 | "strip-json-comments": { 1597 | "version": "2.0.1", 1598 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1599 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 1600 | }, 1601 | "tar-fs": { 1602 | "version": "2.0.0", 1603 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", 1604 | "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", 1605 | "requires": { 1606 | "chownr": "^1.1.1", 1607 | "mkdirp": "^0.5.1", 1608 | "pump": "^3.0.0", 1609 | "tar-stream": "^2.0.0" 1610 | } 1611 | }, 1612 | "tar-stream": { 1613 | "version": "2.1.0", 1614 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.0.tgz", 1615 | "integrity": "sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw==", 1616 | "requires": { 1617 | "bl": "^3.0.0", 1618 | "end-of-stream": "^1.4.1", 1619 | "fs-constants": "^1.0.0", 1620 | "inherits": "^2.0.3", 1621 | "readable-stream": "^3.1.1" 1622 | }, 1623 | "dependencies": { 1624 | "readable-stream": { 1625 | "version": "3.4.0", 1626 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", 1627 | "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", 1628 | "requires": { 1629 | "inherits": "^2.0.3", 1630 | "string_decoder": "^1.1.1", 1631 | "util-deprecate": "^1.0.1" 1632 | } 1633 | } 1634 | } 1635 | }, 1636 | "through2": { 1637 | "version": "2.0.5", 1638 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", 1639 | "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", 1640 | "requires": { 1641 | "readable-stream": "~2.3.6", 1642 | "xtend": "~4.0.1" 1643 | } 1644 | }, 1645 | "through2-filter": { 1646 | "version": "3.0.0", 1647 | "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", 1648 | "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", 1649 | "requires": { 1650 | "through2": "~2.0.0", 1651 | "xtend": "~4.0.0" 1652 | } 1653 | }, 1654 | "to-absolute-glob": { 1655 | "version": "2.0.2", 1656 | "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", 1657 | "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", 1658 | "requires": { 1659 | "is-absolute": "^1.0.0", 1660 | "is-negated-glob": "^1.0.0" 1661 | } 1662 | }, 1663 | "toidentifier": { 1664 | "version": "1.0.0", 1665 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 1666 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 1667 | }, 1668 | "tough-cookie": { 1669 | "version": "2.4.3", 1670 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", 1671 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", 1672 | "requires": { 1673 | "psl": "^1.1.24", 1674 | "punycode": "^1.4.1" 1675 | }, 1676 | "dependencies": { 1677 | "punycode": { 1678 | "version": "1.4.1", 1679 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 1680 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 1681 | } 1682 | } 1683 | }, 1684 | "tunnel-agent": { 1685 | "version": "0.6.0", 1686 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1687 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1688 | "requires": { 1689 | "safe-buffer": "^5.0.1" 1690 | } 1691 | }, 1692 | "tweetnacl": { 1693 | "version": "0.14.5", 1694 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1695 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 1696 | }, 1697 | "type": { 1698 | "version": "1.2.0", 1699 | "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", 1700 | "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" 1701 | }, 1702 | "type-is": { 1703 | "version": "1.6.18", 1704 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1705 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1706 | "requires": { 1707 | "media-typer": "0.3.0", 1708 | "mime-types": "~2.1.24" 1709 | } 1710 | }, 1711 | "typedarray": { 1712 | "version": "0.0.6", 1713 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 1714 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" 1715 | }, 1716 | "ultron": { 1717 | "version": "1.1.1", 1718 | "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", 1719 | "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" 1720 | }, 1721 | "unc-path-regex": { 1722 | "version": "0.1.2", 1723 | "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", 1724 | "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" 1725 | }, 1726 | "unique-stream": { 1727 | "version": "2.3.1", 1728 | "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", 1729 | "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", 1730 | "requires": { 1731 | "json-stable-stringify-without-jsonify": "^1.0.1", 1732 | "through2-filter": "^3.0.0" 1733 | } 1734 | }, 1735 | "unpipe": { 1736 | "version": "1.0.0", 1737 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1738 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1739 | }, 1740 | "uri-js": { 1741 | "version": "4.2.2", 1742 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 1743 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 1744 | "requires": { 1745 | "punycode": "^2.1.0" 1746 | } 1747 | }, 1748 | "util-deprecate": { 1749 | "version": "1.0.2", 1750 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1751 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1752 | }, 1753 | "utils-merge": { 1754 | "version": "1.0.1", 1755 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1756 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1757 | }, 1758 | "uuid": { 1759 | "version": "3.3.3", 1760 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", 1761 | "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" 1762 | }, 1763 | "vary": { 1764 | "version": "1.1.2", 1765 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1766 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1767 | }, 1768 | "verror": { 1769 | "version": "1.10.0", 1770 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1771 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1772 | "requires": { 1773 | "assert-plus": "^1.0.0", 1774 | "core-util-is": "1.0.2", 1775 | "extsprintf": "^1.2.0" 1776 | } 1777 | }, 1778 | "websocket-stream": { 1779 | "version": "5.5.0", 1780 | "resolved": "https://registry.npmjs.org/websocket-stream/-/websocket-stream-5.5.0.tgz", 1781 | "integrity": "sha512-EXy/zXb9kNHI07TIMz1oIUIrPZxQRA8aeJ5XYg5ihV8K4kD1DuA+FY6R96HfdIHzlSzS8HiISAfrm+vVQkZBug==", 1782 | "requires": { 1783 | "duplexify": "^3.5.1", 1784 | "inherits": "^2.0.1", 1785 | "readable-stream": "^2.3.3", 1786 | "safe-buffer": "^5.1.2", 1787 | "ws": "^3.2.0", 1788 | "xtend": "^4.0.0" 1789 | } 1790 | }, 1791 | "which-pm-runs": { 1792 | "version": "1.0.0", 1793 | "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", 1794 | "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" 1795 | }, 1796 | "wide-align": { 1797 | "version": "1.1.3", 1798 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 1799 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 1800 | "requires": { 1801 | "string-width": "^1.0.2 || 2" 1802 | } 1803 | }, 1804 | "wrappy": { 1805 | "version": "1.0.2", 1806 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1807 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1808 | }, 1809 | "ws": { 1810 | "version": "3.3.3", 1811 | "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", 1812 | "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", 1813 | "requires": { 1814 | "async-limiter": "~1.0.0", 1815 | "safe-buffer": "~5.1.0", 1816 | "ultron": "~1.1.0" 1817 | } 1818 | }, 1819 | "xtend": { 1820 | "version": "4.0.2", 1821 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 1822 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" 1823 | } 1824 | } 1825 | } 1826 | -------------------------------------------------------------------------------- /example/DUALPIP4048/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_pip", 3 | "version": "1.0.1", 4 | "dependencies": { 5 | "solar-sis": "latest", 6 | "serialport": "7.1.4" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/DUALPIP4048/pip.service: -------------------------------------------------------------------------------- 1 | # copy this file to /lib/systemd/system/ 2 | 3 | [Unit] 4 | Description=PIP4048 Paralel Poller 5 | After=network-online.target 6 | 7 | [Service] 8 | Restart=on-failure 9 | WorkingDirectory=/home/pi/solar-sis/example/DUALPIP4048 10 | ExecStart=/usr/bin/node /home/pi/solar-sis/example/DUALPIP4048/project.js 11 | 12 | [Install] 13 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /example/DUALPIP4048/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //var mpi = require("solar-sis"); work around for NPM not updated to same as Git 4 | var mpi = require("../../index"); 5 | 6 | var mqtt = require('mqtt') 7 | var client = mqtt.connect('mqtt://localhost') 8 | 9 | function MyMpiCallbacks () { 10 | var fr = 0; 11 | var fs = 0; 12 | var ft = 0; 13 | 14 | this.power_status = function (qc, data, arr, json, influx) { 15 | //console.log("mpi_power: influx : " + influx); 16 | //mpi.SendDataToInflux('mpi_power ' + influx); 17 | 18 | client.publish('solar/mpi', (Number(arr[0]) + Number(arr[1])).toString()); 19 | } 20 | 21 | this.feeding_grid_power_calibration = function (qc, data, arr) { 22 | //console.log("feeding_grid_power_calibration: " + data); 23 | //console.log("feeding_grid_power_calibration: arr: " + arr); 24 | 25 | fr = arr[3]; 26 | fs = arr[5]; 27 | ft = arr[7]; 28 | 29 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 30 | 31 | if (data) { 32 | mpi.SendDataToInflux('mpi_calibration fas_r=' + fr + ',fas_s=' + fs + ',fas_t=' + ft); 33 | } 34 | } 35 | 36 | this.before_f1 = function (values) { 37 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 38 | 39 | var watt = values.w; 40 | var fase = values.f; 41 | 42 | if (values.a == 1) { 43 | if (fase == 'R') { watt = Number(fr) + Number(watt);} 44 | if (fase == 'S') { watt = Number(fs) + Number(watt);} 45 | if (fase == 'T') { watt = Number(ft) + Number(watt);} 46 | } 47 | 48 | console.log('watt: ' + watt + ' fase:' + fase); 49 | 50 | return ({"fase" : fase + "ADJ1", "watt" : watt}); 51 | } 52 | 53 | this.callback_f1 = function (qc, data, arr) { 54 | myMpi.SendQuickCommand("feeding_grid_power_calibration"); 55 | } 56 | } 57 | 58 | var myMpi = new mpi.mpi(); 59 | var callbacks = new MyMpiCallbacks(); 60 | myMpi.init(callbacks); 61 | -------------------------------------------------------------------------------- /example/DUALPIP4048/readme.md: -------------------------------------------------------------------------------- 1 | Port for 2x PIP4048 2015 in PAR 2 | by CyberTza 3 | -------------------------------------------------------------------------------- /example/DUALPIP4048/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/ttyUSB0", 3 | "serial_baudrate": 2400, 4 | "serial_queue_delay": 200, 5 | "serial_parsers_readline": "\r", 6 | "serial_restart_threshold": 5000, 7 | "serial_clear_command_queue_on_restart": true, 8 | "http_port": 3001, 9 | "influx_device": "pip", 10 | "influx_pre": "solar", 11 | "influxUrl": "http://172.16.103.9:8086/write?db=powerwall&precision=s", 12 | "IntervalCommands": [ 13 | { 14 | "name": "general_status0", 15 | "config": "query_config", 16 | "command": "query/general_status0", 17 | "interval": 3000, 18 | "max": 0, 19 | "influx": true 20 | }, 21 | { 22 | "name": "general_status1", 23 | "config": "query_config", 24 | "command": "query/general_status1", 25 | "interval": 3000, 26 | "max": 0, 27 | "influx": true 28 | }, 29 | { 30 | "name": "device_rated_information", 31 | "config": "query_config", 32 | "command": "query/device_rated_information", 33 | "interval": 4000, 34 | "max": 0, 35 | "influx": true 36 | } 37 | ], 38 | "QuickCommands": { 39 | "output_source_priority": { 40 | "command": "set/output_source_priority", 41 | "config": "set_config", 42 | "description" : "Set output source priority, requires parameter 'source': 00 for utility first, 01 for solar first, 02 for SBU priority " 43 | }, 44 | "charger_priority": { 45 | "command": "set/charger_priority", 46 | "config": "set_config", 47 | "description" : ["Set device charger priority, requires parameter 'source'", 48 | "For HS: 00 for utility first, 01 for solar first, 02 for solar and utility, 03 for only solar charging", 49 | "For MS: 00 for utility first, 01 for solar first, 03 for only solar charging"] 50 | }, 51 | "bulk_charging": { 52 | "command": "set/bulk_charging", 53 | "config": "set_config", 54 | "description" : "Set battery bulk (constant voltage) charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit, it cannot be set lower than float voltage" 55 | }, 56 | "float_charging": { 57 | "command": "set/float_charging", 58 | "config": "set_config", 59 | "description" : "Set battery float charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit" 60 | }, 61 | "utility_max_charging": { 62 | "command": "set/utility_max_charging", 63 | "config": "set_config", 64 | "description" : "Set utility max charging current, requires parameter 'current'" 65 | }, 66 | "max_charging": { 67 | "command": "set/max_charging", 68 | "config": "set_config", 69 | "description" : "Set max charging current, requires parameter 'current'" 70 | }, 71 | "back_to_grid": { 72 | "command": "set/back_to_grid", 73 | "config": "set_config", 74 | "description" : "Set battery recharge voltage (back to grid), requires parameter 'voltage', check your model's manual for allowed values" 75 | }, 76 | "back_to_battery": { 77 | "command": "set/back_to_battery", 78 | "config": "set_config", 79 | "description" : "Set battery re-discharge voltage (back to battery), requires parameter 'voltage', check your model's manual for allowed values" 80 | } 81 | }, 82 | 83 | "ListenOn": ["output_source_priority","charger_priority","bulk_charging","float_charging","utility_max_charging","max_charging","back_to_grid","back_to_battery"], 84 | "OnInit": { 85 | "StartInterval": ["general_status0","general_status1","device_rated_information"] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /example/MPI10kWHybrid/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "^", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": ",", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "^", 11 | "response_header_length": 4 12 | }, 13 | "query": { 14 | "general_status": { 15 | "hide": false, 16 | "influx": true, 17 | "cache": true, 18 | "command": "P003GS", 19 | "response": { 20 | "solar_input_voltage_1": 1, 21 | "solar_input_voltage_2": 1, 22 | "solar_input_current_1": 1, 23 | "solar_input_current_2": 1, 24 | "battery_voltage": 1, 25 | "battery_capacity": 1, 26 | "battery_current": 1, 27 | "ac_input_voltage_r": 1, 28 | "ac_input_voltage_s": 1, 29 | "ac_input_voltage_t": 1, 30 | "ac_input_frequency": 1, 31 | "ac_input_current_r": 1, 32 | "ac_input_current_s": 1, 33 | "ac_input_current_t": 1, 34 | "ac_output_voltage_r": 1, 35 | "ac_output_voltage_s": 1, 36 | "ac_output_voltage_t": 1, 37 | "ac_output_frequency": 1, 38 | "ac_output_current_r": 1, 39 | "ac_output_current_s": 1, 40 | "ac_output_current_t": 1, 41 | "inner_temperature": 1, 42 | "component_max_temperature": 1, 43 | "external_battery_temperature": 1 44 | } 45 | }, 46 | "power_status": { 47 | "command": "P003PS", 48 | "influx": true, 49 | "cache": true, 50 | "response": { 51 | "solar_input_power_1": 1, 52 | "solar_input_power_2": 1, 53 | "battery_power": 10, 54 | "ac_input_active_power_r": 100, 55 | "ac_input_active_power_s": 100, 56 | "ac_input_active_power_t": 100, 57 | "ac_input_total_active_power": 10, 58 | "ac_output_active_power_r": 10, 59 | "ac_output_active_power_s": 10, 60 | "ac_output_active_power_t": 10, 61 | "ac_output_total_active_power": 10, 62 | "ac_output_apperent_power_r": 10, 63 | "ac_output_apperent_power_s": 10, 64 | "ac_output_apperent_power_t": 10, 65 | "ac_output_total_apperent_power": 10, 66 | "ac_output_power_percentage": 1, 67 | "ac_output_connect_status": 1, 68 | "solar_input_1_work_status": 1, 69 | "solar_input_2_work_status": 1, 70 | "battery_power_direction": 1, 71 | "dc_ac_power_direction": 1, 72 | "line_power_direction": 1 73 | } 74 | }, 75 | "feeding_grid_power_calibration": { 76 | "command": "P006FPADJ", 77 | "response": { 78 | "feeding_grid_derection_r": false, 79 | "feeding_grid_calibration_power_r": 1, 80 | "feeding_grid_derection_s": false, 81 | "feeding_grid_calibration_power_s": 1, 82 | "feeding_grid_derection_t": false, 83 | "feeding_grid_calibration_power_t": 1 84 | } 85 | }, 86 | "generated_energy_of_year": { 87 | "command": "P010EY", 88 | "sum_crc": true, 89 | "variables": { 90 | "year": [4] 91 | }, 92 | "response": { 93 | "generated_energy": 1 94 | } 95 | }, 96 | "generated_energy_of_month": { 97 | "command": "P010EM", 98 | "sum_crc": true, 99 | "variables": { 100 | "year": [4], 101 | "month": [2] 102 | }, 103 | "response": { 104 | "generated_energy": 1 105 | } 106 | }, 107 | "generated_energy_of_day": { 108 | "command": "P010ED", 109 | "sum_crc": true, 110 | "variables": { 111 | "year": [4], 112 | "month": [2], 113 | "day": [2] 114 | }, 115 | "response": { 116 | "generated_energy": 1 117 | } 118 | } 119 | }, 120 | "set_config": { 121 | "start_bit": "^", 122 | "command_type": "S", 123 | "response_type": "", 124 | "data_length_bits": 0, 125 | "seperator": ",", 126 | "ending_character": "\r", 127 | "crc_length": 2, 128 | "response_accept_command": 1, 129 | "response_refuse_command": 0, 130 | "variable_length_fillout": "0", 131 | "response_start": "^", 132 | "response_header_length": 4 133 | }, 134 | "set": { 135 | "feeding_grid_power_calibration":{ 136 | "command": "S012FPADJ", 137 | "variables": { 138 | "feeding_grid_derection": [1, 0, 1], 139 | "feeding_grid_calibration_power": [4, 0, 999] 140 | } 141 | }, 142 | "f1": { 143 | "command": "S013FP", 144 | "hide": true, 145 | "variables": { 146 | "fase": "", 147 | "watt": [4, 0, 999] 148 | } 149 | } 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /example/MPI10kWHybrid/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_mpi", 3 | "version": "1.0.0", 4 | "dependencies": { 5 | "solar-sis": "latest", 6 | "serialport": "7.1.4" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/MPI10kWHybrid/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var mpi = require("solar-sis"); 4 | 5 | var mqtt = require('mqtt') 6 | var client = mqtt.connect('mqtt://localhost') 7 | 8 | function MyMpiCallbacks () { 9 | var fr = 0; 10 | var fs = 0; 11 | var ft = 0; 12 | 13 | this.power_status = function (qc, data, arr, json, influx) { 14 | //console.log("mpi_power: influx : " + influx); 15 | //mpi.SendDataToInflux('mpi_power ' + influx); 16 | 17 | client.publish('solar/mpi', (Number(arr[0]) + Number(arr[1])).toString()); 18 | } 19 | 20 | this.feeding_grid_power_calibration = function (qc, data, arr) { 21 | //console.log("feeding_grid_power_calibration: " + data); 22 | //console.log("feeding_grid_power_calibration: arr: " + arr); 23 | 24 | fr = arr[3]; 25 | fs = arr[5]; 26 | ft = arr[7]; 27 | 28 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 29 | 30 | if (data) { 31 | mpi.SendDataToInflux('mpi_calibration fas_r=' + fr + ',fas_s=' + fs + ',fas_t=' + ft); 32 | } 33 | } 34 | 35 | this.before_f1 = function (values) { 36 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 37 | 38 | var watt = values.w; 39 | var fase = values.f; 40 | 41 | if (values.a == 1) { 42 | if (fase == 'R') { watt = Number(fr) + Number(watt);} 43 | if (fase == 'S') { watt = Number(fs) + Number(watt);} 44 | if (fase == 'T') { watt = Number(ft) + Number(watt);} 45 | } 46 | 47 | console.log('watt: ' + watt + ' fase:' + fase); 48 | 49 | return ({"fase" : fase + "ADJ1", "watt" : watt}); 50 | } 51 | 52 | this.callback_f1 = function (qc, data, arr) { 53 | myMpi.SendQuickCommand("feeding_grid_power_calibration"); 54 | } 55 | } 56 | 57 | var myMpi = new mpi.mpi(); 58 | var callbacks = new MyMpiCallbacks(); 59 | myMpi.init(callbacks); -------------------------------------------------------------------------------- /example/MPI10kWHybrid/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/ttyUSB0", 3 | "serial_baudrate": 2400, 4 | "serial_queue_delay": 200, 5 | "serial_parsers_readline": "\r", 6 | "serial_restart_threshold": 10000, 7 | "serial_clear_command_queue_on_restart": true, 8 | "http_port": 3004, 9 | "influx_device": "mpi", 10 | "influx_pre": "solar", 11 | "influxUrl": "http://192.168.10.100:8086/write?db=powerwall&precision=s", 12 | "IntervalCommands": [ 13 | { 14 | "name": "general_status", 15 | "config": "query_config", 16 | "command": "query/general_status", 17 | "interval": 5200, 18 | "max": 0, 19 | "influx": true 20 | }, 21 | { 22 | "name": "power_status", 23 | "config": "query_config", 24 | "command": "query/power_status", 25 | "interval": 4000, 26 | "max": 0, 27 | "callback": "power_status", 28 | "influx": true 29 | } 30 | ], 31 | "QuickCommands": { 32 | "feeding_grid_power_calibration": { 33 | "command": "query/feeding_grid_power_calibration", 34 | "config": "query_config", 35 | "callback": "feeding_grid_power_calibration" 36 | }, 37 | "f1": { 38 | "command": "set/f1", 39 | "config": "set_config", 40 | "before": "before_f1", 41 | "callback": "callback_f1" 42 | } 43 | }, 44 | "ListenOn": ["f1"], 45 | "OnInit": { 46 | "RunCommands": ["feeding_grid_power_calibration"], 47 | "StartInterval": ["general_status", "power_status"] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /example/PCM60x/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": " ", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "(", 11 | "response_header_length": 0 12 | }, 13 | "query": { 14 | "general_status": { 15 | "hide": false, 16 | "influx": true, 17 | "cache": true, 18 | "command": "QPIGS", 19 | "crc16": true, 20 | "response": { 21 | "pv_voltage": 1, 22 | "battery_voltage": 1, 23 | "charging_current": 1, 24 | "charging_current1": 1, 25 | "charging_current2": 1, 26 | "charging_power": 1, 27 | "u_v6": false, 28 | "u_v7": false, 29 | "u_v8": false, 30 | "u_v9": false, 31 | "settings": 1 32 | } 33 | }, 34 | "device_rated_information": { 35 | "command": "QPIRI", 36 | "influx": true, 37 | "cache": true, 38 | "crc16": true, 39 | "response": { 40 | "max_output_power": 1, 41 | "nominal_battery_voltage": 1, 42 | "nominal_charging_current": 1, 43 | "absorption_voltage_per_unit": 1, 44 | "float_voltage_per_unit": 1, 45 | "battery_type": 1, 46 | "remote_battery_voltage_detect": 1, 47 | "battery_temperature_compensation": 1, 48 | "remote_temperature_detect": 1, 49 | "battery_rated_voltage_set": 1, 50 | "piece_of_battery_in_serial": 1, 51 | "battery_low_warning_voltage": 1, 52 | "battery_low_shutdown_detect": 1 53 | } 54 | } 55 | 56 | }, 57 | "set_config": { 58 | "start_bit": "", 59 | "command_type": "S", 60 | "response_type": "", 61 | "data_length_bits": 0, 62 | "seperator": " ", 63 | "ending_character": "\r", 64 | "crc_length": 2, 65 | "response_accept_command": 1, 66 | "response_refuse_command": 0, 67 | "variable_length_fillout": "0", 68 | "response_start": "(", 69 | "response_header_length": 0 70 | }, 71 | "set": { 72 | "bulk_charging" : { 73 | "command" : "PBAV", 74 | "crc16": true, 75 | "variables": { 76 | "voltage": "" 77 | } 78 | }, 79 | "float_charging" : { 80 | "command" : "PBFV", 81 | "crc16": true, 82 | "variables": { 83 | "voltage": "" 84 | } 85 | }, 86 | "max_charging": { 87 | "command" : "MCHGC0", 88 | "crc16": true, 89 | "variables" : { 90 | "current" : "" 91 | } 92 | } 93 | 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /example/PCM60x/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_pcm", 3 | "version": "1.0.0", 4 | "dependencies": { 5 | "solar-sis": "latest", 6 | "serialport": "7.1.4" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/PCM60x/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var mpi = require("solar-sis"); 4 | 5 | var mqtt = require('mqtt') 6 | var client = mqtt.connect('mqtt://localhost') 7 | 8 | function MyMpiCallbacks () { 9 | var fr = 0; 10 | var fs = 0; 11 | var ft = 0; 12 | 13 | this.general_status = function (qc, data, arr, json, influx) { 14 | 15 | client.publish('solar/pcm', Number(arr[5]).toString()); 16 | } 17 | 18 | this.power_status = function (qc, data, arr, json, influx) { 19 | //console.log("mpi_power: influx : " + influx); 20 | //mpi.SendDataToInflux('mpi_power ' + influx); 21 | 22 | client.publish('solar/mpi', (Number(arr[0]) + Number(arr[1])).toString()); 23 | } 24 | 25 | this.feeding_grid_power_calibration = function (qc, data, arr) { 26 | //console.log("feeding_grid_power_calibration: " + data); 27 | //console.log("feeding_grid_power_calibration: arr: " + arr); 28 | 29 | fr = arr[3]; 30 | fs = arr[5]; 31 | ft = arr[7]; 32 | 33 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 34 | 35 | if (data) { 36 | mpi.SendDataToInflux('mpi_calibration fas_r=' + fr + ',fas_s=' + fs + ',fas_t=' + ft); 37 | } 38 | } 39 | 40 | this.before_f1 = function (values) { 41 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 42 | 43 | var watt = values.w; 44 | var fase = values.f; 45 | 46 | if (values.a == 1) { 47 | if (fase == 'R') { watt = Number(fr) + Number(watt);} 48 | if (fase == 'S') { watt = Number(fs) + Number(watt);} 49 | if (fase == 'T') { watt = Number(ft) + Number(watt);} 50 | } 51 | 52 | console.log('watt: ' + watt + ' fase:' + fase); 53 | 54 | return ({"fase" : fase + "ADJ1", "watt" : watt}); 55 | } 56 | 57 | this.callback_f1 = function (qc, data, arr) { 58 | myMpi.SendQuickCommand("feeding_grid_power_calibration"); 59 | } 60 | } 61 | 62 | var myMpi = new mpi.mpi(); 63 | var callbacks = new MyMpiCallbacks(); 64 | myMpi.init(callbacks); 65 | -------------------------------------------------------------------------------- /example/PCM60x/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/ttyUSB1", 3 | "serial_baudrate": 2400, 4 | "serial_queue_delay": 200, 5 | "serial_parsers_readline": "\r", 6 | "serial_restart_threshold": 10000, 7 | "serial_clear_command_queue_on_restart": true, 8 | "http_port": 3003, 9 | "influx_device": "pcm1", 10 | "influx_pre": "solar", 11 | "influxUrl": "http://192.168.10.100:8086/write?db=powerwall&precision=s", 12 | "IntervalCommands": [ 13 | { 14 | "name": "general_status", 15 | "config": "query_config", 16 | "command": "query/general_status", 17 | "interval": 5000, 18 | "max": 0, 19 | "influx": true, 20 | "callback": "general_status" 21 | }, 22 | { 23 | "name": "device_rated_information", 24 | "config": "query_config", 25 | "command": "query/device_rated_information", 26 | "interval": 120000, 27 | "max": 0, 28 | "influx": true 29 | } 30 | ], 31 | "QuickCommands": { 32 | "bulk_charging": { 33 | "command": "set/bulk_charging", 34 | "config": "set_config", 35 | "description" : "Set battery bulk (constant voltage) charging voltage, requires parameter 'voltage'" 36 | }, 37 | "float_charging": { 38 | "command": "set/float_charging", 39 | "config": "set_config", 40 | "description" : "Set battery float charging voltage, requires parameter 'voltage'" 41 | }, 42 | "max_charging": { 43 | "command": "set/max_charging", 44 | "config": "set_config", 45 | "description" : "Set max charging current, requires parameter 'current'" 46 | } 47 | }, 48 | 49 | "ListenOn": ["bulk_charging","float_charging","max_charging"], 50 | 51 | "OnInit": { 52 | "StartInterval": ["general_status","device_rated_information"] 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /example/PIP4084/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": " ", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "(", 11 | "response_header_length": 0 12 | }, 13 | "query": { 14 | "general_status": { 15 | "hide": false, 16 | "influx": true, 17 | "cache": true, 18 | "command": "QPIGS", 19 | "crc16": true, 20 | "response": { 21 | "grid_voltage": 1, 22 | "grid_frecuency": 1, 23 | "ac_output_voltage": 1, 24 | "ac_output_frecuency": 1, 25 | "ac_output_power_va": 1, 26 | "ac_output_active_power": 1, 27 | "output_load_percent": 1, 28 | "bus_voltage": 1, 29 | "battery_voltage": 1, 30 | "battery_charging_current": 1, 31 | "battery_capacity": 1, 32 | "inverter_heat_sink_temperature": 1, 33 | "pv_input_current_for_battery": 1, 34 | "pv_input_voltage_1": 1, 35 | "battery_voltage_from_scc": 1, 36 | "battery_discharge_current": 1, 37 | "device_status": true, 38 | "charging_scc": ["device_status", "8", "5", "6"], 39 | "charging_ac": ["device_status", "8", "6", "7"], 40 | "charging_scc_acc": ["device_status", "8", "7", "8"] 41 | } 42 | }, 43 | "extended_status": { 44 | "hide": false, 45 | "influx": true, 46 | "cache": true, 47 | "command": "QPIGS2", 48 | "crc16": true, 49 | "response": { 50 | "pv_input_current_2": 1, 51 | "pv_input_voltage_2": 1, 52 | "battery_voltage_from_scc_2": 1, 53 | "pv_charging_power_2": 1, 54 | "device_status_2": 1, 55 | "ac_charging_current": 1, 56 | "ac_charging_power": 1, 57 | "pv_input_current_3": 1, 58 | "pv_input_voltage_3": 1, 59 | "battery_voltage_from_scc_3": 1, 60 | "pv_charging_power_3": 1, 61 | "pv_total_charging_power": 1 62 | } 63 | }, 64 | "device_rated_information": { 65 | "command": "QPIRI", 66 | "influx": true, 67 | "cache": true, 68 | "crc16": true, 69 | "response": { 70 | "grid_rating_voltage": 1, 71 | "grid_rating_current": 1, 72 | "ac_output_rating_voltage": 1, 73 | "ac_output_rating_frecuency": 1, 74 | "ac_output_rating_current": 1, 75 | "ac_output_rating_apparent_power": 1, 76 | "ac_output_rating_active_power": 1, 77 | "battery_rating_voltage": 1, 78 | "battery_recharge_voltage": 1, 79 | "battery_under_voltage": 1, 80 | "battery_bulk_voltage": 1, 81 | "battery_float_voltage": 1, 82 | "battery_type": 1, 83 | "current_max_ac_charging": 1, 84 | "current_max_charging_current": 1, 85 | "input_voltage_range": 1, 86 | "output_source_priority": 1, 87 | "charger_source_priority": 1, 88 | "parallel_max_num": 1, 89 | "machine_type": 1, 90 | "topology": 1, 91 | "output_mode": 1, 92 | "battery_re_discharge_voltage": 1, 93 | "pv_condition": 1, 94 | "pv_power_balance": 1 95 | } 96 | } 97 | }, 98 | "set_config": { 99 | "start_bit": "", 100 | "command_type": "S", 101 | "response_type": "", 102 | "data_length_bits": 0, 103 | "seperator": " ", 104 | "ending_character": "\r", 105 | "crc_length": 2, 106 | "response_accept_command": 1, 107 | "response_refuse_command": 0, 108 | "variable_length_fillout": "0", 109 | "response_start": "(", 110 | "response_header_length": 0 111 | }, 112 | "set": { 113 | "output_source_priority" : { 114 | "command" : "POP", 115 | "crc16": true, 116 | "variables": { 117 | "source": "" 118 | } 119 | }, 120 | "charger_priority": { 121 | "command" : "PCP", 122 | "crc16": true, 123 | "variables" : { 124 | "source" : "" 125 | } 126 | }, 127 | "bulk_charging": { 128 | "command" : "PCVV", 129 | "crc16": true, 130 | "variables" : { 131 | "voltage" : "" 132 | } 133 | }, 134 | "float_charging": { 135 | "command" : "PBFT", 136 | "crc16": true, 137 | "variables" : { 138 | "voltage" : "" 139 | } 140 | }, 141 | "utility_max_charging": { 142 | "command" : "MUCHGC0", 143 | "crc16": true, 144 | "variables" : { 145 | "current" : "" 146 | } 147 | }, 148 | "max_charging": { 149 | "command" : "MCHGC0", 150 | "crc16": true, 151 | "variables" : { 152 | "current" : "" 153 | } 154 | }, 155 | "back_to_grid": { 156 | "command" : "PBCV", 157 | "crc16": true, 158 | "variables" : { 159 | "voltage" : "" 160 | } 161 | }, 162 | "back_to_battery": { 163 | "command" : "PBDV", 164 | "crc16": true, 165 | "variables" : { 166 | "voltage" : "" 167 | } 168 | } 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /example/PIP4084/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_pip", 3 | "version": "1.0.1", 4 | "dependencies": { 5 | "solar-sis": "latest", 6 | "serialport": "7.1.4" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/PIP4084/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var mpi = require("solar-sis"); 4 | 5 | var mqtt = require('mqtt') 6 | var client = mqtt.connect('mqtt://localhost') 7 | 8 | function MyMpiCallbacks () { 9 | var fr = 0; 10 | var fs = 0; 11 | var ft = 0; 12 | 13 | this.power_status = function (qc, data, arr, json, influx) { 14 | //console.log("mpi_power: influx : " + influx); 15 | //mpi.SendDataToInflux('mpi_power ' + influx); 16 | 17 | client.publish('solar/mpi', (Number(arr[0]) + Number(arr[1])).toString()); 18 | } 19 | 20 | this.feeding_grid_power_calibration = function (qc, data, arr) { 21 | //console.log("feeding_grid_power_calibration: " + data); 22 | //console.log("feeding_grid_power_calibration: arr: " + arr); 23 | 24 | fr = arr[3]; 25 | fs = arr[5]; 26 | ft = arr[7]; 27 | 28 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 29 | 30 | if (data) { 31 | mpi.SendDataToInflux('mpi_calibration fas_r=' + fr + ',fas_s=' + fs + ',fas_t=' + ft); 32 | } 33 | } 34 | 35 | this.before_f1 = function (values) { 36 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 37 | 38 | var watt = values.w; 39 | var fase = values.f; 40 | 41 | if (values.a == 1) { 42 | if (fase == 'R') { watt = Number(fr) + Number(watt);} 43 | if (fase == 'S') { watt = Number(fs) + Number(watt);} 44 | if (fase == 'T') { watt = Number(ft) + Number(watt);} 45 | } 46 | 47 | console.log('watt: ' + watt + ' fase:' + fase); 48 | 49 | return ({"fase" : fase + "ADJ1", "watt" : watt}); 50 | } 51 | 52 | this.callback_f1 = function (qc, data, arr) { 53 | myMpi.SendQuickCommand("feeding_grid_power_calibration"); 54 | } 55 | } 56 | 57 | var myMpi = new mpi.mpi(); 58 | var callbacks = new MyMpiCallbacks(); 59 | myMpi.init(callbacks); -------------------------------------------------------------------------------- /example/PIP4084/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/hidraw0", 3 | "serial_baudrate": 2400, 4 | "serial_queue_delay": 200, 5 | "serial_parsers_readline": "\r", 6 | "serial_restart_threshold": 10000, 7 | "serial_clear_command_queue_on_restart": true, 8 | "http_port": 3001, 9 | "influx_device": "pip", 10 | "influx_pre": "solar", 11 | "influxUrl": "http://localhost:8086/write?db=powerwall&precision=s", 12 | "IntervalCommands": [ 13 | { 14 | "name": "general_status", 15 | "config": "query_config", 16 | "command": "query/general_status", 17 | "interval": 3000, 18 | "max": 0, 19 | "influx": true 20 | }, 21 | { 22 | "name": "device_rated_information", 23 | "config": "query_config", 24 | "command": "query/device_rated_information", 25 | "interval": 4000, 26 | "max": 0, 27 | "influx": true 28 | } 29 | ], 30 | "QuickCommands": { 31 | "output_source_priority": { 32 | "command": "set/output_source_priority", 33 | "config": "set_config", 34 | "description" : "Set output source priority, requires parameter 'source': 00 for utility first, 01 for solar first, 02 for SBU priority " 35 | }, 36 | "charger_priority": { 37 | "command": "set/charger_priority", 38 | "config": "set_config", 39 | "description" : ["Set device charger priority, requires parameter 'source'", 40 | "For HS: 00 for utility first, 01 for solar first, 02 for solar and utility, 03 for only solar charging", 41 | "For MS: 00 for utility first, 01 for solar first, 03 for only solar charging"] 42 | }, 43 | "bulk_charging": { 44 | "command": "set/bulk_charging", 45 | "config": "set_config", 46 | "description" : "Set battery bulk (constant voltage) charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit, it cannot be set lower than float voltage" 47 | }, 48 | "float_charging": { 49 | "command": "set/float_charging", 50 | "config": "set_config", 51 | "description" : "Set battery float charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit" 52 | }, 53 | "utility_max_charging": { 54 | "command": "set/utility_max_charging", 55 | "config": "set_config", 56 | "description" : "Set utility max charging current, requires parameter 'current'" 57 | }, 58 | "max_charging": { 59 | "command": "set/max_charging", 60 | "config": "set_config", 61 | "description" : "Set max charging current, requires parameter 'current'" 62 | }, 63 | "back_to_grid": { 64 | "command": "set/back_to_grid", 65 | "config": "set_config", 66 | "description" : "Set battery recharge voltage (back to grid), requires parameter 'voltage', check your model's manual for allowed values" 67 | }, 68 | "back_to_battery": { 69 | "command": "set/back_to_battery", 70 | "config": "set_config", 71 | "description" : "Set battery re-discharge voltage (back to battery), requires parameter 'voltage', check your model's manual for allowed values" 72 | } 73 | }, 74 | 75 | "ListenOn": ["output_source_priority","charger_priority","bulk_charging","float_charging","utility_max_charging","max_charging","back_to_grid","back_to_battery"], 76 | "OnInit": { 77 | "StartInterval": ["general_status", "device_rated_information"] 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /example/US2000B/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": " ", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "~", 11 | "response_header_length": 14 12 | }, 13 | "query": { 14 | "get_analog_value": { 15 | "command": "~20014642E002FFFD0A", 16 | "influx": true, 17 | "cache": true, 18 | "LENID": 2, 19 | "crc16": false, 20 | "variables": { 21 | "Command": 1 22 | }, 23 | "response": { 24 | "Ammount_of_Pack": 1, 25 | "Cells_count": 1, 26 | "Cell1_voltage": -2, 27 | "Cell2_voltage": -2, 28 | "Cell3_voltage": -2, 29 | "Cell4_voltage": -2, 30 | "Cell5_voltage": -2, 31 | "Cell6_voltage": -2, 32 | "Cell7_voltage": -2, 33 | "Cell8_voltage": -2, 34 | "Cell9_voltage": -2, 35 | "Cell10_voltage": -2, 36 | "Cell11_voltage": -2, 37 | "Cell12_voltage": -2, 38 | "Cell13_voltage": -2, 39 | "Cell14_voltage": -2, 40 | "Cell15_voltage": -2, 41 | "Temperature_count": 1, 42 | "Temperature_1": -2, 43 | "Temperature_2": -2, 44 | "Temperature_3": -2, 45 | "Temperature_4": -2, 46 | "Temperature_5": -2, 47 | "Pack_current": -2, 48 | "Pack_voltage": 2, 49 | "Pack_remains_mAh": 2, 50 | "User_defined": 1, 51 | "Pack_total_mAh": 2, 52 | "Pack_cycle": 2, 53 | "Cells_count_P2": 1, 54 | "Cell1_voltage_P2": -2, 55 | "Cell2_voltage_P2": -2, 56 | "Cell3_voltage_P2": -2, 57 | "Cell4_voltage_P2": -2, 58 | "Cell5_voltage_P2": -2, 59 | "Cell6_voltage_P2": -2, 60 | "Cell7_voltage_P2": -2, 61 | "Cell8_voltage_P2": -2, 62 | "Cell9_voltage_P2": -2, 63 | "Cell10_voltage_P2": -2, 64 | "Cell11_voltage_P2": -2, 65 | "Cell12_voltage_P2": -2, 66 | "Cell13_voltage_P2": -2, 67 | "Cell14_voltage_P2": -2, 68 | "Cell15_voltage_P2": -2, 69 | "Temperature_count_P2": 1, 70 | "Temperature_1_P2": -2, 71 | "Temperature_2_P2": -2, 72 | "Temperature_3_P2": -2, 73 | "Temperature_4_P2": -2, 74 | "Temperature_5_P2": -2, 75 | "Pack_current_P2": -2, 76 | "Pack_voltage_P2": 2, 77 | "Pack_remains_mAh_P2": 2, 78 | "User_defined_P2": 1, 79 | "Pack_total_mAh_P2": 2, 80 | "Pack_cycle_P2": 2, 81 | "Cells_count_P3": 1, 82 | "Cell1_voltage_P3": -2, 83 | "Cell2_voltage_P3": -2, 84 | "Cell3_voltage_P3": -2, 85 | "Cell4_voltage_P3": -2, 86 | "Cell5_voltage_P3": -2, 87 | "Cell6_voltage_P3": -2, 88 | "Cell7_voltage_P3": -2, 89 | "Cell8_voltage_P3": -2, 90 | "Cell9_voltage_P3": -2, 91 | "Cell10_voltage_P3": -2, 92 | "Cell11_voltage_P3": -2, 93 | "Cell12_voltage_P3": -2, 94 | "Cell13_voltage_P3": -2, 95 | "Cell14_voltage_P3": -2, 96 | "Cell15_voltage_P3": -2, 97 | "Temperature_count_P3": 1, 98 | "Temperature_1_P3": -2, 99 | "Temperature_2_P3": -2, 100 | "Temperature_3_P3": -2, 101 | "Temperature_4_P3": -2, 102 | "Temperature_5_P3": -2, 103 | "Pack_current_P3": -2, 104 | "Pack_voltage_P3": 2, 105 | "Pack_remains_mAh_P3": 2, 106 | "User_defined_P3": 1, 107 | "Pack_total_mAh_P3": 2, 108 | "Pack_cycle_P3": 2, 109 | "Cells_count_P4": 1, 110 | "Cell1_voltage_P4": -2, 111 | "Cell2_voltage_P4": -2, 112 | "Cell3_voltage_P4": -2, 113 | "Cell4_voltage_P4": -2, 114 | "Cell5_voltage_P4": -2, 115 | "Cell6_voltage_P4": -2, 116 | "Cell7_voltage_P4": -2, 117 | "Cell8_voltage_P4": -2, 118 | "Cell9_voltage_P4": -2, 119 | "Cell10_voltage_P4": -2, 120 | "Cell11_voltage_P4": -2, 121 | "Cell12_voltage_P4": -2, 122 | "Cell13_voltage_P4": -2, 123 | "Cell14_voltage_P4": -2, 124 | "Cell15_voltage_P4": -2, 125 | "Temperature_count_P4": 1, 126 | "Temperature_1_P4": -2, 127 | "Temperature_2_P4": -2, 128 | "Temperature_3_P4": -2, 129 | "Temperature_4_P4": -2, 130 | "Temperature_5_P4": -2, 131 | "Pack_current_P4": -2, 132 | "Pack_voltage_P4": 2, 133 | "Pack_remains_mAh_P4": 2, 134 | "User_defined_P4": 1, 135 | "Pack_total_mAh_P4": 2, 136 | "Pack_cycle_P4": 2 137 | }, 138 | "MQTTConfig": { 139 | "Pack_current": 1, 140 | "Pack_current_P2": 1, 141 | "Pack_current_P3": 1, 142 | "Pack_current_P4": 1, 143 | "Pack_remains_mAh": 2, 144 | "Pack_remains_mAh_P2": 2, 145 | "Pack_remains_mAh_P3": 2, 146 | "Pack_remains_mAh_P4": 2 147 | } 148 | } 149 | }, 150 | "set_config": { 151 | "start_bit": "", 152 | "command_type": "S", 153 | "response_type": "", 154 | "data_length_bits": 0, 155 | "seperator": " ", 156 | "ending_character": "\r", 157 | "crc_length": 2, 158 | "crc16":true, 159 | "response_accept_command": 1, 160 | "response_refuse_command": 0, 161 | "variable_length_fillout": "0", 162 | "response_start": "(", 163 | "response_header_length": 0 164 | }, 165 | "set": { 166 | "output_source_priority" : { 167 | "command" : "POP", 168 | "crc16": true, 169 | "variables": { 170 | "source": "" 171 | } 172 | }, 173 | "charger_priority": { 174 | "command" : "PCP", 175 | "crc16": true, 176 | "variables" : { 177 | "source" : "" 178 | } 179 | }, 180 | "bulk_charging": { 181 | "command" : "PCVV", 182 | "crc16": true, 183 | "variables" : { 184 | "voltage" : "" 185 | } 186 | }, 187 | "float_charging": { 188 | "command" : "PBFT", 189 | "crc16": true, 190 | "variables" : { 191 | "voltage" : "" 192 | } 193 | }, 194 | "utility_max_charging": { 195 | "command" : "MUCHGC0", 196 | "crc16": true, 197 | "variables" : { 198 | "current" : "" 199 | } 200 | }, 201 | "max_charging": { 202 | "command" : "MCHGC0", 203 | "crc16": true, 204 | "variables" : { 205 | "current" : "" 206 | } 207 | }, 208 | "back_to_grid": { 209 | "command" : "PBCV", 210 | "crc16": true, 211 | "variables" : { 212 | "voltage" : "" 213 | } 214 | }, 215 | "back_to_battery": { 216 | "command" : "PBDV", 217 | "crc16": true, 218 | "variables" : { 219 | "voltage" : "" 220 | } 221 | } 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /example/US2000B/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_pylon", 3 | "version": "1.0.1", 4 | "dependencies": { 5 | "solar-sis": "latest", 6 | "serialport": "7.1.4" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/US2000B/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var mpi = require("../../index"); 4 | 5 | var mqtt = require('mqtt') 6 | var client = mqtt.connect('mqtt://localhost') 7 | 8 | function MyMpiCallbacks () { 9 | var fr = 0; 10 | var fs = 0; 11 | var ft = 0; 12 | 13 | this.power_status = function (qc, data, arr, json, influx) { 14 | //console.log("mpi_power: influx : " + influx); 15 | //mpi.SendDataToInflux('mpi_power ' + influx); 16 | 17 | client.publish('solar/pylon', (Number(arr[0]) + Number(arr[1])).toString()); 18 | } 19 | 20 | this.feeding_grid_power_calibration = function (qc, data, arr) { 21 | //console.log("feeding_grid_power_calibration: " + data); 22 | //console.log("feeding_grid_power_calibration: arr: " + arr); 23 | 24 | fr = arr[3]; 25 | fs = arr[5]; 26 | ft = arr[7]; 27 | 28 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 29 | 30 | if (data) { 31 | mpi.SendDataToInflux('mpi_calibration fas_r=' + fr + ',fas_s=' + fs + ',fas_t=' + ft); 32 | } 33 | } 34 | 35 | this.before_f1 = function (values) { 36 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 37 | 38 | var watt = values.w; 39 | var fase = values.f; 40 | 41 | if (values.a == 1) { 42 | if (fase == 'R') { watt = Number(fr) + Number(watt);} 43 | if (fase == 'S') { watt = Number(fs) + Number(watt);} 44 | if (fase == 'T') { watt = Number(ft) + Number(watt);} 45 | } 46 | 47 | console.log('watt: ' + watt + ' fase:' + fase); 48 | 49 | return ({"fase" : fase + "ADJ1", "watt" : watt}); 50 | } 51 | 52 | this.callback_f1 = function (qc, data, arr) { 53 | myMpi.SendQuickCommand("feeding_grid_power_calibration"); 54 | } 55 | 56 | this.customMerge = function(json, queryValues) { 57 | var c = 0; 58 | var respvalue = 0; 59 | var ByteNum = 0; 60 | //console.log('queryvalues: ' + JSON.stringify(queryValues)); 61 | var data = queryValues[0] 62 | var s = JSON.parse(JSON.stringify(json), (key, value) => { 63 | if (typeof value === 'number') { 64 | if (value > 0) { 65 | ByteNum = value; 66 | respvalue = parseInt(data.substring(c, c+2*ByteNum),16); 67 | //console.log("key: " + key + " value: " + value + ' c: ' + c + ' ByteNum: ' + ByteNum + ' respvalue: ' + respvalue); 68 | } 69 | else { 70 | ByteNum = -value; 71 | respvalue = parseInt(data.substring(c, c+2*ByteNum),16); 72 | if (respvalue > 0x7FFF) respvalue = respvalue - 0xFFFF; 73 | //console.log("key: " + key + " value: " + value + ' c: ' + c + ' ByteNum: ' + ByteNum + ' respvalue: ' + respvalue); 74 | } 75 | c+= 2*ByteNum; 76 | return respvalue; 77 | } 78 | else return value; 79 | }); 80 | 81 | return s; 82 | } 83 | } 84 | 85 | var myMpi = new mpi.mpi(); 86 | var callbacks = new MyMpiCallbacks(); 87 | myMpi.init(callbacks); -------------------------------------------------------------------------------- /example/US2000B/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/ttyUSB0", 3 | "serial_baudrate": 1200, 4 | "serial_queue_delay": 200, 5 | "serial_parsers_readline": "\r", 6 | "serial_restart_threshold": 10000, 7 | "serial_clear_command_queue_on_restart": true, 8 | "http_port": 3003, 9 | "influx_device": "pyl", 10 | "influx_pre": "solar", 11 | "MQTT_pre_header": "pylon/", 12 | "influxUrl": "http://localhost:8086/write?db=powerwall&precision=s", 13 | "influxUser": "user", 14 | "influxPassword": "password", 15 | "IntervalCommands": [ 16 | { 17 | "name": "get_analog_value", 18 | "config": "query_config", 19 | "command": "query/get_analog_value", 20 | "interval": 3000, 21 | "max": 0, 22 | "influx": true, 23 | "customMerge": "customMerge" 24 | } 25 | ], 26 | "QuickCommands": { 27 | "output_source_priority": { 28 | "command": "set/output_source_priority", 29 | "config": "set_config", 30 | "description" : "Set output source priority, requires parameter 'source': 00 for utility first, 01 for solar first, 02 for SBU priority " 31 | }, 32 | "charger_priority": { 33 | "command": "set/charger_priority", 34 | "config": "set_config", 35 | "description" : ["Set device charger priority, requires parameter 'source'", 36 | "For HS: 00 for utility first, 01 for solar first, 02 for solar and utility, 03 for only solar charging", 37 | "For MS: 00 for utility first, 01 for solar first, 03 for only solar charging"] 38 | }, 39 | "bulk_charging": { 40 | "command": "set/bulk_charging", 41 | "config": "set_config", 42 | "description" : "Set battery bulk (constant voltage) charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit, it cannot be set lower than float voltage" 43 | }, 44 | "float_charging": { 45 | "command": "set/float_charging", 46 | "config": "set_config", 47 | "description" : "Set battery float charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit" 48 | }, 49 | "utility_max_charging": { 50 | "command": "set/utility_max_charging", 51 | "config": "set_config", 52 | "description" : "Set utility max charging current, requires parameter 'current'" 53 | }, 54 | "max_charging": { 55 | "command": "set/max_charging", 56 | "config": "set_config", 57 | "description" : "Set max charging current, requires parameter 'current'" 58 | }, 59 | "back_to_grid": { 60 | "command": "set/back_to_grid", 61 | "config": "set_config", 62 | "description" : "Set battery recharge voltage (back to grid), requires parameter 'voltage', check your model's manual for allowed values" 63 | }, 64 | "back_to_battery": { 65 | "command": "set/back_to_battery", 66 | "config": "set_config", 67 | "description" : "Set battery re-discharge voltage (back to battery), requires parameter 'voltage', check your model's manual for allowed values" 68 | } 69 | }, 70 | 71 | "ListenOn": ["output_source_priority","charger_priority","bulk_charging","float_charging","utility_max_charging","max_charging","back_to_grid","back_to_battery"], 72 | "OnInit": { 73 | "StartInterval": ["general_status", "device_rated_information"] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /example/US3000+US2000/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": " ", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "~", 11 | "response_header_length": 14 12 | }, 13 | "query": { 14 | "get_analog_value": { 15 | "command": "~20014642E002FFFD0A", 16 | "influx": true, 17 | "cache": true, 18 | "crc16": false, 19 | "variables": { 20 | "Command": 1 21 | }, 22 | "response": { 23 | "Ammount_of_Pack": 1, 24 | "Cells_count": 1, 25 | "Cell1_voltage": 2, 26 | "Cell2_voltage": 2, 27 | "Cell3_voltage": 2, 28 | "Cell4_voltage": 2, 29 | "Cell5_voltage": 2, 30 | "Cell6_voltage": 2, 31 | "Cell7_voltage": 2, 32 | "Cell8_voltage": 2, 33 | "Cell9_voltage": 2, 34 | "Cell10_voltage": 2, 35 | "Cell11_voltage": 2, 36 | "Cell12_voltage": 2, 37 | "Cell13_voltage": 2, 38 | "Cell14_voltage": 2, 39 | "Cell15_voltage": 2, 40 | "Temperature_count": 1, 41 | "Temperature_1": 2, 42 | "Temperature_2": 2, 43 | "Temperature_3": 2, 44 | "Temperature_4": 2, 45 | "Temperature_5": 2, 46 | "Pack_current": -2, 47 | "Pack_voltage": 2, 48 | "User_defined": 2, 49 | "User_defined1": 3, 50 | "Pack_cycle": 2, 51 | "Pack_remains_mAh": 3, 52 | "Pack_total_mAh": 3, 53 | "Cells_count_P2": 1, 54 | "Cell1_voltage_P2": -2, 55 | "Cell2_voltage_P2": -2, 56 | "Cell3_voltage_P2": -2, 57 | "Cell4_voltage_P2": -2, 58 | "Cell5_voltage_P2": -2, 59 | "Cell6_voltage_P2": -2, 60 | "Cell7_voltage_P2": -2, 61 | "Cell8_voltage_P2": -2, 62 | "Cell9_voltage_P2": -2, 63 | "Cell10_voltage_P2": -2, 64 | "Cell11_voltage_P2": -2, 65 | "Cell12_voltage_P2": -2, 66 | "Cell13_voltage_P2": -2, 67 | "Cell14_voltage_P2": -2, 68 | "Cell15_voltage_P2": -2, 69 | "Temperature_count_P2": 1, 70 | "Temperature_1_P2": -2, 71 | "Temperature_2_P2": -2, 72 | "Temperature_3_P2": -2, 73 | "Temperature_4_P2": -2, 74 | "Temperature_5_P2": -2, 75 | "Pack_current_P2": -2, 76 | "Pack_voltage_P2": 2, 77 | "User_defined_P2": 2, 78 | "User_defined1_P2": 3, 79 | "Pack_cycle_P2": 2, 80 | "Pack_remains_mAh_P2": 3, 81 | "Pack_total_mAh_P2": 3, 82 | "check2": 3 83 | }, 84 | "MQTTConfig": { 85 | "Pack_current": 1, 86 | "Pack_current_P2": 1, 87 | "Pack_remains_mAh": 2, 88 | "Pack_remains_mAh_P2": 2 89 | } 90 | } 91 | }, 92 | "set_config": { 93 | "start_bit": "", 94 | "command_type": "S", 95 | "response_type": "", 96 | "data_length_bits": 0, 97 | "seperator": " ", 98 | "ending_character": "\r", 99 | "crc_length": 2, 100 | "crc16":true, 101 | "response_accept_command": 1, 102 | "response_refuse_command": 0, 103 | "variable_length_fillout": "0", 104 | "response_start": "(", 105 | "response_header_length": 0 106 | }, 107 | "set": { 108 | "output_source_priority" : { 109 | "command" : "POP", 110 | "crc16": true, 111 | "variables": { 112 | "source": "" 113 | } 114 | }, 115 | "charger_priority": { 116 | "command" : "PCP", 117 | "crc16": true, 118 | "variables" : { 119 | "source" : "" 120 | } 121 | }, 122 | "bulk_charging": { 123 | "command" : "PCVV", 124 | "crc16": true, 125 | "variables" : { 126 | "voltage" : "" 127 | } 128 | }, 129 | "float_charging": { 130 | "command" : "PBFT", 131 | "crc16": true, 132 | "variables" : { 133 | "voltage" : "" 134 | } 135 | }, 136 | "utility_max_charging": { 137 | "command" : "MUCHGC0", 138 | "crc16": true, 139 | "variables" : { 140 | "current" : "" 141 | } 142 | }, 143 | "max_charging": { 144 | "command" : "MCHGC0", 145 | "crc16": true, 146 | "variables" : { 147 | "current" : "" 148 | } 149 | }, 150 | "back_to_grid": { 151 | "command" : "PBCV", 152 | "crc16": true, 153 | "variables" : { 154 | "voltage" : "" 155 | } 156 | }, 157 | "back_to_battery": { 158 | "command" : "PBDV", 159 | "crc16": true, 160 | "variables" : { 161 | "voltage" : "" 162 | } 163 | } 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /example/US3000+US2000/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis_pylon", 3 | "version": "1.0.1", 4 | "dependencies": { 5 | "solar-sis": "latest", 6 | "serialport": "7.1.4" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/US3000+US2000/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var mpi = require("../../index"); 4 | 5 | var mqtt = require('mqtt') 6 | var client = mqtt.connect('mqtt://172.16.103.9') 7 | 8 | function MyMpiCallbacks () { 9 | var fr = 0; 10 | var fs = 0; 11 | var ft = 0; 12 | 13 | this.power_status = function (qc, data, arr, json, influx) { 14 | //console.log("mpi_power: influx : " + influx); 15 | //mpi.SendDataToInflux('mpi_power ' + influx); 16 | 17 | client.publish('solar/pylon', (Number(arr[0]) + Number(arr[1])).toString()); 18 | } 19 | 20 | this.feeding_grid_power_calibration = function (qc, data, arr) { 21 | //console.log("feeding_grid_power_calibration: " + data); 22 | //console.log("feeding_grid_power_calibration: arr: " + arr); 23 | 24 | fr = arr[3]; 25 | fs = arr[5]; 26 | ft = arr[7]; 27 | 28 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 29 | 30 | if (data) { 31 | mpi.SendDataToInflux('mpi_calibration fas_r=' + fr + ',fas_s=' + fs + ',fas_t=' + ft); 32 | client.publish('solar/pylon', (Number(arr[0]) + Number(arr[1])).toString()); 33 | } 34 | } 35 | 36 | this.before_f1 = function (values) { 37 | console.log("fr: " + fr + " fs: " + fs + " ft: " + ft); 38 | 39 | var watt = values.w; 40 | var fase = values.f; 41 | 42 | if (values.a == 1) { 43 | if (fase == 'R') { watt = Number(fr) + Number(watt);} 44 | if (fase == 'S') { watt = Number(fs) + Number(watt);} 45 | if (fase == 'T') { watt = Number(ft) + Number(watt);} 46 | } 47 | 48 | console.log('watt: ' + watt + ' fase:' + fase); 49 | 50 | return ({"fase" : fase + "ADJ1", "watt" : watt}); 51 | } 52 | 53 | this.callback_f1 = function (qc, data, arr) { 54 | myMpi.SendQuickCommand("feeding_grid_power_calibration"); 55 | } 56 | 57 | this.customMerge = function(json, queryValues) { 58 | var c = 0; 59 | var respvalue = 0; 60 | var ByteNum = 0; 61 | //console.log('queryvalues: ' + JSON.stringify(queryValues)); 62 | var data = queryValues[0] 63 | var s = JSON.parse(JSON.stringify(json), (key, value) => { 64 | if (typeof value === 'number') { 65 | if (value > 0) { 66 | ByteNum = value; 67 | respvalue = parseInt(data.substring(c, c+2*ByteNum),16); 68 | //console.log("key: " + key + " value: " + value + ' c: ' + c + ' ByteNum: ' + ByteNum + ' respvalue: ' + respvalue); 69 | } 70 | else { 71 | ByteNum = -value; 72 | respvalue = parseInt(data.substring(c, c+2*ByteNum),16); 73 | if (respvalue > 0x7FFF) respvalue = respvalue - 0xFFFF; 74 | //console.log("key: " + key + " value: " + value + ' c: ' + c + ' ByteNum: ' + ByteNum + ' respvalue: ' + respvalue); 75 | } 76 | c+= 2*ByteNum; 77 | return respvalue; 78 | } 79 | else return value; 80 | }); 81 | 82 | return s; 83 | } 84 | } 85 | 86 | var myMpi = new mpi.mpi(); 87 | var callbacks = new MyMpiCallbacks(); 88 | myMpi.init(callbacks); -------------------------------------------------------------------------------- /example/US3000+US2000/readme.md: -------------------------------------------------------------------------------- 1 | A port for a Pylontech US3000 Master with US2000 Slave. 2 | There were some data fields i did not understand under USER1, and USER2 3 | I think it has to do with either Errors or with the Battery Group 4 | All the Dip's on the Batteries are in the OFF possition as i only have on Battery Bank 5 | Console is connected to the top via USB to RS232 6 | Uplink Cable is from Master(us3000) port 2, to Slave (us2000) 7 | 8 | By CyberTza 9 | -------------------------------------------------------------------------------- /example/US3000+US2000/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/serial/by-id/usb-FTDI_USB-RS232_Cable_FT1Y00GS-if00-port0", 3 | "serial_baudrate": 1200, 4 | "serial_queue_delay": 200, 5 | "mqttserver": "mqtt://localhost", 6 | "mqtttopic": "solarsis/inverter/", 7 | "serial_parsers_readline": "\r", 8 | "serial_restart_threshold": 10000, 9 | "serial_clear_command_queue_on_restart": true, 10 | "http_port": 3003, 11 | "influx_device": "pyl", 12 | "influx_pre": "pylon", 13 | "MQTT_pre_header": "pylon/", 14 | "influxUrl": "http://172.16.103.9:8086/write?db=powerwall&precision=s", 15 | "influxUser": "user", 16 | "influxPassword": "password", 17 | "IntervalCommands": [ 18 | { 19 | "name": "get_analog_value", 20 | "config": "query_config", 21 | "command": "query/get_analog_value", 22 | "interval": 3000, 23 | "max": 0, 24 | "influx": true, 25 | "customMerge": "customMerge" 26 | } 27 | ], 28 | "QuickCommands": { 29 | "output_source_priority": { 30 | "command": "set/output_source_priority", 31 | "config": "set_config", 32 | "description" : "Set output source priority, requires parameter 'source': 00 for utility first, 01 for solar first, 02 for SBU priority " 33 | }, 34 | "charger_priority": { 35 | "command": "set/charger_priority", 36 | "config": "set_config", 37 | "description" : ["Set device charger priority, requires parameter 'source'", 38 | "For HS: 00 for utility first, 01 for solar first, 02 for solar and utility, 03 for only solar charging", 39 | "For MS: 00 for utility first, 01 for solar first, 03 for only solar charging"] 40 | }, 41 | "bulk_charging": { 42 | "command": "set/bulk_charging", 43 | "config": "set_config", 44 | "description" : "Set battery bulk (constant voltage) charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit, it cannot be set lower than float voltage" 45 | }, 46 | "float_charging": { 47 | "command": "set/float_charging", 48 | "config": "set_config", 49 | "description" : "Set battery float charging voltage, requires parameter 'voltage' 48.0V ~ 58.4V for 48V unit" 50 | }, 51 | "utility_max_charging": { 52 | "command": "set/utility_max_charging", 53 | "config": "set_config", 54 | "description" : "Set utility max charging current, requires parameter 'current'" 55 | }, 56 | "max_charging": { 57 | "command": "set/max_charging", 58 | "config": "set_config", 59 | "description" : "Set max charging current, requires parameter 'current'" 60 | }, 61 | "back_to_grid": { 62 | "command": "set/back_to_grid", 63 | "config": "set_config", 64 | "description" : "Set battery recharge voltage (back to grid), requires parameter 'voltage', check your model's manual for allowed values" 65 | }, 66 | "back_to_battery": { 67 | "command": "set/back_to_battery", 68 | "config": "set_config", 69 | "description" : "Set battery re-discharge voltage (back to battery), requires parameter 'voltage', check your model's manual for allowed values" 70 | } 71 | }, 72 | 73 | "ListenOn": ["output_source_priority","charger_priority","bulk_charging","float_charging","utility_max_charging","max_charging","back_to_grid","back_to_battery"], 74 | "OnInit": { 75 | "StartInterval": ["general_status", "device_rated_information"] 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /example/US3000+US2000/us2000.service: -------------------------------------------------------------------------------- 1 | # copy this file to /lib/systemd/system/ 2 | 3 | [Unit] 4 | Description=US2000 Poller 5 | After=network-online.target 6 | 7 | [Service] 8 | Restart=on-failure 9 | WorkingDirectory=/home/pi/solar-sis/example/US2000B 10 | ExecStart=/usr/bin/node /home/pi/solar-sis/example/US2000B/project.js 11 | 12 | [Install] 13 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /example/calls.json: -------------------------------------------------------------------------------- 1 | { 2 | "query_config": { 3 | "start_bit": "^", 4 | "command_type": "P", 5 | "response_type": "D", 6 | "data_length_bits": 3, 7 | "seperator": ",", 8 | "ending_character": "\r", 9 | "crc_length": 2, 10 | "response_start": "^", 11 | "response_header_length": 4 12 | }, 13 | "query": { 14 | "general_status": { 15 | "hide": false, 16 | "influx": true, 17 | "cache": true, 18 | "command": "P003GS", 19 | "response": { 20 | "solar_input_voltage_1": 1, 21 | "solar_input_voltage_2": 1, 22 | "solar_input_current_1": 1, 23 | "solar_input_current_2": 1, 24 | "battery_voltage": 1, 25 | "battery_capacity": 1, 26 | "battery_current": 1, 27 | "ac_input_voltage_r": 1, 28 | "ac_input_voltage_s": 1, 29 | "ac_input_voltage_t": 1, 30 | "ac_input_frequency": 1, 31 | "ac_input_current_r": 1, 32 | "ac_input_current_s": 1, 33 | "ac_input_current_t": 1, 34 | "ac_output_voltage_r": 1, 35 | "ac_output_voltage_s": 1, 36 | "ac_output_voltage_t": 1, 37 | "ac_output_frequency": 1, 38 | "ac_output_current_r": 1, 39 | "ac_output_current_s": 1, 40 | "ac_output_current_t": 1, 41 | "inner_temperature": 1, 42 | "component_max_temperature": 1, 43 | "external_battery_temperature": 1 44 | } 45 | }, 46 | "power_status": { 47 | "command": "P003PS", 48 | "influx": true, 49 | "cache": true, 50 | "response": { 51 | "solar_input_power_1": 1, 52 | "solar_input_power_2": 1, 53 | "battery_power": 10, 54 | "ac_input_active_power_r": 100, 55 | "ac_input_active_power_s": 100, 56 | "ac_input_active_power_t": 100, 57 | "ac_input_total_active_power": 10, 58 | "ac_output_active_power_r": 10, 59 | "ac_output_active_power_s": 10, 60 | "ac_output_active_power_t": 10, 61 | "ac_output_total_active_power": 10, 62 | "ac_output_apperent_power_r": 10, 63 | "ac_output_apperent_power_s": 10, 64 | "ac_output_apperent_power_t": 10, 65 | "ac_output_total_apperent_power": 10, 66 | "ac_output_power_percentage": 1, 67 | "ac_output_connect_status": 1, 68 | "solar_input_1_work_status": 1, 69 | "solar_input_2_work_status": 1, 70 | "battery_power_direction": 1, 71 | "dc_ac_power_direction": 1, 72 | "line_power_direction": 1 73 | } 74 | }, 75 | "feeding_grid_power_calibration": { 76 | "command": "P006FPADJ", 77 | "response": { 78 | "feeding_grid_derection_r": false, 79 | "feeding_grid_calibration_power_r": 1, 80 | "feeding_grid_derection_s": false, 81 | "feeding_grid_calibration_power_s": 1, 82 | "feeding_grid_derection_t": false, 83 | "feeding_grid_calibration_power_t": 1 84 | } 85 | }, 86 | "generated_energy_of_year": { 87 | "command": "P010EY", 88 | "sum_crc": true, 89 | "variables": { 90 | "year": [4] 91 | }, 92 | "response": { 93 | "generated_energy": 1 94 | } 95 | }, 96 | "generated_energy_of_month": { 97 | "command": "P010EM", 98 | "sum_crc": true, 99 | "variables": { 100 | "year": [4], 101 | "month": [2] 102 | }, 103 | "response": { 104 | "generated_energy": 1 105 | } 106 | }, 107 | "generated_energy_of_day": { 108 | "command": "P010ED", 109 | "sum_crc": true, 110 | "variables": { 111 | "year": [4], 112 | "month": [2], 113 | "day": [2] 114 | }, 115 | "response": { 116 | "generated_energy": 1 117 | } 118 | } 119 | }, 120 | "set_config": { 121 | "start_bit": "^", 122 | "command_type": "S", 123 | "response_type": "", 124 | "data_length_bits": 0, 125 | "seperator": ",", 126 | "ending_character": "\r", 127 | "crc_length": 2, 128 | "response_accept_command": 1, 129 | "response_refuse_command": 0, 130 | "variable_length_fillout": "0", 131 | "response_start": "^", 132 | "response_header_length": 4 133 | }, 134 | "set": { 135 | "feeding_grid_power_calibration":{ 136 | "command": "S012FPADJ", 137 | "variables": { 138 | "feeding_grid_derection": [1, 0, 1], 139 | "feeding_grid_calibration_power": [4, 0, 999] 140 | } 141 | }, 142 | "f1": { 143 | "command": "S013FP", 144 | "hide": true, 145 | "variables": { 146 | "fase": "", 147 | "watt": [4, 0, 999] 148 | } 149 | } 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /example/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "serial_port": "/dev/hidraw1", 3 | "serial_baudrate": 2400, 4 | "serial_queue_delay": 200, 5 | "serial_parsers_readline": "\r", 6 | "serial_restart_threshold": 10000, 7 | "serial_clear_command_queue_on_restart": true, 8 | "http_port": 3004, 9 | "influx_pre_header": "mpi_", 10 | "influxUrl": "http://localhost:8086/write?db=powerwall&precision=s", 11 | "EndPoints": { 12 | "MyInflux": { 13 | "type": "influx", 14 | "host": "localhost", 15 | "port": "8086", 16 | "database": "powerwall", 17 | "prefix": "mpi_" 18 | }, 19 | "MyMqtt": { 20 | "type": "mqtt", 21 | "host": "mqtt://localhost" 22 | } 23 | }, 24 | "IntervalCommands": [ 25 | { 26 | "name": "general_status", 27 | "config": "query_config", 28 | "command": "query/general_status", 29 | "interval": 5200, 30 | "max": 0, 31 | "influx": true 32 | }, 33 | { 34 | "name": "power_status", 35 | "config": "query_config", 36 | "command": "query/power_status", 37 | "interval": 4000, 38 | "max": 0, 39 | "callback": "power_status", 40 | "influx": true 41 | } 42 | ], 43 | "QuickCommands": { 44 | "feeding_grid_power_calibration": { 45 | "command": "query/feeding_grid_power_calibration", 46 | "config": "query_config", 47 | "callback": "feeding_grid_power_calibration" 48 | }, 49 | "f1": { 50 | "command": "set/f1", 51 | "config": "set_config", 52 | "before": "before_f1", 53 | "callback": "callback_f1" 54 | } 55 | }, 56 | "ListenOn": ["f1"], 57 | "OnInit": { 58 | "RunCommands": ["feeding_grid_power_calibration"], 59 | "StartInterval": ["general_status", "power_status"] 60 | } 61 | } -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * solar-sis 3 | * solar serial inverter system 4 | * Copyright(c) 2017 Erik Johansson, Daniel Römer 5 | * MIT Licensed 6 | */ 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Module dependencies. 12 | * @private 13 | */ 14 | 15 | var express = require('express') 16 | var app = express() 17 | var request = require('request'); 18 | const SerialPort = require('serialport'); 19 | const Readline = require('@serialport/parser-readline'); 20 | var fs = require('fs'); 21 | var log = require('npmdatelog'); 22 | var CRC16 = require('crc16'); 23 | 24 | log.enableDate('YYYY-MM-DD HH:mm:ss'); 25 | 26 | 27 | /** 28 | * Module exports. 29 | * @public 30 | */ 31 | 32 | module.exports.mpi = mpi; 33 | module.exports.calls = calls; 34 | module.exports.session = session; 35 | module.exports.SendDataToInflux = SendDataToInflux; 36 | module.exports.cache = cache; 37 | 38 | 39 | var calls = JSON.parse(fs.readFileSync(process.argv[2] ? process.argv[2] : 'calls.json', "utf8")); 40 | var session = JSON.parse(fs.readFileSync(process.argv[3] ? process.argv[3] : 'session.json', "utf8")); 41 | 42 | // mqtt stuff 43 | const mqtt = require('mqtt') 44 | //cybertza 20/02/2020 test 45 | // define in session.json 46 | // "mqttserver": "mqtt://yourserver", 47 | // "mqtttopic": "solarsis/inverter/", 48 | // no user support just yet 49 | let mqttserver = (session.mqttserver || 'mqtt://localhost'); 50 | let mqtttopic = (session.mqtttopic || "solarsis/inverter"); 51 | var client = mqtt.connect(mqttserver,{will: { topic: mqtttopic + 'LWT', payload: 'Offline', qos: 1, retain: true, properties: {willDelayInterval: 30 }},username: 'power'}); 52 | 53 | /** 54 | * A object to be added to the CommandQueue for scheduled to be sent to the converter on serialport 55 | * @class 56 | * @param {string} name The name of the queue command 57 | */ 58 | 59 | client.on('connect', () => { 60 | // Inform HASS.IO State of sensor, valuable if you want to do a notify when comms are down. 61 | client.publish(mqtttopic + 'LWT', 'Online') 62 | }) 63 | 64 | 65 | function QueueCommand(name) { 66 | this.name = name; 67 | this.cmd = []; 68 | this.timestamp = Date.now(); 69 | this.last = Date.now(); 70 | this.callback; 71 | this.recived = false; 72 | this.interval = 0; 73 | this.times = 0; 74 | this.max = 0; 75 | this.req; 76 | this.res; 77 | this.isSetCommand = true; 78 | 79 | /** 80 | * Add a command to this queue command 81 | * @function 82 | * @param {string} cmd The command to add 83 | */ 84 | this.addCommand = function (cmd) { 85 | if (cmd.slice != undefined) { 86 | for (var i = 0; i < cmd.length; i += 8) { 87 | this.cmd.push(Buffer.from(cmd.slice(i, i + 8), 'ascii')); 88 | } 89 | } 90 | } 91 | } 92 | 93 | /** 94 | * A object to handle command and log commands to be sent to converter on serialport 95 | * @class 96 | */ 97 | function CommandQueue() { 98 | this.commands = []; 99 | this.logs = []; 100 | this.commandHistory = []; 101 | 102 | /** 103 | * Add a new command to queue 104 | * @function 105 | * @param {QueueCommand} qcmd Command to add to queue 106 | */ 107 | this.addCommand = function (qcmd) { 108 | if (qcmd != undefined) { 109 | this.commands.push(qcmd); 110 | } 111 | } 112 | 113 | /** 114 | * Add a new log command to queue 115 | * @function 116 | * @param {QueueCommand} qcmd Log command to add to queue 117 | */ 118 | this.addLogCommand = function (qcmd) { 119 | if (qcmd != undefined) { 120 | this.logs.push(qcmd); 121 | } 122 | } 123 | 124 | /** 125 | * Get the next command in the command queue 126 | * @function 127 | * @returns {QueueCommand} 128 | */ 129 | this.getNextCommand = function () { 130 | var cmd = this.commands.shift(); 131 | this.commandHistory[cmd.name] = cmd; 132 | return cmd; 133 | } 134 | 135 | /** 136 | * Reuse a already added command 137 | * @function 138 | * @param {string} name The name of the command to resurrect 139 | * @returns {QueueCommand} Reused command 140 | */ 141 | this.resurrectCommand = function (name) { 142 | var cmd = this.commandHistory[name]; 143 | if (cmd != undefined) { 144 | cmd.recived = false; 145 | cmd.req = undefined; 146 | cmd.res = undefined; 147 | cmd.times = 0; 148 | } 149 | return cmd; 150 | } 151 | 152 | /** 153 | * Get next log command 154 | * @function 155 | * @returns {QueueCommand} The next log command 156 | */ 157 | this.getNextLog = function () { 158 | var index = this.logs.findIndex((element, i, array) => { 159 | return (Date.now() - element.last >= element.interval) ? true : false; 160 | }); 161 | 162 | return this.getLogCommand(index); 163 | } 164 | 165 | /** 166 | * Get log command from index in queue 167 | * @function 168 | * @param {int} index Index of command to get 169 | * @returns {QueueCommand} 170 | */ 171 | this.getLogCommand = function (index) { 172 | 173 | if (this.logs.length < 1 || index < 0) return undefined; 174 | 175 | return (this.logs[index].max == 0 || this.logs[index].times < this.logs[index].max) ? 176 | this.logs[index] : 177 | this.removeLogCommand(index); 178 | } 179 | 180 | /** 181 | * Removed log command from queue from index 182 | * @function 183 | * @param {int} index Index of command to remove 184 | */ 185 | this.removeLogCommand = function (index) { 186 | return this.logs.splice(index, 1)[0]; 187 | } 188 | 189 | /** 190 | * Get the total number of commands in log and action queue 191 | * @function 192 | * @returns {int} The number of commands 193 | */ 194 | this.count = function () { 195 | return this.commands.length + this.logs.length; 196 | } 197 | 198 | this.clearCommandQueue = function () { 199 | this.commands = []; 200 | } 201 | } 202 | 203 | /** 204 | * Create a influx accepted string from current string 205 | * @function 206 | */ 207 | 208 | function ToInfluxString(mergedDataArray) { 209 | var s = ""; 210 | 211 | Object.keys(mergedDataArray).forEach((key) => { 212 | s += key + "=" + mergedDataArray[key] + ","; 213 | }); 214 | 215 | return s.slice(0, -1); 216 | } 217 | 218 | /** 219 | * Merge json defined protocol return object and return data array 220 | * @function 221 | * @param {object} json A json object to merge the array values into 222 | * @param {object} queryValues Data array of matched json protocol definitions 223 | * @returns {object} A merged json object 224 | */ 225 | 226 | function MergeDataArray (json, queryValues) { 227 | var c = 0; 228 | var tempValues = {}; 229 | var s = JSON.parse(JSON.stringify(json), (key, value) => { 230 | if (typeof value === 'string') value = '"' + queryValues[c] + '"'; 231 | if (typeof value === 'number') value = queryValues[c] / ((value != 0) ? value : 1); 232 | else if (typeof value === 'boolean') value = (value) ? queryValues[c] : undefined; 233 | else if (value instanceof Array) { 234 | if(value.length == 4 && tempValues[value[0]] && tempValues[value[0]].toString().length == Number(value[1])) { 235 | value = tempValues[value[0]].toString().substring(Number(value[2]), Number(value[3])); 236 | } else { 237 | value = undefined; 238 | } 239 | } else if (!Number.isNaN(Number(value))) value = Number(value); 240 | c++; 241 | tempValues[key] = value; 242 | 243 | // CyberTza 20/02/2020 just doing mqtt here since i dont know better 244 | //if mqtt is defined do this else dont. 245 | //console.log("key: " + key + " value: " + value + " Qvalue: " + queryValues[c]); 246 | //if ( key == "") console.log("key: " + key + " value: " + value + " Qvalue: " + queryValues[c]); // we dont want this 247 | if ( key == "") return value; // we dont want empty keys to mqtt, so lets just exit now. 248 | //client.publish('solarsis/pip/' + key, value.toString() ); 249 | client.publish(mqtttopic + key, value.toString() ); 250 | return value; 251 | }); 252 | 253 | return s; 254 | } 255 | 256 | /** 257 | * Calculate a crc16 on a string 258 | * @function 259 | * @param {string} str String to calculate a crc16 on 260 | * @returns {string} The crc16 as a string 261 | */ 262 | 263 | function GetCrc16 (str) { 264 | var crc = ""; 265 | Buffer.from(CRC16(str).toString(16), 'hex').forEach((b) => { 266 | if (b==10 || b==13 || b==40) { 267 | b++; 268 | } 269 | crc += String.fromCharCode(b); 270 | }); 271 | return crc; 272 | } 273 | 274 | /** 275 | * Remove protocol specifications header from response string 276 | * @function 277 | * @param {object} commandConfig Object that contains protocol config object 278 | * @param {string} str String to remove remove protocol headers from 279 | * @returns {string} A header cleaned string 280 | */ 281 | 282 | function ResponseRemoveHeader(commandConfig, str) { 283 | var startIndex = str.indexOf(commandConfig.response_start ? commandConfig.response_start : "") + 1; 284 | var endIndex = str.length - ((commandConfig.crc_length ? commandConfig.crc_length : 0)); 285 | 286 | str = str.substring(startIndex, endIndex); 287 | 288 | if(str.length > 1) { 289 | str = str.substring(commandConfig.response_header_length); 290 | } 291 | return str.trim(); 292 | } 293 | 294 | /** 295 | * Get Json command object from command path 296 | * @function 297 | * @param {object} callsJson Json object that contains command objects 298 | * @param {string} path Path to command object to get 299 | * @returns {object} Json command object at path 300 | */ 301 | 302 | function getJsonCommandObjectFromPath(callsJson, path) { 303 | var ar = path.split("/").filter((e) => {return e.length > 0 ? true : false }); 304 | var jsonCommandObject = callsJson; 305 | ar.forEach((element) => { 306 | jsonCommandObject = jsonCommandObject[element]; 307 | }); 308 | return jsonCommandObject; 309 | } 310 | 311 | /** 312 | * Get Json protocol config object from command path 313 | * @function 314 | * @param {object} callsJson Json object that contains protocol config objects 315 | * @param {string} path Path to protocol config object to get 316 | * @returns {object} Json protocol config object at command pat 317 | */ 318 | 319 | function getJsonConfigObjectFromPath(callsJson, path) { 320 | var ar = path.split("/").filter((e) => {return e.length > 0 ? true : false }); 321 | if(ar.length > 0) { 322 | return callsJson[ar[0] + "_config"]; 323 | } 324 | } 325 | 326 | function GetCacheObject(path) { 327 | if(path.endsWith("/cache")) { 328 | path = path.slice(0, path.length - "/cache".length); 329 | } 330 | 331 | //console.log("PATH: " + path); 332 | 333 | /* 334 | var ar = path.split("/").filter((e) => {return e.length > 0 ? true : false }); 335 | console.log(ar); 336 | var cacheObject = cache; 337 | ar.forEach((element) => { 338 | cacheObject = cacheObject[element]; 339 | }); 340 | */ 341 | 342 | return cache[path]; 343 | } 344 | 345 | function StoreInCache(path, data) { 346 | /* 347 | var ar = path.split("/").filter((e) => {return e.length > 0 ? true : false }); 348 | console.log(ar); 349 | var cacheObject = {}; 350 | ar.forEach((element) => { 351 | cacheObject[element] = {}; 352 | cacheObject = cacheObject[element]; 353 | }); 354 | */ 355 | cache[path] = data; 356 | } 357 | 358 | /** 359 | * Split Data string to array 360 | * @function 361 | * @param {object} commandConfig Object that contains protocol config object 362 | * @param {string} str Data string to split 363 | * @returns {object} Data array 364 | */ 365 | 366 | function ResponseToDataArray(commandConfig, str) { 367 | var split_on = commandConfig.response_seperator 368 | ? commandConfig.response_seperator 369 | : commandConfig.seperator ? commandConfig.seperator : ""; 370 | 371 | return str.split(split_on); 372 | } 373 | 374 | /** 375 | * Send data to Influx db 376 | * @function 377 | * @param {string} data Data string to send 378 | */ 379 | function SendDataToInflux (data, url) { 380 | if (data) { 381 | 382 | request.post({ 383 | auth: { 384 | user: session.influxUser? session.influxUser : '', 385 | pass: session.influxPassword? session.influxPassword : '' 386 | }, 387 | headers: { 388 | 'content-type': 'application/x-www-form-urlencoded' 389 | }, 390 | url: url ? url : session.influxUrl, 391 | body: data 392 | }, function (error, response, body) { 393 | if (error) { 394 | log.error('influx', error); 395 | } 396 | else { 397 | if (body.length == 0) { 398 | log.info ('influx','Sent Successfully'); 399 | } 400 | else { 401 | log.error ('influx',''); 402 | log.error ('influx',''); 403 | log.error ('influx','------------------ERROR-------------------------------------------'); 404 | log.error ('influx',''); 405 | log.error ('influx',''); 406 | log.error ('influx', body); 407 | log.error ('influx',''); 408 | log.error ('influx','------------------ERROR (reason at end of string)------------------'); 409 | //updated CyberTza 20/02/2020 410 | } 411 | } 412 | }); 413 | } 414 | } 415 | 416 | /** 417 | * The command queue to add command to 418 | * @global 419 | */ 420 | var cmdQueue = new CommandQueue(); 421 | 422 | /** 423 | * The current command to recive reponse from 424 | * @global 425 | */ 426 | var reciveCommand; 427 | 428 | var restartingSerialLock = false; 429 | 430 | /** 431 | * Cache to store cached data reponses 432 | * @global 433 | */ 434 | var cache = {}; 435 | 436 | Object.keys(calls).filter((v) => { 437 | return !v.endsWith("_config"); 438 | }).forEach((mainkey) => { 439 | //cache[mainkey] = {}; 440 | Object.keys(calls[mainkey]).forEach((commandkey) => { 441 | cache[mainkey + "/" + commandkey] = calls[mainkey][commandkey].response; 442 | }); 443 | }); 444 | 445 | //console.log(JSON.stringify(cache)); 446 | 447 | function mpi() { 448 | 449 | /** 450 | * Object for all callbacks 451 | */ 452 | this.callbacks; 453 | 454 | this.init = function(callbacks) { 455 | this.callbacks = callbacks; 456 | 457 | /** 458 | * A serielport object to communicate to the inverter 459 | * @global 460 | */ 461 | const port = new SerialPort(session.serial_port, { 462 | baudRate: session.serial_baudrate 463 | }); 464 | 465 | const parser = port.pipe(new Readline({ delimiter: session.serial_parsers_readline })); 466 | 467 | /** 468 | * Send data to Converter on the serialport, checks the command queue and send command or log. 469 | * Made to make the async serialport api to sync due to the sync responses from converter. 470 | * @function 471 | */ 472 | setInterval(function () { 473 | if (!restartingSerialLock && port.isOpen && cmdQueue.count() > 0 && reciveCommand == undefined) { 474 | if (cmdQueue.commands.length > 0) { 475 | reciveCommand = cmdQueue.getNextCommand(); 476 | } else if (cmdQueue.logs.length > 0) { 477 | reciveCommand = cmdQueue.getNextLog(); 478 | } 479 | 480 | if (reciveCommand != undefined) { 481 | log.info('serial:' + session.serial_port + ':SEND', reciveCommand.name); 482 | log.info('serial:' + session.serial_port + ':SEND_RAW', JSON.stringify(reciveCommand.cmd)); 483 | reciveCommand.cmd.forEach(function (cmd) { 484 | //cmd.forEach((v) => {console.log(v.toString(16));}); 485 | 486 | port.write(cmd, function (error) { 487 | port.drain(function (error) {}); 488 | }); 489 | }); 490 | reciveCommand.last = Date.now(); 491 | reciveCommand.times++; 492 | } 493 | } else if (!restartingSerialLock && reciveCommand != undefined && Date.now() - reciveCommand.last > session.serial_restart_threshold) { 494 | restartingSerialLock = true; 495 | log.error('serial:' + session.serial_port, 'Reciving reached threshold ' + (Date.now() - reciveCommand.last) + 'ms (' + session.serial_restart_threshold + 'ms)') 496 | log.warn('serial:' + session.serial_port, 'Close serial port'); 497 | port.flush(); 498 | port.close((error) => { 499 | if(error) log.error('serial:' + session.serial_port, error); 500 | else port.open((error) => { 501 | if(error) log.error('serial:' + session.serial_port, error); 502 | }); 503 | 504 | }); 505 | if(session.serial_clear_command_queue_on_restart) { 506 | cmdQueue.clearCommandQueue(); 507 | } 508 | reciveCommand = undefined; 509 | restartingSerialLock = false; 510 | } else if (reciveCommand != undefined) { 511 | //console.log(Date.now() - reciveCommand.last); 512 | //console.log(session.serial_restart_threshold - (Date.now() - reciveCommand.last)); 513 | } 514 | }, session.serial_queue_delay); 515 | 516 | var rootObjects = []; 517 | var childObjects = []; 518 | 519 | Object.keys(calls).filter((v) => { 520 | return !v.endsWith("_config"); 521 | }).forEach((key) => { 522 | rootObjects.push("/" + key); 523 | Object.keys(calls[key]).forEach((commad) => { 524 | if(!calls[key][commad].hide) { 525 | childObjects.push("/" + key + "/" + commad); 526 | if(calls[key][commad].cache) { 527 | childObjects.push("/" + key + "/" + commad + "/cache"); 528 | } 529 | } 530 | }); 531 | }); 532 | 533 | //console.log("rootObjects: " + rootObjects); 534 | //console.log("childObjects: " + childObjects); 535 | /** 536 | * Handle any request connect to defined protocols in json protocol definition 537 | * @function 538 | */ 539 | app.get(rootObjects.concat(childObjects).concat(!session.ListenOn ? [] : Array.from(session.ListenOn, (word) => {return "/" + word})), (req, res) => { 540 | 541 | log.http("get:REQUEST", req.ip + ':' + req.originalUrl); 542 | 543 | var path = req.path.slice(1); 544 | 545 | if(rootObjects.includes(req.path)) { 546 | res.send(calls[path]); 547 | } else if(path.endsWith("/cache")) { 548 | log.http("cache", 'Data found in cache for query'); 549 | res.send(JSON.stringify(GetCacheObject(path))); 550 | } else { 551 | var queryVals = req.query; 552 | 553 | if(session.ListenOn.includes(path)) { 554 | var qc = session.QuickCommands[path]; 555 | if(qc.before) { 556 | queryVals = this.callbacks[qc.before](queryVals); 557 | } 558 | } 559 | log.http('get', 'Query values: ' + JSON.stringify(queryVals)); 560 | this.SendQuickCommand(path, queryVals, res); 561 | } 562 | 563 | // Vad man ska retunerar tillbaka till användare vid http get, json, array, string, eller callbacken 564 | // Fixa så att den tar hand om input värden och cheackar dessa 565 | // lägga till att behandla influx, mqtt plugin i plugin och session m.m. 566 | // Gör QucikCommands tillgängliga från webben 567 | // lägga till om set kommandon ska ha crc16, session och calls 568 | // lägga till logning till consol och fil på ett satt sätt 569 | }); 570 | 571 | // Open serialport an start listen 572 | port.on('open', () => { 573 | //console.log('Port open'); 574 | log.info('serial:' + session.serial_port, 'Open serial port'); 575 | 576 | if(session.OnInit.RunCommands) { 577 | session.OnInit.RunCommands.forEach((element) => { 578 | this.SendQuickCommand(session.QuickCommands[element]); 579 | }); 580 | } 581 | 582 | if(session.IntervalCommands) { 583 | //console.log(session.IntervalCommands); 584 | session.IntervalCommands.forEach((element) => { 585 | //var c = calls.query[element.command]; 586 | var c = getJsonCommandObjectFromPath(calls, element.command); 587 | //console.log(c); 588 | var commandConfig = getJsonCommandObjectFromPath(calls, element.config); 589 | //console.log(commandConfig); 590 | var lc = new QueueCommand(element.command); 591 | lc.interval = element.interval; 592 | 593 | var commandCrc16 = ""; 594 | if((commandConfig.crc16 || c.crc16) && (("crc16" in c && c.crc16) || !("crc16" in c))) { 595 | commandCrc16 = GetCrc16(commandConfig.start_bit + c.command); 596 | } 597 | 598 | /* 599 | Buffer.from(CRC16(commandConfig.start_bit + c.command).toString(16), 'hex').forEach((b) => { 600 | console.log(b.toString(16)); 601 | }); 602 | 603 | console.log("commandCrc16: " + commandCrc16); 604 | */ 605 | 606 | lc.addCommand(commandConfig.start_bit + c.command + commandCrc16 + commandConfig.ending_character); 607 | if(element.callback && this.callbacks[element.callback]) { 608 | lc.callback = this.callbacks[element.callback]; 609 | } 610 | 611 | if(element.customMerge && this.callbacks[element.customMerge]) 612 | { 613 | lc.customMerge = this.callbacks[element.customMerge]; 614 | } 615 | 616 | log.info('queue:ADD_INTERVAL', lc.name + ':' + commandConfig.start_bit + c.command + commandCrc16 + commandConfig.ending_character); 617 | cmdQueue.addLogCommand(lc); 618 | //console.log(lc); 619 | }); 620 | } 621 | }); 622 | 623 | 624 | // Print error messsage if any error on serialport com 625 | port.on('error', function (error) { 626 | log.error('serial:' + session.serial_port, error); 627 | //console.log('error: ' + error); 628 | }); 629 | 630 | // Event on new data on serialport 631 | parser.on('data', function (str) { 632 | log.info('serial:' + session.serial_port + ':RECIVED_RAW', 'Data: ' + str + " Length: " + str.length); 633 | //console.log('str: -' + str + "- length: " + str.length); 634 | if (!restartingSerialLock && reciveCommand != undefined) { 635 | 636 | reciveCommand.recived = true; 637 | 638 | log.info('serial:' + session.serial_port + ':RECIVED', reciveCommand.name); 639 | //console.log("Recive: " + reciveCommand.name); 640 | 641 | var commandConfig = (reciveCommand.config) 642 | ? getJsonCommandObjectFromPath(calls, reciveCommand.config) 643 | : getJsonConfigObjectFromPath(calls, reciveCommand.name); 644 | 645 | var dataArray = ResponseToDataArray(commandConfig, ResponseRemoveHeader(commandConfig, str)); 646 | var command = getJsonCommandObjectFromPath(calls, reciveCommand.name) 647 | 648 | var customMerge = reciveCommand.customMerge != undefined ? reciveCommand.customMerge : MergeDataArray; 649 | 650 | if(command.response) { 651 | var mergedDataArray = customMerge(command.response, dataArray); 652 | } else { 653 | var mergedDataArray = customMerge({"success": 1}, dataArray); 654 | } 655 | //console.log("mergedDataArray: " + JSON.stringify(mergedDataArray)); 656 | var influxString = ToInfluxString(mergedDataArray); 657 | //console.log("influxString: " + influxString); 658 | if(reciveCommand.res) { 659 | reciveCommand.res.send(JSON.stringify(mergedDataArray)); 660 | } 661 | //console.log("command.influx:" + command.influx); 662 | if(command.influx) { 663 | //console.log(session.influx_pre_header + reciveCommand.name.replace("/", "_") + " " + influxString); 664 | // SendDataToInflux(session.influx_pre_header + reciveCommand.name.replace("/", "_") + " " + influxString); 665 | console.log("device=" + session.influx_device + ",query=" + reciveCommand.name.replace("/", "_") + " " + influxString); 666 | SendDataToInflux(session.influx_pre +",device=" + session.influx_device + ",query="+ reciveCommand.name.replace("/", "_") + " " + influxString); 667 | } 668 | 669 | if(command.cache) { 670 | StoreInCache(reciveCommand.name, mergedDataArray); 671 | } 672 | 673 | if (reciveCommand.callback != undefined) { 674 | //console.log("str: " + str); 675 | 676 | reciveCommand.callback(reciveCommand, ResponseRemoveHeader(commandConfig, str), dataArray, mergedDataArray, influxString); 677 | } 678 | 679 | reciveCommand = undefined; 680 | } 681 | }); 682 | 683 | // Start listen on http get on localhost:session_port 684 | app.listen(session.http_port, function () { 685 | log.http('localhost', "Listening on port: " + session.http_port); 686 | //console.log('Listening on port: ' + session.http_port); 687 | }); 688 | } 689 | 690 | /** 691 | * Create a command and put it on the send queue 692 | * @function 693 | * @param {string} quickcommand Path to call or name of QuickCommand to send 694 | * @param {object} value Parameters matching the command variables in calls 695 | */ 696 | this.SendQuickCommand = function(quickcommand, value, response) { 697 | if(Object.keys(session.QuickCommands).includes(quickcommand)) { 698 | quickcommand = session.QuickCommands[quickcommand]; 699 | } 700 | 701 | var qc = new QueueCommand(quickcommand.command ? quickcommand.command : quickcommand); 702 | 703 | var c = (quickcommand.command) 704 | ? getJsonCommandObjectFromPath(calls, quickcommand.command) 705 | : getJsonCommandObjectFromPath(calls, quickcommand); 706 | //console.log("quickcommand.command: " + c); 707 | 708 | var commandConfig = (quickcommand.config) 709 | ? getJsonCommandObjectFromPath(calls, quickcommand.config) 710 | : getJsonConfigObjectFromPath(calls, quickcommand); 711 | //console.log("commandConfig: " + commandConfig); 712 | 713 | var valueString = ""; 714 | if(!value && quickcommand.default_value) { 715 | value = quickcommand.default_value; 716 | } 717 | if(value && c.variables) { 718 | //console.log("value: " + value) 719 | 720 | var variablesInOrder = {}; 721 | 722 | Object.keys(c.variables).forEach((key) => { 723 | if(value[key]) { 724 | variablesInOrder[key] = value[key]; 725 | } 726 | }); 727 | 728 | Object.keys(variablesInOrder).forEach((key) => { 729 | var v = variablesInOrder[key]; 730 | var cv = c.variables[key]; 731 | 732 | if(Number(v) && Array.isArray(cv)) { 733 | v = Number(v); 734 | if(cv.length > 1 && v < cv[1]) { 735 | v = cv[1]; 736 | } else if (cv.length > 2 && v > cv[2]) { 737 | v = cv[2]; 738 | } 739 | v = v.toString(); 740 | 741 | if(cv.length > 0) { 742 | for(var s = 0; s < cv[0]; s++) { 743 | v = commandConfig.variable_length_fillout + v; 744 | } 745 | 746 | v = v.slice(-(cv[0])); 747 | } 748 | 749 | } else { 750 | v = v + cv; 751 | } 752 | 753 | valueString += v + commandConfig.seperator; 754 | }); 755 | } 756 | 757 | valueString = valueString.slice(0, valueString.length -1); 758 | 759 | //console.log("valueString: " + valueString); 760 | //console.log("command: " + commandConfig.start_bit + c.command + valueString + commandConfig.ending_character); 761 | 762 | var sum_crc = ""; 763 | if(c.sum_crc) { 764 | sum_crc = commandConfig.start_bit + c.command + valueString; 765 | var sum = 0; 766 | sum_crc.split('').forEach((e) => { 767 | //console.log(e.charCodeAt(0).toString(16)); 768 | sum += Number(e.charCodeAt(0)); 769 | }); 770 | sum_crc = sum.toString(16); 771 | } 772 | 773 | var commandCrc16 = ""; 774 | if((commandConfig.crc16 || c.crc16) && (("crc16" in c && c.crc16) || !("crc16" in c))) { 775 | commandCrc16 = GetCrc16(commandConfig.start_bit + c.command + valueString); 776 | } 777 | 778 | //console.log("commandCrc16: " + commandCrc16); 779 | 780 | qc.addCommand(commandConfig.start_bit + c.command + valueString + sum_crc + commandCrc16 + commandConfig.ending_character); 781 | 782 | if(quickcommand.callback && this.callbacks[quickcommand.callback]) { 783 | qc.callback = this.callbacks[quickcommand.callback]; 784 | } else if (c.callback) { 785 | qc.callback = c.callback; 786 | } 787 | 788 | if(response) { 789 | qc.res = response; 790 | } 791 | 792 | log.info('queue:ADD', qc.name + ': ' + commandConfig.start_bit + c.command + valueString + sum_crc + commandCrc16 + commandConfig.ending_character); 793 | cmdQueue.addCommand(qc); 794 | } 795 | } 796 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solar-sis", 3 | "version": "1.0.10", 4 | "description": "solar serial inverter system", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "solar", 11 | "inverter", 12 | "serialport", 13 | "inverter", 14 | "json" 15 | ], 16 | "author": "opengd", 17 | "license": "MIT", 18 | "dependencies": { 19 | "crc16": "latest", 20 | "express": "latest", 21 | "fs": "latest", 22 | "npmdatelog": "latest", 23 | "request": "latest", 24 | "serialport": "7.1.4", 25 | "influx": "latest", 26 | "mqtt": "latest", 27 | "@serialport/parser-readline": "latest" 28 | } 29 | } 30 | --------------------------------------------------------------------------------