Player APIs (BrightScript & Ja...
JavaScript APIs

devicestatus

10min
this object provides information about the device hardware, firmware, and features devicestatus idl interface devicestatus { promise\<bvninformationlist> getbvnpipelines(); promise\<bvninformationlist> getbvncomponents(); promise\<powerinformation> getpowerstatus(); promise\<extensionsinformationlist> getextensions(); promise\<poeinformation> getpoestatus(); }; interface powerinformation { attribute string source; attribute string switch mode; attribute string battery; attribute int soc percent; }; interface bvninformation { attribute string name; attribute int index; attribute bvnregisterlist registers; attribute bvnpipelinelist items; //@optional }; interface bvnregister { attribute string name; attribute int offset; }; interface bvnpipeline { attribute string name; }; interface extensionsinformation { attribute string name; attribute int size; //@optional attribute string id; attribute string version //semver }; interface poepowerinformation { attribute float value; attribute string units; }; interface poeinformation { attribute string status; attribute poepowerinformation power; //@optional }; object creation to create a devicestatus object, load the @brightsign/status module using the require() method var devicestatusclass = require("@brightsign/devicestatus"); var devicestatus = new devicestatusclass(); devicestatus getpowerstatus() promise\<powerinformation> getpowerstatus() returns the device battery status as "charging", "discharging", "complete", "absent", or "fault" getextensions() promise\<extensionsinformationlist> getextensions() returns a promise which yields an object containing an extensions array with each element containing at least a name field other fields may also be present, but should not be relied on getpoestatus() promise\<poeinformation> getpoestatus() returns information about whether poe (power over ethernet) network is supported, available, and/or active on a device powerinformation source string string possible values are "battery", "ethernet", or "ac" switch mode string string returns "soft" or "hard" battery string string possible values are "charging", "discharging", "complete", "absent", or "fault" soc percent int int the state of charge of the battery in percent from 0 (empty) to 100 (full) extensionsinformation name string string the name of the extension size int int some extensions return a size and others do not players that have ac3 or e ac3 licenses installed will report those as extensions but no size will be included id string string the extension id version string string the extension version poepowerinformation value float float returns the "power value" units string string returns the "power value" units ("w") poeinformation status string string the status string can be "active", "standby", or "inactive" power poepowerinformation poepowerinformation see poepowerinformation above for details example to get the power status of a device var devicestatusclass = require("@brightsign/devicestatus"); var devicestatus = new devicestatusclass(); devicestatus getpowerstatus() then( function(data){ console log(json stringify(data)); }) catch( function(data){ console log("error " + data); })