# Help please, If Spotify song & time triggers payload

**URL:** <https://discourse.nodered.org/t/help-please-if-spotify-song-time-triggers-payload/27807>\
**Category:** General\
**Created:** [5 June 2020 06:42 UTC](https://discourse.nodered.org/t/help-please-if-spotify-song-time-triggers-payload/27807 "2020-06-05T06:42:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mattallmighty](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mattallmighty/32/23367_2.png) [@Mattallmighty](https://discourse.nodered.org/u/Mattallmighty)\
**Post date:** [5 June 2020 06:42 UTC](https://discourse.nodered.org/t/help-please-if-spotify-song-time-triggers-payload/27807/1 "2020-06-05T06:42:07Z")

</div>

Hey awesome Node-red people. Bit of a newbie and have gone through a bit of tutorials.

You can see here what I am wanting to accomplish:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/7/f76bef26a096037663829c353f29cc9f7fa04e59.png)

This is using LedFx realtime lighting effects LED with your music that you are playing.

Where I need help is:

1. "If above API getting connection then"
2. "IF LedFx Spotify song & time matches Spotify Payload, then push trigger based on LedFx payload"

**Starting with 1.**  
I think I have done this right, a second opinion doesn't hurt:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7d1b1814fcc87a813d58cc31993b27629e9b7fd3.png)  
Seem OK? debug looks like it continues down the second path, although it shouldn't.

**Point 2.**  
Payload example of LedFx presets is:

```auto
{
    "status": "success",
    "presets": {
        "blabla": {
            "devices": {
                "121": {
                    "config": {
                        "blur": 3.0,
                        "brightness": 1.0,
                        "color_high": "blue",
                        "color_lows": "red",
                        "color_mids": "green",
                        "decay": 0.97,
                        "flip": false,
                        "mirror": true,
                        "speed": 5,
                        "threshold": 0.0
                    },
					"QLC": {
                            "widget": {
							"widgetid": 3
							"widgetvalue": 0
                            },
							{
							"widgetid": 4
							"widgetvalue": 255
                            },
                            "type": "scroll(Reactive)"
                        }
                    },
                    "id": "blabla",
                    "name": "blabla",
                    "triggers": {
                        "0hXdDpLNbSaYVKwCygFNsY-17840": [
                            "0hXdDpLNbSaYVKwCygFNsY",
                            "Why Do You Feel",
                            17840
                        ],
                        "6KzkqZqhUBEsWYJJa2aBOd-0": [
                            "6KzkqZqhUBEsWYJJa2aBOd",
                            "The Weekend - Radio Edit",
                            0
                        ]
                    }
                },
                "test": {
                    "name": "Test",
                    "id": "test",
                    "triggers": {},
                    "devices": {
                        "121": {
                            "type": "scroll(Reactive)",
                            "config": {
                                "blur": 3.0,
                                "brightness": 1.0,
                                "color_high": "blue",
                                "color_lows": "red",
                                "color_mids": "green",
                                "decay": 0.97,
                                "flip": false,
                                "mirror": true,
                                "speed": 5,
                                "threshold": 0.0
                            }
                        },
                        "122": {
                            "type": "rain(Reactive)",
                            "config": {
                                "brightness": 1.0,
                                "raindrop_animation": "droplet_0.npy",
                                "lows_colour": "white",
                                "mids_colour": "red",
                                "high_colour": "blue",
                                "lows_sensitivity": 0.2,
                                "mids_sensitivity": 0.1,
                                "high_sensitivity": 0.03,
                                "mirror": true,
                                "flip": false,
                                "blur": 0.0
                            }
                        }
                    }
                }
            }
        }

```

---

<div class="post-metadata">

**Author:** ![Mattallmighty](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mattallmighty/32/23367_2.png) [@Mattallmighty](https://discourse.nodered.org/u/Mattallmighty)\
**Post date:** [5 June 2020 06:42 UTC](https://discourse.nodered.org/t/help-please-if-spotify-song-time-triggers-payload/27807/2 "2020-06-05T06:42:48Z")

</div>

Working export: testing LedFx Preset: "blabla"  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5dc7d9a3eb5e6b26cb7704eb04f7a33b7f381ab6.png)

Working export: testing QLC+ Widget3 as 0  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f10b09e4663a7083f473ec4dbbd572e12d69be42.png)

Any help would be really appreciated. Thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 August 2020 06:42 UTC](https://discourse.nodered.org/t/help-please-if-spotify-song-time-triggers-payload/27807/3 "2020-08-04T06:42:52Z")

</div>

Closed on 4 August 2020 06:42 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
