I am having some difficulty getting sonos snapshot and sonos restore service calls to work through node red.
Here is my set up:
Function going into subflow that sets the sonos entity and message I want.
In subflow:
Input node into change node. Sets flow variable from the input
Service call node to set sonos snapshot
Change node to set payload to previous sonos flow variable
Service call to send message to sonos
Change node to set payload to null (otherwise the previous payload was overridden)
Service call to sonos to restore.
The message properly gets sent, but either the restore or snapshot doesn’t work because if I’m playing music and the message sends the sonos plays the message then is silent and the music does not restart.
Is there somewhere I need to store the snapshot?
Do I need a delay between the snapshot and message call?
Do I need a delay between the message call and restore?
YESSSS after a couple of days stumbling around I did find the solution:
I do store he snapshot msg.payload into a variable. After TTS I do write the variable back into msg.payload and do restore.
Thanks for the stoptimer. I used the “delay” i thought it would be dynamic with the stop timer. So that it resume when the tts is finished. I tried it with “wait until” but i didn’t get it to work.
But thats ok i’m happy that it work so far.