[RELEASE] Yamaha Network Receiver Basic Integration [DEPRECATED]

@redloro Thanks for the device handler!

My stupid Yamaha RX-A2030 can’t remember last Net Radio station it was playing before it was turned off, so I tried to add a button to select a station from my bookmarks. For this I need to send the following command 3 times (Bookmarks > My__Favorites > First Station on the list)

I need to add about 2sec delay between the commands, but I can’t seem to figure out how to do this?

I tried this:

def NetRadioStation() { delayBetween([ sendCommand("<YAMAHA_AV cmd=\"PUT\"><NET_RADIO><List_Control><Direct_Sel>Line_1</Direct_Sel></List_Control></NET_RADIO></YAMAHA_AV>"), sendCommand("<YAMAHA_AV cmd=\"PUT\"><NET_RADIO><List_Control><Direct_Sel>Line_1</Direct_Sel></List_Control></NET_RADIO></YAMAHA_AV>"), sendCommand("<YAMAHA_AV cmd=\"PUT\"><NET_RADIO><List_Control><Direct_Sel>Line_1</Direct_Sel></List_Control></NET_RADIO></YAMAHA_AV>") ], 2000) }
But there is no delay, it still sends the commands too fast. I’m new to SmartThings and Groovy, so maybe I’m doing this the wrong way?
I found this old topic delayBetween(cmds,<timeinms>) does not work it discusses that the delaybetween doesn’t work. Can it be that it still doesn’t work? Any other way to send 3 commands with a delay between them?

I also tried to call NetRadioStation() with CORE piston 3 times and I added wait 2s before every command, but this didn’t work either. So I’m out of ideas.