i8beef / node-red-contrib-castv2

MIT License
22 stars 14 forks source link

Define IP & Port by code in function node #30

Closed ChillXXL closed 3 years ago

ChillXXL commented 3 years ago

Hello,

If I stand correct, in a previous version it was possible to address the ip & port number by code like: _return { host: "192.168.2.11", // optional if specified on the node itself port: "8009", // optional, defaults to 8009 //appId: "CC32E753", // optional, allows launching and controlling apps other than DefaultMediaReceiver, payload: { type: "QUEUENEXT" //"NEXT" }

Is this still possible or can only the IP and PORT be configered in the node itself?

i8beef commented 3 years ago

No, you can't do that anymore. The new model requires you to configure the connection per node. This is required for the new model where it stays connected to the Cast device at all times.

ChillXXL commented 3 years ago

Thanks. Now I know why it didn't worked :-) (do you share release versions/updates somewhere on git?)

I must say that it is great that the new model is always connected and outputs any change. This because when a cast group is triggered I can then trigger other nodes/flows automatically depending on the cast content. great work.

i8beef commented 3 years ago

As in change logs? No, unfortunately I am... admittedly too lazy for that. I DID actually make a post on the node-red forums about the 3.x releases in hopes anyone confused by the change might look there, and hopefully I caught all the documentation changes that needed made for the change on the Git repo.

I moved to this model because its actually reflective of Google's INTENDED usage, and it seems more useful for home automation purposes this way.

ChillXXL commented 3 years ago

Thanks for the pointer on your post on the node red forum, I missed that. The new model works great. What are the benefits or functionality with the new option for Spotify credentials ?

i8beef commented 3 years ago

I added some basic Spotify support because it was asked for. As it stands I have no faith in that since a lot of it I brought over from other snippets I was able to piece together, and it looks like the OAuth auth scheme its trying to use is the wrong flow for this sort of app. I don't actually have a Spotify account to try it out, so I'm waiting on others to poke at it a bit and see what needs changed.

That said, that login should only be used for the initial MEDIA command, a RUNNING Spotify instance should be CONTROLLABLE (play, pause, etc.) by this I think.