You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-90Lines changed: 59 additions & 90 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,19 @@ ikea-tradfri-api is a Java library for communicating with IKEA TRÅDFRI devices.
8
8
9
9
## Features
10
10
11
-
- Register a new client to the IKEA TRÅDFRI gateway
12
-
- Get a list of all devices connected to the IKEA TRÅDFRI gateway
13
-
- Get the current state of a light
14
-
- Change the state of a light (on / off, brightness, colour, etc.)
15
-
- Get the current state of a plug
16
-
- Change the state of a plug (on / off)
17
-
- Events to automatically detect changes for devices
18
-
- Support for RGB colours for lights
19
-
20
-
11
+
- Register a new client to the IKEA TRÅDFRI gateway
12
+
- Get a list of all devices connected to the IKEA TRÅDFRI gateway
13
+
- Get the current state of a light
14
+
- Change the state of a light (on / off, brightness, colour, etc.)
15
+
- Get the current state of a plug
16
+
- Change the state of a plug (on / off)
17
+
- Events to automatically detect changes for devices
18
+
- Support for RGB colours for lights
21
19
22
20
## Installation
23
21
24
-
If possible, always try to use the latest version of this library for your application. The latest version can be found on the Maven Central repository and on the GitHub Releases page.
25
-
26
-
22
+
If possible, always try to use the latest version of this library for your application. The latest version can be found
23
+
on the Maven Central repository and on the GitHub Releases page.
27
24
28
25
### Maven
29
26
@@ -37,8 +34,6 @@ To install this library using Maven, add the following dependency to your POM fi
37
34
</dependency>
38
35
```
39
36
40
-
41
-
42
37
### Gradle
43
38
44
39
To install this library using Gradle, add the following dependency to your build file:
@@ -47,40 +42,38 @@ To install this library using Gradle, add the following dependency to your build
If you are not using a dependency management system (like Maven or Gradle), you could also add the standalone JAR file to your classpath. The JAR file can be downloaded from the Maven Central repository or from the GitHub Releases page. Make sure to also add the [dependencies](#built-with) to your classpath.
55
-
56
-
47
+
If you are not using a dependency management system (like Maven or Gradle), you could also add the standalone JAR file
48
+
to your classpath. The JAR file can be downloaded from the Maven Central repository or from the GitHub Releases page.
49
+
Make sure to also add the [dependencies](#built-with) to your classpath.
57
50
58
51
## How To Use
59
52
60
53
### Connect to an IKEA TRÅDFRI gateway for the first time
61
54
62
55
Import the Gateway class and the Credentials class:
56
+
63
57
```Java
64
58
importnl.stijngroenen.tradfri.device.Gateway;
65
59
importnl.stijngroenen.tradfri.util.Credentials;
66
60
```
67
61
68
62
Replace 'IP_OF_THE_GATEWAY' with the IP-address of the IKEA TRÅDFRI gateway.
69
-
Replace 'SECURITY_CODE' with the security code of the IKEA TRÅDFRI gateway. The security code can be found on the bottom of the IKEA TRÅDFRI gateway.
63
+
Replace 'SECURITY_CODE' with the security code of the IKEA TRÅDFRI gateway. The security code can be found on the bottom
64
+
of the IKEA TRÅDFRI gateway.
70
65
71
66
The connect function returns credentials. These credentials can later be to to connect to the gateway again.
72
67
Please store these credentials (identity and key) securely.
73
68
The credentials expire after 6 weeks of inactivity.
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/StijnGroenen/ikea-tradfri-api/tags).
323
-
324
-
293
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see
294
+
the [tags on this repository](https://github.com/StijnGroenen/ikea-tradfri-api/tags).
0 commit comments