Control Overlays.UNO alternatively to the GUI?
- To interact with Overlays.UNO without needing to rely on the GUI.
- Control from OBS or vMIX if possible.
- Avoid needing 3rd party applications or hardware and use basic keyboard hotkeys.
IN A NUT SHELL
Overlays.UNO uses PUT statements using JSON for control.
To make it work with as many systems as possible, the CURL command is used which isn't OS dependent outside of minor syntax formatting tweaks for your flavor of OS. These examples in this document are for Windows CMD prompt, and required to have slashes in front of any quotation inside a curly brace
Overlays.UNO need the URL API and in some cases a specific JSON ID associated to the overlay.
The CURL syntax below is an example of how to send direct commands to Overlays.uno.
curl -i -H "Content-Type:application/json" -d "{"JSON CODE"}" -X PUT https://app.overlays.uno/apiv2/controlapps/xxxAPI_VALUExxx/api
The above command is reformatted below for Windows CMD with a slash marks as mentioned above:
curl -i -H "Content-Type:application/json" -d "{\"JSON CODE\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/xxxAPI_VALUExxx/api
It appears that Overlays.UNO may have retired the original "Hockey Scorebug | Standard" That I demoed originally, so here's the one they have now. I'm building a new explanation, hopefully it will be more clear. The original was mostly for my own notes until i had time to clarify everything.
First thing you need is your API url.
Now lets turn the Overlay OFF and ON.
Use the commands below, substitute your UNO API URL for your overlay.
Modify the command below with your API URL data.
Paste into a CMD prompt and press enter.
curl -i -H "Content-Type:application/json" -d "{\"command\": \"HideOverlay\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/YOURoverlayURL/api
DEMO (OLD)
Launch it and the default looks basically like this below:
Click on the question mark and click on API description
For this Overlay example we are using here, the JSON ID is required.
Run the following command, substitute your API endpoint value that is in RED
curl -i -H "Content-Type:application/json" -d "{\"command\": \"GetOverlays\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
When we got the API endpoint URL above, it also contained some of the possible commands that could be issued, the first two being "ShowOverlay" and "HideOverlay"
Modify the command below with your JSON and API data.
Paste into a CMD prompt and press enter.
curl -i -H "Content-Type:application/json" -d "{\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"command\": \"HideOverlay\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
By following the substitution steps above with the command will allow you to display the Overlay.
curl -i -H "Content-Type:application/json" -d "{\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"command\": \"ShowOverlay\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
OR you can set the goal directly to any value.
curl -i -H "Content-Type:application/json" -d "{\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"command\": \"IncrementOverlayContentField\",\"fieldId\": \"Team 2 Goals\",\"value\": \"3\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Team 1 Goals\",\"value\": \"13\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"IncrementOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Game Clock Minutes\",\"value\": \"1\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"DecrementOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Game Clock Seconds\",\"value\": \"15\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Game Clock Minutes\",\"value\": \"11\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Game Clock Seconds\",\"value\": \"12\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"ExecuteOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"GameClockControl\",\"value\": \"start\"}" -X PUT
https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/apicurl -i -H "Content-Type:application/json" -d "{\"command\": \"ExecuteOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"GameClockControl\",\"value\": \"True\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"ExecuteOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"GameClockControl\",\"value\": \"pause\"}" -X PUT
https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/apicurl -i -H "Content-Type:application/json" -d "{\"command\": \"ExecuteOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"GameClockControl\",\"value\": \"True\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
Period (You can put any txt you want) (1,1st,ShootOut, OT etc, different language versions)
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Period\",\"value\": \"2ND\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"alert\",\"value\": \"true\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Alert Text\",\"value\": \"REDS\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
Change Team 1 to "BLUES"
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Team 1\",\"value\": \"BLUES\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"Team 2\",\"value\": \"REDS\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
curl -i -H "Content-Type:application/json" -d "{\"command\": \"SetOverlayContentField\",\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"fieldId\": \"logosActive\",\"value\": \"false\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
JSON commands in detail:
Another way to determine some of the JSON values, and syntax that can be helpful is to use "Postman" Download Postman | Get Started for Free which is a system to allow you to review JSON code and do interaction to sites like Overlays. Might help you. It helped me quite a bit
Along with the above syntax sequence, you also will need the values in the names. So how do you increase the
The names of the fields somewhat match the names they are given in the above picture, but to get a full list, well at least one that you can search through, use this command: "GetOverlayContent"
curl -i -H "Content-Type:application/json" -d "{\"id\": \"45eac98d-cc99-4a8a-b430-872391c30aca\",\"command\": \"GetOverlayContent\"}" -X PUT https://app.overlays.uno/apiv2/controlapps/0mNA1zjHa8jiElWzdWJb0Y/api
No comments:
Post a Comment
Feel free to leave a comment! If you have any information that you think should be included, please do so here and I'll get it added in.