Anyone have any experience converting apps from hubitat?

Looking to convert a hubitat app back to smartthings

Does anyone have any tips

I pasted the code as it is also groovy and this is what I got…

How can I begin to tackle these errors?

Validation Error(s) occurred during save(): - Field error in object ‘physicalgraph.app.SmartAppVersion’ on field ‘iconUrl’: rejected value [null]; codes [physicalgraph.app.SmartAppVersion.iconUrl.nullable.error.physicalgraph.app.SmartAppVersion.iconUrl,physicalgraph.app.SmartAppVersion.iconUrl.nullable.error.iconUrl,physicalgraph.app.SmartAppVersion.iconUrl.nullable.error.java.lang.String,physicalgraph.app.SmartAppVersion.iconUrl.nullable.error,smartAppVersion.iconUrl.nullable.error.physicalgraph.app.SmartAppVersion.iconUrl,smartAppVersion.iconUrl.nullable.error.iconUrl,smartAppVersion.iconUrl.nullable.error.java.lang.String,smartAppVersion.iconUrl.nullable.error,physicalgraph.app.SmartAppVersion.iconUrl.nullable.physicalgraph.app.SmartAppVersion.iconUrl,physicalgraph.app.SmartAppVersion.iconUrl.nullable.iconUrl,physicalgraph.app.SmartAppVersion.iconUrl.nullable.java.lang.String,physicalgraph.app.SmartAppVersion.iconUrl.nullable,smartAppVersion.iconUrl.nullable.physicalgraph.app.SmartAppVersion.iconUrl,smartAppVersion.iconUrl.nullable.iconUrl,smartAppVersion.iconUrl.nullable.java.lang.String,smartAppVersion.iconUrl.nullable,nullable.physicalgraph.app.SmartAppVersion.iconUrl,nullable.iconUrl,nullable.java.lang.String,nullable]; arguments [iconUrl,class physicalgraph.app.SmartAppVersion]; default message [{0} cannot be null] - Field error in object ‘physicalgraph.app.SmartAppVersion’ on field ‘iconX2Url’: rejected value [null]; codes [physicalgraph.app.SmartAppVersion.iconX2Url.nullable.error.physicalgraph.app.SmartAppVersion.iconX2Url,physicalgraph.app.SmartAppVersion.iconX2Url.nullable.error.iconX2Url,physicalgraph.app.SmartAppVersion.iconX2Url.nullable.error.java.lang.String,physicalgraph.app.SmartAppVersion.iconX2Url.nullable.error,smartAppVersion.iconX2Url.nullable.error.physicalgraph.app.SmartAppVersion.iconX2Url,smartAppVersion.iconX2Url.nullable.error.iconX2Url,smartAppVersion.iconX2Url.nullable.error.java.lang.String,smartAppVersion.iconX2Url.nullable.error,physicalgraph.app.SmartAppVersion.iconX2Url.nullable.physicalgraph.app.SmartAppVersion.iconX2Url,physicalgraph.app.SmartAppVersion.iconX2Url.nullable.iconX2Url,physicalgraph.app.SmartAppVersion.iconX2Url.nullable.java.lang.String,physicalgraph.app.SmartAppVersion.iconX2Url.nullable,smartAppVersion.iconX2Url.nullable.physicalgraph.app.SmartAppVersion.iconX2Url,smartAppVersion.iconX2Url.nullable.iconX2Url,smartAppVersion.iconX2Url.nullable.java.lang.String,smartAppVersion.iconX2Url.nullable,nullable.physicalgraph.app.SmartAppVersion.iconX2Url,nullable.iconX2Url,nullable.java.lang.String,nullable]; arguments [iconX2Url,class physicalgraph.app.SmartAppVersion]; default message [{0} cannot be null]

Given that Groovy support is going away this year, you might be better off starting from scratch and rewriting it as an endpoint app.

Well that is disheartening… I spent the whole morning trying to understand the original version on these forums, only to just come across this more robust hubitat version.

Now I gotta figure out what an endpoint app is…

Ok well looks like I am going to have to start from the ground up as I am committed to completing this as well as understanding this for future endeavors.

I was under the impression that the app and driver was similar to smartapp and device handler

Hopefully I don’t get too distracted by the package pieces of the code

Is this still a valid article to start learning about endpoint apps?

The driver and smart app both look to be available in the repository you referenced. Look at the files called app and driver.

If you do a search in the Hubitat forums for converting smarthing apps to Hubitat, you will find a lot of information. Some of it is just changing the names of a few things in the code. You might get lucky and it will be easy.

The references to the package manager is an app available on Hubitat that will install and update community created apps and drivers. It uses the manifest file for tracking.

2 Likes

Hubitat doesn’t have the concept of a package; only the (user written) Hubitat Package Manager does. But the package is just the manifest file, which effectively lists the installation files and steps.

That github contains the app (SleepNumberController_App.groovy) and the driver (SleepNumberController_Driver.groovy) as separate files. They directly correspond to a SmartThings SmartApp and DTH.

1 Like

Thanks for the explanation!

1 Like

So are any of you able to load that smart app or is it just me having the issue?

No, I don’t use Smartthings anymore so I haven’t tried to load the app or driver.