devicestatus
10 min
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 \<font color="#704ae0">string\</font> possible values are "battery", "ethernet", or "ac" switch mode \<font color="#704ae0">string\</font> returns "soft" or "hard" battery \<font color="#704ae0">string\</font> possible values are "charging", "discharging", "complete", "absent", or "fault" soc percent \<font color="#704ae0">int\</font> the state of charge of the battery in percent from 0 (empty) to 100 (full) extensionsinformation name \<font color="#704ae0">string\</font> the name of the extension size \<font color="#704ae0">int\</font> 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 \<font color="#704ae0">string\</font> the extension id version \<font color="#704ae0">string\</font> the extension version poepowerinformation value \<font color="#704ae0">float\</font> returns the "power value" units \<font color="#704ae0">string\</font> returns the "power value" units ("w") poeinformation status \<font color="#704ae0">string\</font> the status string can be "active", "standby", or "inactive" power \<font color="#704ae0">poepowerinformation\</font> 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); })