Announcement

Collapse
No announcement yet.

Merge two HS instances

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

    Merge two HS instances

    Hi,

    I have been fooling around with some motion sensors and a plugin on a test system. I'd like to merge somehow these scripts and devices with my "production" system without having to add all the devices and copy all the scripts over.

    Is there a tool or convenient way to merge two instances of HS? They are running the same version.

    Gracias
    -Michael
    Regards,
    Michael

    HS3, W10 Home, HSTouch, W800, Z-Stick+

    #2
    Michael,

    There is no easy way to do this currently. In HomeSeer 2 Pro version there is an import/export function, but in HomeSeer 1.7 it is not easy. The reason is simple - devices are assigned a unique reference ID, and so it is possible that you have the same ID in the two different configuration XML files, and so they would conflict when merged. Also, event names should always be unique across the system.

    The best solution if you still want to attempt this would be to use a text editor to open the configuration XML files, find the different record types (tv timers, events, and devices) and then carefully copy entire records from one file to the other being careful to merge them into the same section in the destination file -- e.g. device records into the section where all of the device records are, events into the section with events, etc. When that is done, you then have to figure out a way to make sure the device reference IDs are unique - I think the field name in the file is "ref". If you have duplicate event names, HomeSeer will run fine and so you can use HomeSeer to rename the duplicates once it is running, but I would hate to uncover a non-unique device reference after it is running - it could be ugly! The reference number is just a unique number, so you can generate one yourself.

    Here is a tip - if you use the command line command FIND and tell it to find the device reference field ID (e.g. find /i "ref=" filename.xml) then it will output the lines with the ref IDs, making it easier to spot them and search for duplicates.
    Regards,

    Rick Tinker (a.k.a. "Tink")

    Comment


      #3
      These is an analysis package in the Script library "[ASP][exe] Script / Event /Device Relationship Management" that will transfer all the properties of the homseer devices and events to a database and will allow you to restore from the database. You should be able to run it on one copy of homeseer, take the database to the other, and then restore. This will have the effect of merging the two. During a restore operation new reference IDs are generated for all the events and devices to assure consistency exists.

      This is an old package, the internal logic rather complex, and not really designed for this specific purpose. You can try it, but likely the easiest thing to do is just manually transcribe at the GUI level.

      Comment


        #4
        I have not tried this but... Couldn't you just open the .xml file in HS then copy the device, and then open the new .xml file in HS and then paste this device? I know this may take a while if you have a lot of devices... but it sounds like it would work.

        Comment


          #5
          Brute force

          Hi

          Thanks for all the replies, but I wound up just doing it by hand (adding devices and events via the interface) since there weren't that many events. I was testing Doomotion with some sensors and some scripts, and after buying it I just recreated the stuff in the 'production' HS.

          Not so bad for a small number of objects, but of course a major PITB for a test system with a lot of devices and events.

          Thanks again,
          -Michael
          Regards,
          Michael

          HS3, W10 Home, HSTouch, W800, Z-Stick+

          Comment

          Working...
          X