Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
88823ef727 | |||
fcecdaee88 | |||
714db9fb25 | |||
002f1fa11a | |||
f0fae9fd82 | |||
f09fa33ef8 | |||
016fe149b9 | |||
6e20d6675a |
11
.drone.yml
11
.drone.yml
@ -5,6 +5,8 @@ platform:
|
||||
arch: amd64
|
||||
node_selector:
|
||||
kubernetes.io/arch: amd64
|
||||
federationhq.de/location: Blumendorf
|
||||
federationhq.de/compute: true
|
||||
|
||||
volumes:
|
||||
- name: fedhq-ca-crt
|
||||
@ -16,12 +18,14 @@ volumes:
|
||||
steps:
|
||||
- name: generate control
|
||||
image: debian:bookworm
|
||||
pull: always
|
||||
commands:
|
||||
- apt-get -qy update && apt-get -qy install git
|
||||
- scripts/generate_control.sh
|
||||
|
||||
- name: build amd64
|
||||
image: quay.io/buildah/stable
|
||||
pull: always
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: fedhq-ca-crt
|
||||
@ -38,6 +42,8 @@ platform:
|
||||
arch: arm64
|
||||
node_selector:
|
||||
kubernetes.io/arch: arm64
|
||||
federationhq.de/location: Blumendorf
|
||||
federationhq.de/compute: true
|
||||
|
||||
volumes:
|
||||
- name: fedhq-ca-crt
|
||||
@ -49,12 +55,14 @@ volumes:
|
||||
steps:
|
||||
- name: generate control
|
||||
image: debian:bookworm
|
||||
pull: always
|
||||
commands:
|
||||
- apt-get -qy update && apt-get -qy install git
|
||||
- scripts/generate_control.sh
|
||||
|
||||
- name: build arm64
|
||||
image: quay.io/buildah/stable
|
||||
pull: always
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: fedhq-ca-crt
|
||||
@ -69,6 +77,8 @@ type: kubernetes
|
||||
name: push
|
||||
node_selector:
|
||||
kubernetes.io/arch: amd64
|
||||
federationhq.de/location: Blumendorf
|
||||
federationhq.de/compute: true
|
||||
|
||||
volumes:
|
||||
- name: fedhq-ca-crt
|
||||
@ -80,6 +90,7 @@ volumes:
|
||||
steps:
|
||||
- name: push
|
||||
image: quay.io/buildah/stable
|
||||
pull: always
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: fedhq-ca-crt
|
||||
|
@ -1,5 +1,5 @@
|
||||
FROM docker.io/nginx:latest
|
||||
|
||||
COPY FHEM /usr/share/nginx/html/
|
||||
COPY FHEM /usr/share/nginx/html/FHEM/
|
||||
COPY controls_byterazor-fhem-ntfy.txt /usr/share/nginx/html/
|
||||
COPY CHANGED /usr/share/nginx/html/
|
||||
|
@ -140,6 +140,7 @@ sub NTFY_Define
|
||||
|
||||
$hash->{NAME} = $name;
|
||||
$hash->{SERVER} = $params->[2];
|
||||
$hash->{VERSION} = $VERSION;
|
||||
$hash->{USERNAME} = $h->{user} || "";
|
||||
$hash->{helper}{PASSWORD} = $h->{password};
|
||||
$modules{NTFY_CLIENT}{defptr}{$hash->{SERVER}} = $hash;
|
||||
@ -149,17 +150,25 @@ sub NTFY_Define
|
||||
return;
|
||||
}
|
||||
|
||||
sub NTFY_Update_Subscriptions_Readings
|
||||
sub NTFY_Get_Subscriptions
|
||||
{
|
||||
my $hash = shift;
|
||||
my @topics;
|
||||
my @subscriptions;
|
||||
|
||||
for my $k (keys %{$modules{NTFY_TOPIC}{defptr}})
|
||||
{
|
||||
$k=~/^(.*)_(.*)$/;
|
||||
push(@topics,$2);
|
||||
push(@subscriptions,$2);
|
||||
}
|
||||
|
||||
return @subscriptions;
|
||||
}
|
||||
|
||||
sub NTFY_Update_Subscriptions_Readings
|
||||
{
|
||||
my $hash = shift;
|
||||
my @topics = NTFY_Get_Subscriptions($hash);
|
||||
|
||||
readingsSingleUpdate($hash,"subscriptions", join(",", @topics),1);
|
||||
|
||||
}
|
||||
@ -221,7 +230,7 @@ sub NTFY_Publish_Msg
|
||||
|
||||
if ($msg->{priority})
|
||||
{
|
||||
$message->{priority} = $msg->{priority};
|
||||
$message->{priority} = int($msg->{priority});
|
||||
}
|
||||
|
||||
if ($msg->{keywords})
|
||||
|
13
README.md
13
README.md
@ -20,6 +20,19 @@ that this is a sparetime project of someone with a family.
|
||||
|
||||
You will find the issue tracker at https://rm.byterazor.de/projects/fhem-ntfy.
|
||||
|
||||
## Installation
|
||||
|
||||
### Manual
|
||||
|
||||
just copy the files within the FHEM directory to you FHEM installations FHEM directory and restart the server
|
||||
|
||||
### FHEM Updates
|
||||
|
||||
On the FHEM command line run
|
||||
|
||||
update add https://rm.byterazor.de/upd-fhem-ntfy/controls_byterazor-fhem-ntfy.txt
|
||||
update
|
||||
|
||||
## Authors
|
||||
|
||||
- Dominik Meyer <dmeyer@federationhq.de>
|
||||
|
Loading…
Reference in New Issue
Block a user