====== Listing Detailed Spot Information ====== This application note describes shows how you can obtain a list of all Spots in your system, including the following details about each spot: * **Spot Group** Name of any enclosing Spot Group (blank for top-level Spots). * **Name** The name of this spot. * **Identity** The MAC address (if using IXILAB Player) or automatically assigned ID number. * **Playing** The block currently playing on this spot * **Connected** Indicates whether the spot is currently connected. * **Address** Show the IP address of the spot (only if connected). * **Active** The Spot's "active" state (i.e., it has an Attractor block that's currently in its active state). ===== Installation and First Use ===== First follow this [[blocks:app-note:start|general setup]]. Use this {{ :blocks:app-note:detailed-spot-information:spotinfo.zip |PIXILAB-Blocks-root}}, which contains all you need for this application note. Once that is done, follow these steps: - Start Blocks. - Open the editor using the Admin button. - Log in using the name admin and the password pixi. - Connect a [[blocks:porteus_kiosk|PIXILAB Player]] to the server (alternatively, open a second browser window pointed at the Blocks server, acting as a Display Spot). - Locate the Display Spot in the editor, double-click it and and reassign it to the ID shown by Spot added in the previous step. ==== Displaying the List ==== Open another browser window and go to the URL: http://localhost:8080/auth/spot-info.html Replace //localhost:8080// with the address/name of your Blocks server if you're not running on your local laptop. This displays a list of all connected Spots, which at this point contains only the single Display spot added above. :!: Placing the web page in the //auth// directory, rather than the more common //public// directory, requires the user accessing it to be logged in to Blocks, thus preventing anyone with access to the URL from accessing the web page. ==== Using on your own Server ==== If you want to incorporate this capability in your own Blocks server, copy the following files from the root folder of this application note to the corresponding directories on your Blocks server: * **script/user/SpotInfo.js** is a user script that provides the information shown. The corresponding .ts file is the source code for that script, useful if you want to make any changes, but not required to run the script. * **auth/spot-info.html** is a basic web page listing the information. This calls the SpotInfo user script to obtain the information, the lists it as a table. In addition to those two files, you also need to make sure that the //system// and //system_lib// contain the required files. If you had any scripts or drivers on your server since before, those files are most likely all there. If not, take them from the corresponding directories in this application note, or download and install the latest version of those files from [[https://github.com/pixilab/blocks-script/|here]]. You may also download a selfcontained block ready for import into Blocks containing the booth the HTML part and the Blocks part. {{ :blocks:app-note:detailed-spot-information:spotinfoblock.zip |}}