Jump to content

How to painlessly migrate RPi to Polisy


gviliunas

Recommended Posts

I am trying to "ease my toe into the Polisy water" without needing to spend too long rebuilding in ISY.

Currently, I have a working RPi with Polyglot v2.2.4 and 7 Node Servers. I have saved a backup file from this RPi system.

Now, I have my shiny-new "virgin Polisy" v2.2.5 without any Node Servers. I have not yet entered my ISY's credentials into this Polyglot as I don't want to duplicate NS in ISY until I learn the proper migration process.

1. Do I need to manually add the NS from the store into Policy or will restoring the backup file take care of this?

2. What is the sequence to prevent problems with my current ISY configuration?

    -  Should I shutdown ISY and the RPi and then fully configure Polisy before restarting ISY.

    -  If I need to install the 7 NS manually, do I need to take care to install them in the same order as they are currently in the RPi Polyglot?

2. Can I restore a backup file created with v2.2.4 onto a v2.2.5 Polisy?

 

Link to comment
Share on other sites

1 hour ago, gviliunas said:

I am trying to "ease my toe into the Polisy water" without needing to spend too long rebuilding in ISY.

Currently, I have a working RPi with Polyglot v2.2.4 and 7 Node Servers. I have saved a backup file from this RPi system.

Now, I have my shiny-new "virgin Polisy" v2.2.5 without any Node Servers. I have not yet entered my ISY's credentials into this Polyglot as I don't want to duplicate NS in ISY until I learn the proper migration process.

1. Do I need to manually add the NS from the store into Policy or will restoring the backup file take care of this?

2. What is the sequence to prevent problems with my current ISY configuration?

    -  Should I shutdown ISY and the RPi and then fully configure Polisy before restarting ISY.

    -  If I need to install the 7 NS manually, do I need to take care to install them in the same order as they are currently in the RPi Polyglot?

2. Can I restore a backup file created with v2.2.4 onto a v2.2.5 Polisy?

 

Do a backup from your RPi Polyglot and a restore of the file created from polisy. Careful, the restore is a two step process where the button changes labels and has to be clicked twice. The v2.2.5 from v2.2.4 didn't matter.

I only use the ecobee NS but it worked like a charm, assuming the position of the old RPi Polyglot. Now I need to know how to stop the RPi Polyglot from booting up while it still supports my other software bridges from ISY.

Link to comment
Share on other sites

6 minutes ago, larryllix said:

Do a backup from your RPi Polyglot and a restore of the file created from polisy. Careful, the restore is a two step process where the button changes labels and has to be clicked twice. The v2.2.5 from v2.2.4 didn't matter.

I only use the ecobee NS but it worked like a charm, assuming the position of the old RPi Polyglot. Now I need to know how to stop the RPi Polyglot from booting up while it still supports my other software bridges from ISY.

You might give this a try:

sudo systemctl disable polyglot-v2

From the man page for systemctl:

 disable UNIT...
           Disables one or more units. This removes all symlinks to the unit files backing the specified units from the unit configuration directory, and hence undoes any changes made by enable
           or link. Note that this removes all symlinks to matching unit files, including manually created symlinks, and not just those actually created by enable or link. Note that while disable
           undoes the effect of enable, the two commands are otherwise not symmetric, as disable may remove more symlinks than a prior enable invocation of the same unit created.

           This command expects valid unit names only, it does not accept paths to unit files.

           In addition to the units specified as arguments, all units are disabled that are listed in the Also= setting contained in the "[Install]" section of any of the unit files being
           operated on.

           This command implicitly reloads the system manager configuration after completing the operation. Note that this command does not implicitly stop the units that are being disabled. If
           this is desired, either combine this command with the --now switch, or invoke the stop command with appropriate arguments later.

           This command will print information about the file system operations (symlink removals) executed. This output may be suppressed by passing --quiet.

           This command honors --system, --user, --runtime and --global in a similar way as enable.

 

Link to comment
Share on other sites

2 hours ago, gviliunas said:

I have not yet entered my ISY's credentials into this Polyglot as I don't want to duplicate NS in ISY until I learn the proper migration process.

In my experience, that won't happen.  Your node servers will show up in the Polisy Polyglot Dashboard as "Unmanaged", but nothing seems to happen to your ISY.  It appears that Polyglot will not allow you to install a nodeserver over the top of an occupied slot.

Link to comment
Share on other sites

15 minutes ago, Bumbershoot said:

In my experience, that won't happen.  Your node servers will show up in the Polisy Polyglot Dashboard as "Unmanaged", but nothing seems to happen to your ISY.  It appears that Polyglot will not allow you to install a nodeserver over the top of an occupied slot.

With only one NS I never saw "unmanaged" in either Polyglot NS. Both ecobee NSs seemed to chug away as per normal. I stopped the old RPi NS but it's Polyglot shows logs flying by regardless. Your systemctl line and a reboot fixed that up.

In the end my ISY (with comm monitoring) didn't even detect the  change over. Smooth as silk.

Link to comment
Share on other sites

My Polisy is scheduled for delivery today!  If I'm jumping the gun with this post and should instead just wait for polisy to show up with included documentation, just tell me to cool my heals.

Migration 

1) How do I backup my Rpi Polyglot?  I don't find anything in the UI.  Do I need to put the sd card into my computer and manually copy the configuration file (not sure what it is named or where it is located)?  Or are there multiple files?

2) How do I restore the file to the Polisy?  Kind of goes with number 1.  Does Polisy have an sd card I can put into my pc and overwrite the config file?  Or do I have to use terminal session?

My pi has ver 2.2.3 on it and since clicking use beta firmware, it is offering me installation of v 2.2.4  Not sure if there is any point to doing that?  Perhaps a "backup" option is in that version?    

 

Link to comment
Share on other sites

Thank you all for your advice!

The migration was almost as easy as you predicted but I had the following issues and have one question:

1. Since the Polyglot on my RPi was using port 3000 and Polisy was using 443, I needed to change the ISY port configuration for each NS via ISY Node Servers, Configure pop-up for each ISY NS slot. Until I did this, as you would expect, none of the NS were working as ISY was pointing to the Polisy IP but the RPi port.  

 

2. For the LIFx NS: I was using a devlist.yml file to specify my lights. This was not copied over using the backup/restore operation however, the custom parameter (incorrectly) pointing to the devlist.yml file  was present after the restore.  Used WinSCP to copy the devlist.yml file onto Polisy and now working.

 

3. For the Harmony Hub NS: Two configuration files used by this NS were not copied during the backup/restore operation. Used WinSCP to copy:

     config.yaml   and   hubs.json    to /var/polyglot/nodeservers/HarmonyHub  and now this NS is working.

 

4. For the Presence Poly NS: This one will not start complaining about a missing "bluetooth module:"

2019-10-31 07:51:50,614 [MainThread] [ERROR] File "./presence-poly.py", line 5, in <module>
2019-10-31 07:51:50,615 [MainThread] [ERROR] import bluetooth
2019-10-31 07:51:50,616 [MainThread] [ERROR] ModuleNotFoundError
2019-10-31 07:51:50,617 [MainThread] [ERROR] :
2019-10-31 07:51:50,617 [MainThread] [ERROR] No module named 'bluetooth'
2019-10-31 10:29:16,517 [MainThread] [INFO ] Received Config from STDIN.

 

4a. I expect that this will require the efforts of the Developer to fix.  If I want to leave Presence Poly running on my RPi and the other NSs on Polisy, what is the best way to delete the now migrated NSs from the RPi. I tried clicking the "Delete" button on one of my RPi NS but this deleted the entry in ISY. How do I delete from RPi without deleting in ISY?
 

Link to comment
Share on other sites

1 hour ago, apostolakisl said:

My Polisy is scheduled for delivery today!  If I'm jumping the gun with this post and should instead just wait for polisy to show up with included documentation, just tell me to cool my heals.

Migration 

1) How do I backup my Rpi Polyglot?  I don't find anything in the UI.  Do I need to put the sd card into my computer and manually copy the configuration file (not sure what it is named or where it is located)?  Or are there multiple files?

2) How do I restore the file to the Polisy?  Kind of goes with number 1.  Does Polisy have an sd card I can put into my pc and overwrite the config file?  Or do I have to use terminal session?

My pi has ver 2.2.3 on it and since clicking use beta firmware, it is offering me installation of v 2.2.4  Not sure if there is any point to doing that?  Perhaps a "backup" option is in that version?    

 

Backup and restore is in v2.2.4 and v2.2.5. My older RPi polyglot doesn't offer v2.4.5 for some reason but backup from old and restore to new worked seamlessly. It created a file on my Win Desktop. Restore takes a double click on the same button that becomes repurposed.  My ISY never knew there was any change.

The new Polisys needs to be set up to attach to ISY first, and the upgrade needs to be done to get v2.2.5. See Bumbershoot's command lines to disable  the old Polyglot boot. Maybe leave it intact for any Polisy failures down the road.

Now I have a few other python3 packages to transfer. Not exactly the RPi Linux we are familiar with.

 

Link to comment
Share on other sites

19 minutes ago, larryllix said:

Backup and restore is in v2.2.4 and v2.2.5. My older RPi polyglot doesn't offer v2.4.5 for some reason but backup from old and restore to new worked seamlessly. It created a file on my Win Desktop. Restore takes a double click on the same button that becomes repurposed.  My ISY never knew there was any change.

The new Polisys needs to be set up to attach to ISY first, and the upgrade needs to be done to get v2.2.5. See Bumbershoot's command lines to disable  the old Polyglot boot. Maybe leave it intact for any Polisy failures down the road.

Now I have a few other python3 packages to transfer. Not exactly the RPi Linux we are familiar with.

 

Great info.  So I'll go ahead and update to the beta 2.2.4 so I can make a backup.

Link to comment
Share on other sites

This is a great summary, just to add a simpler way to handle #2 & #3, I used this while logged into Polisy to transfer files for HarmonyHub.

sudo -u polyglot -s
cd /var/polyglot/nodeservers/HarmonyHub/
scp pi@192.168.86.92:/home/pi/.polyglot/nodeservers/HarmonyHub/config.yaml .
scp pi@192.168.86.92:/home/pi/.polyglot/nodeservers/HarmonyHub/hubs.json .
scp pi@192.168.86.92:/home/pi/.polyglot/nodeservers/HarmonyHub/h5713e88305276.yaml .
scp pi@192.168.86.92:/home/pi/.polyglot/nodeservers/HarmonyHub/h4e32dcc482a3a.yaml .

The last two will be different for each hub, so you'll have to see what yours are called.

I've added an issue https://github.com/UniversalDevicesInc/polyglot-v2/issues/71 so hopefully @einstein.42 can do that soon.

Also, thanks to @larryllix for pointing out you have to hit the restore button again after selecting the file, I didn't notice that at first.

The only other problem I have is that the HarmonyHub no longer sees my HueEmulator because the IP address of Polisy is different than the RPi.  I'm hoping there is a way to fix this without having to swap their IP addresses but haven't had time to investigate further.

Link to comment
Share on other sites

On 10/31/2019 at 1:48 PM, gviliunas said:

Thank you all for your advice!

The migration was almost as easy as you predicted but I had the following issues and have one question:

1. Since the Polyglot on my RPi was using port 3000 and Polisy was using 443, I needed to change the ISY port configuration for each NS via ISY Node Servers, Configure pop-up for each ISY NS slot. Until I did this, as you would expect, none of the NS were working as ISY was pointing to the Polisy IP but the RPi port.  

 

2. For the LIFx NS: I was using a devlist.yml file to specify my lights. This was not copied over using the backup/restore operation however, the custom parameter (incorrectly) pointing to the devlist.yml file  was present after the restore.  Used WinSCP to copy the devlist.yml file onto Polisy and now working.

 

3. For the Harmony Hub NS: Two configuration files used by this NS were not copied during the backup/restore operation. Used WinSCP to copy:

     config.yaml   and   hubs.json    to /var/polyglot/nodeservers/HarmonyHub  and now this NS is working.

 

4. For the Presence Poly NS: This one will not start complaining about a missing "bluetooth module:"

2019-10-31 07:51:50,614 [MainThread] [ERROR] File "./presence-poly.py", line 5, in <module>
2019-10-31 07:51:50,615 [MainThread] [ERROR] import bluetooth
2019-10-31 07:51:50,616 [MainThread] [ERROR] ModuleNotFoundError
2019-10-31 07:51:50,617 [MainThread] [ERROR] :
2019-10-31 07:51:50,617 [MainThread] [ERROR] No module named 'bluetooth'
2019-10-31 10:29:16,517 [MainThread] [INFO ] Received Config from STDIN.

 

4a. I expect that this will require the efforts of the Developer to fix.  If I want to leave Presence Poly running on my RPi and the other NSs on Polisy, what is the best way to delete the now migrated NSs from the RPi. I tried clicking the "Delete" button on one of my RPi NS but this deleted the entry in ISY. How do I delete from RPi without deleting in ISY?
 

I did not have any of these issues with the port.  I had to update my Polisy from a terminal window and it changed polisy to port 443 (where I left it).  I then restored my rpi backup (which was on port 3000) to polisy, power cycled polisy (perhaps not necessary), and all of my NS's worked immediately.  Including Harmony Hub. 

 

Link to comment
Share on other sites

7 hours ago, apostolakisl said:

3. For the Harmony Hub NS: Two configuration files used by this NS were not copied during the backup/restore operation. Used WinSCP to copy:

     config.yaml   and   hubs.json    to /var/polyglot/nodeservers/HarmonyHub  and now this NS is working.

@Jimbo  I'm trying to do a new installation of the HarmonyHub Nodeserver from the NS store on my Polisy, and neither of these files seems to be created during the process.  I previously had Nodelink running on a Raspberry Pi, but wiped that out when the Polisy arrived, so I don't have copies that I can carry over to the new install.  Any suggestions?  I can provide log files or screen shots if that would help. 

Link to comment
Share on other sites

@Jimbo  I'm trying to do a new installation of the HarmonyHub Nodeserver from the NS store on my Polisy, and neither of these files seems to be created during the process.  I previously had Nodelink running on a Raspberry Pi, but wiped that out when the Polisy arrived, so I don't have copies that I can carry over to the new install.  Any suggestions?  I can provide log files or screen shots if that would help. 
For a new install those will be created if you follow the instructions in the readme. Please review those, I'm traveling now but if you have problems post in the Harmony hub Polyglot V2 subforum.

Sent from my Pixel 3 XL with Tapatalk

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.8k
    • Total Posts
      369.9k
×
×
  • Create New...