How I got my Sonos to play notifications and resume Line-In

I have been using a SmartApp to give a report of my devices. It had been able to play TTS to the Sonos but it never resumed properly. I had been using Line In to act as a PC speaker.

After searching the forums, I found people suggesting to log into the graph api and look at various things like Mac and IP address. So I went to do that and saw that the current thing it was playing was Component In. I was ok with that (it didn’t seem wrong). In another window, I had the Sonos desktop app opened and i went to Manage-Settings, and under Room settings, I clicked on the Line In tab. I set the Line In Source name to PC and the level to 8 (PC).

I refreshed the graph page and I was amazed that it changed to something that looked more specific:

Track Description: Computer

Track Data:
{
“station”: “Line-In”,
“name”: null,
“artist”: null,
“album”: null,
“trackNumber”: “1”,
“status”: “playing”,
“level”: “”,
“uri”: “x-rincon-stream:RINCON_B8E9372A309201400”,
“trackUri”: “x-rincon-stream:RINCON_B8E9372A309201400”,
“transportUri”: “x-rincon-stream:RINCON_B8E9372A309201400”,
“enqueuedUri”: “”,
“metaData”: “<DIDL-Lite xmlns:dc=“http://purl.org/dc/elements/1.1/” xmlns:upnp=“urn:schemas-upnp-org:metadata-1-0/upnp/” xmlns:r=“urn:schemas-rinconnetworks-com:metadata-1-0/” xmlns=“urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/”><item id=“lineinput” parentID=“0” restricted=“false”>dc:titleLine-In</dc:title>upnp:classobject.item.audioItem</upnp:class><res protocolInfo=“http-get::audio/wav:”>x-rincon-stream:RINCON_B8E9372A309201400”,
“trackMetaData”: “<DIDL-Lite xmlns:dc=“http://purl.org/dc/elements/1.1/” xmlns:upnp=“urn:schemas-upnp-org:metadata-1-0/upnp/” xmlns:r=“urn:schemas-rinconnetworks-com:metadata-1-0/” xmlns=“urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/”><item id=”-1" parentID="-1" restricted=“true”><res protocolInfo=“x-rincon-stream:::*”>x-rincon-stream:RINCON_B8E9372A309201400<r:audioInputIcon>AudioComponent</r:audioInputIcon>dc:titleAudio Component</dc:title>upnp:classobject.item</upnp:class>"
}

For some reason, after this, TTS played and Resume changed my device back to Line In! I’m happy as long as this continues. Figured I’d post it in case that Sonos setting fixes anything for someone else.