How to send data to singular.live?

There are several ways how to send data from Scoreboard OCR to singular.live:

  1. Using Data Streams. It is recommended to use this method, because it will provide the smallest latency and can update several times per second
  2. Using 'old' method

1. Using Data Streams

  1. Add new Data Stream in singular.live Data Stream Manager and copy the private token
  2. Choose “singular.live” output option in Scoreboard OCR
  3. Use the following URL and add the private access token:
    https://datastream.singular.live/datastreams/<data_streams_private_token>/random_text
  4. Create fields in Scoreboard OCR and add some digits
  5. Open singular.live Data Stream Manager and click on Status of the Data Stream. You should see incoming data
  6. Take a look at this very useful video for steps to be taken in singular.live
  7. Use the following syntax to access data sent by Scoreboard OCR to singular.live:
    jsonData[0].controlNode.payload["data-field-name"]
    jsonData[0].controlNode.payload["Time"]

Scoreboard OCR will send the following HTTP PUT request to singular.live Data Streams according to developer documentation

[{
  "compositionName": "random_text",
  "controlNode": {
    "payload": {
      "Time": "3:27",
      "Score_a": "8",
      "Score_b": "12"
    }
  }
}]

2. Using 'old' method

  1. Add external access API token to your singular.live graphics template
  2. Choose “singular.live” output option in Scoreboard OCR
  3. Enter singular.live access token:
    https://app.singular.live/apiv1/control/<TOKEN>/<compositionName>
    https://app.singular.live/apiv1/control/2gzVUSk2pFmDI7dK53KX5g/Composition1
  4. Use the same field names in Scoreboard OCR that are defined in singular.live

Scoreboard OCR will send the following HTTP PUT request to singular.live according to developer documentation

[
   {
      "compositionName":"Composition1",
      "controlNode":{
         "payload":{
            "Time":"09:00"
         }
      }
   }
]  

How to test ?

  1. in Singular.live
    1. from Market add Corner Cap composition and create control app for that composition
    2. in Control App upper right corner click on the three dashes and generate a token, copy it to your clipbaord
    3. in Control App activate only 'Score Bug - Basketball' overlay, make sure you see the scorebug on the screen
  2. in Scoreboard OCR
    1. in '2. Choose Output' choose the output type 'Singular.live' and add this line
      https://app.singular.live/apiv1/control/<TOKEN_FROM_CLIPBOARD>/Score Bug - Basketball
    2. in '3. Add Digits' add field named 'team1Score' and add some digits

You should see the Team1 score updating in Singular.live


How to solve the issue that Time field is not updating?

Since Singular.live 'Time' field is not a standard text field but rather a 'timer' type of field and it is not possible to send a value to update this field. Instead it can be started and stoped by sending a command. Workaround is to replace Timer widget with Text widget.


How to show/hide timeout indicator in singular.live?