Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
daikin-controller-cloud
Advanced tools
Library to generate/retrieve tokens to communicate with the Daikin cloud and to control Daikin devices via the cloud adapters like (BRP069C4x). The Library uses the new Daikin Europe Developer cloud API since v2.0.0.
All product and company names or logos are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or any associated subsidiaries! This personal project is maintained in spare time and has no business goal. Daikin is a trademark of DAIKIN INDUSTRIES, LTD.
The newer Daikin devices sold since 2020 contain a newer Wifi Adapter (e.g. BRP069C4x) which only connects to the Daikin Cloud and is no longer reachable locally. These devices are only controllable through the Daikin Onecta API, which uses the OpenID Connect (OIDC) protocol for client authentication and authorization purposes.
This library facilitates interacting with the Onecta API by providing an abstraction over OIDC flows and token management.
Note: For devices with older WLAN-Adapters like BRP069A4x which can only be used by the Daikin Controller App please use the Daikin-Controller lib instead.
The Onecta API limits each client application to 200 requests per day. Please make sure to not exceed this limit, as the API will block further requests for the day.
Because of this we propose the following usage limits to be implemented by the applications using this library:
retryAfter
property of the RateLimitError to determine how long to wait for the next request.This library acts as an OIDC client towards the Onecta API and uses OIDC's
Authorization
grant to obtain the initial pair of OIDC tokens. As such,
you'll have to provide the following:
Client ID
and Client Secret
of a registered application tied to your
Daiking Developer account. If you do not have such an account, yet, you can
create one in the Daikin Developer PortalAuthorization
grant flowlocalhost
or 127.0.0.1
as it is rejected by the Onecta API)You will have to combine the port (point 2.) and domain name (point 3.) to
create the URL to be set as the application's Redirect URI
in the
Daikin Developer portal. Note that the same URL must also be passed
as a configuration parameter of the DaikinCloudController
class or is build
automatically from the provided values. Also note that the Redirect URI
must
use the secure https:
protocol and that this library ships with its own self-signed
SSL/TLS certificate, which will cause your browser to present you with a security warning.
npm i daikin-controller-cloud
See src/example.ts
.
Option | Required? | Description | Default |
---|---|---|---|
oidcClientId | Yes | The client ID of the registered Daikin Developer Account application | |
oidcClientSecret | Yes | The client secret of the registered Daikin Developer Account application | |
oidcCallbackServerExternalAddress | Maybe, see desc | The external address (domainname/IP) of the machine running the library, ot external Docker IP or such when using docker. Mandatory if oidcCallbackServerBaseUrl or customOidcCodeReceiver is not provided. | |
oidcCallbackServerBaseUrl | Maybe, see desc | The full externally reachable callback URl including protocol, domain/ip/basepath. If not provided will be build internally using oidcCallbackServerExternalAddress or oidcCallbackServerBindAddr and oidcCallbackServerPort | |
oidcCallbackServerPort | Maybe, see desc | The port the callback server listens on, required when customOidcCodeReceiver is not used. | |
oidcCallbackServerBindAddr | No | The address the callback server listens on, required when customOidcCodeReceiver is not used. | ` |
oidcAuthorizationTimeoutS | Yes | The timeout in seconds for the OIDC authorization flow | |
oidcTokenSetFilePath | No | The path to a file where the token set is stored. When not set the tokens are not persisted and application need to listen to "token_updated" event and store and restore itself! | |
certificatePathCert | No | The path to the SSL certificate | ./cert/cert.key in library root |
certificatePathKey | No | The path to the SSL key | ./cert/cert.pem in library root |
onectaOidcAuthThankYouHtml | No | The HTML content to be displayed after successful OIDC authorization, requiored when customOidcCodeReceiver is not used | |
customOidcCodeReceiver | No | A custom function to receive the OIDC code. WHen this is used the library donot start any Webservcer and application needs to handle this. | |
tokenSet | No | A token set to be used initially when no token file is stored |
FAQs
Interact with Daikin Cloud devices and retrieve Tokens
The npm package daikin-controller-cloud receives a total of 53 weekly downloads. As such, daikin-controller-cloud popularity was classified as not popular.
We found that daikin-controller-cloud demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.