Skip to content

Commit

Permalink
Merge branch 'main' of github.com:koush/scrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 9, 2024
2 parents 8daf74e + b84adf5 commit 170bc5f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
15 changes: 12 additions & 3 deletions install/docker/install-intel-graphics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ then
exit 0
fi

# this script previvously apt install intel-media-va-driver-non-free, but that seems to no longer be necessary.
# no errors beyond this point
set -e

# the intel provided script is disabled since it does not work with the 6.8 kernel in Ubuntu 24.04 or Proxmox 8.2.
# manual installation of the Intel graphics stuff is required.
Expand All @@ -18,11 +19,19 @@ fi
# apt-get -y install intel-opencl-icd &&
# apt-get -y dist-upgrade;

# need intel-media-va-driver-non-free, but all the other intel packages are installed from Intel github.
echo "Installing Intel graphics packages."
apt-get update && apt-get install -y gpg-agent &&
rm -f /usr/share/keyrings/intel-graphics.gpg &&
curl -L https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --yes --output /usr/share/keyrings/intel-graphics.gpg &&
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list &&
apt-get -y update &&
apt-get -y intel-media-va-driver-non-free &&
apt-get -y dist-upgrade;

# manual installation
# https://github.com/intel/compute-runtime/releases/tag/24.13.29138.7

# no errors beyond this point
set -e

rm -rf /tmp/gpu && mkdir -p /tmp/gpu && cd /tmp/gpu

Expand Down
10 changes: 8 additions & 2 deletions plugins/hikvision-doorbell/fs/DOORBELL_README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hikvision Doorbell (beta)
# Hikvision Doorbell

At the moment, plugin was tested with the **DS-KV6113PE1[C]** model `doorbell` with firmware version: **V2.2.65 build 231213**, in the following modes:

Expand Down Expand Up @@ -30,16 +30,22 @@ The interaction mode is configured using the **SIP Mode** combobox. The plugin s

#### Don't Use SIP

In this mode, a SIP proxy is not used, and the `doorbell` must be connected to `Hik-Connect` or to your `Indoor Station`.
This mode should be used if you have an **Indoor Station** and a `doorbell` connected to it.

You should also enable the **Hik-Connect** (Platform Access Mode) in the `doorbell` settings so that `this device` receives a call notification. These are the implementation features of the doorbell software, unfortunately.

#### Connect to SIP Proxy

This mode should be used when you have a separate SIP gateway and all your intercom devices work via SIP telephony.

**On this device** you need to configure a connection to your SIP proxy (gateway) in the additional tab, which will appear after saving the selection.

**On `doorbell`** also set up a connection to a SIP proxy (gateway), and also, in the appropriate section of the settings, specify the “phone number” of this device so that a call will also be received here.

#### Emulate SIP Proxy

This mode should be used when you have a `doorbell` but no **Indoor Station**, and you want to connect this `doorbell` to Scrypted server only.

In this mode, the plugin creates a fake SIP proxy that listens for a connection on the specified port (or auto-select a port if not specified). The task of this server is to receive a notification about a call and, in the event of an intercom start (two way audio), simulate picking up the handset so that the `doorbell` switches to conversation mode (stops ringing).

On the additional tab, configure the desired port, and you can also enable the **Autoinstall Fake SIP Proxy** checkbox, for not to configure `doorbell` manually.
Expand Down
2 changes: 1 addition & 1 deletion plugins/hikvision-doorbell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vityevato/hikvision-doorbell",
"version": "0.0.4",
"version": "0.0.5",
"description": "Hikvision Doorbell Plugin for Scrypted",
"author": "Roman Sokolov",
"license": "Apache",
Expand Down
6 changes: 2 additions & 4 deletions plugins/hikvision-doorbell/src/doorbell-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,8 @@ export class HikvisionDoorbellAPI implements HikvisionAPI

} catch (error) {
this.console.error(`Install error: ${error}`);
if (error.code === 'EHOSTUNREACH') {
// if host unreached we rethrows error for restarting of the installation process
throw error;
}
// we rethrows error for restarting of the installation process
throw error;
}
}

Expand Down
11 changes: 7 additions & 4 deletions plugins/hikvision-doorbell/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,11 @@ class HikvisionCameraDoorbell extends HikvisionCamera implements Camera, Interco
if (autoinstall) {
try {
await this.getClient().setFakeSip (true, ip, port)
this.console.info (`Installed fake SIP settings on doorbell. Address: ${ip}, port: ${port}`);
} catch (e) {
this.console.error (`Error installing fake SIP settings: ${e}`);
if (e.code === 'EHOSTUNREACH') {
// repeat if unreached
this.installSipSettingsOnDeviceTimeout = setTimeout (() => this.installSipSettingsOnDevice(), UNREACHED_REPEAT_TIMEOUT);
}
// repeat if unreached
this.installSipSettingsOnDeviceTimeout = setTimeout (() => this.installSipSettingsOnDevice(), UNREACHED_REPEAT_TIMEOUT);
}
}
}
Expand Down Expand Up @@ -668,6 +667,10 @@ export class HikvisionDoorbellProvider extends RtspProvider
super();
}

getScryptedDeviceCreator(): string {
return 'Hikvision Doorbell';
}

override getAdditionalInterfaces() {
return [
ScryptedInterface.Reboot,
Expand Down

0 comments on commit 170bc5f

Please sign in to comment.