Skip to content

Commit

Permalink
Update scene triggers example
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdgeisler committed Dec 7, 2022
2 parents cabcbe4 + 6584c22 commit 2db2343
Show file tree
Hide file tree
Showing 118 changed files with 3,652 additions and 1,723 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will create a pre-release on merging code to "main"
# For more information see: https://github.com/marvinpinto/action-automatic-releases

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Create pre-release

on:
push:
branches:
- "main"

jobs:
pre-release:
name: Create pre-release
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build source code with maven
run: mvn -B package --file pom.xml

- name: Create pre-release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: Development Build
files: |
LICENSE.txt
**/*.jar
41 changes: 41 additions & 0 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will create a tagged release on pushing a version tag (v*)
# For more information see: https://github.com/marvinpinto/action-automatic-releases

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Create tagged release

on:
push:
tags:
- "v*"

jobs:
gh_tagged_release:
name: Create tagged release
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build source code with maven
run: mvn -B package --file pom.xml

- name: Create tagged release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
LICENSE.txt
**/*.jar
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,30 @@ barely tested, and some are known as inoperable.
* TRADFRI signal repeater
* Light & Driver
* STOFTMOLN ceiling/wall lamp WW24
* FLOALT panel WS 60x60
* TRADFRI bulb E27 CWS 806lm
* TRADFRI bulb E27 CWS opal 600lm
* TRADFRI bulb E27 WS globe opal 1055lm
* TRADFRI bulb E27 WS opal 980lm
* TRADFRI bulb E27 WS opal 1000lm
* TRADFRI bulb E27 WS globe opal 1055lm
* TRADFRI bulb T120 E27 WS opal 470lm
* TRADFRI bulb E14 WS opal 400lm
* TRADFRI bulb GU10 WS 400lm
* TRADFRI bulb GU10 WS 345lm
* TRADFRI Driver 10W
* TRADFRI Driver 30W
* GUNNARP panel round
* Light-Controller
* Remote Control N2
* TRADFRI on/off switch
* TRADFRI remote control
* LEPTITER Recessed spot light
* Sound-Controller
* TRADFRI wireless dimmer
* Sound-Controller
* SYMFONISK Sound Controller
* Blinds-Controller
* TRADFRI open/close remote
* Motion-Sensor
* Motion-Sensor
* TRADFRI motion sensor
* Shortcut-Controller
* TRADFRI SHORTCUT Button
Expand Down Expand Up @@ -66,12 +71,10 @@ public class MyApplication {
@Bean
public CommandLineRunner run(final DirigeraApi api) {
return (String... args) -> {
api.pairIfRequired().block(); // pair gateway if required

api.device.light.all() // fetch all light devices from hub
.flatMapMany(Flux::fromIterable)
.flatMap(d -> api.device.light.turnOn(d)) // turn on lights
.flatMap(d -> api.device.light.setLevel(d, 100)) // turn on lights
.flatMap(d -> api.device.light.setLevel(d, 100)) // set light level to 100%
.flatMap(d -> api.device.light.setTemperature(d, d.attributes.state.color.temperatureMax)) // set color temperature
.blockLast();
};
Expand Down Expand Up @@ -106,9 +109,18 @@ we can determine at which points the API data model deviates or is
incomplete. You may submit the generated dump as an issue to GitHub.

#### Build and run the Dump Application
1) Clone repository:
```bash
git clone [email protected]:dvdgeisler/DirigeraClient.git
cd DirigeraClient
```
2) Build project:
```bash
./mvnw package
java -jar ./dirigera-client-dump/target/dirigera-client-dump-0.0.1-SNAPSHOT.jar --dirigera.hostname=<DIRIGERA-IP-ADDRESS>
```
3) Run the Dump-Application:
```bash
java -jar ./dirigera-client-dump/target/dirigera-client-dump.jar --dirigera.hostname=<DIRIGERA-IP-ADDRESS>
```

## Integration to Home Assistant
Expand Down
Loading

0 comments on commit 2db2343

Please sign in to comment.