# Newbee help, netflix or spotify playing

**URL:** <https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172>\
**Category:** General\
**Created:** [9 August 2019 12:20 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172 "2019-08-09T12:20:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eke](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@eke](https://discourse.nodered.org/u/eke)\
**Post date:** [9 August 2019 12:20 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172/1 "2019-08-09T12:20:52Z")

</div>

Hi,

Im using node red to create my automations for Home Assistant and i need help to solve my problem in my latest flow.  
Im trying to build a flow that listens to the status of my chromecast (playing,pause and stop) and triggers a group of lamps (i have accomplished this part), but i dont want my group of lamps to be triggered if its spotify that are playing or stopping. I only want them to be triggered if its Netflix.

In msg.payload there's a value under data.new\_state.attributes.friendly\_name telling me what application that are playing but i dont have the knowledge how to use that.

thanks in advance

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 August 2019 12:26 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172/2 "2019-08-09T12:26:15Z")

</div>

Use a switch node  
if it’s that send it to one output  
If it’s anything else send to the other.

There’s an example in the cookbook  
[cookbook.nodered.org](http://cookbook.nodered.org)

---

<div class="post-metadata">

**Author:** ![eke](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@eke](https://discourse.nodered.org/u/eke)\
**Post date:** [9 August 2019 12:54 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172/3 "2019-08-09T12:54:13Z")

</div>

I have used a switch node but it dont seem to pass the whole message so i wont be able to trigger on playing or pause in the next step. Or should it pass the whole message, maybe i done something wrong?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 August 2019 13:00 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172/4 "2019-08-09T13:00:51Z")

</div>

Are you sure you have configured the debug node to display the entire message rather than just msg.payload?

The switch node just sends the message to different outputs dependant on your settings  
it doesn’t alter the message

---

<div class="post-metadata">

**Author:** ![eke](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@eke](https://discourse.nodered.org/u/eke)\
**Post date:** [9 August 2019 13:04 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172/5 "2019-08-09T13:04:16Z")

</div>

must take a look at that when i get home.  
Thanks for now!

---

<div class="post-metadata">

**Author:** ![eke](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@eke](https://discourse.nodered.org/u/eke)\
**Post date:** [9 August 2019 16:23 UTC](https://discourse.nodered.org/t/newbee-help-netflix-or-spotify-playing/14172/6 "2019-08-09T16:23:44Z")

</div>

Type-o from my side, works with a switch node but seems like my chromecast doesnt send anything when i press pause or stop, Spotify do.
