Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kritsel/tado-api-demo-java
Java application showcasing how to interact with the tado API v2, via a generated REST API client
https://github.com/kritsel/tado-api-demo-java
java oauth2 openapi-generator restclient spring-boot tado tado-api
Last synced: 4 days ago
JSON representation
Java application showcasing how to interact with the tado API v2, via a generated REST API client
- Host: GitHub
- URL: https://github.com/kritsel/tado-api-demo-java
- Owner: kritsel
- Created: 2024-08-03T16:35:34.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T13:42:57.000Z (3 months ago)
- Last Synced: 2024-08-16T15:10:05.782Z (3 months ago)
- Topics: java, oauth2, openapi-generator, restclient, spring-boot, tado, tado-api
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tado api demo - java
tadoº is a german based company which offers a smart thermostat solution.
They also have an API to control this solution.This java application shows how you can use the tado API v2 which is available
at https://my.tado.com/api/v2.# Module set-up
## generated-tado-api-client
Generated java client for the tado API.It uses the `openapi-generator-maven-plugin` to generate the client code based on the
tado OpenAPI spec maintained here https://github.com/kritsel/tado-openapispec-v2/## tado demo
Spring boot application which executes some tado API calls upon application
start-up.It also implements the OAuth 2.0 authentication mechanism to authenticate
to the API.# How to run this application
## Prerequisites
You need to have a tado account which is linked to a tado Home.The username and password of this account need to be supplied as arguments
to the program, as they are needed to authenticate to the API.## maven command-line - on Windows
On Windows the `spring-boot.run.jvmArguments` part needs to be surrounded by quotes
Replace the placeholders with your account details.
`mvn -pl tado-demo -am spring-boot:run -D"spring-boot.run.jvmArguments"="-Dtado.username= -Dtado.password="`
## maven command-line - non-Windows
Replace the placeholders with your account details.
`mvn -pl tado-demo -am spring-boot:run -Dspring-boot.run.jvmArguments="-Dtado.username= -Dtado.password="`
## IntelliJ
Navigate to tado-demo > src > main > java > tadodemo > Application and run
the `main` method.The first run will be unsuccessful as you will be missing some necessary
arguments. Edit the run configuration and add this part to the VM options
(replace the placeholders with your account details):`-Dtado.username= -Dtado.password=`
## `useWindowsKeystore` option
This application is developed on a company managed Windows machine,
where the company manages the certificates in the Windows keystore.This set-up requires that some specific system properties need to be set to instruct
the program to use the Windows keystore instead of the Java one.When you happen to be in a similar situation, you can add this extra JVM argument:
`-DuseWindowsKeystore=true`