Announcement

Collapse
No announcement yet.

Retrieve currently selected Preset

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieve currently selected Preset

    First of all, thanks for a great plugin, ChrisH! Purchased it, and absolutely like it.
    Now I am trying to implement some of my ideas around using my Bose speakers for TTS announcements. It is almost working, and only missing bit is to get currently selected preset to be able to restore it after announcement. Also I am interested in how to switch to specific station, addressed by name, not just Preset_1, Preset_2, etc. For example: 'Shuffle'. So far, i did not find any CAPIControl option to do so, am I missing something?
    Last edited by superpups; May 29th, 2017, 08:00 PM. Reason: Added more details to question to align with post title

  • #2
    Are you switching to the AUX input to do the announcement on the SoundTouch?

    Comment


    • #3
      Nope. I generate WAV file into folder which is served via WMP DLNA server. I also have a preset assigned to that DLNA folder. So I switch to that preset in my event script, all works well - TTS WAV get played, but I want to return speaker to it's original state (station, volume, on/off state, etc... it was before it was switched to TTS preset). No issues with on/off or volume, but station - I have no solution.

      Comment


      • #4
        For the station to switch back to, is this always going to be one of the other presets? I'm thinking I could create an additional device with "Save" and "Restore" buttons.

        The "Save" button could store the currently playing preset and the "Restore" button would change to it. Would that work for you?

        If you are willing to share your DNLA setup with others let me know and I will document it on the plugin information pages.

        regards,

        Comment


        • #5
          "Save and Restore" is great idea. It will work for me perfectly, only one thing I am not sure about: what will happen if non-preset station will be selected. For example it can be playing station selected via mobile app?
          I will be happy to share my solution with you, once I'll have it done. Still WIP, have some issues with generated WAV file, for some reason Bose is playing it with increased speed, sounds like Chipmunks

          Comment


          • #6
            If you want to try an m4a file I have put one here,
            http://hartman.website/HomeSeer3/BOS...Right-Open.m4a

            I'm not sure if that will behave any different to a wav file for the chipmunk problem.

            Can you do this as a test? While you are playing music on the SoundTouch that you have selected using the app instead of the HomeSeer plugin, can you load this page and let me know the result (here or PM)

            http://10.0.1.41:8090/now_playing
            (substitute your own SoundTouch ip)

            I want to see how that alternate music source presents itself.

            thanks,

            Comment


            • #7
              Tried the file you have asked, works ok. Did a little bit of reading, and surprise, WAV files are not supported https://www.soundtouch.com/Knowledge...0000000GvBHCA0 Quote:

              Code:
              Be sure the music files you are trying to play are in one of the following formats compatible with SoundTouch®:
              MP3
              M4A
              WMA
              AAC*
              So, looks like I need to find a DLNA server with transcoding functionality, unless I find the way to save TTS output to one of the supported formats.

              See below the response of speaker, while playing MP3 file:

              Code:
              <nowPlaying deviceID="XXC90B2826XX" source="STORED_MUSIC" sourceAccount="29XXXX0d-1712-3340-9ed8-ebXXXXXX51da/0">
              <ContentItem unusedField="0" source="STORED_MUSIC" location="A_F^FOL*R2" sourceAccount="29XXXX0d-1712-3340-9ed8-ebXXXXXX51da/0" isPresetable="true">
              <itemName>Downloads</itemName>
              </ContentItem>
              <track>sms-alert-3-daniel_simon.mp3</track>
              <artist>Unknown</artist>
              <album>Unknown</album>
              <offset>7</offset>
              <art artImageStatus="SHOW_DEFAULT_IMAGE"/>
              <time total="2">0</time>
              <skipEnabled/>
              <playStatus>BUFFERING_STATE</playStatus>
              <shuffleSetting>SHUFFLE_OFF</shuffleSetting>
              <repeatSetting>REPEAT_ALL</repeatSetting>
              <skipPreviousEnabled/>
              </nowPlaying>
              regards

              Comment


              • #8
                Can you also send me the output from this?
                http://10.0.1.41:8090/sources
                I want to see if you have a source of "STORED_MUSIC" that we might be able to use to switch back to. I'm not sure what track it would use though as there is no way to select that in the API.


                I use a Mac to generate my spoken announcements. In case this helps you or anyone else, here is the procedure,

                Open Apple application Numbers, new blank spreadsheet
                Type the text to be spoken in a cell, example Back Door Right Open
                Click the cell so it is highlighted
                Open iTunes
                Right click, Services, Add to iTunes as Spoken Track

                System Voice: Daniel ( I like this one )
                Save As: Back-Door-Right-Open (this is the filename it will end up with )
                Where: Music (ie iTunes)

                A new audio file will now be in iTunes
                Drag the .m4a file out of iTunes to wherever you need it

                Comment


                • #9
                  I heard back from BOSE developer support. I had questioned if this functionality is available through the developer API. The SmartThings ecosystem can now play audio announcements through the BOSE SoundTouch and I was looking for this capability using HomeSeer.

                  https://community.bose.com/t5/SoundT...ons/td-p/49276

                  Comment


                  • #10
                    Thanks for an update, sure, proper announcements would be great. let's wait, meanwhile I'll see what I can do with current API.
                    Thanks,

                    Comment

                    Working...
                    X