Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
44cfcad935 | |||
5c2db6444f | |||
473f71772c | |||
6a0295d5c9 | |||
3b5aa7419d | |||
93f8462f1e | |||
7efca653e6 | |||
d5a3804136 | |||
5ae4068bec |
13
.drone.yml
13
.drone.yml
@ -5,8 +5,6 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
node_selector:
|
node_selector:
|
||||||
kubernetes.io/arch: amd64
|
kubernetes.io/arch: amd64
|
||||||
federationhq.de/location: Blumendorf
|
|
||||||
federationhq.de/compute: true
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: fedhq-ca-crt
|
- name: fedhq-ca-crt
|
||||||
@ -18,14 +16,12 @@ volumes:
|
|||||||
steps:
|
steps:
|
||||||
- name: generate control
|
- name: generate control
|
||||||
image: debian:bookworm
|
image: debian:bookworm
|
||||||
pull: always
|
|
||||||
commands:
|
commands:
|
||||||
- apt-get -qy update && apt-get -qy install git
|
- apt-get -qy update && apt-get -qy install git
|
||||||
- scripts/generate_control.sh
|
- scripts/generate_control.sh
|
||||||
|
|
||||||
- name: build amd64
|
- name: build amd64
|
||||||
image: quay.io/buildah/stable
|
image: quay.io/buildah/stable
|
||||||
pull: always
|
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: fedhq-ca-crt
|
- name: fedhq-ca-crt
|
||||||
@ -42,8 +38,6 @@ platform:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
node_selector:
|
node_selector:
|
||||||
kubernetes.io/arch: arm64
|
kubernetes.io/arch: arm64
|
||||||
federationhq.de/location: Blumendorf
|
|
||||||
federationhq.de/compute: true
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: fedhq-ca-crt
|
- name: fedhq-ca-crt
|
||||||
@ -55,14 +49,12 @@ volumes:
|
|||||||
steps:
|
steps:
|
||||||
- name: generate control
|
- name: generate control
|
||||||
image: debian:bookworm
|
image: debian:bookworm
|
||||||
pull: always
|
|
||||||
commands:
|
commands:
|
||||||
- apt-get -qy update && apt-get -qy install git
|
- apt-get -qy update && apt-get -qy install git
|
||||||
- scripts/generate_control.sh
|
- scripts/generate_control.sh
|
||||||
|
|
||||||
- name: build arm64
|
- name: build arm64
|
||||||
image: quay.io/buildah/stable
|
image: quay.io/buildah/stable
|
||||||
pull: always
|
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: fedhq-ca-crt
|
- name: fedhq-ca-crt
|
||||||
@ -77,9 +69,7 @@ type: kubernetes
|
|||||||
name: push
|
name: push
|
||||||
node_selector:
|
node_selector:
|
||||||
kubernetes.io/arch: amd64
|
kubernetes.io/arch: amd64
|
||||||
federationhq.de/location: Blumendorf
|
|
||||||
federationhq.de/compute: true
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: fedhq-ca-crt
|
- name: fedhq-ca-crt
|
||||||
config_map:
|
config_map:
|
||||||
@ -90,7 +80,6 @@ volumes:
|
|||||||
steps:
|
steps:
|
||||||
- name: push
|
- name: push
|
||||||
image: quay.io/buildah/stable
|
image: quay.io/buildah/stable
|
||||||
pull: always
|
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: fedhq-ca-crt
|
- name: fedhq-ca-crt
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
FROM docker.io/nginx:latest
|
FROM docker.io/nginx:latest
|
||||||
|
|
||||||
COPY FHEM /usr/share/nginx/html/FHEM/
|
COPY FHEM /usr/share/nginx/html/
|
||||||
COPY controls_byterazor-fhem-ntfy.txt /usr/share/nginx/html/
|
COPY controls_byterazor-fhem-ntfy.txt /usr/share/nginx/html/
|
||||||
COPY CHANGED /usr/share/nginx/html/
|
COPY CHANGED /usr/share/nginx/html/
|
||||||
|
@ -140,7 +140,6 @@ sub NTFY_Define
|
|||||||
|
|
||||||
$hash->{NAME} = $name;
|
$hash->{NAME} = $name;
|
||||||
$hash->{SERVER} = $params->[2];
|
$hash->{SERVER} = $params->[2];
|
||||||
$hash->{VERSION} = $VERSION;
|
|
||||||
$hash->{USERNAME} = $h->{user} || "";
|
$hash->{USERNAME} = $h->{user} || "";
|
||||||
$hash->{helper}{PASSWORD} = $h->{password};
|
$hash->{helper}{PASSWORD} = $h->{password};
|
||||||
$modules{NTFY_CLIENT}{defptr}{$hash->{SERVER}} = $hash;
|
$modules{NTFY_CLIENT}{defptr}{$hash->{SERVER}} = $hash;
|
||||||
@ -150,25 +149,17 @@ sub NTFY_Define
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub NTFY_Get_Subscriptions
|
|
||||||
{
|
|
||||||
my $hash = shift;
|
|
||||||
my @subscriptions;
|
|
||||||
|
|
||||||
for my $k (keys %{$modules{NTFY_TOPIC}{defptr}})
|
|
||||||
{
|
|
||||||
$k=~/^(.*)_(.*)$/;
|
|
||||||
push(@subscriptions,$2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return @subscriptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub NTFY_Update_Subscriptions_Readings
|
sub NTFY_Update_Subscriptions_Readings
|
||||||
{
|
{
|
||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
my @topics = NTFY_Get_Subscriptions($hash);
|
my @topics;
|
||||||
|
|
||||||
|
for my $k (keys %{$modules{NTFY_TOPIC}{defptr}})
|
||||||
|
{
|
||||||
|
$k=~/^(.*)_(.*)$/;
|
||||||
|
push(@topics,$2);
|
||||||
|
}
|
||||||
|
|
||||||
readingsSingleUpdate($hash,"subscriptions", join(",", @topics),1);
|
readingsSingleUpdate($hash,"subscriptions", join(",", @topics),1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -230,7 +221,7 @@ sub NTFY_Publish_Msg
|
|||||||
|
|
||||||
if ($msg->{priority})
|
if ($msg->{priority})
|
||||||
{
|
{
|
||||||
$message->{priority} = int($msg->{priority});
|
$message->{priority} = $msg->{priority};
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg->{keywords})
|
if ($msg->{keywords})
|
||||||
|
13
README.md
13
README.md
@ -20,19 +20,6 @@ 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.
|
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
|
## Authors
|
||||||
|
|
||||||
- Dominik Meyer <dmeyer@federationhq.de>
|
- Dominik Meyer <dmeyer@federationhq.de>
|
||||||
|
Loading…
Reference in New Issue
Block a user