Announcement

Collapse
No announcement yet.

Using Javascript to Find HomeSeer system?

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

  • Using Javascript to Find HomeSeer system?

    Does anybody know of a way to find the host ID of a HomeSeer system using Javascript? Basically, what I'm looking for is something like the find.homeseer.com function but which would give you back the IP number of any local computers running HomeSeer.

  • #2
    A much simpler solution is to simply use the IP Reservation feature on your router to assign a fixed local IP address for your Homeseer server, using the MAC address of your server. Then you will always know what the IP address is. Check the documentation for your router for instructions on how to set up IP Reservation (it may be called something different on your router though).

    Comment


    • #3
      Originally posted by aa6vh View Post
      A much simpler solution is to simply use the IP Reservation feature on your router to assign a fixed local IP address for your Homeseer server, using the MAC address of your server. Then you will always know what the IP address is. Check the documentation for your router for instructions on how to set up IP Reservation (it may be called something different on your router though).

      Thanks though that won't work for what I am after. I am trying to make the Homebridge HomeKit-to-HomeSeer plugin I developed a bit easier to configure (https://www.npmjs.com/package/homebr...er-plugin-2018). As currently written, the end-user has to manually identify the IP address of their homeseer system when setting up the plugin. I'd like to set it to auto-detect the IP address.

      Comment


      • #4
        find.homeseer.com does not actually query your network to determine the IP address. It works by having you controller (or znet) contact the HS mother ship and report your public and private IP address to HS. When you go to find.homeseer.com HS knows your public IP and just matches that with all the private IP addresses it has logged from your public IP address space and returns the results.

        I am wondering if there is some sort of function call a PI could make to discover yhe local controller IP address.

        Comment


        • #5
          Originally posted by jvm View Post


          Thanks though that won't work for what I am after. I am trying to make the Homebridge HomeKit-to-HomeSeer plugin I developed a bit easier to configure (https://www.npmjs.com/package/homebr...er-plugin-2018). As currently written, the end-user has to manually identify the IP address of their homeseer system when setting up the plugin. I'd like to set it to auto-detect the IP address.
          You will add a selection box for people that are running multiple instances of HS?

          ---
          John

          Comment


          • #6
            This is a Homekit to HomeSeer plugin not a HomeSeer to Homekit plugin. I did not realize this when I made my post.

            Comment


            • #7
              Some further details ---

              Each HomeSeer instance (HS3, Z-Net) sends a registration packet every 5 minutes to find.homeseer.com. The registrations live for 10 minutes; if not renewed before expiration the entry is purged.

              It's possible to webscrape the page for the host name/address info. I wrote a perl script to do this, although its a bit of a mess as it was written for the old format page, where a form submission was required, then hacked to support the current format.

              One complication is that the HS3 and Z-Net entries are indistinguishable on the main page. If you wanted to filter out the Z-Net entries, these are listed here: https://find.homeseer.com/findhomeseer/iplist.aspx (This is called by the Z-Wave plugin when populating the Z-Net picklist on the 'Add Interface' widget).

              You might also need to consider the 'Maintenance' entry presented for the ZeeS2, shown in the image.
              Attached Files

              Comment


              • #8
                Solved!

                For those interested, you can enable "System is Discoverable using UPnP" on the HomeSeer Network page and then use this Javascript package to find Homeseer: https://www.npmjs.com/package/node-upnp-utils

                The code is pretty simple:

                var upnp = require("node-upnp-utils");

                upnp.on('added', (device) => {
                // This callback function will be called whenever an device was discovered / added.

                if (device.description.device.friendlyName == "HomeSeerHS3(HOMESEER)")
                {
                console.log(device);
                }

                });

                // Start the discovery process
                upnp.startDiscovery();

                Comment

                Working...
                X