Announcement

Collapse
No announcement yet.

Plugin Idea

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

  • Plugin Idea

    Would a Speaker Client profile manager be useful?

    I have a lot of scripts that I use hs.Speak. During the day I have several clients that I want to speak. In the evening I have some that need to not speak.

    So I'm thinking of writing a plugin where you can enter all your speaker clients and then enter profiles.

    For example
    you could enter a profile called "Announce Weather". Start time is 7:30AM. End time is 9PM. Days of the Week are "Mon,Tues,Wed,Thurs,Fri". Clients are: "Computer1:*,Computer2: Default"

    enter a second profile called "Announce Weather". Start time is 9:01PM. End time is 11PM. Days of the week are "Mon,Sat". Clients are: "Computer1:*"

    In your script you would modify the speak command like so.

    hs.Speak "The weather is",True,hs.Plugin("Misc").clientList("Announce Weather")

    The plugin would take the parameter of "Announce Weather", look at the current time and find the profile called "Announce Weather" that the current time is within the start and end time and return the list of clients that the speaking is for.

    Enter as many profiles as you want and as many time ranges as you want for each profile.
    --
    Jeff Farmer
    HS 3, HSPhone
    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

  • #2
    I hate to rain on your parade Jeff, and perhaps some would prefer a plugin; but couldn't the same thing be accomplished by the script in question simply referring to an INI file?

    [SpeakSchedule]
    Weather = Client, startspeak, stopspeak

    Where in this example, weather is the key the script examines.
    Client is the speaker client & instance list that script would speak to.
    Startspeak, stopspeak.. the time window those clients should speak the weather.

    It could be expanded for any number of schedules within the same key as well.

    Weather = client,start,stop,client,start,stop...

    The required subroutine would be added to and called by each script that needs it.
    Real courage is not securing your Wi-Fi network.

    Comment


    • #3
      I think there are others out there going by the name of "Speech Proxies".
      I have been working on a script for myself because...well.....I like to do it myself. But, I think there are at least a couple from other guys out there.

      But dont let that stop you.
      I like to see competition.

      Just thought you should know if you dont already.
      A computer's attention span is as long
      as it's powercord.

      Comment


      • #4
        Originally posted by Wadenut View Post
        I hate to rain on your parade Jeff, and perhaps some would prefer a plugin; but couldn't the same thing be accomplished by the script in question simply referring to an INI file?

        [SpeakSchedule]
        Weather = Client, startspeak, stopspeak

        Where in this example, weather is the key the script examines.
        Client is the speaker client & instance list that script would speak to.
        Startspeak, stopspeak.. the time window those clients should speak the weather.

        It could be expanded for any number of schedules within the same key as well.

        Weather = client,start,stop,client,start,stop...

        The required subroutine would be added to and called by each script that needs it.
        Normally I would have written some asp pages to allow setting up the client profiles and a script that you would call to get the client string. I try not to do scripts where you have to edit the ini file manually and I've been moving away from asp web pages in anticipation of upgrading to HS3. asp.net will still be around but not the classic asp pages. Plugin pages will still work though. Plugins also allow for event conditions, triggers and actions
        --
        Jeff Farmer
        HS 3, HSPhone
        My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
        Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

        Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

        Comment


        • #5
          Originally posted by sdanks View Post
          I think there are others out there going by the name of "Speech Proxies".
          I have been working on a script for myself because...well.....I like to do it myself. But, I think there are at least a couple from other guys out there.

          But dont let that stop you.
          I like to see competition.

          Just thought you should know if you dont already.

          I'm not looking to become a speech proxy. I currently use SpeakEasy on my production HS server but I don't think it will be upgraded for HS 3. I'll keep using it as long as I'm on HS 2. I've been looking at IsSpeaking and may switch to that if it gets upgraded for HS 3. I have isSpeaking installed on my development HS server.

          My objective with this idea is to have a way to control which HS client speakers are used in various scripts that I have. I have several scripts that speak during the day to several speakers. After my daughters bedtime I need to not have the speaker in her room speak. I could write code in each script to look at the time but I think this would be more flexible. Storing the data in a database will allow as many profiles as I want for the same script. I can then search based on time of day, day of week, if its a holiday and if we are home and have a different list of clients for each option or go simple and just enter a profile for before bedtime and one for after bedtime.

          If you have ever used any of my projects you will notice that I like lots of options.
          --
          Jeff Farmer
          HS 3, HSPhone
          My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
          Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

          Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

          Comment


          • #6
            I have been working on similar ideas with my system. I have whole house audio, and it is not zoned yet. But I have a speaker upstairs, and one in the hall downstairs. I needed to set it up to NOT speak the wakeup announcements and the time until leave for work and school, so on holidays, we can sleep in. This caused really low WAF. So what I am working on, is I have 10 levels of importance. I want all alarm system announcements to be spoken everywhere no matter what level is set. So it is a level 10. But the go to work announcements are a level 1. Then I set a device to the operating level and if the announcements are >= to the set level, make the announcement. I still have a long way to go, but I am thinking of using this to make my first plugin for myself. Anyway, I like the ideas about queuing up announcemnts when I am away and that will be based on the alarm system status etc.
            A computer's attention span is as long
            as it's powercord.

            Comment


            • #7
              Jeff:

              I think your idea of a speaker plug-in is a good idea.

              In my situation I don't have remote computers around the house running the speaker client. I have multiple USB soundcards connected to my HS server with individual speaker clients assigned to each sound card, like computer1:local and computer 1:bedroom, etc. That shouldn't make any difference in the way you are proposing your plug in, should it?

              Each USB sound device output is connected to an ELK 800 10 watt speaker module which is then driving a pair of wires in the CAT5 cable I have pulled to all the rooms in the house. Each room has at least two CAT5 cables in it. One is dedicated to Ethernet and the other is broken out so that I have access to each of the 4 twisted pairs within the cable. In some cases I have audio in one pair and 1-wire data in another and Xantech remote IR data in yet another pair.

              So right now each of my scripts that use a speaker has the speaker client or clients that I want to speak to in the INI file. Your plug-in would let me make all my scrtipts the same by changing to hs.speak(xxx).

              I think I like that idea, maybe a little less confusing.

              Bob

              Comment


              • #8
                Bob, do you have audio sync issues with your setup when playing speech to multiple rooms?
                HS Pro 3.0 | Linux Ubuntu 16.04 x64 virtualized under Proxmox (KVM)
                Hardware: Z-NET - W800 Serial - Digi PortServer TS/8 and TS/16 serial to Ethernet - Insteon PLM - RFXCOM - X10 Wireless
                Plugins: HSTouch iOS and Android, RFXCOM, BlueIris, BLLock, BLDSC, BLRF, Insteon PLM (MNSandler), Device History, Ecobee, BLRing, Kodi, UltraWeatherWU3
                Second home: Zee S2 with Z-Wave, CT101 Z-Wave Thermostat, Aeotec Z-Wave microswitches, HSM200 occupancy sensor, Ecolink Z-Wave door sensors, STI Driveway Monitor interfaced to Zee S2 GPIO pins.

                Comment


                • #9
                  Originally posted by FeMan View Post
                  Jeff:

                  I think your idea of a speaker plug-in is a good idea.

                  In my situation I don't have remote computers around the house running the speaker client. I have multiple USB soundcards connected to my HS server with individual speaker clients assigned to each sound card, like computer1:local and computer 1:bedroom, etc. That shouldn't make any difference in the way you are proposing your plug in, should it?

                  Each USB sound device output is connected to an ELK 800 10 watt speaker module which is then driving a pair of wires in the CAT5 cable I have pulled to all the rooms in the house. Each room has at least two CAT5 cables in it. One is dedicated to Ethernet and the other is broken out so that I have access to each of the 4 twisted pairs within the cable. In some cases I have audio in one pair and 1-wire data in another and Xantech remote IR data in yet another pair.

                  So right now each of my scripts that use a speaker has the speaker client or clients that I want to speak to in the INI file. Your plug-in would let me make all my scrtipts the same by changing to hs.speak(xxx).

                  I think I like that idea, maybe a little less confusing.

                  Bob

                  You are correct that it won't matter that the clients are on the same computer. The plugin will allow you to enter client names. In your case you would have clients of:
                  computer1:local
                  computer1:bedroom
                  computer1:*
                  etc.
                  No real limit.

                  Then you would enter profiles and setup as many variations of each profile as you want based on day, start time, end time, holiday which clients.

                  When your script calls the plugin with a profile, the plugin will look at the time and day, etc and find the profile that matches to the options. It will then take all the clients and produce a string that is formatted for the hs.speak function.
                  --
                  Jeff Farmer
                  HS 3, HSPhone
                  My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                  Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                  Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                  Comment


                  • #10
                    Originally posted by reidfo View Post
                    Bob, do you have audio sync issues with your setup when playing speech to multiple rooms?
                    That's a real good question. The remote speakers are in various rooms of the house so I can't say if I am having sync issues. I know I can hear the message in each room assigned and that's all I know. I haven't even considered that there may be sync issues.

                    Do you suspect there are? Do you have a similar setup?

                    Comment


                    • #11
                      Originally posted by sdanks View Post
                      I have been working on similar ideas with my system. I have whole house audio, and it is not zoned yet. But I have a speaker upstairs, and one in the hall downstairs. I needed to set it up to NOT speak the wakeup announcements and the time until leave for work and school, so on holidays, we can sleep in. This caused really low WAF. So what I am working on, is I have 10 levels of importance. I want all alarm system announcements to be spoken everywhere no matter what level is set. So it is a level 10. But the go to work announcements are a level 1. Then I set a device to the operating level and if the announcements are >= to the set level, make the announcement. I still have a long way to go, but I am thinking of using this to make my first plugin for myself. Anyway, I like the ideas about queuing up announcemnts when I am away and that will be based on the alarm system status etc.
                      My plan is to allow the levels of importance but allow it to be different levels of importance for every script if you want it. Holidays that don't change date will most likely have a web page to allow you to enter the recurring date. Holidays that change, like Easter, will be built into the plugin. Most likely I'll add a public function to the plugin for users to be able to get the date for Easter this year.

                      I use speakeasy for the queing up of announcements. One feature that it has that I really like is that I can put [NoQueue] in front of the speak text. If the system is currently set to no speaking then any new text with NoQueue is not added to the queue. I mainly use that to not queue the weather or tv announcements.
                      Last edited by CFGuy; October 5th, 2012, 12:32 PM.
                      --
                      Jeff Farmer
                      HS 3, HSPhone
                      My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                      Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                      Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                      Comment


                      • #12
                        Originally posted by FeMan View Post
                        That's a real good question. The remote speakers are in various rooms of the house so I can't say if I am having sync issues. I know I can hear the message in each room assigned and that's all I know. I haven't even considered that there may be sync issues.

                        Do you suspect there are? Do you have a similar setup?
                        I haven't done much testing yet other than to use JRMC to play music to two USB sound cards. There was about a half second delay between the two. I haven't tried multiple speaker clients yet but I hope to this weekend.
                        HS Pro 3.0 | Linux Ubuntu 16.04 x64 virtualized under Proxmox (KVM)
                        Hardware: Z-NET - W800 Serial - Digi PortServer TS/8 and TS/16 serial to Ethernet - Insteon PLM - RFXCOM - X10 Wireless
                        Plugins: HSTouch iOS and Android, RFXCOM, BlueIris, BLLock, BLDSC, BLRF, Insteon PLM (MNSandler), Device History, Ecobee, BLRing, Kodi, UltraWeatherWU3
                        Second home: Zee S2 with Z-Wave, CT101 Z-Wave Thermostat, Aeotec Z-Wave microswitches, HSM200 occupancy sensor, Ecolink Z-Wave door sensors, STI Driveway Monitor interfaced to Zee S2 GPIO pins.

                        Comment


                        • #13
                          Originally posted by reidfo View Post
                          I haven't done much testing yet other than to use JRMC to play music to two USB sound cards. There was about a half second delay between the two. I haven't tried multiple speaker clients yet but I hope to this weekend.
                          I don't play any music through this setup, only speech.

                          I have tried playing a wav file to selected speaker clients in this setup and the wav file only played on the primary sound card. I did some reseach on the board and found that was the case. I don't know if that's been corrected. I recall someone saying it was a Windows problem.

                          I use Apple Airport Express to play remote music, but that is in very limited areas. And that is not automated at all. I have been trying to figure out how to get itunes to play a selected track to selected devices. I ended up just using the Apple Remote App on my iPhone.

                          Comment

                          Working...
                          X