I am trying to load an app that uses the groovy grails code and getting this error:
startup failed: Script1.groovy: 1954: unable to resolve class org.codehaus.groovy.grails.web.json.JSONObject
The line has:
instanceof org.codehaus.groovy.grails.web.json.JSONObject
I think there was a bug in SmartThings where runIn would pass the object in as a JSONObject instead of a map so a lot of SmartApps have checks to see what they are working in so they access attributes properly. Did we ever get an answer here, or maybe it’s that this platform doesn’t have this bug and we can assume we’ll get a map?
What are you trying to do...convert a string to Json or map?
If so, I have had success using evaluate(string). All other methods have been hit or miss...primarily miss.
Now to work out the Authentication. It goes to the website to login. Then once I login and it asks me if I want to grant access to ST. When I say yes I get this:
Yes, I have seen this but not being a programmer, I need working examples to compare not just some technical wording. Unfortunately I'm way over my head on this but since it hasn't been looked at in months, I figure I could waste a couple of hours poking around, lol.
If nothing else comes of this today, at least @stephack got us past the first hurdle. Hopefully someone can figure out the oath part. I know it won't be me! But if I keep asking questions, sometimes I can put the pieces together.
I'm am also not a programmer so I wouldn't necessarily assume that the code I posted is accurate...even if it avoids an error. If you still have these devices in ST, I would add an output to the logs from the toJson method in both ST and HE and compare the results. Just to ensure they at least look similar.