Counter to syncronise Spotify track duration. Bit of an ask....!

Hello!
I've integrated HA Spotify tracks (currently playing) into node red flows.
Got some of my fav tracks colour matched to the lighting states on the RGB lights in the living room.

What I am trying to find is a second counter node which will be triggered by a numerical input (from the media player)

IE: 21.31s then pulse a message out per complete second increasing on that time to do some fancy lighting changes on track positions (Similar to SMPTE LTC Timecode).

Tacks are filtered through switches per flow so the second pulse messages need to be just that, not unique.

I'd use the time input from HA media player but the updates arent that frequent. So a static timer that can be updated with the real track time (from time to time) during the track would be great.

Cheers

Request has modified now as I've used the Node-red spotify node to poll per 5 seconds to get current track info.

The timer node just needs to be able to start with one numerical inject (from Spotify) on a new track loading.

IE node timer node gets injected with 2:31 (seconds) then continues on producing another ID'd message per second increasing on that number....

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