Updated webCoRE - now cannot login to WebCoRE


#1

1) Give a description of the problem
I kept getting the “update through IDE” notification, yet update from repo didn’t show any newer versions. So I updated manually. Now, (Somehow) I have two versions of the webCoRE dashboard in my IDE smartapps, both showing blue/published/OAuth.

When I try to open webCoRE through Smartthings (classic) app (IOS) it says I cannot install a piston directly, use the webCoRE smartapp instead.

I thought I was? I didn’t install anything new. I just updated the app.

So I tried to go through the webCoRE app. It asks me to get a registration code from the smartapp. And around we go.

Can someone help me out please? I am hoping that I did something dumb that has an easy fix. I’m here to learn.

Thanks!


#2

All pistons are created and edited from the Dashboard using any web browser. The first time you use a particular browser, there is a code required to link it to your account. This code can be found at:

ST app > Automation > SmartApps > webCoRE > Register a browser
(This has to be done once per browser)

Then back at the Dashboard in your browser, choose “Register a Browser” and enter the code…


#3

I have been using webCoRE for a long time. The only change I made was to update the version. Now when I try to go to the smartapp (the path you’ve shown above), it tells me “Sorry, you cannot install a piston directly…”.

I’m not trying to install a piston. I just want to open the app to get the code so that I can see the pistons I already have.

Am I making sense?


#4

How far along this path can you travel before you get that error message?

ST app > Automation > SmartApps > webCoRE > Register a browser


#5

That is the first message when I open webCoRE. So, automation>webCoRE>message.

I think it has something to do with the two instances of dashboard in my IDE, but I don’t know how to fix that.


#6

I had a double instance over a year ago, but I do not remember the exact steps I took to remove the extra one. Maybe someone else can chime in who is more familiar with this.


#7

Apologies for the mayhem, is it possible that you pasted the webCoRE Dashboard smart app in place of the webCoRE smart app at some point? That particular wording is only in found in the dashboard app which should not appear in your ST apps list.

You will see name: "${handle()} Dashboard", near the top of the file which can easily distinguish the webCoRE Dashboard app code.


#8

That is entirely possible. If the pic loads you can see my IDE. How do I fix it?


#9

In the IDE go to My Locations > smartapps. You should see a hierarchical list of smart apps here, it looks like you will see both webCoRE (with all your pistons under it) and webCoRE (dashboard) at the top level (farthest left). If that is the case you can hit Edit at the top of the page and uninstall the rogue dashboard app.


#10

I only have one top level webcore, but below it I have webcore (dev) and webcore (dashboard) (dev). Is that correct?


#11

That looks correct, is the code for each of your smart apps up-to-date by visual comparison with the code in GitHub?


#12

One of the two dashboards is outdated. If I try to delete it, it says: “This SmartApp can’t be deleted at this time because it is installed by one or more users.”


#13

Can you change its name to something distinct, like name: "${handle()} Dashboard Old", then save and publish? If so, does that allow it to show up in your smartapps list?


#14

Sort of. If I hover over the "webcore (dashboard)(dev) it says “Old Dashboard” off to the side. I don’t know why the new one is not showing up. Or how to remove this one.


#15

I’ve got to run. I appreciate your help and I’ll check back later.


#16

I’m still looking for a solution to this. Can I reinstall webcore without creating another instance? I don’t want to do anything that would cause me to lose my pistons.


#17

With today’s release you can backup all of your pistons to a file and restore after deleting everything but that is still a fairly nuclear solution since you would also have to redo all global variables, categories, places, etc…

I’m still not sure why having two copies of the dashboard would cause the webCoRE app to not show up in your ST app Automation tab. Your only choice on that screen is the one webCoRE that is broken?


#18

I installed a new instance of webcore hoping that it would replace the broken one. Now I can log in to webcore, but all of my pistons are in the broken instance, and I cannot get to them.

Is this screenshot any help toward a solution?


#19

I cannot get into webcore to backup the pistons I have.

I did update the smartapps from repo this morning. And tried again to delete the broken dashboard, no dice. I’m not sure why the newer dashboard didn’t replace the older version.


#20

Let’s do some hacking. We’re going to temporarily make your new webCoRE app provide a dashboard registration code for your old app.

Before we start, please don’t paste any of these IDs back into the thread; just find them and follow the instructions from there. I obscured my own identifiers for these screenshots.

  1. Find the app id of your old webCoRE install
    a. Go to ide.smartthings.com > My Locations > smartapps
    b. Click webCoRE to open the details for your old install
    c. Scroll all the way to the bottom of the popup
    d. Copy the value shown in the lower left and paste somewhere for later

  2. Find the access token for the old webCoRE install
    a. Still on the smart app info popup, scroll up until you find accessToken (in the Application State section)
    b. Copy the value and paste somewhere for later

  3. Go to My SmartApps > ady624 : webCoRE to edit the code for the new install

  4. Click anywhere in the code then press Ctrl+F (Cmd+F on macOS) to search for the text private String getDashboardInitUrl

  5. Replace the line that begins return url with the following

    def oldAccessToken = '9276bf58-a139-4219-9193-6c6e304873c1'
    def oldAppId = '8118ed8e-c454-423e-b999-64a00738b486'
    return url + (register ? "register/" : "init/") + (apiServerUrl("").replace("https://", '').replace(".api.smartthings.com", "").replace(":443", "").replace("/", "") + 
    ((hubUID ?: oldAccessToken) + oldAppId).replace("-", "") + (hubUID ? '/?access_token=' + oldAccessToken : '')).bytes.encodeBase64()
  1. Paste in your access token and app id
  2. Save and publish changes
  3. Open the ST mobile app and navigate to the webCoRE smart app
  4. Tap Register a browser to get a code for your old install
  5. Open a different browser or private/incognito session to access the dashboard with that code

If that works you should be able to export all pistons from the old instance to a backup file and then import that to the new instance. Be sure to revert the smart app to the original code when you’re done. If all seems well you will need to delete your old pistons from the smartapps page.