i8beef / node-red-contrib-castv2

MIT License
22 stars 14 forks source link

GET_CAST_STATUS no response #44

Closed jandae closed 3 years ago

jandae commented 3 years ago

I wanted to get the current playing media title, is this possible? How to use GET_CAST_STATUS

tried: msg.payload = “GET_CAST_STATUS”

and

msg.payload = { type: “GET_CAST_STATUS” }

i8beef commented 3 years ago

The second one is correct.

There are actually two commands here, GET_CAST_STATUS (platform) and GET_STATUS (active application). I know this is confusing.

GET_CAST_STATUS will

  1. Return its results in msg.platform instead of msg.payload.
  2. Is the "device" status

GET_STATUS will

  1. Return in msg.payload
  2. Is the "current application" status, or null if nothing is running.
  3. Is the default returned result of most media command implementations.
  4. (I think) is the only one that contains currently running media information if available

I don't like the names here, they were just picked because "GET_STATUS" seemed like the "default" return so it got the "default" name... GET_CAST_STATUS is really GET_CAST_DEVICE_STATUS or GET_PLATFORM_STATUS, etc. but none of the names I had made much more sense.

i8beef commented 3 years ago

Closing as answered. Reopen if you need more help.