node-sonos-nfc icon indicating copy to clipboard operation
node-sonos-nfc copied to clipboard

feat:add support to store multiple commands in NFC card

Open ignasiduelo opened this issue 1 year ago • 4 comments

This adds support to store multiple commands in NFC card in text feld separated by line breaks, allowing things like storing a room change in a card and then playing an album from a particular track, such as:

room:Den
spotify:playlist:5B8etHA3kzgOZ5Pdz2FAVe
command:trackseek/2

ignasiduelo avatar Nov 08 '24 13:11 ignasiduelo

Hi @ignasiduelo, thanks for the PR! I think this feature sounds reasonable, but I'm not sure it adds much over what you can already do, which is have each command in its own record. Each card can have multiple records. What lead you to do this instead of using multiple records?

ryanolf avatar Nov 08 '24 15:11 ryanolf

Ah you're totally right. I was using another tool that only read the first text record, so I went this route. But yep, you're right it makes no sense.

ignasiduelo avatar Nov 08 '24 17:11 ignasiduelo

I think making cards compatible between different implementations is compelling. I’d rather you not have to reprogram your cards. I don’t really see a downside to parsing each line as a command.

I’ll take a look when I’m back on my computer.

On Fri, Nov 8, 2024 at 5:12 PM Ignasi Duelo @.***> wrote:

Closed #18 https://github.com/ryanolf/node-sonos-nfc/pull/18.

— Reply to this email directly, view it on GitHub https://github.com/ryanolf/node-sonos-nfc/pull/18#event-15220665554, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJSBSSF2W6D3NFH6JFKY4DZ7TWGHAVCNFSM6AAAAABRNRLFV6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGIZDANRWGU2TKNA . You are receiving this because you commented.Message ID: @.***>

ryanolf avatar Nov 08 '24 18:11 ryanolf

What is the other tool that works this way? I wonder if there are other commands or differences we want to consider.

On Fri, Nov 8, 2024 at 6:53 PM Ryan Olf @.***> wrote:

I think making cards compatible between different implementations is compelling. I’d rather you not have to reprogram your cards. I don’t really see a downside to parsing each line as a command.

I’ll take a look when I’m back on my computer.

On Fri, Nov 8, 2024 at 5:12 PM Ignasi Duelo @.***> wrote:

Closed #18 https://github.com/ryanolf/node-sonos-nfc/pull/18.

— Reply to this email directly, view it on GitHub https://github.com/ryanolf/node-sonos-nfc/pull/18#event-15220665554, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJSBSSF2W6D3NFH6JFKY4DZ7TWGHAVCNFSM6AAAAABRNRLFV6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGIZDANRWGU2TKNA . You are receiving this because you commented.Message ID: @.***>

ryanolf avatar Nov 08 '24 18:11 ryanolf