Continuing the discussion from Ideal Hub Placement:
As @bravenel and others have mentioned, the old version of SmartTiles works great with Hubitat and I am using it until the Hubitat developers release a new UI. While the SmartTiles licensing restricts distribution of the source code, it does allow you to modify the software. Many of you may have the code archived away or still in use on SmartThings so I thought I would share the steps I used to get it working with Hubitat. Thank you @bravenel and @ogiewon for your help validating these steps! Please don't contact me or others asking for the SmartTiles source code as again the licensing restricts sharing it.
The following steps are based on SmartTiles v5.3.3. I recommend following the steps in order so the line numbers match up.
- In your Hubitat browser, navigate to Apps Code, click New App and paste in the SmartTiles code.
- Find line 565:
var icons = ${getTileIcons().encodeAsJSON()};
- Change that to the following:
var icons = ${new JsonBuilder(getTileIcons()).toString()};
- Find line 540:
["https://graph.api.smartthings.com/api/smartapps/installations/${app.id}/$path", "?access_token=${state.accessToken}"]
- Change that to the following:
["${getApiServerUrl()}/${hubUID}/apps/${app.id}/$path", "?access_token=${state.accessToken}"]
- After making the change in the code, make sure the double quotes in the above code are straight down and not slanted. If slanted, delete each quote and set it again, otherwise you may get an error when saving the app such as: unexpected token: } @ line 531, column 1.
- Here is a screenshot of what the code should look like in your browser with the correct quotes:
- Find line 325 that starts with: if (params.access_token...
- Comment out lines 325-336. Line 336 is the } else {.
- Comment line 346 which is the }
- You can comment a line of code by putting two forward slashes before the code: //
- If you prefer you can also remove these lines of code instead of commenting them out
- At the top of the code, around line 20, before the definition section but AFTER the commented description, add the following line:
import groovy.json.JsonBuilder
- Click Save
- Click OAuth
- Click Enable OAuth in App
- Leave the default settings as they are and click Update
- Navigate to Apps, click Load New App, and choose SmartTiles 5.3.3
- Setup SmartTiles as you have previously done in SmartThings by choosing your devices
- Continue setup and clicking Next
- On the Final screen with the Done button you will see "URL Tap to view, then click Done", click that to get your custom URL for your dashboard and bookmark that site
- Click the back button in your browser to go back to the SmartTiles setup and click the Done button.
Thats it! Enjoy.