node-tcrouter
  • Welcome
  • Getting Started
  • Javascript Docs
    • TCRouter
  • Guides
    • Status Information
    • Sending Text Messages
    • Receive Text Messages
    • Device Connection Status
    • Control IO
    • Sending Emails
    • Control VPN
  • Hardware
    • Overview
  • Setup
    • Setup Overview
    • Socket Server
    • Enable SMS
    • Enable Email
    • Setup VPN
Powered by GitBook
On this page
  • All Status Information
  • Mutable Information

Was this helpful?

  1. Guides

Status Information

All Status Information

Execute getAllInfo() to load all available device and status information.

const tcr = require("@phoenixcontactusa/node-tcrouter");

var TCRouter = new tcr("192.168.1.1", 1432, 3000);

//All info from the router
TCRouter.getAllInfo()
  .then(info => {
    console.log(info);
  })
  //Catch networking or process errors
  .catch(e => {
    console.log(e, e.stack);
  });

Mutable Information

getMutableInfo should be used after the initial getAllInfo request so that only mutable data is requested.

//Upate mutable status info from the TC Router
TCRouter.getMutableInfo()
  .then(info => {
    console.log(info);
  })
  .catch(e => {
    console.log(e, e.stack);
  });
PreviousTCRouterNextSending Text Messages

Last updated 5 years ago

Was this helpful?