Announcement

Collapse
No announcement yet.

Scripting for Dummies or templates?

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

    Scripting for Dummies or templates?

    I am working on a custom UI and would like to integrate scripts into it. The problem is that I have no experience with scripts. All I want to do is turn lights on and off. I would like to think if templates exist, that I could modify them to fit my environment.

    I want to verify that my understanding is correct. Scripts are simply text files that have been compiled, and reside in HomeSeer HS3/scripts folder. All my UI needs to be able to do is to open/execute those script files, which it can do already.

    I want to learn how to script and I have some ebooks and vods to learn from. However I want to hit the ground running.

    #2
    Originally posted by jogentry View Post
    I am working on a custom UI and would like to integrate scripts into it. The problem is that I have no experience with scripts. All I want to do is turn lights on and off. I would like to think if templates exist, that I could modify them to fit my environment.

    I want to verify that my understanding is correct. Scripts are simply text files that have been compiled, and reside in HomeSeer HS3/scripts folder. All my UI needs to be able to do is to open/execute those script files, which it can do already.

    I want to learn how to script and I have some ebooks and vods to learn from. However I want to hit the ground running.
    How are you building the custom UI? Web page running under HS or your own web server? Separate application?

    The scripts in the HS script folder are just text, and are compiled by HS when they are executed BY HS. They cannot execute outside of HS (without significant contortions, see: http://www.tenholder.net/tenWare2/tenScripting)

    There are ways to access HS devices, events, etc from outside of HS, and you could tell HS to run a specific script this way.

    Let us know more of the environment you are using to build the UI and we can provide some help.

    tenholde
    tenholde

    Comment


      #3
      It might be a worthy consideration to look at the JSON API if you are using some other interface, that will allow you the control you are after without the hassle of dealing with connections and dll's etc. As tenholde says though - you might be better explaining a bit more about what you are trying to do...

      Comment


        #4
        it's a long story...

        I have a unique use case for my HS3 deployment. My name is Josh and I have ALS, also known as Lou Gehrig's disease. It's difficult for me to interface with devices to control my home. I have no use for touch screen devices since I have very little control over my arms and fingers. I can still use a computer mouse fairly well, but this isn't a mobile solution.

        The device I use the most is my eye tracker. It's a small USB device that captures the movements of my eyes and translates that input into mouse clicks and typing functions. I have one that I use with a regular laptop. I have another one that is built in to a purpose-built computer. The purpose-built computer mounts to my wheelchair and I can take it anywhere.

        Both of them come with specialized software called Tobii Communicator. I can use Communicator to speak, browse the web, Facebook, texting and more. The computer has a built-in IR blaster so I use it to control the TV, blu-ray player, and even a raspberry pi that I outfitted with a Flirc.

        I can run the Windows version of HSTouch on my computer but it requires a lot of eye clicking just to turn on one light. I bought HSTouch Designer which is a lot easier. I can put a lot of buttons on a single page and setup the navigation how I want. The only downside to this is that most applications including HSTouch are not eye tracker friendly.

        In order to click something I have to stare at the left click icon to select it, and then stare at the button I want. Sometimes this can take 3 or 4 tries to get to the right spot. Tobii Communicator allows you to create your own GUIs. I have created a few for IR control. Everything in Communicator is very eye tracker friendly.

        Here's where I need help. I'm not sure how to interface Communicator with HomeSeer. I can program buttons in Communicator to do a lot of things. A button can send IR commands, send email, speak voice commands using synthesized voice, run programs with or without variables, open files and more. I've only been using HomeSeer for less than a year and I'm not sure how to proceed.

        Is scripting an option? I think I could have a button programmed to execute a script file. I don't know anything about scripting but I've always wanted to learn. Right now Im trying to use synthesized voice and voice recognition, but it's challenging. The speaker client doesn't like some words so I still have some experimenting to do. I tried out email commands but it takes sixty seconds to check email and register the command. I might try some of the email integration plug-ins.

        Comment


          #5
          Hi Josh,

          If you can create buttons in Communicator to issue URL commands, then you could issue JSON commands to the HS server. This is probably the easiest way to go and can be used to control individual devices and execute more complex events that you create in HS. Here's the reference guide that can give you some ideas on what can be done that way: http://homeseer.com/support/homeseer..._with_json.htm

          Cheers
          Al
          HS 3.0.0.548: 1990 Devices 1172 Events
          Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

          Comment


            #6
            Originally posted by sparkman View Post
            Hi Josh,

            If you can create buttons in Communicator to issue URL commands, then you could issue JSON commands to the HS server. This is probably the easiest way to go and can be used to control individual devices and execute more complex events that you create in HS. Here's the reference guide that can give you some ideas on what can be done that way: http://homeseer.com/support/homeseer..._with_json.htm

            Cheers
            Al
            Hmmmm.... I can open a shortcut file for a specific URL, or I can open Firefox or Chrome and tell it what URL to open. Is that what you mean?

            Comment


              #7
              Yes, that's what I meant. The only issue I see with that method is that it would open a new browser window each time, although there are probably ways to autoclose them. Another option may be creating a custom asp web page in HS with buttons on it. Not sure if a browser window would work better with an eye tracker than HS Touch.

              Cheers
              Al
              HS 3.0.0.548: 1990 Devices 1172 Events
              Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

              Comment


                #8
                As you can use programs with variables I wonder if one of the applications in this thread may be somewhere to start http://forums.homeseer.com/showthread.php?t=165591, the event running application I wrote could be adapted to control devices (it was written before the JSON interface and it is reliant on keeping the dll files up to date in the HS directory, it only runs events as it stands) or the program rupp has be used to issue instructions to devices to control them?

                Comment


                  #9
                  Originally posted by sparkman View Post
                  Hi Josh,

                  If you can create buttons in Communicator to issue URL commands, then you could issue JSON commands to the HS server. This is probably the easiest way to go and can be used to control individual devices and execute more complex events that you create in HS. Here's the reference guide that can give you some ideas on what can be done that way: http://homeseer.com/support/homeseer..._with_json.htm

                  Cheers
                  Al
                  It WORKS!

                  I am testing it in Firefox and it opens a new tab each time. I think I can send a macro with a keyboard shortcut to close the tab. Thanks everyone.

                  Comment


                    #10
                    Great!

                    Cheers
                    Al
                    HS 3.0.0.548: 1990 Devices 1172 Events
                    Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                    Comment

                    Working...
                    X