Announcement

Collapse
No announcement yet.

is this possible with a script?

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

    is this possible with a script?

    Hi all ,

    My question is if its possible with a script to see what wifi and/or local network im connected to


    i need a virtual device what says im connected to CABLE or WIFI-WIFINAME
    so my pc knows when its connected to my emergency wifi , because now its connected with a cable.

    i checked this forum but i didn't find anything about it.


    regards
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

    #2
    It's not something I've tried, although will experiment with.
    I did find this thread elsewhere. It appears, at first glance, to be what you're trying to do. Naturally it'll require some tweaking to adapt it to a HS script.

    http://vbnet.mvps.org/index.html?cod...tworkalive.htm
    Real courage is not securing your Wi-Fi network.

    Comment


      #3
      hi thanks for your reply ,

      i checked it , but its different than i was searching .

      When my server is on cable i get my normal ip 192.168.***.**
      but when its on my emergency wifi i get an ip like 10.84.***.**

      maybe if there is a script that let see my ip adress whats now connected in a virtual device, i can make an event when there is a change it wil send me a message when its on the emergency wifi, so i know there is something going on but the internet will still go on.

      i use jon00 script (rccnm) , but it hasn't a option that it shows my ip adress from my server in a virtual device.

      i ask Jon00 also in his topic if i can do something with one of his scripts.

      regards
      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

      Comment


        #4
        This might help

        Hi Malosa.......

        Looking at what you want/need...you need to be able to read into the system management interface.

        I have created a script (from pieces on the internet) that will tell you how you are getting out to the internet (ie your main route). It will put the text LAN/WLAN into the virtual device and set the value of that device to 0, 1, 2 so you can change the icon based on that (where 0 = unknown, 1 = LAN, 2 = WLAN). In theory if your cable stops providing internet, the route will change over to the WLAN and this script will see the different route out!

        Let me know if it helps. I've attached it as a PDF to this
        If you still need the LAN name / WIFI-SSID let me know and I'll see if I can include it.




        (I'm assuming you are using windows)
        Attached Files
        Last edited by russr999; April 2, 2016, 01:00 AM. Reason: Updated PDF and script file

        Comment


          #5
          wow great script but i cant get it to work ,

          i did exactly like you said in the pdf , but i get syntax error

          regards ,


          Originally posted by russr999 View Post
          Hi Malosa.......

          Looking at what you want/need...you need to be able to read into the system management interface.

          I have created a script (from pieces on the internet) that will tell you how you are getting out to the internet (ie your main route). It will put the text LAN/WLAN into the virtual device and set the value of that device to 0, 1, 2 so you can change the icon based on that (where 0 = unknown, 1 = LAN, 2 = WLAN). In theory if your cable stops providing internet, the route will change over to the WLAN and this script will see the different route out!

          Let me know if it helps. I've attached it as a PDF to this
          If you still need the LAN name / WIFI-SSID let me know and I'll see if I can include it.




          (I'm assuming you are using windows)
          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




          HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

          Comment


            #6
            what is the error message? which syntax is wrong?

            Comment


              #7
              i translate it for you ,my error was in a other language.


              Code:
              The namespace or type in the Imports statement System.Core does not contain any public member or can not be found . Make sure the namespace or the type is defined and contains at least one public member . Make sure the imported element name does not use any aliases.
              Originally posted by russr999 View Post
              what is the error message? which syntax is wrong?
              Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
              Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




              HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

              Comment


                #8
                What version of .NET do you have installed?

                Comment


                  #9
                  .net 4.6



                  Originally posted by russr999 View Post
                  What version of .NET do you have installed?
                  Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                  Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                  HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                  Comment


                    #10
                    Originally posted by Malosa View Post
                    on this pc dotnet 4.6, this is my test pc
                    I'm running the same .NET 4.6 (Windows 10)...

                    Try using the attached file here....in case the script didnt copy/paste properly last time... just copy from it and paste into your script window

                    I made a small change from the first script I posted...this one now sets the status as LAN or WLAN and includes the LAN IP as reported by homeseer

                    Make sure in the event when you call the script, do not set a sub or function...it will automatically default and read MAIN.
                    Attached Files

                    Comment


                      #11
                      that one works perfect ,

                      thanks for it and for your time !!
                      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                      HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                      Comment


                        #12
                        hi russr999,

                        i forget to ask something , can you also add the wifi ssid ?

                        regards

                        Originally posted by russr999 View Post
                        I'm running the same .NET 4.6 (Windows 10)...

                        Try using the attached file here....in case the script didnt copy/paste properly last time... just copy from it and paste into your script window

                        I made a small change from the first script I posted...this one now sets the status as LAN or WLAN and includes the LAN IP as reported by homeseer

                        Make sure in the event when you call the script, do not set a sub or function...it will automatically default and read MAIN.
                        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                        HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                        Comment


                          #13
                          SSID

                          Hi Malosa,

                          Took a bit longer than I thought.....no easy way to get the SSID without using WMI (which I wanted to stay away from!)
                          I have cheated a little and used output from the console but it all works perfectly..it will give you the SSId for the WiFi adapter that you used as an input to the event.
                          I have added some code to check if there is no internet connection at all (eg: No Wifi and no cable)
                          device values are now: 0 = unknown; 1 = LAN; 2 = WiFi; 3 = No Internet found

                          I have also formatted the text going into the device status for easier reading. The device now shows 2 or 3 lines depending on which adapter:
                          Line 1 = Connection Type
                          Line 2 = SSID (if Wifi or else LAN IP Address as reported by Homeseer)
                          Line 3 = LAN IP Address as reported by Homeseer (if Wifi)
                          (see below)

                          Let me know if this works okay for you and is what you wanted.
                          Its attached below as a text file. Just copy and paste over the old script text


                          Rory
                          Attached Files
                          Last edited by russr999; April 2, 2016, 01:09 AM.

                          Comment


                            #14
                            Thanks!

                            It works but when there is no internet connection i get this error.



                            Code:
                            The purpose of a call has caused an exception is unknown .Host

                            Originally posted by russr999 View Post
                            Hi Malosa,

                            Took a bit longer than I thought.....no easy way to get the SSID without using WMI (which I wanted to stay away from!)
                            I have cheated a little and used output from the console but it all works perfectly..it will give you the SSId for the WiFi adapter that you used as an input to the event.
                            I have added some code to check if there is no internet connection at all (eg: No Wifi and no cable)
                            device values are now: 0 = unknown; 1 = LAN; 2 = WiFi; 3 = No Internet found

                            I have also formatted the text going into the device status for easier reading. The device now shows 2 or 3 lines depending on which adapter:
                            Line 1 = Connection Type
                            Line 2 = SSID (if Wifi or else LAN IP Address as reported by Homeseer)
                            Line 3 = LAN IP Address as reported by Homeseer (if Wifi)
                            (see below)

                            Let me know if this works okay for you and is what you wanted.
                            Its attached below as a text file. Just copy and paste over the old script text


                            Rory
                            Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                            Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                            HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                            Comment


                              #15
                              Originally posted by Malosa View Post
                              Thanks!

                              It works but when there is no internet connection i get this error.



                              Code:
                              The purpose of a call has caused an exception is unknown .Host
                              When you get that message...where is it? is it in the homeseer log?

                              Does the device value get updated to 3? and does the device status get undated to unknown?

                              Comment

                              Working...
                              X