Skip to main content

lastDataReceived

Liveness signal for the overlay poll: set on every poll, whether data came back or not.

Description​

Observe lastDataReceived to tell "no data arriving" from "data arriving but not shown" without reading device logs. It covers the overlay poll only; for panel data, use the HTTP logs in Debugging.

The field is set on every overlay poll, about every 10 seconds; both successful and failed requests set it. A run of ok: false entries is the intended signal for "no data arriving", not an error in the observer.

Nothing is published before polling starts. Polling requires both a resolved configuration and a valid player timecode, provided via onPlayerTimeCodeUpdated.

Type​

assocArray

Usage​

m.maestro.observeField("lastDataReceived", "onLastDataReceived")

function onLastDataReceived(event as Object)
data = event.getData()
print "Live data poll: " + formatJson(data)
end function

Data Structure​

FieldTypeDescription
sourcestringWhich feed reported. Currently "overlay".
timecodestringPlayer timecode the poll was made against, or "" if none yet.
bytesintegerResponse body size in bytes. 0 when nothing came back.
okbooleantrue if the request succeeded; false otherwise.

Example​

sub setupLivenessMonitor()
m.maestro.observeField("lastDataReceived", "onLastDataReceived")
end sub

function onLastDataReceived(event as Object)
data = event.getData()

if data <> invalid then
if data.ok = true
print "Data received — source: " + data.source + ", bytes: " + data.bytes.toStr()
else
print "Poll failed — source: " + data.source
' Investigate connectivity or server availability
end if
end if
end function

Notes​

  • Polls run about every 10 seconds, and pause while Maestro has overlays turned off.
  • Nothing is published before polling starts, which requires both a resolved configuration and a player timecode flowing via onPlayerTimeCodeUpdated.
  • Failed polls publish with ok: false and bytes: 0 — this is expected behavior indicating a failed poll, not a problem with the observer itself.