Announcement

Collapse
No announcement yet.

How to get started in scripting?

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

  • How to get started in scripting?

    is there a tutorial on how to get started in scripting with HS3 or HS4? Would like to know how to make calls to the script from HS and where to place the files.

  • #2
    The files are placed in ........../HomeSeer/scripts. The scripts are called from events in HomeSeer as shown in the snippet below:

    Click image for larger version  Name:	Screenshot from 2020-02-12 21-38-28.png Views:	0 Size:	22.4 KB ID:	1362114
    You are not just limited to VB/C# etc scripts. You can also run command line scripts or different processes. There is documentation on scripting in tools->setup ... Homeseer help file. This will give you basics on scripting (function calls, simple syntax etc). The forum has a lot of information on scripting and many examples. Look in the howto section.

    Hope this helps

    Comment


    • #3
      Ed Tenholder has developed some useful tools to help with vb.net scripting.
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

      Comment


      • #4
        Perfect.....mucho thanks!

        Comment


        • #5
          Can a script be run after a device is polled?

          Comment


          • #6
            Originally posted by Bugman1400 View Post
            Can a script be run after a device is polled?
            A z-wave device? You could poll in a script and then do subsequent script actions.
            HS 3.0.0.548: 1990 Devices 1172 Events
            Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

            Comment


            • #7
              Can a script be run without an Event? The Manual and Scheduled Events aren’t working well for me.

              Comment


              • #8
                Originally posted by Bugman1400 View Post
                Can a script be run without an Event? The Manual and Scheduled Events aren’t working well for me.
                It will help if you explain what you are attempting to do.
                HS 3.0.0.548: 1990 Devices 1172 Events
                Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                Comment


                • #9
                  I have an HS-WD200+ that turns on/off my outside lights. Sometimes the lights are turned on via a Scheduled Event and sometimes when I manually press the paddle. I would like the LEDs to turn Red when the lights are ON and Green when the lights are OFF. I don't want the LEDs manipulated from the Scheduled Event or from the Manual paddle press; I want the LEDs to follow the "Switch Multilevel" status of ON/OFF. I do not use the dimmer.

                  Comment


                  • #10
                    Originally posted by Bugman1400 View Post
                    Simple really. I have an HS-WD200+ that turns on/off my outside lights. Sometimes the lights are turned on via a Scheduled Event and sometimes when I manually press the paddle. I would like the LEDs to turn Red when the lights are ON and Green when the lights are OFF. I don't want the LEDs manipulated from the Scheduled Event or from the Manual paddle press; I want the LEDs to follow the "Switch Multilevel" status of ON/OFF. I do not use the dimmer.
                    So why the questions about polling and running the script outside of an event?
                    HS 3.0.0.548: 1990 Devices 1172 Events
                    Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                    Comment


                    • #11
                      Perhaps you were offended by the wording of my reply. I’ve edited it in an effort to be less distracting from the main point. Any help is sincerely appreciated.
                      Last edited by Bugman1400; April 11th, 2020, 06:51 PM. Reason: N

                      Comment


                      • #12
                        Originally posted by Bugman1400 View Post
                        Perhaps you were offended by the wording of my reply. I’ve edited it in an effort to be less distracting from the main point. Any help is sincerely appreciated.
                        There was no offense taken. I simply don’t understand why you were asking about running a script after polling and running it outside of an event. What you want to accomplish should be relatively straightforward based on an event triggering on your multilevel device.
                        HS 3.0.0.548: 1990 Devices 1172 Events
                        Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                        Comment


                        • #13
                          I’d rather change the color of the LEDs based on the status of the multilevel device and not the external triggers. This because the external triggers don’t always get noticed. However, a polling of the device would notice the change of the status and change the LED color.

                          Comment


                          • #14
                            Originally posted by Bugman1400 View Post
                            I’d rather change the color of the LEDs based on the status of the multilevel device and not the external triggers. This because the external triggers don’t always get noticed.
                            Can you provide an example of the external triggers that you are referring to and how you have attempted to use them?

                            Mike____________________________________________________________ __________________
                            HS3 Pro Edition 3.0.0.548

                            HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

                            Comment


                            • #15
                              Originally posted by Bugman1400 View Post
                              I’d rather change the color of the LEDs based on the status of the multilevel device and not the external triggers. This because the external triggers don’t always get noticed. However, a polling of the device would notice the change of the status and change the LED color.
                              So you're thinking of triggering the script something like once a minute, then polling the multilevel device and then setting the LED color?
                              HS 3.0.0.548: 1990 Devices 1172 Events
                              Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                              Comment

                              Working...
                              X