I finally put my hover board to good use! I modified some code for an arduino IR remote for the Sonos.
Its working intermittently at the moment, but it does work… no red flash or anything, but there are some huge delays when printing to the client and then i need to restart the core to make it work again. i think its to do with the TCPclient slowing down thing… there is currently a function ->
Thanks @bko, ill give it a go when i get home tonight.
I managed to get it working 99% by adding the magic delays between each client.println but would rather not use that approach!
Edit: decided to give it a quick go… even though i should be packing!
Needed to do a println after as it doesnt have the carriage return any more. and now the carriage return takes forever and doesnt work… any quick way to add a /r/n to “s” before doing the write?
Edit 2: WOW what a difference using write makes! its near instant control…
not sure where my brain was earlier… maybe trying to pack and programming at the same time isn’t possible by men? im a little embarrassed by the question above… oh well… its working perfect now!
When I get the photon I will try and upgrade to show cover art, song/station name and all the other good bits of info on the digole display.
I have just started breaking the sonos part off into a library so anyone can use it with any type of input… like a touch screen display, buttons or capacitive touch sensors.
just trying to work out how to get now playing info
Are you able to “Get Favorites” from your Sonos devices (or have you tried). I structured the command properly (tested with Fiddler). But the FV:2 command doesn’t return the entire envelope, only a portion. If you can successfully read the entire returned SOAP message, I’d love to see the code you used to do so.
Yep, i cant figure out why, maybe a buffer thing. the first part of the reply comes back but it is truncated so then the code gets confused. ill spend a bit more time on it tomorrow.
Have you made any progress receiving the longer responses? I believe I’ve tried every solution and example provided for reading data with TCPClient() on these forums. I can not get it to work for the longer messages…
I couldn’t work it out either… I’ll try and have more of a dig in the code next week. I think the cores buffer is filling up and then it gets truncated. I wonder I’d a spark.process just before the call would help clear anything already in the buffer