Edit Text Widget Through API

Hi all.

I’m working on creating an alert system that changes the layout of the sign based on an RSS feed. I’ve gotten the sign to switch based on what the feed contains (occurs through Python sending a webhook to the sign), however, I can’t get the content to reliably change based on the RSS feed. I’ve tried integrating the RSS feed directly into the layout of the sign but the refresh interval of Xibo is too slow and regularly doesn’t show the content of the feed (the feed changes every few minutes and isn’t synced to the update interval of Xibo).

My next solution was to try to use the Xibo API directly to update the text widget(s) on the layout but I can’t seem to get it to work. I’ve gotten to the point where Postman says that the template with the widget isn’t a Draft when I try to edit, so I check it out, but then I still can’t edit it. I’ve looked at many threads here and still can’t figure out what is going on. For example, this thread talks nothing about having to check out a layout so I’m not even sure if I’m going in the right direction. Another thread about my same issue was started a few years ago but didn’t seem to get any traction.

I’m working with Xibo Cloud v4.0.12. Any help would be greatly appreciated.

Thanks!
Quincy

Hello @quincyd

Welcome to the Xibo community forum.

I think API is the good way. May be with DataSet?

What information would you like to update?

Hi @ProServ

I’m wondering how to go about getting the content of text widgets to update. The first thread I linked originally says it can be done without a playlist but I can’t seem to figure out how to do it following their steps. I continuously get the “Layout isn’t a Draft” when I call the edit command on the widget id directly, which from what I can tell is using the same call that they were working with in the other thread.

I think API works in the sames way with user interface. You cannot edit published layout.

It’s possible to edit DataSet content with API.

Do you have tried with DataSet?

I just tried editing DataSet content with the API. It works but I’m running into the same issue with the update interval on the sign. CMS updates immediately with the API change but the sign still has to elapse through its update interval. Is there some sort of way to force the sign to update or a way to update CMS through the sign (if that makes sense)?

To “Configure” tab on DataSet Widget you can set the cache
Have you tried it?

image

Yes, but the update interval doesn’t line up with when the layout is changed. It’s almost like the update interval runs independently of the template. So the webhook call changes the layout, but sometimes there is no content on the screen because the update interval hasn’t elapsed yet (I guess it runs when the template isn’t even visible). That’s the same issue I was having with just letting the sign load the data through RSS.