I’d like to get a list of all files with m3u extension on my NAS storage and display the list on a Smart app.
How can I connect to cifs URI and get list of files in a specified path from my smart app ?
Would it be possible to list the files in a dropdown selection input ?
I suppose you could do this with EG and the connector somehow? Have it create a VS for each item returned, then tear it down upon refresh or something? Probably thinking WAY outa the box on that one.
ok. I can get the list from my web server (on the same server with CIFS share)
but how can get the output from web call ?
and how do I put it in a pull down selection list ?
Sorry was more asking Pat on that one as it was a random thought. Event Ghost, awesome but old bit of software for automating things, have to run on a windows PC that’s always on. I’ve used it to interface different HA stuff, but in this case, there is a connector to send and receive to ST, I’ve not used it though. VS is a virtual switch in ST.
well I have a windows pc always on. (the CIFS share is on it in any case)
but why do I need a 3rd party software other than Web server ?
If CIFS is not reachable by smart app, then I can get the list via Web server and list as pstuart suggested.
But I don’t know how to get thelist and display in a selection box.
The reason I asked is to better understand what the problem is. CIFS was your solution, but I wasn’t sure what the problem was or any other context.
I was also curious what media player you are using as some of them already have SmartApps that have more detailed control than others. For example, I wrote a Kodi integration with a set of custom commands that are constantly expanding.
It sounds like what you are looking for isn’t something that SmartThings offers out of the box… so you’ll either need to develop a SmartApp for it or better describe what you are trying to accomplish and perhaps there’s another approach to solving your problem.
For your question about creating a list in a SmartApp, I would encourage you to check out the inputs and Dynamic preferences sections of the SmartApp guide in the documentation:
Your app may help me and I could add Sonos to it as well. But it does not play files from any source, right ?
What I am trying to do :
I would like to get a list of all m3u files from my cifs server (I can also start a web server on it if cifs is not supported by ST apps)
Then I will put these files on a selection list and when the user selects, I want the CIFS URI to be sent to my Sonos speakers (and Kodi) to play.
What I don’t know :
I don’t know how to write a basic smart app to get a list of files from my cifs ( or http) server.
I don’t know how to put that list on a selection (preferably pull down)
What I know :
I know how to form the URI for Sonos speaker to play. (well at least I have something in my mind)
I have read info on the page you suggested about dynamic preferences.
I understand that this would work :
Was that comment about Sonos or Kodi? My Kodi SmartApp can trigger playing files on Kodi from any source that Kodi supports. Someone else might be able to chime in on the Sonos capabilities.