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
      HS4Pro on a Raspberry Pi4
      54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
      Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

      HSTouch Clients: 1 Android

      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: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
                        Home Assistant 2024.3
                        Operating System: Microsoft Windows 11 Pro - Desktop
                        Z-Wave Devices via two Z-Net G3s
                        Zigbee Devices via RaspBee on RPi 3b+
                        WiFi Devices via Internal Router.

                        Enabled Plug-Ins
                        AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

                        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
                            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                            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