ryanolf / node-sonos-nfc

Access your streaming music through physical NFC tokens, like putting on a CD or record. Great for children and adult aesthetics.
MIT License
36 stars 14 forks source link

Doc guidance: Multiple commands on NFC tag #14

Closed johnnyfleet closed 2 years ago

johnnyfleet commented 2 years ago

Hi there - apologies if this is the wrong pathway to raise such query.

I read in the README section under Card record format:

You can enable cross fade, shuffle, or repeat on a card-by-card basis by adding records to enable these features to the card.

The question I have is, how exactly do I do that?

What I'm looking to do is clear the queue and decide on a per-card basis whether to enable shuffle etc.

Is there any information anywhere that helps to provide guidance on how to do this?

Thanks

ryanolf commented 2 years ago

Hi @johnnyfleet. You can write multiple NDEF records to a card. Each record can have an instruction. The instruction possibilities are shown here. So for example you could have a card that has spotify:album:4hW2wvP51Myt7UIVTgSp4f as the first record and command:shuffle/on as the second.

johnnyfleet commented 2 years ago

Fantastic - that explained it. Apologies for the late reply. I only just attempted it and worked flawlessly.

For reference this is how it looked in NFC tools. I had to add a next command as well as it always played the same first song - so I wanted to truly have a new song each time I started.

image