Exciting news!Announcing our $4.6M Series Seed. Learn more
Log in


Package Overview
File Explorer

Advanced tools


servient command line interface


Version published
Yearly downloads
increased by371.26%

Weekly downloads




Summary of updates

  • binding-firestore re-introduced
  • added tuya to binding-http
  • other improvements / bug-fixes

What's Changed (Automatically generated release notes)

  • fix: use proper handleUnobserveProperty call instead of event by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/734
  • Use new statistics links by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/732
  • refactor: remove obsolete / deprecated code by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/731
  • chore: increase version to 0.8.1 and fix dependency issues with TMs, CoAP, OPC-UA by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/727
  • fix template and change to async-await paradigm by @FadySalama in https://github.com/eclipse/thingweb.node-wot/pull/740
  • chore(binding-opcua): update packages by @erossignon in https://github.com/eclipse/thingweb.node-wot/pull/739
  • chore(deps): bump coap to 1.0.8 by @JKRhb in https://github.com/eclipse/thingweb.node-wot/pull/744
  • Fix CoapClientFactory constructor, clean up examples by @JKRhb in https://github.com/eclipse/thingweb.node-wot/pull/742
  • chore(binding-http): add HTTP examples from README as files by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/746
  • added tuya binding with security and codec management by @SeppiaBrilla in https://github.com/eclipse/thingweb.node-wot/pull/735
  • feat: cli to accept servient config through file/.env/cli-arguments by @fillobotto in https://github.com/eclipse/thingweb.node-wot/pull/733
  • adapted binding-firestore to 0.8 (Issue-482) by @hidetak in https://github.com/eclipse/thingweb.node-wot/pull/737
  • fix: value() might also return undefined if no value is expected by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/748
  • Exposed template update 0.8.x by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/752
  • issue-755 Measures for binding-firebase test failure by @hidetak in https://github.com/eclipse/thingweb.node-wot/pull/757
  • Cleanup td definititions (v2) by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/750
  • chore: regenerate package-lock.json for next release by @danielpeintner in https://github.com/eclipse/thingweb.node-wot/pull/759

New Contributors

  • @SeppiaBrilla made their first contribution in https://github.com/eclipse/thingweb.node-wot/pull/735
  • @fillobotto made their first contribution in https://github.com/eclipse/thingweb.node-wot/pull/733

Full Changelog: https://github.com/eclipse/thingweb.node-wot/compare/v0.8.0...v0.8.1



Command-line interface (CLI) of node-wot

Getting Started

The following examples show how to use wot-servient based CLI. The -h option explains the functionality and also how node-wot can be configured based on wot-servient.conf.json.

  • wot-servient -h or
  • node packages\cli\dist\cli.js

The -h help options shows the following output:

Usage: wot-servient [options] [SCRIPT]... wot-servient wot-servient examples/scripts/counter.js examples/scripts/example-event.js wot-servient -c counter-client.js wot-servient -f ~/mywot.conf.json examples/testthing/testthing.js Run a WoT Servient in the current directory. If no SCRIPT is given, all .js files in the current directory are loaded. If one or more SCRIPT is given, these files are loaded instead of the directory. If the file 'wot-servient.conf.json' exists, that configuration is applied. Options: -v, --version display node-wot version -i, --inspect[=[host:]port] activate inspector on host:port (default: -ib, --inspect-brk[=[host:]port] activate inspector on host:port and break at start of user script -c, --clientonly do not start any servers (enables multiple instances without port conflicts) -f, --configfile <file> load configuration from specified file -h, --help show this help wot-servient.conf.json syntax: { "servient": { "clientOnly": CLIENTONLY, "staticAddress": STATIC, "scriptAction": RUNSCRIPT }, "http": { "port": HPORT, "proxy": PROXY, "allowSelfSigned": ALLOW }, "mqtt" : { "broker": BROKER-URL, "username": BROKER-USERNAME, "password": BROKER-PASSWORD, "clientId": BROKER-UNIQUEID, "protocolVersion": MQTT_VERSION }, "log": { "level": LEVEL }, "credentials": { THING_ID1: { "token": TOKEN }, THING_ID2: { "username": USERNAME, "password": PASSWORD } } } wot-servient.conf.json fields: --------------------------------------------------------------------------- All entries in the config file structure are optional --------------------------------------------------------------------------- CLIENTONLY : boolean setting if no servers shall be started (default=false) STATIC : string with hostname or IP literal for static address config RUNSCRIPT : boolean to activate the 'runScript' Action (default=false) HPORT : integer defining the HTTP listening port PROXY : object with "href" field for the proxy URI, "scheme" field for either "basic" or "bearer", and corresponding credential fields as defined below ALLOW : boolean whether self-signed certificates should be allowed BROKER-URL : URL to an MQTT broker that publisher and subscribers will use BROKER-UNIQUEID : unique id set by mqtt client while connecting to broker MQTT_VERSION : number indicating the MQTT protocol version to be used (3, 4, or 5) LEVEL : string or number setting the log level: { error: 0, warn: 1, info: 2, debug: 3 } (default info) THING_IDx : string with TD "id" for which credentials should be configured TOKEN : string for providing a Bearer token USERNAME : string for providing a Basic Auth username PASSWORD : string for providing a Basic Auth password --------------------------------------------------------------------------- Environment variables must be provided in a .env file in the current working directory. Example: VAR1=Value1 VAR2=Value2


See instructions how to build node-wot as a standalone application.

Environment variables

If your scripts needs to access environment variables those must be supplied in a particular file. Node-wot cli uses dotenv library to load .env files located at the current working directory. For example, providing the following .env file will fill variables PORT and ADDRESS in scripts process.env field:

PORT=4242 ADDRESS=http://hello.com


See node-wot examples using Node.js.

More Details

See https://github.com/eclipse/thingweb.node-wot/



Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc