I would like to add a new column named status which will display whether the display is online or offline. It will be checked by pinging each displays using ip address of displays. I have seen a ClientAddress column in display table(in php myadmin) . Is there any way to access that value in status_dashboard.php file?
There is a column called loggedin which tells you this information already.
You can’t rely on the IP address in the display table unless you are on a local LAN without and NAT traversal (it is just the IP property of the web request made by the client).
If you really want to proceed you would need to add that value to the Theme using
Theme::Set() in the controller
Actually all displays are on a local lan.
What information does loggedin gives? Is it similar to what I’m trying to add?
Logged in tells you if the Player connected to the CMS in a timely fashion as we would expect.
So the Players connect say every 5 minutes. If we don’t see the Player connect regularly on a 5 minute schedule then loggedin will be set to 0. When it starts connecting again it will change to 1.
Changing to 0 relies on the maintenance.php script being run on a schedule - for example from a cron job or scheduled task.
How are you checking whether the player is connected or not if it is not by IP?
I have switched off my display and even after 15 minutes it is still showing a tick mark for loggedin. why is it not changing?
Because you aren’t running the maintenance script, or you’ve defined a long collection interval in the server default for alerts or in the display profile assigned to that display.
We can’t check by IP because in most senarios Xibo is deployed in, pinging the machine will only tell you if the router that Player is attached to is on. It tells you nothing about the state of the Player. We do it based on the information the Player reports, and when that information stops coming.
Thank you Alex,
The collection interval is set as 60 seconds. Could you please explain how to run the maintenance script?
It’s in the manual here:
If you’re setting that 60 second collection from a Display Settings Profile then that’s all you’ll need to do. If you’re setting it directly on the Player then you’ll also need to change the value of Max Display Timeout in the CMS Settings -> Maintenance page to say 2 minutes.
We did as you said. We created the task for running the maintenance script but still the logged in status is not getting updated. Could you please suggest some other solution ?
What did you set the max display timeout settings to? Have you definitely set the script up to be called with a valid secret etc? We know this stuff works. Just try it on the Spring Signage platform and you’ll see where all of this is done for you!
We even tried creating batch file but still logged in status is not getting updated and our max display timeout is 2 mins. Below is the command we had given.
C:\xampp\php\php-win.exe -f C:\xampp\htdocs\xibo\maintenance.php
And we set the Enable Maintenance? as ON.
If you go to Display then edit it, and then go to Advanced, what value is shown for collection interval?
We had given setting profile as windows, Interleave default and auditing as no. We could not see any collection interval in that menu.
It’s not a setting, it’s shown in the report of settings sent to the Display and comes from your Display Profile.
If it’s really not there, ensure you’ve got the “Use the Global Timeout?” tickbox ticked on the Maintenance tab instead so it uses your 2 minute timeout.
Our tickbox “Use the Global Timeout?” is ticked. And still the status is not updated
What do you get if you manually run the maintenance script
A DOS command window appears and then disappears.
That’s not what I meant. Please call the maintenance script directly in a browser. What output do you get?
Sorry Alex. This is what I got.
Wake On LAN