Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zoneminder] Added image channel, changed to jetty, Optimized performance #3583

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/binding/org.openhab.binding.zoneminder/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="lib" path="lib/zoneminder4j-0.9.7.jar"/>
<classpathentry kind="lib" path="lib/zoneminder4j-0.9.8.jar" sourcepath="D:/Development/Java/workspace/zoneminder4j"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path looks very local to me?

<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<binding:binding id="zoneminder"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="http://eclipse.org/smarthome/schemas/binding/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd">

<name>ZoneMinder Binding</name>
<description>This binding interfaces a ZoneMinder Server</description>
<author>Martin S. Eskildsen</author>

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML files should be formatted with tabs, like it was

xmlns:binding="http://eclipse.org/smarthome/schemas/binding/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd">
<name>ZoneMinder Binding</name>
<description>This binding interfaces a ZoneMinder Server</description>
<author>Martin S. Eskildsen</author>
</binding:binding>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:config-description="http://eclipse.org/smarthome/schemas/config-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/config-description/v1.0.0
http://eclipse.org/smarthome/schemas/config-description-1.0.0.xsd">
<config-description uri="thing-type:monitor-channels:config">

<parameter-group name="advancedConfig">
<context>advancedConfig</context>
<label>Other</label>
<advanced>true</advanced>
</parameter-group>

<parameter-group name="imageConfig">
<context>imageConfig</context>
<label>Image Settings</label>
<advanced>true</advanced>
</parameter-group>

<parameter name="id" type="integer" required="true">
<label>Monitor ID</label>
<description>The ID of the monitor in ZoneMinder</description>
</parameter>

<parameter name="triggerTimeout" type="integer" required="false" min="0" max="65335" groupName="advancedConfig">
<label>ForceAlarm timeout</label>
<description>Timeout in seconds when activating alarm, 0 disables timeout. Default is 60 seconds</description>
<default>60</default>
<advanced>true</advanced>
</parameter>

<parameter name="eventText" type="text" required="false" groupName="advancedConfig">
<label>Event Text</label>
<description>Event text in ZoneMinder</description>
<default>Triggered from openHAB</default>
<advanced>true</advanced>
</parameter>


<parameter name="imageRefreshIdle" type="text" required="false" groupName="imageConfig">
<label>Image refresh (Idle)</label>
<description>Refresh priority for still images when event state is idle</description>
<default>low</default>
<options>
<option value="normal">Normal Priority</option>
<option value="low">Low Priority</option>
<option value="disabled">Disabled</option>
</options>
</parameter>

<parameter name="imageRefreshEvent" type="text" required="false" groupName="imageConfig">
<label>Image refresh (Event)</label>
<description>Refresh priority for still images when event state is alarmed</description>
<default>normal</default>
<options>
<option value="alarm">Alarm Priority</option>
<option value="normal">Normal Priority</option>
<option value="low">Low Priority</option>
<option value="disabled">Disabled</option>
</options>
</parameter>


<parameter name="imageScale" type="integer" required="false" min="1" max="1000" groupName="imageConfig">
<label>Image Scale</label>
<description>Rescale image from ZoneMinder Monitor</description>
<default>100</default>
<options>
<option value="10">0.1</option>
<option value="20">0.2</option>
<option value="30">0.3</option>
<option value="40">0.4</option>
<option value="50">0.5</option>
<option value="60">0.6</option>
<option value="70">0.7</option>
<option value="80">0.8</option>
<option value="90">0.9</option>
<option value="100">1.0</option>
<option value="125">1.25</option>
<option value="150">1.5</option>
<option value="175">1.75</option>
<option value="200">2.0</option>
</options>
</parameter>

</config-description>
</config-description:config-descriptions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be formatted using tabs

<config-description:config-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:config-description="http://eclipse.org/smarthome/schemas/config-description/v1.0.0" xsi:schemaLocation="http://eclipse.org/smarthome/schemas/config-description/v1.0.0
http://eclipse.org/smarthome/schemas/config-description-1.0.0.xsd">
<config-description uri="thing-type:zoneminderserver:config">
<parameter-group name="basicConfig">
<context>basicConfig</context>
<label>Basic</label>
</parameter-group>
<parameter-group name="credentials">
<context>credentials</context>
<label>Credentials</label>
</parameter-group>
<parameter-group name="networkAdvConfig">
<context>networkAdvConfig</context>
<label>Port configuration</label>
</parameter-group>
<parameter-group name="refreshConfig">
<context>refreshConfig</context>
<label>Refresh settings</label>
</parameter-group>
<parameter-group name="performanceConfig">
<context>performanceConfig</context>
<label>Performance</label>
</parameter-group>
<parameter-group name="streamingConfig">
<context>streamingConfig</context>
<label>Streaming</label>
<advanced>true</advanced>
</parameter-group>

<parameter-group name="advancedConfig">
<context>advancedConfig</context>
<label>Advanced</label>
</parameter-group>


<parameter name="host" type="text" required="true" groupName="basicConfig">
<context>network-address</context>
<label>Host</label>
<description>The IP address or hostname of the ZoneMinder Server</description>
</parameter>
<parameter name="protocol" type="text" required="false" groupName="basicConfig">
<label>Protocol</label>
<description>Protocol to connect to the ZoneMinder Server API (http or https)</description>
<default>http</default>
<options>
<option value="http">HTTP</option>
<option value="https">HTTPS</option>
</options>
</parameter>
<parameter name="user" type="text" required="false" groupName="credentials">
<label>Username</label>
<description>User to access the ZoneMinder Server API</description>
</parameter>
<parameter name="password" type="text" required="false" groupName="credentials">
<context>password</context>
<label>Password</label>
<description>Password to access the ZoneMinder Server API</description>
</parameter>

<parameter name="urlSite" type="text" required="false" groupName="advancedConfig">
<label>Additional path on ZoneMinder Server to access API</label>
<description>Additional path on ZoneMinder Server to access ZoneMinder Portal page. In a standard installation this is' /zm'</description>
<default>/zm</default>
<advanced>true</advanced>
</parameter>
<parameter name="urlApi" type="text" required="false" groupName="advancedConfig">
<label>Path on ZoneMinder Server to access API</label>
<description>Additional path on ZoneMinder Server to access API. In a standard installation this is' /zm/api'</description>
<default>/zm/api</default>
<advanced>true</advanced>
</parameter>

<parameter name="portHttp" type="integer" required="false" min="0" max="65335" groupName="networkAdvConfig">
<label>Port</label>
<description>Port of the ZoneMinder Server API. If '0', then the port will be determined from the protocol</description>
<default>0</default>
<advanced>true</advanced>
</parameter>
<parameter name="portTelnet" type="integer" required="false" min="1" max="65335" groupName="networkAdvConfig">
<label>Telnet Port</label>
<description>Port to listen for events in (Telnet)</description>
<default>6802</default>
<advanced>true</advanced>
</parameter>

<parameter name="refreshNormal" type="integer" required="false" min="1" max="65335" groupName="refreshConfig">
<label>API Polling interval</label>
<description>Seconds between each call to ZoneMinder Server API to refresh values in openHAB</description>
<default>10</default>
<advanced>true</advanced>
</parameter>
<parameter name="refreshLow" type="integer" required="false" min="1" max="65335" groupName="refreshConfig">
<label>Refresh Interval for Low priority channels</label>
<description>Seconds between each call to ZoneMinder Server to refresh Server DiskUsage in ZoneMinder. Default value is '60'</description>
<default>60</default>
<advanced>true</advanced>
</parameter>

<parameter name="diskUsageRefresh" type="text" required="false" groupName="advancedConfig">
<label>Refresh Disk Usage</label>
<description>Refresh disk usage counter</description>
<default>disabled</default>
<options>
<option value="batch">Enabled</option>
<option value="disabled">Disabled</option>
</options>
<advanced>true</advanced>
</parameter>

<parameter name="autodiscover" type="boolean" required="false" groupName="advancedConfig">
<label>Background discovery</label>
<description>If enabled new monitors on the ZoneMinder Server will automatically be added to the Inbox in openHAB</description>
<default>true</default>
<advanced>true</advanced>
</parameter>

<parameter name="useSpecificUserStreaming" type="boolean" required="true" groupName="streamingConfig">
<label>Use Streaming user</label>
<description>Specific streaming user</description>
<default>false</default>
<advanced>true</advanced>
</parameter>

<parameter name="streamingUser" type="text" required="false" groupName="streamingConfig">
<label>Username</label>
<description>Optional User to access image streams</description>
<default></default>
</parameter>
<parameter name="streamingPassword" type="text" required="false" groupName="streamingConfig">
<label>Password</label>
<description>Optional Password for streaming user</description>
<default></default>
</parameter>

</config-description>
</config-description:config-descriptions>

This file was deleted.