Announcement

Collapse
No announcement yet.

SB as doorbell?

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

    SB as doorbell?

    I would be happy on inputs of the following:

    What I try to accomplish:

    SqueezeBox as a doorbell without breaking current playlist/item.
    -Fire an event when doorbell button is pushed
    -Insert a mp3/playlist in current playlist and play it immediately
    -Resume playback of playlist, preferably where left off - especially important when playing internet radio, as this would be the one and only playlist item.

    What I have tried so far:
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	11.7 KB
ID:	1202207

    The delete action does not work regardless of typing the playlist or the spesific mp3 as criteria.

    The 100ms wait action has to be present, if else the following action is not performed.

    Ideas? Any more flexibility by scripting instead?

    /aeklo

    #2
    I have not tried using it as a doorbell, but interesting idea. AS part of the next version (after 1.6), beside HSTouch support I was planning to add an "Announce" scripting API/event, i.e. pause music, display a message and play a sound (including text-to-speech).

    The delay (100ms) is required to ensure that the power on of players has completed before sending other commands. If I correctly understand, the only thing that is not working is the delete action at the end. I will try to reproduce it.

    Comment


      #3
      Sounds cool idea
      Is it's also possible to change the Album clipart on the remote?
      I like to replace it with the front door Netcame image.

      At the moment I'm making picture's and sending them by e-mail

      When the full support for the HST is there i will buy few SB's including the plugin..

      Comment


        #4
        The idea of a announce feature sounds great! :-)
        Text to speech even better.

        Originally posted by pcp View Post
        If I correctly understand, the only thing that is not working is the delete action at the end. I will try to reproduce it.
        Yes, your are correct. Am I supposed to insert the exact filename, the song title, or the very same playlist into the delete function?

        Thanks!

        /aeklo

        Comment


          #5
          I also could not get the "playlist deleteitem" SqueezeCenter work on my current SqueezeCenter version. I tried this without HS2 and SqueezeCenter did not process the command. I will have to further look into this.

          There is another way to delete items in the playlist using the song index. Below is a solution that will play a notification and return to the previous song. The only drawback is that it will assumes that the notification way file is inserted at position 1 (and therefore the currently playing song is at index 0). The VB.Net script will send the command to delete the song by index (the song index is passed as an argument). I don't believe there is currently a way to find out what the currently playing song index is prior to the notification, so that you could use to delete the notification. I will further look into this in the next few days.

          PS: I just noticed that the action should only play the song on the desired player and not all of them in my example and not all of them!
          Attached Files

          Comment


            #6
            Is there a way to find number of items in the current playlist?
            If so, one could check for number of items after adding doorbell.mp3 at the end, then finally delete the item corresponding to number of items.

            Also, to be considered, if players are off at the moment of doorbell button pushed, they should not resume playing. I guess this could be accomplished by scripting?

            /aeklo

            Comment


              #7
              The index of the currently playing song and the number of items in the playlist are currenly not available in HS2 devices or APIs. I will add at least the index of the currently playing song as the HS2 device value of the device containing the name of the song being played in the final plug-in version 1.6.

              You can retrieve the power status, volume, status (playing, paused, etc) and shuffle information from the values of the corresponding HS2 devices per player if you want to restore them after playing the bell song.

              Ideally you would also want the length of the song (the bell song) so that you can wait for that amount of time and the time offset already played in a song so that you can continue playing ths song at that position after playing you bell announcement. Not sure if I can exposes those in this release.

              Comment


                #8
                I updated the plug-in with additional support to play announcements. Details in dialog http://board.homeseer.com/showpost.p...01&postcount=6

                Comment


                  #9
                  Tremendous! I haven't had the chance to test your earlier suggestions, and then you show up with complete API's for announcement!

                  Your plug-in is well worth the money :-)
                  Thanks!

                  /Aeklo

                  Comment


                    #10
                    I have now edited pcp's script to accommodate my needs as a doorbell script, but I also believe it is usefull for many other purposes

                    Call the script and insert the needed parameters as follows:
                    ("Main", "PlayerName;RelativePathToMp3;TextToSpeak;DisplayTextHeader; DisplayTextMain")

                    My only trouble now is synchronized players.
                    The selected tune is played once per synchronized player, that is, if you synchronize five players, it plays the tune five times on every player...

                    Any suggestions on this? Could the API support synchronization status?

                    Thanks!

                    /aeklo
                    Attached Files

                    Comment


                      #11
                      Script and Sync

                      How are you calling your wonderful script?

                      I would suggest grabbing the duration of the current song on all players before calling this script and only calling it with players that durations don't match. As matching durations are deemed synced players.

                      hope that helps you and thx for your script.

                      ChriS

                      Comment


                        #12
                        First of all, attached is a revised version of the script (previous version contained a small bug).
                        Credits to pcp for making this script

                        Now, the way I trigger it:

                        I use a RFXCOM receiver and a Visonic MCT-100 "Universal Wireless PowerCode Transmitter" - this is in turn connected to my door button.
                        A simple event checks for the MCT-100s change in status, and fires the script.

                        You could also use the same RFXCOM receiver and a wireless door bell button from Nexa.

                        /aeklo
                        Attached Files

                        Comment


                          #13
                          Another approach to sync players (I have not tried it) is to use the plug-in API PlayerSendCLICommand to generate the CLI sync command to sync to players. The syntax of the CLI sync command is "<code><playerid> sync <playerindex|playerid|-|?></code>".

                          The first argument of PlayerSendCLICommand would the name of the player that will end up on the left of the CLI sync command. The 2nd argument of PlayerSendCLICommand (the command argument) would be "sync <playerid>", replacing <playerid> with the id of the player you want to sync. You can get the ID of the player from the plug-in status view (first column). This should sync the two players.

                          Below is the description of the CLI sync command from the SqueezeCenter docs:

                          The "sync" command specifies the player to synchronise with the given playerid. The command accepts only one playerindex or playerid. To unsync the player, use the "-" parameter. Note that in both cases the first <code><playerid></code> is the player which is already a member of a sync group. When adding a player to a sync group, the second specified player will be added to the group which includes the first player, if necessary first removing the second player from its existing sync-group.

                          Comment


                            #14
                            Are you trying to play some sound to speak some text when the doorbell is triggerred? Have you tried tu just use. The HomeSeer speak action in the event?

                            Comment

                            Working...
                            X