-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
221 additions
and
2,215 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version=${project.version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM eclipse-temurin:17-jre | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates telnet iputils-ping curl netbase net-tools iproute2 wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
|
||
COPY sbc2ha.jar ./ | ||
COPY sbc.yaml ./config.yaml | ||
|
||
CMD java -Ddiozero.devicefactory=com.diozero.internal.provider.pigpioj.PigpioJDeviceFactory -DusePwmFadingLed=true -jar sbc2ha.jar /app/config.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "sbc2ha" | ||
description: "Single board computer 2 home assistant" | ||
version: "0.0.3" | ||
slug: "sbc2ha" | ||
init: false | ||
arch: | ||
- aarch64 | ||
- amd64 | ||
- armhf | ||
- armv7 | ||
- i386 | ||
ports: | ||
5005/tcp: 5005 | ||
schema: | ||
config: "str?" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
platform: | ||
- platform: mqtt | ||
host: 192.168.1.10 | ||
username: boneio | ||
password: boneio | ||
port: 1883 | ||
topic_prefix: pi-1 | ||
ha_discovery: | ||
enabled: true | ||
topic_prefix: homeassistant | ||
actuator: | ||
- name: Salon klima led | ||
kind: gpiopwm | ||
output: 12 | ||
output_type: led | ||
restore_state: true | ||
- name: Salon okno led | ||
kind: gpiopwm | ||
output: 13 | ||
output_type: led | ||
restore_state: true | ||
- name: Salon obraz led | ||
kind: gpiopwm | ||
output: 29 | ||
output_type: led | ||
restore_state: true | ||
- name: Salon kanapa led | ||
kind: gpiopwm | ||
output: 15 | ||
output_type: led | ||
restore_state: true | ||
- name: Hall led | ||
kind: gpiopwm | ||
output: 37 | ||
output_type: led | ||
restore_state: true | ||
- name: Wc led | ||
kind: gpiopwm | ||
output: 35 | ||
output_type: led | ||
restore_state: true | ||
- name: Kuchnia led | ||
kind: gpiopwm | ||
output: 33 | ||
output_type: led | ||
restore_state: true | ||
- name: Łazienka led | ||
kind: gpiopwm | ||
output: 31 | ||
output_type: led | ||
restore_state: true | ||
logger: | ||
default: info | ||
logs: | ||
com.dfi: trace | ||
com.dfi.sbc2ha.platform.mqtt: debug | ||
com.diozero.sbc.LocalSystemInfo: error | ||
com.dfi.sbc2ha.actuator.Led: trace | ||
com.diozero.devices.PwmLed: trace | ||
com.dfi.sbc2ha.actuator.LedFading: trace | ||
com.diozero.devices.PwmFadingLed: debug | ||
writer: | ||
format: "{ date:HH:mm:ss } {level|size=5} {class-name} {message}" | ||
extension_boards: | ||
vendor: rpi | ||
inputBoard: nohat | ||
outputBoard: nohat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM eclipse-temurin:17-jre | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates telnet iputils-ping curl netbase net-tools iproute2 wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
|
||
COPY sbc2ha.jar ./ | ||
COPY config.yaml ./config.yaml | ||
|
||
EXPOSE 8080 | ||
|
||
CMD java -DusePwmFadingLed=true -jar sbc2ha.jar /app/config.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
platform: [ ] | ||
sensor: | ||
- platform: analog | ||
name: analog 1 | ||
filters: [ ] | ||
analog: 1 | ||
- platform: analog | ||
name: Analog 2 | ||
filters: [ ] | ||
analog: 2 | ||
- platform: resistance | ||
name: resistance 1 | ||
filters: [ ] | ||
sensor: analog 1 | ||
direction: DOWNSTREAM | ||
resistor: "10000" | ||
reference_voltage: "1.8" | ||
- platform: digital | ||
name: digital 1 | ||
input: 1 | ||
device_class: DOOR | ||
- platform: digital | ||
name: Digital 2 | ||
input: 2 | ||
device_class: MOTION | ||
- platform: switch | ||
name: switch 1 | ||
input: 3 | ||
click_detection: double | ||
actions: | ||
single: | ||
- action: output | ||
output: 1 | ||
action_output: toggle | ||
double: | ||
- action: output | ||
output: 1 | ||
action_output: toggle | ||
- action: output | ||
output: 2 | ||
action_output: toggle | ||
- platform: switch | ||
name: switch 2 | ||
input: 4 | ||
actions: | ||
single: | ||
- action: output | ||
output: 2 | ||
action_output: toggle | ||
|
||
actuator: | ||
- restore_state: true | ||
kind: gpio | ||
name: out 1 | ||
output_type: switch | ||
output: 1 | ||
- restore_state: true | ||
kind: gpio | ||
name: out 2 | ||
output_type: switch | ||
output: 2 | ||
extension_boards: | ||
vendor: fake | ||
input_board: in | ||
output_board: out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 1 addition & 30 deletions
31
lib/diozero/src/main/java/com/diozero/devices/PwmFadingLed.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.