Announcement

Collapse
No announcement yet.

"Distributed" HS possible?

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

    "Distributed" HS possible?

    Is it possible to set up HS with a "Primary" HS server and one or more "Secondary" HS servers? What I would like to do is have the one primary server that controls everything and makes all the decisions but have the ability to send X10 signals to a secondary (or "remote") HS server to put on the powerline. That secondary HS server could be a very small computer that does nothing but receive commands and send them to an X10 powerline interface. My need for having the remote computer just process X10 commands is just an example based on my specific situation. Ideally, the remote HS computer should be able to do as much or as little as a person wants but work in conjunction with the master HS computer. For example, one might want to have some events run on the master computer and some run on one of the remotes.

    #2
    This would be possible with a bit of coding but I'm not sure why any one would want to run more than one always on PC when HomeSeer hardly uses the resources of one. I actually have 2 PC running HomeSeer at the moment but they are work independently of one another so this is an option as well.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      I actually have two complete systems running in my home.

      I have one HS server that has complete control of the entire house... lights.. sprinklers... HVAC... sensors...events..etc..

      I then have another HS server that only has the devices for our Guest Room and upstairs HVAC. This way when guests come to visit they have complete control of their environment, via Maestro, without any possibility of accessing the rest of the house.

      Unfortunately, since HS does not support a shared database... I simply have just entered duplicates of the controlled devices on the second HS server. When the guest server receives a command for a device it does not recognize, it ignores it.

      When a device command is recognized by both servers, they each update their status and act accordingly. I have not run into any logic loop errors yet. The guest server acts just like it is seeing a command from... say a plampad... when the main server controls a device.

      This set-up is a bit hardware intensive, since both machines need to have a PLC.

      Comment


        #4
        I don't see the advantages to having 2 separate systems, I can sure see a need for redundant failover, so if something fails on the main HS server, the secondary takes over, but i haven't completely investigated that.

        Dhanford, can't Maestro be customized to have multiple custom interfaces? so that your guests can only have access to certain devices? I apologize I am not a maestro user, i got involved with another product before Maestro's release and have too much invested (both time and money) and it does what I need.

        To try and sync 2 servers would just double if not more the traffic on the powerline.

        But maybe I am not understanding the need, would love to hear more on the thoughts!
        Over The Hill
        What Hill?
        Where?
        When?
        I Don't Remember Any Hill

        Virtualized Server 2k3 Ent X86 Guest on VMWare ESXi 4.1 with 3 SunRay thin clients as access points - HSPro 2.4.0.48 - ZTroller - ACRF2 (3 WGL 800's) - iAutomate RFID - Ledam - MLHSPlugin - Ultra1wire - RainRelay8 - TI103 - Ultramon - WAF-AB8SS - jvESS (11 zones) - Bitwise Controls BC4 - with 745 Total Devices - 550 Events - 104 scripts - 78 ZWave devices - 42 X10 devices - 76 DS10a's 3 RFXSenors and 32 Motion Sensors

        Comment


          #5
          Originally posted by Rupp
          This would be possible with a bit of coding but I'm not sure why any one would want to run more than one always on PC when HomeSeer hardly uses the resources of one. I actually have 2 PC running HomeSeer at the moment but they are work independently of one another so this is an option as well.
          Perhaps someone that uses HS for security cameras / capture etc??

          I have a second PC purely for the HS webcam plugin, otherwise when I do a capture the HS speech events etc all stop working until capture is stopped.

          It works pretty well, the main HS box does all the movement sensor stuff, rfxcom etc, then when a sensor detects movement it sends the signals to change camera and a code down the powerline to the other pc which does a 1 minute capture.

          If I could do it with ONE HS PC Id be over the moon but untill someone looks at the webcam plugin to see if it can be improved, 2 pcs is the only way to go

          TrOjAn

          Comment


            #6
            The reason I want to do it is to get X10 signals RELIABLY from one building to another. (I don't need information on couplers, repeaters, etc. I know all about that). If I had two HS systems on my network (which is 100% reliable) then the "master" server in the house would not have to send X10 signals to my shop, it could simply tell the HS "remote" server in the shop to send the necessary X10 signals to those devices in the shop.

            Jackpod, it would not increase powerline traffic at all. What I have in mind is that for every X10 device, you would specify which server (master, remote 1, remote 2, etc) communicates with that device by X10. In other words, if I want HS to turn my device J10 on (the air compressor in my shop), HS would know that the X10 commands for THAT DEVICE need to be sent to the remote server (in the shop) and put on the powerline through that interface, not the interface connected to the computer in the house.

            And yes Rupp, I know that's just an expensive X10 repeater but some of us are more interested in high-reliability than low-cost. Actually, it wouldn't be very expensive because I have several computers lying around that I could use for that so I would just have to buy another X10 powerline interface. And I may not even have to do that because I have a couple of interfaces I could use if I wouldn't need an expensive TI103 version. So, unless HST charged another full license fee for the secondary servers, it would actually be a very low cost way for me to improve X10 reliability.

            I just think this might be a good feature to add to HS. I'm sure others would find other uses for having a master and one or more remote HS systems. Someone mentioned failover. I think that would be a great option also. It would be really cool if a remote could take over the functionality of the master if the master failed for some reason. This would require a "heartbeat" function where the remote periodically queries the master to be sure it's online and responding and, if not, automatically takes over the master function.

            Having a "geographically dispersed" HS system over VPN would also be a cool feature. I have a VPN tunnel between my house and my wife's office. It would be very useful to me to be able to put a HS "remote" in her office to perform some basic automation under control of my master HS system at home. Others might like the same feature for their main/vacation homes.

            Lot's of potential uses come to mind if this were a feature of HS.

            Comment


              #7
              One option might be to use xAP to send the signal accross the net, and put it back on the other powerline.

              Comment


                #8
                One option might be to use xAP to send the signal accross the net, and put it back on the other powerline.
                How does that work? Is that a HS feature or would it be a home-grown solution?

                Comment


                  #9
                  Michael McSharry has a wide array of free xAP utilities, interfaces and a HS plug-in. See here: xAP

                  I am using this for remote 1wire data collection, but there is no reason you couldn't use it for remote X10 control.

                  There is a learning curve, and the documentation is sporadic, but Michael is always willing to help when you run into trouble.

                  Bill

                  Comment


                    #10
                    This is right up xAP's alley. As Bill said Michael has this entire scenario running on his system. I just can't emigine running any more pc's.
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      #11
                      As Michael stated (I'm paraphrasing):

                      Lets give the scenario (which happened in my house and until I got my hands on UPB I would have used xAP):
                      you have a good working system. All signals go everywhere. boosters, couplers, whatever. Then there is one plug that you can't get ANY signals on. 0 bars on your X10 meter. WHY? I don't know. I personally have 3 plugs in my house that I can't get ANY X10 signals on.

                      OK, in comes xAP. You put a PC there, you network it. Then when you get a command for that particular plug, you send it to the remote PC. Then it can send the signal "locally" to the X10 module/s.

                      I believe Michael has a pond that he controls like that (if I remember from his post).

                      The other benefit, you can use xAP to put multiple X10 devices on the SAME PC. You just setup xAP to send to local, instead of broadcast across the network. Then you can have a TI103 and an X10 something or other (as a backup). I know that the CM11A is flakey, so if you put two of those, then you could have a double redundant system.

                      All in all another great idea by Michael!!

                      --Dan
                      Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                      Comment


                        #12
                        It wouldn't be hard to write an HS plugin that uses .net remoting to talk to a remote PC (custom app) that simply sends ON/OFF/DIM type commands to a serial X10 line interface.

                        Would have to think about how the devices (real, virtual, combination) would be defined to HS, and how to identify the X10 commands that are to be sent to the remote, but I can think of several possibilities.

                        I have pieces of that code running now for other purposes.

                        Don't know how much interest there is in this 'remote x10' capability.

                        Ed T.
                        tenholde

                        Comment


                          #13
                          In the original hype about HS2, the remoting features were supposed to be further expanded to be able to run remote plug-ins. Other than the speaker app, that original idea seems to have faded away. A remote X10 interface I would think would be on the top of the list. I wonder what ever happened to those original plans?

                          Bill

                          Comment


                            #14
                            Its pretty easy to access a remote HS system using .NET remoting. Here is a vb.net script that will connect to a remote instance of HS and get a reference to the HS interface there. You can then execute script commands as if you were on that actual PC. I did not test this code, but it should work, or at least be close. I can help if you have issues. You may need to add a reference to the HomeSeer2.dll in your settings.ini file.

                            PHP Code:
                             
                            Sub Main
                            (parms as object)
                            dim hsinterface As HomeSeer2.application
                            dim hs 
                            As Scheduler.hsapplication
                             
                            ' create the class from HomeSeer2.dll
                            hsinterface = New HomeSeer2.application
                             
                            set the remote host we will connect to
                            hsinterface
                            .SetHost("myremotepc")
                             
                            ' try to connect to the remote pc, this could even be on the Internet!
                            Dim rval As String = hsinterface.Connect("user", "pass")
                             
                            if the return value is not an empty stringthen there is an error
                            If rval <> "" Then
                              
                            ' log an error
                              hs.writelog ("Error","Could not connect to remote server: " & rval)
                            Else
                              ' 
                            good connection
                            EndIf
                             
                            ' get a reference to the remote HS object
                            hsapp = hsinterface.GetHSRef
                             
                            Now call any HS script commandexecutes on the remote PC
                            ' Send an X10 command
                            hs.ExecX10("A1","on",0,0)
                             
                            Speak on the remote PC
                            hs
                            .Speak("Hello on the remote PC")
                             
                            End Sub 
                            Next would be to trigger this from an event with X10 recieved, then use hs.LastX10 to get the x10 command and send it to the remote PC.

                            I think this is very powerful feature of HS2, but I don't see many using it. If anyone has any questions on how to make this work, let me know.
                            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                            Comment


                              #15
                              Rich,

                              Thanks for the information. Would it be possible to integrate this into HS so one doesn't have to be a programmer to use it? This may make perfect sense to most people but I'm not even sure what to do with "PHP code".

                              What I had envisioned is a setup option in HS where one would define the "master" and "remote" HS instances. Maybe a checkbox to enable "Distributed HomeSeer" and if the box is checked, a place to specify the IP address of any remote instances and other necessary options.

                              Now when a devices is defined, there would be an option on the device definition screen such as "Communicate with this device through: [Master] or [Shop] or [Lake House], etc. Of course the default would be Master, if a remote is not specified.

                              Let's say I have a device called "Air Compressor" with a device code of J10. When I define that device, I could specify "Communicate with this device through: Shop". Now anytime HS wants to control that device, HS sends the X10 command out on the powerline via the TI103 attached to the HS instance called "Shop". I don't mean have HS Master send the X10 command to "Shop", I mean HS Master tells "Shop" to turn on J10.

                              The same concept would apply to any peripheral, not just X10 devices. I could attach an Ocelot to my remote HS instance and control devices attached to it from the Master. Or UPB or any other interface.

                              In the setup for the remote instances, there could be options such as:

                              Instance Name: Shop
                              IP address of Master: 192.168.1.100
                              Can become Master: Yes
                              Check health of Master every: 5 minutes
                              Assume role of Master if no response after: 6 attempts

                              There should only be one HS database so that devices and events are only defined once. Obviously, this database would have to be on a shared drive. Actually, I guess a current copy of the database would have to reside on each system so that "Shop" could assume the role of Master if the Master computer or the shared drive is completely down.

                              There would need to be a mechanism (probably an entry in the database) that tells all HS instances what their current role is. This so that if Shop assumes the role of Master, then when Master is back online (it's rebooted for example), Shop relinquishes the role of Master.

                              I can see this evolving into a very powerful feature of HS. For example, it may make it feasible to use HS in a very large installation such as large commercial building, or a campus situation such as a college. Maybe a HS instance could be installed in each dorm to control lighting, heat/cool, security, etc. and have it all controlled by one Master HS instance. All that would be required to build a large HS network would be LAN or WAN connectivity!
                              Last edited by DC; November 20, 2006, 08:13 PM.

                              Comment

                              Working...
                              X