top of page
Writer's pictureBud

Install the SmartThings2 App in Homey Pro Using the CLI Install Method - Windows OS

Updated: Apr 20


The unofficial SmartThings 2 app was previously available via the Homey Community Store (HCS). Unfortunately, the HCS is down/crashed and it is unknown when or if the store will be revived.

Should the Homey Community Store (HCS) be revived, you will have the option to install the Homey Community Store app from the Homey Community Space. You may then have access to the SmartThings 2 app as well as many other Homey Community apps. If the Homey Community Store is revived, to install the SmartThings 2 app via the HCS you may my follow the instructions provided in my YouTube video or you can follow the link to my other website article that details the HCS installation process.


Since it is not currently possible to install the SmartThings 2 app via the HCS, I took the time and effort to create the following guide for installing the SmartThings 2 application via the Command Line Interface (CLI) install method within the Windows OS.

 

Developing this guide together took a considerable amount of time in research and testing.

If you are helped by this content please consider buying me a cup of coffee

 

If you are not familiar with the command prompt, it is a program that provides the interface for typing commands. In Windows, it's called "cmd.exe" and is often referred to as just "command prompt."  A PC command line is a text-based way to interact with your computer. Instead of using a mouse and clicking icons, you type commands and arguments to instruct the computer what to do. 


Important Note: The Command Line Interface (CLI) and is intended for advanced users only. Improper use of the CLI can lead to data loss, instability and damage to your system. Bud's Smart Home will not be liable for any damages to your system resulting from attempts to follow this tutorial to install the SmartThings 2 application on the Homey Pro hub via the CLI. Proceed at your own risk.

 

Note: The following is an expanded version of the information that was extracted from the Homey Community Article titled “[HOW TO] CLI install method” that can be sourced here. I have added additional instructions and links specific to the installation of the SmartThings 2 app.


A special thanks to Adrian Rockall, the Developer of the SmartThings 2 app. If you have questions about the app you may refer them to Adrian within the SmartThings 2 app post on the Homey Community forum.


1.  Before you begin:

  • Make sure you have a Homey Pro hub. This method will not work with the Homey Cloud service.

  • Be comfortable using the Command Line Interface (CLI) on your computer. Here are a couple of commands that you may require to navigate your windows directories in the CLI:

o   cd (change directory) [This command is used to switch between directories.]

o   cd <directory name> [Changes the current directory to specified directory.]

o   cd .. [Moves up one level in the directory structure.]

o   cd ~ [Navigates to your home directory.]

o   cd - [Returns to the previous directory you were in.]

o   ls (list) [This command lists the contents of the current directory.]

o   ls [Shows a basic list of files and folders.]

o   ls -a [Lists all files and folders, including hidden ones (starting with a dot).]

o   ls -l [Provides a detailed list with permissions, owner, group, size, and date/time information.]

  • Remember: Always be cautious when using commands that modify your system 


2. Check Your Homey Hub's Node.js Version:

  • On your Homey Pro, go to: Homey App > Settings > General > About

  • Note the listed “Node.js version”. You'll need to download a Node.js version that is equal to or higher then the version installed on your hub

3. Download Node.js:

  • Visit https://nodejs.org/en

  • Download and install a version of Node.js that is equal to or higher than the one listed on your Homey Pro.


4. Download the SmartThings 2 App:

  • Locate the SmartThings 2 app on GitHub: https://github.com/AdyRock/com.smartthings

  • Click on the green “Code” button and then click on the “GitHub CLI” tab in the dropdown list. 

  • Click “Download ZIP” to download the file “com.smartthings-master.zip

  • Once downloaded choose a directory to extract the downloaded ZIP files.

  • Make note the directory path where your files are extracted. You will need to point to this directory within the CLI to instruct the CLI where to find the files needed to install the SmartThings 2 app to your Homey Pro hub.



5. Setup Node.js CLI Tools:

  • Navigate your Windows PC apps to find the installed Node.js app.

  • Click the Windows icon and find Node.js in your list of installed apps.

  • Click on the "Node.js" folder.

  • Click on "Node.js Command Prompt" from the folder’s dropdown list.

  • Install the Homey CLI tools by typing the following command in the command line:  

    • npm install -g homey

 

6. Login to Homey:

  • In the Command Prompt, log in to your Homey Pro by typing the following command in the command line:  

    • homey login ’ [Allows access through the provided webpage.]

  • When your Homey login page displays, click on your account name/email address under “Select an account” to login

  • Click “Allow” to grant Homey CLI the requested permissions.

  • Close the webpage when advised to do so.

  • You should see a line of green text in the CLI that confirms that you are logged in to your Homey hub.

 

7. Navigate to the Installed App Folder:

  • Use the ' cd ' commands to navigate to the folder containing the extracted app files.

    • TIP: You may use Windows Explorer to navigate to the “com.smartthings-master” folder and then copy the path to paste into the command line following the ‘ cd ’ [change directory] command.

  • Example: cd C:\Users\(your user name)\com.smartthings-master

 

8. Install the SmartThings 2 App:

  • homey app install ’ [CLI Command to install the app]

    • You should see a command line prompt: “? Choose and active Homey: (Use arrow keys)

    • Your Homey Pro hub should be listed below this prompt.

    • Use the down arrow to select your hub and then tap the enter key.

  • If you get an error, follow the on-screen instructions for fixing the error.

  • You may need to run ‘ npm install ’ and possibly ‘ npm audit fix ’, if instructed.

  • Check the Homey mobile app to confirm the installation of the SmartThings 2 app

    • Choose the "More" tab at the bottom

    • Tap on "Apps"

    • Search for "SmartThings 2" in the list of "My Apps"


9. SmartThings 2 App Setup:

  • Follow the instructions within the SmartThings 2 article on the Homey Community forum to configure and generate your SmartThings Personal Access Token (PAT) for the SmartThings 2 app.

  • Place the SmartThings PAT in the SmartThings 2 Homey app and begin to add your SmartThings devices to Homey.

  • You can view my general overview of this process in my YouTube Video:  



10. Explore Commands (Optional):

For a list of available commands, type the following command in the command line:  

  • homey –help

 

11. List/Select Homey (Optional):

  • homey homey list ’ [List available Homey hubs]

  • homey homey select ’ <Homey_ID> [Select a specific Homey hub]

  • homey homey unselect ’ [Unselect a Homey hub]

12. Other Forum Tips for Installation Errors:

13. Run the App (Testing):

  • homey app run ’ [To simply run the app (without installation)]

  • homey app run –clean ’ [To run the app and clear any previous installations]

  • homey app run --path /path/to/my/app/folder ’ [To run a specific app from a different folder]

 

Developing this guide together took a considerable amount of time in research and testing. If you were helped by this content please consider buying me a cup of coffee



Thank you for your support

 

コメント

5つ星のうち0と評価されています。
まだ評価がありません

評価を追加
bottom of page