Download pool/shard010/JavaScript/0062742_iotdb_protect.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 655 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard010/JavaScript/0062742_iotdb_protect.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard010/JavaScript/0062742_iotdb_protect.js
-
curl -L -o 0062742_iotdb_protect.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard010/JavaScript/0062742_iotdb_protect.js
655 Bytes
| /* | |
| * How to use this module in IOTDB / HomeStar | |
| * This is the best way to do this | |
| * Note: to work, this package must have been installed by 'homestar install' | |
| */ | |
| ; | |
| const iotdb = require('iotdb'); | |
| iotdb.use("homestar-nest"); | |
| const things = iotdb.connect('NestProtect'); | |
| things.on("istate", function(thing) { | |
| console.log("+", "istate", thing.thing_id(), "\n ", thing.state("istate")); | |
| }); | |
| things.on("meta", function(thing) { | |
| console.log("+", "meta", thing.thing_id(), "\n ", thing.state("meta")); | |
| }); | |
| things.on("thing", function(thing) { | |
| console.log("+", "discovered", thing.thing_id(), "\n ", thing.state("meta")); | |
| }); | |