Announcement

Collapse
No announcement yet.

Jon00 Homeseer/Echo Skill Helper for Homeseer 3 & Homeseer 4

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

    #61
    Originally posted by klieber View Post
    So I want to avoid the confirmation required with the official skill. e.g. when you say "turn off all the lights in the kitchen", Alexa says, "please confirm turn off all lights in the kitchen". I just want her to turn it off. Your script does that very effectively.
    Can't you turn that off?

    Goto tools -> Setup -> Voice (tab)

    and uncheck "Confirm voice commands containing "All""


    This should stop you from having to confirm it (and I have confirmed that on my system).
    MeiAutomtion Home

    Comment


      #62
      I'm not sure if your script can do this, but one issue I've had with Homeseer is being able to tell it to do something with a delay via the Echo. So I want to run an event, but I want it to run in 2 minutes. Currently I can only do this by saying "Alexa, ask homeseer in 2 minutes to turn off the office".

      That's not very natural to me. I would much rather say "Alexa, Ask homeseer ot turn off the office in 2 minutes." Is there a way our script could recognize that and swap it?

      I'm not sure it's doable, but HS hasn't really been all the responsive to my suggestion to all the "in" part to be at the beginning or end.

      *note: I recognize that when just talking directly to homeseers built in speech recognition it is much more natural: [wake word] in 2 minutes turn off the office. it's the addition of "Alexa, ask.." that makes it less natural for me.

      I realize this might not be doable, but just a thought.
      MeiAutomtion Home

      Comment


        #63
        Another request: Would it be possible for a script to return the text that Alexa speaks back? For instance If my wife says "Alexa, ask Homeseer where Frank is" I can run a script that can check my location and PHlocation devices and give her an answer which might be :

        "Frank is at [address]"
        or if I'm "near" my work location and PH location has me marked as "near", it could merely say "Frank is at work".

        This is not really 1 device returning the value, but the ability to check multiple devices via a script and return a string that is sent back.

        Edit: To elaborate on this, My idea is that my script could check multiple devices, in this case all my PHLocation devices, and build a phrase. When I do go to the office it is a 2 hour one way drive, so on my way home she keeps checking to see how much longer till I get home (traffic could delay me, etc). So In this instance I would check the following devices:

        (psuedo code)
        Code:
        Is franks phone moving? (speed > 5mph), then
           Is Frank moving towards home? ( direction to home is approaching), then
              get time from home (driving time)     
              get current City
              say "Frank is currently in [city] and should arrive by [driving time]
        is Frank's phone not moving then
           Is frank near the Office, then
              Say "frank is at work"
        ...
        Obviously there is a bit more than that, but I think you get the idea.
        MeiAutomtion Home

        Comment


          #64
          Use some event to update the string of a virtual device and have alexa/Jon's echo skill helper read the device string.


          Robert
          HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

          Comment


            #65
            Originally posted by sirmeili View Post
            Can't you turn that off?

            Goto tools -> Setup -> Voice (tab)

            and uncheck "Confirm voice commands containing "All""


            This should stop you from having to confirm it (and I have confirmed that on my system).
            You're right -- that works great. Thank you!

            Comment


              #66
              Originally posted by sirmeili View Post
              I'm not sure if your script can do this, but one issue I've had with Homeseer is being able to tell it to do something with a delay via the Echo. So I want to run an event, but I want it to run in 2 minutes. Currently I can only do this by saying "Alexa, ask homeseer in 2 minutes to turn off the office".

              That's not very natural to me. I would much rather say "Alexa, Ask homeseer ot turn off the office in 2 minutes." Is there a way our script could recognize that and swap it?

              I'm not sure it's doable, but HS hasn't really been all the responsive to my suggestion to all the "in" part to be at the beginning or end.

              *note: I recognize that when just talking directly to homeseers built in speech recognition it is much more natural: [wake word] in 2 minutes turn off the office. it's the addition of "Alexa, ask.." that makes it less natural for me.

              I realize this might not be doable, but just a thought.
              Yes, it could be done with a small script:

              Save the following script to the scripts directory. Lets say AlexaOffice.vb

              PHP Code:
               Sub Main(ByVal Secs As String)
                      
              hs.WaitSecs(CInt(Secs) * 60)
                      
              hs.TriggerEvent("Office")
                  
              End Sub 

              Change the name of the event "Office" to the event name of your office event.

              Then set up one of the triggers as follows:

              [Trigger1]
              AlexaText=turn off office minute
              Mode=1
              AlexaResponse=OK I will turn off the office in [alexanumstring] minutes
              RunEvent=
              Runscript=AlexaOffice.vb
              Speak=
              SPClient=
              SpeakDevice=
              CAPI=
              Json=
              DeviceValue=
              SetDeviceValue=
              SetCapiValue=
              Delay=500

              That's it!

              Now you can say...'Ask Homeseer to turn off the office in 2 minutes'

              You can have any sentence you want so long as it contains the words 'turn' 'off' 'office' and 'minute'
              Jon

              Comment


                #67
                Originally posted by sirmeili View Post
                Another request: Would it be possible for a script to return the text that Alexa speaks back? For instance If my wife says "Alexa, ask Homeseer where Frank is" I can run a script that can check my location and PHlocation devices and give her an answer which might be :

                "Frank is at [address]"
                or if I'm "near" my work location and PH location has me marked as "near", it could merely say "Frank is at work".

                This is not really 1 device returning the value, but the ability to check multiple devices via a script and return a string that is sent back.

                Edit: To elaborate on this, My idea is that my script could check multiple devices, in this case all my PHLocation devices, and build a phrase. When I do go to the office it is a 2 hour one way drive, so on my way home she keeps checking to see how much longer till I get home (traffic could delay me, etc). So In this instance I would check the following devices:

                (psuedo code)
                Code:
                Is franks phone moving? (speed > 5mph), then
                   Is Frank moving towards home? ( direction to home is approaching), then
                      get time from home (driving time)     
                      get current City
                      say "Frank is currently in [city] and should arrive by [driving time]
                is Frank's phone not moving then
                   Is frank near the Office, then
                      Say "frank is at work"
                ...
                Obviously there is a bit more than that, but I think you get the idea.
                Originally posted by langenet View Post
                Use some event to update the string of a virtual device and have alexa/Jon's echo skill helper read the device string.


                Robert
                As Robert has stated, you can update a device string which can be returned to Alexa for her to speak. It is not the only method as you can also get her to read the contents of Global Variables and even ini files.

                So do whatever logic you want and save that to a device string/global variable/ini file and use the respective replacement variable(s) in Alexa's response text.

                Just remember you will need to set the delay= parameter to something suitable to allow your logic to be processed and saved.
                Jon

                Comment


                  #68
                  So I got my virtual device setup and populating with a string (I am updating it when I upload my location maps to my server). And alexa is returning the correct string.

                  <rant>
                  However, when I say "Alexa, ask homeseer where frank is" it misses the "where" more than half the time. I know this isn't the scripts issue, but I thought that maybe someone else might have run into this. Also note that for some reason, it never picks up "Frank is", it's always "Frank he's" (Which I believe is an Alexa issue, not Homeseer or this scripts).
                  </rant>

                  Note that I used the || to get around these issues, but it's more than frustrating (Though I've heard I do mumble, even if I don't hear it...LOL)
                  MeiAutomtion Home

                  Comment


                    #69
                    As you say, it is entirely an issue with Amazon's speech recognition. She does seem more comfortable with certain structured sentences.
                    Jon

                    Comment


                      #70
                      Originally posted by jon00 View Post
                      As you say, it is entirely an issue with Amazon's speech recognition. She does seem more comfortable with certain structured sentences.
                      Yeah, wasn't trying to put down the script. It's awesome and I plan on doing more with it. You've out down yourself again. The only thing better would be if it had a config screen. I'm using your ini editor, so that's pretty close :-)

                      Sent from my XT1585 using Tapatalk
                      MeiAutomtion Home

                      Comment


                        #71
                        As a feature request, would you please consider adding functionality that would allow one to set a global variable and respective value?

                        [Trigger1]
                        AlexaText=turn off office minute
                        Mode=1
                        AlexaResponse=OK I will turn off the office in [alexanumstring] minutes
                        RunEvent=
                        Runscript=AlexaOffice.vb
                        Speak=
                        SPClient=
                        SpeakDevice=
                        CAPI=
                        Json=
                        DeviceValue=
                        SetDeviceValue=
                        SetCapiValue=
                        Delay=500
                        HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

                        Comment


                          #72
                          I can, however it may not be needed.

                          As you have not specified a script parameter, the number is automatically passed to your script (AlexaOffice.vb) as the parameter, therefore you can set the global variable from within the script:

                          PHP Code:
                          Sub Main(ByVal Parm As String)

                          hs.SaveVar("Your variable name",Parm)

                          ' your code here

                          End Sub 
                          Jon

                          Comment


                            #73
                            I have read thru this thread but I Still don't understand the concept. If I use this script do I still have to say "Alexa tell Homeseer to ...." .?
                            Hector
                            ____________________________________
                            Win.2003 OS, HS3
                            BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                            BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                            MyTrigger,ACRF2,W800,Zwave
                            AP800,Honeywell Stat

                            Comment


                              #74
                              Yes, but you can change the homeseer to something else... in my case, I call it Leena. So I would say Alexa... tell Leena to ... The script provides the advantage to run scripts, events capi commands etc. You can customize the trigger and response as well.

                              Robert
                              HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                              Comment


                                #75
                                Originally posted by Rotech View Post
                                I have read thru this thread but I Still don't understand the concept. If I use this script do I still have to say "Alexa tell Homeseer to ...." .?
                                Yes you do, however this offers many benefits:

                                1) You can return any text for Alexa to speak back to you. For instance, My wife can say "Alexa, Ask Homeseer where Frank is" and she will say one of a few things: "Frank is at home", "Frank is at [Address]", "Frank is at the office", or "Frank is in [city] and should be home in X minutes" (the last is when I'm on my 2 hour drive home from work).

                                2). You are not reliant on a complete phrase match. Using just homeseer events you have to have a complete match. I have an event for turning off my office. I have to match "Turn the office off" or "Turn off the office" for it to work. With this plugin, I could just look for the words "Turn office off" either in that order or in any order and this will pick it up (note I wouldn't use it for that because I may want to turn off a light in the room).

                                I think those are the 2 biggest ones, but there is another that I can't wait to try out and it's the number parsing. So I can say "Tell homeseer to turn the thermostat to X degrees" and this plugin will parse out the X and allow me to send it into a script to set my thermostat.
                                MeiAutomtion Home

                                Comment

                                Working...
                                X