Skip to main content

Podman Homebridge to MQTT

Sapporo, Japan

Building the Docker Image

Preparing Ubuntu

Start by pulling the latest Ubuntu Image from DockerHub:

podman pull ubuntu:latest
podman run --net=host --privileged -ti ubuntu:latest /bin/bash
podman update && podman upgrade -y
cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"

And recommit it with a descriptive name (in a new terminal from your host system):

podman ps -a
CONTAINER ID IMAGE COMMAND
48fa0c8f78b2 localhost/ubuntu:latest /bin/bash
podman commit --author "Mike Polinowski" 48fa0c8f78b2 mqtt-homebridge
podman rm 48fa0c8f78b2
podman run \
--name homebridge \
--net=host \
--privileged \
--rm \
-ti -u root localhost/mqtt-homebridge /bin/bash

Installing FFMPEG

Sources: FFmpeg with fdk-aac codecs:

Get the dependencies:

apt -y install \
autoconf \
automake \
build-essential \
cmake \
git \
git-core \
libass-dev \
libfreetype6-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libx264-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
pkg-config \
texinfo \
wget \
zlib1g-dev

Installing Assembler:

apt install nasm yasm

Installing Video Encoder:

apt install -y libx264-dev libvpx-dev libfdk-aac-dev libmp3lame-dev

Download and build fdk-aac:

mkdir -p ~/ffmpeg_sources ~/bin
cd ~/ffmpeg_sources
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./autogen.sh
./configure --prefix=/usr/local --enable-shared --enable-static
make -j4
make install
ldconfig
cd ..

Download and build FFmpeg:

cd ~/ffmpeg_sources && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--target-os=linux \
--enable-decoder=h264 \
--enable-network \
--enable-protocol=tcp \
--enable-demuxer=rtsp && \
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r
cd ..

Now re-login or run the following command for your current shell session to recognize the new ffmpeg location:

export PATH=$PATH:$HOME/bin
source ~/.profile

or

cp ~/bin/* /usr/local/bin

You can now test the command:

ffmpeg
ffmpeg version N-97038-g7239254 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-nonfree --target-os=linux --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-demuxer=rtsp

Installing NodeJS 12 LTS

Node.js v12.x for Ubuntu

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt install -y nodejs
apt-mark hold nodejs

Test and update your installation:

node -v
v12.16.1
npm -v
6.13.4

npm update -g

Installing Homebridge

Install homebridge and the homebridge ui:

npm install -g --unsafe-perm homebridge homebridge-config-ui-x

Copy the sample configuration:

cp /usr/lib/node_modules/homebridge/config-sample.json ~/.homebridge/config.json
nano ~/.homebridge/config.json

Add this to your homebridge config.json file

"platforms": [
{
"platform": "config",
"name": "Config",
"port": 8080,
"sudo": false
}
]

And start Homebridge with:

homebridge

Homebridge INSTAR MQTT

You can install the following plugins through the Hombridge UI:

  • homebridge-camera-ffmpeg
  • homebridge-mqttthing

Homebridge INSTAR MQTT

Homebridge INSTAR MQTT

Homebridge INSTAR MQTT

Adding your Camera

You can now switch the the Config tab in the Homebridge UI and will see the sample configuration that was added by the camera plugin:

{
"name": "Camera ffmpeg",
"cameras": [
{
"name": "Default Camera",
"videoConfig": {
"source": "-re -i rtsp://myfancy_rtsp_stream",
"stillImageSource": "-i http://faster_still_image_grab_url/this_is_optional.jpg",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 10,
"maxBitrate": 300,
"vcodec": "libx264",
"packetSize": 1316,
"audio": false,
"debug": false
}
}
],
"platform": "Camera-ffmpeg"
}

You can edit this configuration to add your personal IP camera:

{
"platform": "Camera-ffmpeg",
"videoProcessor": "/root/bin/ffmpeg",
"cameras": [
{
"name": "Name of your Camera",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567890",
"firmwareRevision": "1.0",
"videoConfig": {
"source": "-rtsp_transport tcp -vcodec -re -i rtsp://admin:instar@192.168.2.117:554/12",
"stillImageSource": "-re -i http://192.168.2.117/tmpfs/auto.jpg?usr=admin&pwd=instar",
"vcodec": "libx264",
"maxStreams": 3,
"maxWidth": 1280,
"maxHeight": 720,
"videoFilter": "scale=1280:720",
"maxFPS": 10,
"maxBitrate": 4096,
"packetSize": 1316,
"audio": false,
"additionalCommandline": "",
"debug": true
}
}
]
}

Homebridge INSTAR MQTT

Adding MQTT Button to the Hombridge UI

  "accessories": [
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 1",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567890",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Area 1",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area1/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area1/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
}
],

Homebridge INSTAR MQTT

Recommit the image and restart the container.

podman commit --author "Mike Polinowski" <container ID> mqtt-homebridge
podman run \
--name homebridge \
--net=host \
--privileged \
--rm \
-ti -u root localhost/mqtt-homebridge /bin/bash

This time start Homebridge with the -I flag to get access to the Accessories tab:

homebridge -I

Homebridge INSTAR MQTT

Homebridge INSTAR MQTT

Homebridge INSTAR MQTT

  "accessories": [
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 1",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567889",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Area 1",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area1/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area1/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 2",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567891",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Area 2",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area2/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area2/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 3",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567892",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Area 3",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area3/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area3/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 4",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567893",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Area 4",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area4/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area4/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "PIR Sensor",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567894",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "PIR Sensor",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/actions/pir/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/actions/pir/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Link Areas",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567895",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Link Areas",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/actions/linkareas",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/actions/linkareas",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "on",
"offValue": "off",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Email",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567896",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Email",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/actions/email",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/actions/email",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "on",
"offValue": "off",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Push",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567897",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Alarm Push",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/push/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/push/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "on",
"offValue": "off",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Audio",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567898",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Audio",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/multimedia/audio/enable/high",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/multimedia/audio/enable/high",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Preset Position",
"manufacturer": "INSTAR",
"model": "IN-9020 FullHD",
"serialNumber": "1234567899",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "instar",
"caption": "Preset Position",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/features/ptz/preset",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/features/ptz/preset",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
}
],
podman run \
--net=host \
--name=instar-mqtt-homebridge \
--privileged \
--rm \
-e PUID=0 -e PGID=0 \
-e TZ=Europe/Berlin \
-e HOMEBRIDGE_CONFIG_UI=1 \
-e HOMEBRIDGE_CONFIG_UI_PORT=8080 \
-e HOMEBRIDGE_INSECURE=1 \
-v /opt/homebridge:/homebridge \
-ti -u root localhost/instar-mqtt-homebridge /bin/bash
podman run \
--net=host \
--name=instar-mqtt-homebridge \
--privileged \
--rm \
-e PUID=0 -e PGID=0 \
-e TZ=Europe/Berlin \
-e HOMEBRIDGE_CONFIG_UI=1 \
-e HOMEBRIDGE_CONFIG_UI_PORT=8080 \
-e HOMEBRIDGE_INSECURE=1 \
-v /opt/homebridge:/homebridge \
-ti -u root docker.io/oznu/homebridge /bin/ash
{
"bridge": {
"name": "Homebridge",
"username": "AA:CC:AA:AA:CC:AA",
"manufacturer": "homebridge.io",
"model": "homebridge",
"port": 51826,
"pin": "866-88-668"
},
"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",
"ports": {
"start": 52100,
"end": 52150,
"comment": "This section is used to control the range of ports that separate accessory (like camera or television) should be bind to."
},
"accessories": [
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 1",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567889",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Alarm Area 1",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area1/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area1/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 2",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567891",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Alarm Area 2",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area2/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area2/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 3",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567892",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Alarm Area 3",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area3/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area3/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Area 4",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567893",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Alarm Area 4",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/area4/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/area4/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "PIR Sensor",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567894",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "PIR Sensor",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/actions/pir/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/actions/pir/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Link Areas",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567895",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Link Areas",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/actions/linkareas",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/actions/linkareas",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "on",
"offValue": "off",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Email",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567896",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Alarm Email",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/actions/email",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/actions/email",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "on",
"offValue": "off",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Alarm Push",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567897",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Alarm Push",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/alarm/push/enable",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/alarm/push/enable",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "on",
"offValue": "off",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Audio",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567898",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Audio",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/multimedia/audio/enable/high",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/multimedia/audio/enable/high",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "mqttthing",
"type": "switch",
"name": "Preset Position",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567899",
"firmwareRevision": "0.1",
"url": "http://192.168.2.117:1883",
"username": "admin",
"password": "!#()*-./<?@[]^_{|}",
"caption": "Preset Position",
"mqttOptions": {
"keepalive": 30
},
"mqttPubOptions": {
"retain": true
},
"logMqtt": true,
"topics": {
"getOn": {
"topic": "instar/local/status/features/ptz/preset",
"apply": "return JSON.parse(message).val;"
},
"setOn": {
"topic": "instar/local/features/ptz/preset",
"apply": "return JSON.stringify({val: (message)})"
}
},
"onValue": "1",
"offValue": "0",
"confirmationPeriodms": 1000,
"retryLimit": 3
},
{
"accessory": "HTTP-SWITCH",
"type": "switch",
"name": "Areas On",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567900",
"firmwareRevision": "0.1",
"switchType": "stateless",
"caption": "All Areas On",
"onUrl": [
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=1&-enable=1",
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=2&-enable=1",
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=3&-enable=1",
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=4&-enable=1"
]
},
{
"accessory": "HTTP-SWITCH",
"name": "Areas Off",
"manufacturer": "INSTAR",
"model": "IN-8015 FullHD",
"serialNumber": "1234567901",
"firmwareRevision": "0.1",
"switchType": "stateless",
"caption": "All Areas Off",
"onUrl": [
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=1&-enable=0",
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=2&-enable=0",
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=3&-enable=0",
"http://admin:1234567890@192.168.2.117/param.cgi?cmd=setmdattr&-name=4&-enable=0"
]
}
],
"platforms": [
{
"name": "Config",
"port": 8080,
"auth": "form",
"theme": "dark-mode",
"tempUnits": "c",
"lang": "auto",
"sudo": false,
"accessoryControl": {
"debug": true
},
"platform": "config"
},
{
"cameras": [
{
"name": "IN-8015 Full HD",
"manufacturer": "INSTAR",
"model": "IN-8015 Full HD",
"serialNumber": "000-0000-001",
"firmwareRevision": "v666",
"videoConfig": {
"source": "-re -i rtsp://admin:1234567890@192.168.2.117:554/12",
"stillImageSource": "-re -i http://192.168.2.117:80/tmpfs/auto.jpg?usr=admin&pwd=1234567890",
"maxStreams": 3,
"maxWidth": 640,
"maxHeight": 352,
"maxFPS": 15,
"maxBitrate": 512,
"preserveRatio": "W",
"vcodec": "libx264",
"additionalCommandline": "-rtsp_transport tcp"
}
}
],
"platform": "Camera-ffmpeg"
}
]
}