Announcement

Collapse
No announcement yet.

Scripting with Visual Studio Express

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

  • Scripting with Visual Studio Express

    So I'm using Microsoft Visual Studio Express 2012 for Windows Desktop, which is installed on the PC running HomeSeer3, to help write my vb.net scripts mainly to get intellisense help. I've created a project reference to HSCF.dll, Scheduler.dll and HomeSeerAPI.dll that were located in the HomeSeer3 programs folder. Also added namespace imports to Scheduler and HomseerAPI in my project.

    Is there anyway to get a reference to the actively running instance of HomeSeer3 so that the 'HS' object used in scripting would be valid in my Studio project? Maybe I'm going about this wrong but my intent is just to create scripts using Studio and then paste them into HomeSeer3 when finished. If I could run them from Studio as well during development that would be a plus.

    thanks, -phil

  • #2
    Originally posted by vbphil View Post
    So I'm using Microsoft Visual Studio Express 2012 for Windows Desktop, which is installed on the PC running HomeSeer3, to help write my vb.net scripts mainly to get intellisense help. I've created a project reference to HSCF.dll, Scheduler.dll and HomeSeerAPI.dll that were located in the HomeSeer3 programs folder. Also added namespace imports to Scheduler and HomseerAPI in my project.

    Is there anyway to get a reference to the actively running instance of HomeSeer3 so that the 'HS' object used in scripting would be valid in my Studio project? Maybe I'm going about this wrong but my intent is just to create scripts using Studio and then paste them into HomeSeer3 when finished. If I could run them from Studio as well during development that would be a plus.

    thanks, -phil

    I think you would need to look at tenScripting as I think this will do what you are after.

    Greig
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


    • #3
      +1 for tenScripting
      HS3Pro Running on a Raspberry Pi3
      64 Z-Wave Nodes, 168 Events, 280 Devices
      UPB modules via OMNI plugin/panel
      Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
      HSTouch Clients: 3 Android, 1 Joggler

      Comment


      • #4
        Id also suggest tenscripting,

        If you are trying to create a plugin, have a look at the sample plugins and then you need to reference the files you mentioned below.

        If you want to work on scripts, I would 100% suggest tenscripting as a great tool.
        HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

        Facebook | Twitter | Flickr | Google+ | Website | YouTube

        Comment


        • #5
          Make sure you download the HS3 version - but read the HS2 documentation first.


          http://tenholder.net/tenWare2/tenScr...3/Default.aspx
          tenholde

          Comment


          • #6
            I've also begun recording videos to assist first time users:

            Videos

            I'd appreciate feedback. Is it worth the effort to record the next several that walk through coding, debugging, and exporting a few scripts?

            tenholde
            tenholde

            Comment


            • #7
              Thanks, Tenholde,

              this will help me a lot to change my script from HS2 to HS3.

              I look forward to more videos

              Jean-Francois.

              Comment


              • #8
                +1 for more videos. This is most helpful.
                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


                • #9
                  Beginner question: I haven't yet delved into HomeSeer-related scripting, but I probably will be fairly soon. If tenscripting is generally better than the alternatives, then I'd rather just start with tenscripting rather than learn something else only to later realize I should have started with tenscripting instead. Is tenscripting general purpose enough to serve all scripting needs, or would there ever be a need to use whatever the default scripting would be if tenscripting didn't happen to exist?

                  Comment


                  • #10
                    Tenscripting is a tool to create native .net scripts within the context of HS and VS. It is not a new scripting model... So to answer your question, it would make it easier to create and test your .net scripts with HS. The alternative is to create your scripts and "guess" their behavior based on documentation before implementation and loop through this process until you get it right. By using TS, you can add references to the HS libraries which makes life easier.
                    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


                    • #11
                      tenScripting3 Remote

                      The tenScripting3 videos were helpful. I am an experienced Visual Studio developer and have a question about running the tenScripting3 project remotely from the HS3 server PC. I'd like to use the Visual Studio install on my laptop and not HS3 PC. Both machines are on the same home network. Do I have to install HS3 on my laptop or just copy the 3 DLL files to my laptop and register them? I'm running Win7 on the laptop.

                      thanks, -phil

                      Comment


                      • #12
                        Originally posted by tenholde View Post
                        I've also begun recording videos to assist first time users:

                        Videos

                        I'd appreciate feedback. Is it worth the effort to record the next several that walk through coding, debugging, and exporting a few scripts?

                        tenholde
                        The videos are worth their weight in Latinum! Now, if somebody could do the same for .NET, I might have a clue what I am doing.....
                        HomeSeer Version: HS3 Pro Edition 3.0.0.500
                        Operating System: Microsoft Windows 10 Pro - Work Station

                        Enabled Plug-Ins:
                        2.1.0.119: AmbientWeather | 3.0.21.0: BLLock | 2.0.24.0: BLUPS | 1.3.6.0: Device History | 3.0.0.56: EasyTrigger | 3.1.0.7: MeiHarmonyHub | 3.0.6681.34300: UltraCID3 | 3.0.6644.26753: UltraLog3 | 3.0.6554.33094: UltraMon3 | 3.0.0.91: weatherXML | 3.0.1.245: Z-Wave | 3.0.51: HS Touch Designer | 3.0.0.40 Z-Seer+

                        Comment


                        • #13
                          +1 for the next videos. Those were very helpful. Gives me some incentive to give scripting another crack. The trial and error approach made it tedious to learn.

                          Comment


                          • #14
                            Originally posted by vbphil View Post
                            The tenScripting3 videos were helpful. I am an experienced Visual Studio developer and have a question about running the tenScripting3 project remotely from the HS3 server PC. I'd like to use the Visual Studio install on my laptop and not HS3 PC. Both machines are on the same home network. Do I have to install HS3 on my laptop or just copy the 3 DLL files to my laptop and register them? I'm running Win7 on the laptop.

                            thanks, -phil
                            I had the same question. In the absence of a clear answer, I guess I will create a directory structure on my laptop and desktop to mimic HS3 and put the three DLLs in that structure
                            Randy Prade
                            Aurora, CO
                            Prades.net

                            PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                            Comment


                            • #15
                              The easiest way to get the HS3 dlls installed on your remote PC (laptop) is to install the HS3 speaker app, and then add references to the installed dlls.

                              tenholde
                              tenholde

                              Comment

                              Working...
                              X