@qubiack/homebridge-samsung-windfree-ac
v2.0.0
Published
Homebridge plugin for Samsung WindFree AC with support for OAuth2 (not required to change token everyday). Base on https://github.com/igorxmath/homebridge-samsung-windfree-ac/
Maintainers
Readme
Homebridge Samsung WindFree AC
This is a Homebridge plugin for Samsung WindFree AC.
Description
This plugin allows you to control your Samsung WindFree AC through Homebridge.
Installation
Install this plugin using: hb-service add homebridge-samsung-windfree-ac
Configuration
Configuration parameters:
name: The name of the platform.BaseURL: The base URL for the API.authMethod: The authentication method to use. Options are:oauth2(Recommended): Uses OAuth2 authentication with a refresh token for permanent access.pat: Uses a Personal Access Token that expires after 24 hours.
OAuth2 Authentication (Recommended)
For OAuth2 authentication, you need to provide the following parameters:
clientId: Your SmartThings client ID.clientSecret: Your SmartThings client secret.refreshToken: Your SmartThings refresh token.
To obtain these credentials:
- Go to the SmartThings CLI and install it by
brew install smartthingscommunity/smartthings/smartthingsornpm install -g @smartthings/cli. - Run
smartthings apps:create
- add Display Name
- add Description
- skip icon
- skip target
- select
r:device:*,w:device:*,x:device:* - move up to select
Add Redirect URI - add:
https://httpbin.org/getas redirect URI
- Enter web page - please replace
CLIENT_IDwith yourOAuth Client IDfrom step 2:https://api.smartthings.com/oauth/authorize?response_type=code&client_id=CLIENT_ID&redirect_uri=https%3A%2F%2Fhttpbin.org%2Fget&scope=x%3Adevices%3A*+w%3Adevices%3A*+r%3Adevices%3A* - Copy code from args object, eg.
ZmZ2Z_
Here is a sample configuration for OAuth2 authentication:
{
"platforms": [
{
"platform": "Homebridge Samsung WindFree AC",
"name": "Samsung WindFree AC",
"BaseURL": "https://api.smartthings.com/v1/",
"authMethod": "oauth2",
"clientId": "your_client_id",
"clientSecret": "your_client_secret",
"refreshToken": "your_refresh_token"
}
]
}Personal Access Token Authentication
For Personal Access Token authentication, you need to provide the following parameter:
AccessToken: Your access token. They can be created and managed on the personal access tokens page.
Note: Personal Access Tokens expire after 24 hours and are intended for temporary development use.
Here is a sample configuration for Personal Access Token authentication:
{
"platforms": [
{
"platform": "Homebridge Samsung WindFree AC",
"name": "Samsung WindFree AC",
"BaseURL": "https://api.smartthings.com/v1/",
"authMethod": "pat",
"AccessToken": "your_access_token"
}
]
}Supported Modes
offcoolheatauto
Supported Optional Modes
windFree
To enable this mode, you need to select the
windFreeoption in the plugin settings.
Debugging
For detailed instructions on how to debug this plugin with breakpoints in WebStorm or VS Code, please see the DEBUGGING.md file.
Note: To access the Homebridge WebUI during debugging (http://localhost:8581), make sure the homebridge-config-ui-x plugin is installed. Run
npm installbefore debugging to ensure all dependencies are installed.
Roadmap
- [x] Add support for
windFreemode. - [x] Add support for Schema App integration.
- [ ] Add automated tests and CI/CD.
- [x] Support for OAuth2.
