Skip to content

rizhenkov/smart-button

Repository files navigation

Smart Button for SmartThings

This small project is a SmartThings virtual button that allows you to control a SmartThings device by launching a defined SmartThings scene.

The typical use case is to give a ability to launch a selected scene in your SmartThings hub without giving access to your full SmartThings environment. It may be useful for guests or for neighbors.

The button is protected by a PIN code that you can set.

Demo

You can try the demo of this project at bramka.vercel.app. Open this at one device and use PIN 000000.

And open the bramka.vercel.app/test page at another device or another window at least. Then you can see how the Tester reacts to the button press. You can imagine that the Tester is a SmartThings device such as a light bulb or a door lock.

Deployment to Vercel

Press button below to deploy this project to Vercel in one click.

Deploy with Vercel

Next you will be asked to set the following environment variables:

Advanced Usage

There are additional environment variables that you can set to customize the behavior of the button.

NUXT_SMART_THINGS_API_URL Allows you to set the URL of the SmartThings API. By default, it is set to the SmartThings API URL (https://api.smartthings.com/v1). You can use it to set a different URL, for example, if you have a custom SmartHome API server.

NUXT_ADDITIONAL_PUSH_PAUSE allows you to set the pause after the scene is launched (until the button is ready to be pushed again). By default, it is set to 0 (no pause). You can set it to a value in milliseconds.