Caution
The integration is under development!
The custom integration adds support for SmartThings compatible Cooktops
The idea came from a need to integrate a Samsung cooktop with a hood (not a Samsung one, for example to make it work with hob2hood :). It was supposed to be the integration for Home Assistant are not exposed to publicity.
Using HACS (recommended)
- Download the latest release of
homeassistant-samsung-smart-cooktoprepository. The link - smartthings-cooktop.zip - Copy the
custom_components/smartthings-cooktopfolder from the downloaded files and paste the it into your Home Assistant's custom components directory:<home_assistant_folder>/custom_components/smartthings-cooktop - Restart Home Assistant.
When the integration is installed using one of the above approach, it should be added to the list of integrations. Follow the steps to do that:
- Open
Settingsand go toDevices & services - Click
Add Integrationand search forSmart Things Cooktop
You can also use the following My Home Assistant link:
The first step cover SmartThings OAuth credentials
| Key | Type | Required | Description |
|---|---|---|---|
Client ID |
string |
True |
Client ID of the registered app. See Authorization in Smart Things |
Client Secret |
string |
True |
Client Secret of the registered app. See Authorization in Smart Things |
Redirect URL |
string |
True |
Redirect URL of the registered app. See Authorization in Smart Things |
Authorization code |
string |
True |
A code generated at the end of the autorization process. See Authorization in Smart Things |
The second step will ask you to choose a cooktop device you'd like to use for this integration
Warning
At this moment the integration works with one cooktop
At some point Samsung limitted the TTL of Personal Tokens to 24 hours only, which makes it hard to support in the Home Assistant. But there is OAuth flow to the rescue.
- Install SmartThings CLI
- Run the following command to create your application in SmartThings:
smartthings apps:create - Choose
OAuth-In Appfrom the promted list of options - You will be guided through the wizard of app creation.
- App name can be whatever you want
- Redirect URL: you can put
https://httpbin.org/get - Scopes required for the integration to work:
r:devices:*,w:devices:*,x:devices:*
- When the app is create its details will be shown
Display Name <you_app_display_name>
App Id <your app id>
App Name <your_app_name>
Description <your_app_discription>
Single Instance true
Classifications CONNECTED_SERVICE
App Type API_ONLY
────────────────────────────────────────────────────────────────
OAuth Info (you will not be able to see the OAuth info again so please save it now!):
───────────────────────────────────────────────────────────
OAuth Client Id <you_app_client_id>
OAuth Client Secret <you_app_client_secret>
───────────────────────────────────────────────────────────
- Save
<you_app_client_id>,<you_app_client_secret>, and<your_redirect_url>. These are important settings of your integration - SmartThing OAuth uese Authorization Code flow, therefore the next step is to receive the
code - Build the link for auth. Here is template:
https://api.smartthings.com/oauth/authorize?client_id=<you_app_client_id>&response_type=code&redirect_uri=<your_redirect_url>&scope=r:devices:*+w:devices:*+x:devices:*`
- Open the link in a browser
- Follow the suggest steps to authorize.
- When authorized, you will be redirect to
<your_redirec_url>withcodein the path. For exmaple:http://<your_redirect_url>?code=<auth_code> - This code is for one time usage
All exposed entities are read_only. The cooktop API in SmartThings doesn't provide actions.
- Power on/off:
switch.cooktop_power - Lock on/off:
switch.cooktop_lock - Burner levels:
number.cooktop_burner_01_levelnumber.cooktop_burner_02_levelnumber.cooktop_burner_03_levelnumber.cooktop_burner_04_level
- Timers associated with each burner
number.cooktop_burner_01_timernumber.cooktop_burner_02_timernumber.cooktop_burner_03_timernumber.cooktop_burner_04_timer
- Energy (artificial culculation based on the burners levels)
sensor.cooktop_energy
- Samsung NZ64B5046KK