mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-02 20:52:41 +02:00
* Complete rewrite of PTZpresets.sh Rewrite PTZpresets.sh to have better PID handling and full posix compatibility. * left and right ptz presets where flipped * Fix creation of PID file Overly aggressive search and replace error, switch out logger to echo so PID is written to fille. * Use full path to jq Use full path to jq so that it still works when called from action.cgi and api.cgi * Create Xiaomi.pm Updated Xiaomi.pm that includes basic PTZ presets support. * Update zoneminder.md
81 lines
1.9 KiB
Markdown
81 lines
1.9 KiB
Markdown
## Xiaomi Dafang Integration in Zoneminder
|
|
|
|
ZM Setup:
|
|
|
|
Click "Add a Monitor"
|
|
### General Tab
|
|
|
|
Name your camera
|
|
|
|
Select Source Type of "FFmpeg"
|
|
|
|
Function (this depends on you, I picked modect)
|
|
|
|
Left all other settings as-is on this tab
|
|

|
|
|
|
### Source Tab
|
|
|
|
Source Path: rtsp://XX.XX.XX.XX:8554/unicast (Where XX.XX.XX.XX is the IP of your camera)
|
|
|
|
Remote Method: UDP (This was the first I tired and it worked, not saying it's the only way.
|
|
|
|
Target colorspace: 32 bit colour
|
|
|
|
Capture Width: 1920
|
|
|
|
Capture Height: 1080
|
|
|
|
The rest as-is 
|
|
BEFORE you can configure the Control tab
|
|
|
|
If you don't see this make sure you enabled OPT_CONTROL in the ZM options.
|
|
Copy [Xiaomi.pm](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/integration/zoneminder/Xiaomi.pm) into a file named Xiaomi.pm in /usr/share/perl5/ZoneMinder/Control/ (May be different for your distro, make sure it has the same permissions as the other controls)
|
|
|
|
Navigate to the control tab for your camera
|
|
|
|
Click on the "Edit" next to "Control Type"
|
|
|
|
Click "Add New Control" at the bottom of the popup
|
|
|
|
Name: "Xiaomi Dafang"
|
|
|
|
Type: "Fffmpeg"
|
|
|
|
Protocol: "Xiaomi" (it has to match the .pm file from above)
|
|
|
|
Can Reset: Yes
|
|
|
|

|
|
|
|
### Move Tab
|
|
|
|
Can move: yes
|
|
|
|
Can move relative: yes
|
|
|
|

|
|
|
|
### Pan Tab
|
|
|
|
Can pan: yes
|
|

|
|
|
|
### Tilt Tab
|
|
|
|
Can tilt: yes
|
|

|
|
|
|
That's it, now save your new control type and head back to the control tab
|
|
|
|
### Control Tab
|
|
|
|
Select "Controllable"
|
|
|
|
Control Type "Xiaomi Dafang"
|
|
|
|
Control Device: leave this empty
|
|
|
|
Control Address: root:ismart12@XX.XX.XX.XX (Where XX.XX.XX.XX is the IP of your camera)
|
|

|