Project designed to investigate possible connection issues while working on Nest cloud to cloud integration.
- Nest-connections-test requires a version of node.js from the v4.2.x family.
$ npm install
You must provide a path to valid json config file to run test:
$ node index.js --config path-to-config
Provided config must have next structure:
{
"masterToken": "...",
"userTokens" : ["...", "...", ..., "..."]
}
Where:
masterToken
- firebase access token that used to update device property (must have write access to property)userTokens
- array of firebase access tokens connected to the same firebase model asadminToken
You can also use some additional arguments:
Argument name | Description | Default value |
---|---|---|
mode |
Approach to receive updates, possible values are ws (WebServices), rs (REST Streaming), full (both rs and ws ) |
ws |
testInterval |
Interval between two sequential tests, sec | 60 |
checkInterval |
Interval between two sequential checks that update received, ms | 500 |
checkTimes |
Maximum number of checks that update received before considering it's lost | 60 |
Example:
$ node index.js --config path-to-config --testInterval 60 --checkInterval 500 --checkTimes 60 --mode full