1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-02 20:52:41 +02:00

49 Commits

Author SHA1 Message Date
Chris Osgood
c5e1444270 Change all absolute URL's to relative (#1748) 2021-06-22 19:53:14 +02:00
Julian Tatsch
f7c4a0ef49 Merge branch 'master' into beta 2021-03-13 20:13:59 +01:00
Chris Knight
0b6a19ae4e typo fix (#1685) 2021-02-12 05:55:24 +01:00
Ben Russell
be4402631a Fix differences between Web UI services and MQTT (#1640)
* Change descriptions of MQTT topics to match Web UI (#1637)

* Allow MQTT to start/stop the "timelapse" service (#1637)

* Add manual switch for Night Mode to the sidebar (#1637)

* Add friendly names to the current list of services (#1637)

This adds a list of more user-friendly names to the services page. If a
new service is added in the future this list should be updated, or the
display name will default to the filename just as it did before.
2020-12-08 21:58:38 +01:00
jmtatsch
b590eef293 Update index.html
make light blue the default theme
2020-11-14 12:14:26 +01:00
dewi-ny-je
b0d51becde Merge branch 'beta' 2020-10-28 22:44:34 +01:00
Douglas Moura
6bbbdea227 Correcting motion link
I was trying to access the videos/photos from the motion option but it wasn't opening, so i found that the link was wrong. I corrected on mine, sending the PR :)
2020-09-01 18:05:26 -03:00
Anon
e08af9fbee Add list view for captured motion files
Enable list view  and download functionality for motion files captured to the default location
2020-08-24 20:04:05 +02:00
André Poersch
58514bc638 Adding motion events graph 2020-07-16 10:25:22 +02:00
gysmo38
c691f862bf Multi delete files 2020-07-16 10:25:21 +02:00
gysmo38
2312d1bab6 New UI as main + Clean previous UI 2020-07-16 10:25:20 +02:00
gysmo38
8a94ef93c8 Add link to switch between ui 2020-07-16 10:20:36 +02:00
gysmo38
9627122e98 State side finish 2020-07-16 10:20:36 +02:00
jmtatsch
7059874e27 Merge beta into master (#1415)
* New binaries:
   - lighttpd
   - openssl
   - busybox
   - v4l2rtspserver-master
       latest live libs included
       bug correction for motion detection at startup
       MJPG is back (there is still an issue with the OSD: it is
flickering)

* Manage FPS for MJPG

* Dropbear new version  (#1348)

* Dropbear new bin

* New version of Dropbear (v2019.78)

* New version of dropbear

- Use v2019.78 from https://secure.ucc.asn.au/hg/dropbear
- Change default path to "/usr/bin:/bin:/system/bin:/system/sdcard/bin/"

* Merge dropbearmulti

* New version of server:
According to PR: https://github.com/Dafang-Hacks/Main/pull/54
- Reduce video buffers per channel to two
- And enable poolsize fix by default

* Add mod_alias to lighttpd

* New binaries:
   - lighttpd
   - openssl
   - busybox
   - v4l2rtspserver-master
       latest live libs included
       bug correction for motion detection at startup
       MJPG is back (there is still an issue with the OSD: it is
flickering)

* Manage FPS for MJPG

* Dropbear new version  (#1348)

* Dropbear new bin

* New version of Dropbear (v2019.78)

* New version of dropbear

- Use v2019.78 from https://secure.ucc.asn.au/hg/dropbear
- Change default path to "/usr/bin:/bin:/system/bin:/system/sdcard/bin/"

* New version of server:
According to PR: https://github.com/Dafang-Hacks/Main/pull/54
- Reduce video buffers per channel to two
- And enable poolsize fix by default

* Add mod_alias to lighttpd

* Add directory listing of DCIM directory via lighttpd mod_alias, needs lighttpd.conf reset.

* Motion detection was not working if reduce pool was activated

* Update openRTSP according to last version of Live555 libs (#1383)

* Add night mode on/off options for the Telegram bot (#1386)

Co-authored-by: Jelle Posthuma <jelle@beyonit.nl>

* Bump bulma 0.8.2

* Merge stuff into beta that should have went there all along (#1393)

* PTZpresets.sh should not use inverted logic for motor control. (#1366)

* Allow example userscripts, with calibratePTZ example script. (#1371)

* PTZpresets.sh should not use inverted logic for motor control.

* Allow example userscripts, calibrate at boot example.

This commit changes run.sh to only execute files in /system/sdcard/config/userscripts/startup/
if they do not end with .dist. This allows example scripts to be included in the repository.

This commit also includes an example script calibratPTZ.sh.dist that will perform a PTZ calibration at boot
and if a /system/sdcard/config/cameraposition file exists it will also move the camera to the position it defines.

To enable the calibratePTZ.sh.dist demo, or any other script, copy or rename it to NOT end in .dist.
Example:
cp /system/sdcard/config/userscripts/startup/calibratePTZ.sh.dist /system/sdcard/config/userscripts/startup/calibratePTZ.sh

* enable zram by default as per the original firmware (#1323)

* enable zram by default as per the original firmware

this prevents crashes due to memory exhaustion on xiaofeng and other
64mb models

* Keep old swap variable names for backwards compatability

* Use zram swap with higher priority than sd-card swapfile

* Add configuration option for zram size

Co-authored-by: jmtatsch <jmtatsch@users.noreply.github.com>

* Update README.md

mention pull request should be against beta branch

* Add documentation about ram (#1375)

* Autoupgrade (#1374)

* New menu organisation

* Improve upgrade process by creation a VERSION file

* Add commit info in status overview

* Improve update process with VERSION file

* Typo fixies

* Fix typo in status_overview.cgi (#1388)

Latest commit leads to blank content on Overview page under the Information tab. Based on below, I think it is a typo.

/var/log/lighttpd-cgi-stderr.log
/system/sdcard/www/cgi-bin/status_overview.cgi: line 59: syntax error: unexpected "else" (expecting ")")

* remove no original f/w note from Neos SmartCam (#1389)

2 versions are available

* Minor changes / correcting labeling (#1391)

* Minor changes / correcting labeling
run.sh: blue_led also off by default
common_functions.sh: fix typo
api.cgi, system_led.cgi, index.html: Correct display of cut_ir to IR Filter
sw_night.css: make some text easier to read
index.html.js: remove blank line

Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>

* PTZ Presets - go home (#1387)

* 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

Co-authored-by: Solomon S <slm4996@users.noreply.github.com>
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.me>
Co-authored-by: Yannik Sembritzki <yannik.sembritzki@gmail.com>
Co-authored-by: Gysmo <frederic@leroux.im>
Co-authored-by: fhl206 <fhl206@gmail.com>
Co-authored-by: Combie81 <classified_one@hotmail.com>
Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>

* Hide dpad if camera have no PTZ

* Add topic update to start update from mqtt (#1399)

Co-authored-by: gysmo38 <frederic@leroux.im>

* Viewer (#1401)

* Add html page to show files in Recording directory

* more generic code and add timelapse files

* Rebased on latest version on https://github.com/mpromonet/v4l2rtspserver
- No more memory leak (hopefully)
- latest version of live555

* Add test for update process (#1405)

* Add test for update process

* Update action.cgi

* Bug fix for Fimware commit on status overview page (#1406)

Co-authored-by: root <nicolas.ebele@gmail.com>
Co-authored-by: nik0 <1867654+nik0@users.noreply.github.com>
Co-authored-by: J Posthuma <jposthuma25@gmail.com>
Co-authored-by: Jelle Posthuma <jelle@beyonit.nl>
Co-authored-by: gysmo38 <frederic@leroux.im>
Co-authored-by: Solomon S <slm4996@users.noreply.github.com>
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.me>
Co-authored-by: Yannik Sembritzki <yannik.sembritzki@gmail.com>
Co-authored-by: fhl206 <fhl206@gmail.com>
Co-authored-by: Combie81 <classified_one@hotmail.com>
Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>
2020-07-16 09:19:09 +02:00
Combie81
503637c819 Minor changes
Miinor test changes
Re-add split for hours back into group data pattern
2020-05-23 12:23:52 +01:00
jmtatsch
eeb1e75e3c Merge beta into master (#1415)
* New binaries:
   - lighttpd
   - openssl
   - busybox
   - v4l2rtspserver-master
       latest live libs included
       bug correction for motion detection at startup
       MJPG is back (there is still an issue with the OSD: it is
flickering)

* Manage FPS for MJPG

* Dropbear new version  (#1348)

* Dropbear new bin

* New version of Dropbear (v2019.78)

* New version of dropbear

- Use v2019.78 from https://secure.ucc.asn.au/hg/dropbear
- Change default path to "/usr/bin:/bin:/system/bin:/system/sdcard/bin/"

* Merge dropbearmulti

* New version of server:
According to PR: https://github.com/Dafang-Hacks/Main/pull/54
- Reduce video buffers per channel to two
- And enable poolsize fix by default

* Add mod_alias to lighttpd

* New binaries:
   - lighttpd
   - openssl
   - busybox
   - v4l2rtspserver-master
       latest live libs included
       bug correction for motion detection at startup
       MJPG is back (there is still an issue with the OSD: it is
flickering)

* Manage FPS for MJPG

* Dropbear new version  (#1348)

* Dropbear new bin

* New version of Dropbear (v2019.78)

* New version of dropbear

- Use v2019.78 from https://secure.ucc.asn.au/hg/dropbear
- Change default path to "/usr/bin:/bin:/system/bin:/system/sdcard/bin/"

* New version of server:
According to PR: https://github.com/Dafang-Hacks/Main/pull/54
- Reduce video buffers per channel to two
- And enable poolsize fix by default

* Add mod_alias to lighttpd

* Add directory listing of DCIM directory via lighttpd mod_alias, needs lighttpd.conf reset.

* Motion detection was not working if reduce pool was activated

* Update openRTSP according to last version of Live555 libs (#1383)

* Add night mode on/off options for the Telegram bot (#1386)

Co-authored-by: Jelle Posthuma <jelle@beyonit.nl>

* Bump bulma 0.8.2

* Merge stuff into beta that should have went there all along (#1393)

* PTZpresets.sh should not use inverted logic for motor control. (#1366)

* Allow example userscripts, with calibratePTZ example script. (#1371)

* PTZpresets.sh should not use inverted logic for motor control.

* Allow example userscripts, calibrate at boot example.

This commit changes run.sh to only execute files in /system/sdcard/config/userscripts/startup/
if they do not end with .dist. This allows example scripts to be included in the repository.

This commit also includes an example script calibratPTZ.sh.dist that will perform a PTZ calibration at boot
and if a /system/sdcard/config/cameraposition file exists it will also move the camera to the position it defines.

To enable the calibratePTZ.sh.dist demo, or any other script, copy or rename it to NOT end in .dist.
Example:
cp /system/sdcard/config/userscripts/startup/calibratePTZ.sh.dist /system/sdcard/config/userscripts/startup/calibratePTZ.sh

* enable zram by default as per the original firmware (#1323)

* enable zram by default as per the original firmware

this prevents crashes due to memory exhaustion on xiaofeng and other
64mb models

* Keep old swap variable names for backwards compatability

* Use zram swap with higher priority than sd-card swapfile

* Add configuration option for zram size

Co-authored-by: jmtatsch <jmtatsch@users.noreply.github.com>

* Update README.md

mention pull request should be against beta branch

* Add documentation about ram (#1375)

* Autoupgrade (#1374)

* New menu organisation

* Improve upgrade process by creation a VERSION file

* Add commit info in status overview

* Improve update process with VERSION file

* Typo fixies

* Fix typo in status_overview.cgi (#1388)

Latest commit leads to blank content on Overview page under the Information tab. Based on below, I think it is a typo.

/var/log/lighttpd-cgi-stderr.log
/system/sdcard/www/cgi-bin/status_overview.cgi: line 59: syntax error: unexpected "else" (expecting ")")

* remove no original f/w note from Neos SmartCam (#1389)

2 versions are available

* Minor changes / correcting labeling (#1391)

* Minor changes / correcting labeling
run.sh: blue_led also off by default
common_functions.sh: fix typo
api.cgi, system_led.cgi, index.html: Correct display of cut_ir to IR Filter
sw_night.css: make some text easier to read
index.html.js: remove blank line

Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>

* PTZ Presets - go home (#1387)

* 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

Co-authored-by: Solomon S <slm4996@users.noreply.github.com>
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.me>
Co-authored-by: Yannik Sembritzki <yannik.sembritzki@gmail.com>
Co-authored-by: Gysmo <frederic@leroux.im>
Co-authored-by: fhl206 <fhl206@gmail.com>
Co-authored-by: Combie81 <classified_one@hotmail.com>
Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>

* Hide dpad if camera have no PTZ

* Add topic update to start update from mqtt (#1399)

Co-authored-by: gysmo38 <frederic@leroux.im>

* Viewer (#1401)

* Add html page to show files in Recording directory

* more generic code and add timelapse files

* Rebased on latest version on https://github.com/mpromonet/v4l2rtspserver
- No more memory leak (hopefully)
- latest version of live555

* Add test for update process (#1405)

* Add test for update process

* Update action.cgi

* Bug fix for Fimware commit on status overview page (#1406)

Co-authored-by: root <nicolas.ebele@gmail.com>
Co-authored-by: nik0 <1867654+nik0@users.noreply.github.com>
Co-authored-by: J Posthuma <jposthuma25@gmail.com>
Co-authored-by: Jelle Posthuma <jelle@beyonit.nl>
Co-authored-by: gysmo38 <frederic@leroux.im>
Co-authored-by: Solomon S <slm4996@users.noreply.github.com>
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.me>
Co-authored-by: Yannik Sembritzki <yannik.sembritzki@gmail.com>
Co-authored-by: fhl206 <fhl206@gmail.com>
Co-authored-by: Combie81 <classified_one@hotmail.com>
Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>
2020-05-08 21:09:36 +02:00
Combie81
7caf27bd53 Minor changes / correcting labeling (#1391)
* Minor changes / correcting labeling
run.sh: blue_led also off by default
common_functions.sh: fix typo
api.cgi, system_led.cgi, index.html: Correct display of cut_ir to IR Filter
sw_night.css: make some text easier to read
index.html.js: remove blank line

Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>
2020-04-30 20:40:38 +02:00
Knurlnheim
d9336ab637 Motionvideo2mqtt (#1298)
* Add 768x432 video resolution

* Update system_video.cgi

sort

* Add options to send motion video to MQTT

* Missing pieces

Co-authored-by: jmtatsch <jmtatsch@users.noreply.github.com>
Co-authored-by: Marc Fundenberger <38658442+MarcFundenberger@users.noreply.github.com>
2020-03-01 20:49:40 +01:00
Gysmo
6112420a67 New menu organisation (#1269)
* New menu organisation

* Update index.html

fix typo

Co-authored-by: jmtatsch <jmtatsch@users.noreply.github.com>
2020-02-11 11:28:06 +01:00
Jelmer Tiete
eab95ca47f web interface menu reshuffel (#910)
* web interface menu reshuffel. Added network info panel. Removed missile launcher files.

* removed start original firmware button
2019-02-02 21:09:40 +01:00
blakadder
77e3ac8b7c Added Telegram functionality to HA and webui (#866)
* Update telegram-bot-daemon.sh

* Update common_functions.sh

* Update mqtt-autodiscovery.sh

* Update action.cgi

* Update index.html

* Update index.html.js

* Update index.html

* Update mqtt-status-interval.sh

* Update mqtt-autodiscovery.sh

* Update mqtt-control.sh

* Update state.cgi

* Added Send to telegram switches to HA and web ui
2018-12-30 21:06:37 +01:00
Ark
c5f73128a0 Fix typo from previous PR and update css (#861)
* add smoothie.js to local

updated to v1.36 from v1.34

* fix script links to local

change smoothie.js and bulma.0.6.2.min.css links to local so it can works without internet connection

* Fix typo css and change bulma to 0.7.2

- fix type from css/bulma.min.css (should be css/bulmaswatch.min.css)
- update bulma reference to 0.7.2 (from 0.6.2)

* add required css for theme file

bulmaswatch.min.css is required (based on 0.7.2 - slate theme)

* update bulma.min.css to 0.7.2

* add bulma css 0.7.2

update the css files version from 0.6.2

* delete old files

replaced by version 0.7.2
2018-12-29 11:03:19 +01:00
Ark
e7adb162a2 Change some scripts links to local (#860)
* add smoothie.js to local

updated to v1.36 from v1.34

* fix script links to local

change smoothie.js and bulma.0.6.2.min.css links to local so it can works without internet connection
2018-12-29 06:29:07 +01:00
Mike Miller
895b1558b3 Fix MQTT Snapshot toggle (#794) 2018-11-14 04:58:49 +01:00
Mike Miller
0741fb33b9 Add a new parameter 'publish_mqtt_snapshot' (#791)
Currently, publish_mqtt_message is used to decide whether we send a
notification about motion. save_snapshot is used to save the image
locally. And if both are set, the image is also sent to mqtt

This PR decouples the mqtt image send from the snapshot saving. There
are now three parameters:

publish_mqtt_message -- send notification that there was motion
publish_mqtt_snapshot -- send notification containing the motion.
save_snapshot -- saves to disk, doesn't necessarily notify

No MQTT topics are changed; this is purely configuration bookkeeping.
2018-11-13 20:11:30 +01:00
jmtatsch
673b96908b Update index.html
fix typo
2018-11-11 07:59:42 +01:00
chisht
8076a88133 Updating autonight software method (#752)
* Integrating sw_night_configure.html to main index.html
Adding GUI option to select SW/HW mode for autonight in setting page
Adding capability to read current configuation and save the new configuation back to the sdcard in sw_night_configure

* Removing autonight.conf.sw Instead we now only add or remove -S to autonight.conf
2018-10-24 07:23:45 +02:00
jmtatsch
b116141f61 Update index.html
add link to sw_night_configure.html
2018-10-19 20:06:24 +02:00
Gysmo
7221890c5a Title and version updated in UI (#629) 2018-08-09 11:06:08 +02:00
nik0
d60788f08b Add web ui for actions on motion (#528) 2018-06-26 19:02:50 +02:00
nik0
f029ce0fe0 Audio and framerate settings (#523)
* Audio and framerate settings
- Enable audio AES filter
- Now can choose more audio in/out bitrate
  Please note the constraints:
   * Filtering AES, NS is available with in bitrate under or egal 16000
   * When select OPUS out birate is 48000
   * When select PCM or PCMU in bitrate shall be egal to out bitrate

- Can now control video FPS
     * I noticed that some configuration freeze the video (for example 1/1)

* Delete webrtc_profile.ini

* Update status.cgi

* Update rtspserver.conf.dist
2018-06-25 21:25:33 +02:00
nik0
282e04e911 New auto updatepage (#428)
* Update update.html

* New autoupdate page
- Autoupdate with progress bar (approximative as based on files already on card)
- associated log tab
- version in settings

* New autoupdate page
- Autoupdate with progress bar (approximative as based on files already on card)
- associated log tab
- version in settings
2018-06-07 20:40:55 +02:00
David Barrera
f25b88f40a Fix camera control labels (#415)
Labels for MQTT status and control servers were swapped.
2018-06-06 06:24:31 +02:00
Julian Tatsch
1de89f1a28 add web ui for autoupdate 2018-05-24 06:34:59 +02:00
jmtatsch
d427a4a073 Update index.html
fix css url for dark theme
2018-05-18 05:03:34 +02:00
gkaindl
08a9aa09e1 use relative paths for web interface. (#319)
to run it behind a reverse proxy
2018-04-30 22:36:08 +02:00
jmtatsch
608f95632d Update index.html
reorder and rename a few manage menu items to be more accurate
2018-04-23 08:06:54 +02:00
nik0
0ec1919f5c Add more log display on interface 2018-04-21 17:02:17 +02:00
ping
25abdb21e7 Move config motion scripts/css to load in index, fix config motion submission 2018-04-21 07:57:03 +08:00
ping
4c94306b3f Add a small indicator overlay on live image to hint at dpad 2018-04-19 21:40:50 +08:00
ping
e000d271c4 Improvements based on feedback received 2018-04-19 21:15:30 +08:00
ping
63d23e2ae9 Implement new UI
Change summary:

- Incorporate the Bulma CSS framework
- Changed many of the functions in action.cgi scripts.cgi status.cgi getMotionInfo.cgi to return json so that we can have more elegant ajax-y UI flows
- Changed the "live" view to only refresh statuses on demand (when Camera Controls menu is hovered/clicked) instead of a constant interval refresh. I did not like the constant refresh in the current implementation because it was sometimes locking up the UI in the background.
- Changed the "live" view image to reload only after previous image is loaded instead of a constant refresh interval (uses image "onload" to trigger)
- Fixed up some bugs in configMotion.html and also made the UI work responsively
- Added a "shutdown" command (calls /sbin/halt) so that I can gracefully shutdown the camera instead of pulling the plug
- Add option to choose a dark UI theme
2018-04-19 10:48:49 +08:00
Ryan Jarvis
4dfb5390c8 Cleanup (#172)
* PEP8 for python scripts

* Format HTML

* Cleanup scripts using shellcheck.  Whitespace.  Removed unused variables and a "dead cat"

* Cleanup script using shellcheck.  Whitespace.  Refactored a fragile for loop and removed a "dead cat"

* Cleanup scripts using shellcheck.  Whitespace.  Refactored a chain of grep commands in mqtt-control.sh.

* Cleanup scripts using shellcheck.  Whitespace.  Removed unused commented code and dead cats.

* Format changes for consistency
2018-03-23 15:39:05 +01:00
Elias Kotlyar
3d022a1008 Fixxed Stuff 2017-12-06 17:42:55 +01:00
Elias Kotlyar
eb91d83c89 LEDs 2017-12-05 16:34:30 +01:00
Elias Kotlyar
3f6c32df7f New Files 2017-12-05 16:19:41 +01:00
Elias Kotlyar
21d6ccec34 Currentpic 2017-12-05 15:59:09 +01:00
Elias Kotlyar
1727757fd3 Install instructions 2017-12-03 20:40:00 +01:00
Elias Kotlyar
cb9ce0b97d Boa 2017-12-02 00:30:08 +01:00