Using XMR with Xibo CMS v1.8.0-rc2

Hello,

I am trying to use XMR with CMS v1.8.0-rc2 and Android Player v1.7R62,

Is my Android Player compatible with XMR ?

Furthermore,
I would like to manage my Xibo player with a PHP script passing through XMR,

Could you please tell me how to instantiate a PHP script using XMR ?

Thanks,

Xibo for Android 1.7 is not compatible with XMR, there will be a version made available for the 1.8.0 stable release.

I am not sure what you mean when you say run a PHP script through XMR? Can you please elaborate?

Dan,
First of all, thank you for your reply,
I wish you an happy new year to you and all Xibo’s team.

I read on this community that it would be possible to get an Android Player in beta version compatible with XMR. Would it be possible to get it please ?

Then,
I have currently a PHP script which send request to Xibo’s API in order to add an image/video to the library or to automatically schedule a content to a screen.
I need to change the image of a player more often than once per minute (I would like to be able to change the image once per second)
To do that, I read that it would be possible to send to a player “request” or “command” through XMR to ask the player to check a new content on the server.

Could you tell me how can I manage to send a “message” through XMR with a PHP script ?

Thanks,

Please send your request to support@springsignage.com, or whomever supplied your Xibo for Android licences. Thanks.

I think you need to reconsider your architecture - it is not advisable to use Xibo for this sort of high-frequency update - it almost sounds like you want a video stream rather than a picture.

You can use the Xibo API to issue a media “edit” and replacement (see Peters excellent Guide: API Introduction with Postman). There is a PHP wrapper for the API which may also be of use: GitHub - xibosignage/oauth2-xibo-cms: Xibo CMS Provider for league/oauth2-client

However, I don’t think your delivery mechanism for this sort of frequency is correct and I would recommend looking at an alternative solution.

Ok for asking a beta version of the Android App.

Ok for not using Xibo at high-frequency but I still need using XMR in order to send request to my players.

I used to follow this tutorial for managing my players thought Xibo API.

I would like to immediately push an action to my players as presented here

But I still not understand how to push message to players using XMR.

Could you tell me please how to use XMR ?

You cannot use XMR directly - instead you use the CMS API to trigger actions on the player. There are a number of actions available, which are listed in the API document: http://xibo.org.uk/manual-tempel/api/#/displayGroup

They all require a displayGroupId, which can either be a real group, or a specific display using its own special displayGroupId.

If you are scheduling new content to players, they will already be using XMR to detect that content change and update themselves immediately. If each content change needs new content to be shown, you can’t make that happen any quicker, because the player needs to download that content.

The flow is:

  • Content Changes
  • CMS detects that content is active on displays
  • XMR collectNow message sent to displays
  • Displays connect to XMDS and receive new content

If existing content needs to be shown, then using a changeLayoutAction might be the way to go as the content is pre-downloaded and will change immediately.

Flow is:

  • You send changeLayoutAction message
  • Display immediately shows that pre-cached Layout

Does this make more sense?

I think sending message or controlling Player directly is possible.
If you’re ready to get your hands dirty
Take a look at https://github.com/xibosignage/xibo-xmr/blob/develop/tests/cmsSend.php
Channel and public key for the player can be retrieved from display table of the cms database. Actions are from these files https://github.com/xibosignage/xibo-cms/tree/develop/lib/XMR

That example is no longer valid I am afraid because lines 16/19 have been moved into the CMS (accessible via the API). It seemed to us more appropriate to do the encryption at source, in case the XMR service was moved outside the local network.

Of course you could write something that did your own encryption based on the public key and then manually sent a message to the XMR private address - but I suppose the question at that point is why would you bother?

It would make much more sense to add your custom XMR call into the CMS - or use the existing calls. Adding custom calls can be achieved by adding custom Middleware, which registers a new API route, which is then action-ed by your own controller. Further reading here.