Migrating agent to another computer?

  • I had the agent running on one Windows machine which had to be migrated to another...I installed the agent on the new machine, copied the configuration JSON file, named it the same, etc. and all still works if I test commands in the web interface, but ST automations are no longer working through the SmartApp. Is there anything I can do in ST or the app to keep all the existing automations and just 'point' them to the new agent (which now has the same name as the old), or do I need to re-create all my automations?

  • @batteryxsnare, I see the problem, and I'll work on it. Right now the SmartThings SmartApp uses the computer and command ID's, but if I switch to using the computer name and command name to match the SmartThings switches to the triggercmd commands, it would allow you to move your commands to a new computer, name it the same in TRIGGERcmd, and you wouldn't have to re-create your SmartThings switches.

    I'll have to make a new version of the SmartThings app code, and unfortunately you will have to delete your switches and re-add them to move to the new code.

    I'll let you know when it's ready. Thank you for reporting this problem!

  • Sounds good...since I'm going to have to delete and re-add anyway, should I just go ahead and do that now or wait until you update the smart app? Just dont want to redo twice, let me know!

    Also, I've been meaning to leave a review ...will do that today...

    And one more question - I meant to subscribe but cant remember if I did...can you check? If I'm not subscribed let me know and I'll do that also

    Thanks again!

  • @batteryxsnare, please wait to delete and re-create your switches. You'll want to install the new smartthings smartapp code first. I'm almost done with it. I'm working on it now.

    Thanks for offering to do a review.

    Also I checked, and you're not subscribed yet. For future reference, if you're subscribed, you'll see this in red on the instructions page:
    You're already subscribed. Thank you for your support!
    And for clarity, I just added this text to the instructions page if you're not subscribed:
    You're not subscribed yet.

    EDIT: It's done. Now the SmartThings switches are tied to the commands via the computer name / command name combo, so you can move your commands to a new computer, name the computer the same as the old computer (in the web gui), and you won't have to re-create your SmartThings switches.

    Thanks for the suggestion. I should have done that a long time ago.

    To use the new SmartApp code, you'll need to remove your switches, login to the SmartThings IDE, and update the SmartApp code to use the new V2 code, then re-add your switches.

    BTW, if you're an Alexa user, you can get similar voice experience without SmartThings with this skill.

  • @Russ Oh boy this is what I was looking for, as I'm getting a new Windows machine tomorrow. Although I'm not sure how many of my switches are v1 and v2 so I guess I'll find out. Thank you for this great upgrade to the code!

  • You're welcome @dougcolt!

Log in to reply