how to update xibo client .xlf file manually by xibo server

Asked by Ashokkumar

XLF files available in xibo client, it updating automatically based on
xmdsUpdateInterval(site.chg) setting

But i want update client XLF files by using Xibo server.

Ex if i pressing a button in XIBO server, it should update on client side XLF flies

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

The architecture of the client/server is that the client pulls the updates from the server on a schedule.

The design doesn't allow for the server to push updates to the client. We did it that way to avoid issues with clients behind NAT/firewalls.

If your clients have real IP addresses or you're able to connect to them directly from the server, you can run a modified version of the client which supports listening to a socket for commands.

You'd have to modify the server to connect over TCP to the client's socket and issue the appropriate command to the client to force it to download new content and begin showing it straight away.

All this is unsupported in any released version of Xibo at the moment as it was done as a separate project but the code is there and it works as far as I know.

The code is in the branch lp:~alexharrington/xibo/pyclient-socket-listener

There's an example script to connect to the listening socket and force the client to download new content and begin showing it immediately here:
http://bazaar.launchpad.net/~alexharrington/xibo/pyclient-socket-listener/view/head:/client/python/fullRefresh.sh

It supports three commands at the moment:
http://bazaar.launchpad.net/~alexharrington/xibo/pyclient-socket-listener/view/head:/client/python/XiboClient.py#L2598

Hope that helps

Alex

Revision history for this message
Ashokkumar (m-t-ashok) said :
#2

Hi Alex,

Thanks a lot, meanwhile I am not sure how to send the commands (refresh,fullrefresh) from server side using php. As we know the client machine is not a server its an individual machine in a LAN (with internet).

How do I identify that system to send the commands and also how i send (format) the commands.

thanks in advance.

Revision history for this message
Alex Harrington (alexharrington) said :
#3

That's up to you to figure out.

How it was done in the test system that feature was put together for was using an OpenSSH server on the client machine. The server then could SSH in to the client without a password using key authentication and execute that script I linked before. PHP has functions that allow you to run external scripts.

As to how you'd identify which displays you need to do that on, I'd look at the media inventory code.

This isn't a feature of Xibo - and likely won't be for some time - so I'm afraid you're going to have to do the hard work on this yourself if it's something you want.

As ever, if you do get a working system, patches would be appreciated.

Alex

Revision history for this message
Dan Garner (dangarner) said :
#4

If the server doesn't have a clear route to the client then this is a non starter - so the server must be able to address the client.

This is likely to be true if you are on a simple LAN and both server and clients are on the same LAN. Anything more complicated and the clients may not be addressable.

As for how to do it, Alex may say differently, but I dont think the project has the time to take on this work - the script will not be a 5 minute job - neither will the UI work. The example Alex gives is pretty good and shouldnt be too hard in PHP. You can get the client IP address / MAC Address (1.3 series) from the 'display' table in the database.

If you are really stuck you might consider asking on of the companies in the Xibo directory to quote you for the work.

Thanks

Can you help with this problem?

Provide an answer of your own, or ask Ashokkumar for more information if necessary.

To post a message you must log in.