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

57 Commits

Author SHA1 Message Date
dewi-ny-je
ff72612871 Fixes "sh: bad number" in detectionOn.sh #1777 (#1813)
* Squashed commit of the following:

commit 0cde105a1b
Author: Aaron Carson <aaron@aaroncarson.co.uk>
Date:   Sun Dec 5 16:25:16 2021 +0000

    Update WyzeCam v1.2 `sha3sum -a 256` (#1791)

commit f1cf7dad8b
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Sun Oct 24 09:57:50 2021 +0100

    Merge beta into master (#1786)

commit d2fa6d7aac
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Sun Oct 24 07:57:17 2021 +0100

    Change Telegram ico (#1785)

commit b6a93e9cf5
Author: Stephan Fuchs <sfuchs@fastmail.com>
Date:   Mon Jun 21 18:50:37 2021 +0800

    Added clarification for LOCATION and DEVICE_NAME (#1747)

commit adbaffb038
Author: Nicholas FitzRoy-Dale <nicholas.github@fitzroydale.org>
Date:   Sat May 22 17:33:17 2021 +0100

    install_cfw: update Wyzecam V2 firmware version (#1735)

commit 62c8990caa
Author: fhl206 <fhl206@gmail.com>
Date:   Mon May 17 03:56:08 2021 +0100

    Update install_cwf_t20l.md (#1734)

commit c33bb63a61
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Tue May 11 15:11:35 2021 +0200

    Update README.md

commit c15370910b
Merge: a4a8bdc 90076db
Author: Julian Tatsch <julian@tatsch.it>
Date:   Tue May 11 06:23:18 2021 +0200

    Merge branch 'master' into beta

commit 90076db303
Author: McNutnut <mcnutnut90@gmail.com>
Date:   Mon May 10 21:19:16 2021 -0700

    Updated cfw for newest wyzev2 (#1729)

commit 1090a1f626
Author: Will Freeman <github@inwr.com>
Date:   Thu Apr 29 09:14:39 2021 -0600

    Root CA updates and more cron fixes (#1726)

    * Fix source of missing cron directories

    At some point, the root crontab was added to the git source, but the
    original script that added them was not updated to reflect.

    * Update root ca and updater

commit 799c2a4b70
Author: Will Freeman <github@inwr.com>
Date:   Tue Apr 27 08:35:00 2021 -0600

    Letsencrypt fix path (#1725)

commit 6bfe58ed54
Author: Will Freeman <github@inwr.com>
Date:   Mon Apr 26 20:20:59 2021 -0600

    Fix missing directory structure on letsencrypt (#1724)

commit 1de5ae1636
Author: maxemoose <maxemoose@users.noreply.github.com>
Date:   Thu Apr 22 17:59:23 2021 +0100

    Fix update w3.css (#1721)

    The previous PR I submitted was supposed to make the footer object stick to the bottom of the page but it did not work. This was because I missed a comma when adding the relevant changes.

    This PR changes one comma in w3.css to a semi-colon, fixing the desired footer behaviour.

commit 0ded51606e
Author: Ian <ian@apocrathia.com>
Date:   Thu Apr 22 10:58:15 2021 -0600

    Typo fix (#1723)

    I know this is stupid but it was annoying me.

commit a4a8bdc6d6
Author: Joey Babcock <joeybab3@users.noreply.github.com>
Date:   Tue Apr 20 20:05:28 2021 -0700

    Fix small typo in OSD save log (#1722)

commit 3935ddfd50
Author: Nazim-ua <38263368+Nazim-ua@users.noreply.github.com>
Date:   Tue Apr 13 22:36:05 2021 +0300

    Fix: waiting for all background jobs to finish before send snapshot (#1720)

commit 116c1ad53d
Author: psallandre <psallandre@gmail.com>
Date:   Tue Mar 23 13:11:43 2021 +0100

    Fix wifi (re)connection when available SSID is not the first one in wpa_supplicant.conf (#1717)

commit 7aa86b916f
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Sun Mar 21 19:06:38 2021 +0000

    Add web server control script (#1714)

commit 90b8a89a4d
Author: maxemoose <maxemoose@users.noreply.github.com>
Date:   Sun Mar 21 12:40:40 2021 +0000

    Update w3.css (#1713)

    Make html, body & w3-auto elements 100% height. Add flex and flex direction to w3-auto. Make the content element grow to fill available space.

commit a163f4456d
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Sun Mar 21 08:09:52 2021 +0000

    SSH Control script (#1711)

commit 55a85cca64
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Fri Mar 19 11:24:16 2021 +0000

    Remove audio and convert to mp4 so videos play in Telegram app (#1709)

commit 00ffa10af5
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Mon Mar 15 18:31:26 2021 +0000

    Add LD_LIBRARY_PATH to .profile (#1704)

    * Add sdcard libs to LD_LIBRARY_PATH

    Add sdcard libs to LD_LIBRARY_PATH

    * Update .profile

    fix typo

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

commit f7c4a0ef49
Merge: fbb903d bae6374
Author: Julian Tatsch <julian@tatsch.it>
Date:   Sat Mar 13 20:13:59 2021 +0100

    Merge branch 'master' into beta

commit fbb903d608
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Sat Mar 13 14:43:59 2021 +0000

    Fix changing dropbox folders (#1705)

commit 4a2af3a87e
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Fri Mar 12 13:27:37 2021 +0000

    Add dropbox uploads on motion detection (#1703)

commit bae6374a42
Author: yerlandinata <yudhistira.erlandinata@ui.ac.id>
Date:   Tue Mar 9 02:54:02 2021 +0700

    Fix controlscripts/rtsp (#1701)

    - stopping rtsp will stop its dependents properly

commit 74575379b0
Author: Fietspomp86 <senne_baars@hotmail.com>
Date:   Mon Mar 8 20:52:23 2021 +0100

    Update mqtt-autodiscovery.sh (#1700)

    Replaced value_template with position_template, for Home Assistant 2021.3.x and newer

commit 5ef8548434
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Mon Mar 8 09:26:34 2021 +0000

    Refactor dtectionOn.sh (#1698)

commit 1e393e1bd5
Author: aque0us <barronpdonovan@gmail.com>
Date:   Mon Mar 8 04:25:38 2021 -0500

    Update install_cfw.md (#1673)

commit 8065bd58b5
Author: Julian Tatsch <julian@tatsch.it>
Date:   Mon Mar 8 10:16:34 2021 +0100

    Added nano binary

commit d79a153e99
Author: timstanley1985 <6829542+timstanley1985@users.noreply.github.com>
Date:   Sun Mar 7 17:16:03 2021 +0000

    SSH management panel (#1692)

    * SSH management panel - initial commit

    * Add ssh.conf.dist

    * Tweaks

    * Update firmware_mod/www/cgi-bin/ui_system.cgi

    Co-authored-by: fhl206 <fhl206@gmail.com>

    * Add configure SSH pub key to web ui

    * Tweak wording

    * Change logic for SSH paasword

    Co-authored-by: fhl206 <fhl206@gmail.com>

commit 972ba9d5cf
Author: Matthias Pfefferle <pfefferle@users.noreply.github.com>
Date:   Fri Feb 26 05:55:03 2021 +0100

    the bot should only answer to commands that starts with "/" (#1664)

    If a bot is in a group it can be very noisy otherwise.

commit 174b2d56a1
Author: Chris Knight <cdk-github@accessoft.org>
Date:   Thu Feb 25 20:54:24 2021 -0800

    fix #1674 - typo in ui_motion.cgi (#1676)

    Co-authored-by: Chris Knight <cdknight@hotcat.org>

commit 0b6a19ae4e
Author: Chris Knight <cdk-github@accessoft.org>
Date:   Thu Feb 11 20:55:24 2021 -0800

    typo fix (#1685)

commit e5520d0bcd
Author: fhl206 <fhl206@gmail.com>
Date:   Wed Feb 10 02:44:51 2021 +0000

    Update technical.md (#1683)

commit fe18a97e94
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Fri Jan 1 15:24:11 2021 +0100

    Update motion.html

    fix typo

commit 67794f2867
Merge: 5fc16fb 7d2eeba
Author: Julian Tatsch <julian@tatsch.it>
Date:   Sun Dec 27 11:12:08 2020 +0100

    Merge branch 'master' into beta

commit 5fc16fb409
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Sun Dec 27 10:11:57 2020 +0100

    Update ui_motion.cgi

    fix typo

commit ccdfd4d239
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Sun Dec 27 10:09:52 2020 +0100

    Update motion.html

    fix typo

commit 7d2eebaed6
Author: Justin Goette <53531335+jcgoette@users.noreply.github.com>
Date:   Sat Dec 26 04:40:53 2020 -0500

    Update camera.html (#1656)

    * Update camera.html

    Typo

    * Update camera.html

    Typo

commit 69e0126c0b
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Wed Dec 23 22:02:13 2020 +0100

    Update control.js

    Add friendly name for mdns-responder

commit 8eb23eb040
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Wed Dec 23 21:54:20 2020 +0100

    Update motion.html

    fix some grammar & clarify night mode delay

commit 90173ea83f
Author: Julian Tatsch <julian@tatsch.it>
Date:   Wed Dec 23 18:27:12 2020 +0100

    add mDNSResponder binary

commit e7c84ddf59
Author: Greg Thornton <xdissent@me.com>
Date:   Tue Dec 22 10:13:50 2020 -0600

    Network config web ui and fallback wifi hotspot (#1655)

commit 43d73c3c77
Author: Greg Thornton <xdissent@me.com>
Date:   Tue Dec 22 00:48:59 2020 -0600

    Allow custom firmware repositories (#1651)

    * Add repo option to autoupdate.sh

    * Fix repo option in autoupdate.sh

    * Use local repo when checking for updates

    * Use default repo if non given in VERSION file in autoupdates.sh

    * Pass custom repo to web ui and update cgi

    * Add custom firmware update to web ui

    * Fix update messages

    * Fix update start arguments

    * Fix update input labels

    * Add custom upgrade button when on custom firmware

commit 4f304046fa
Author: Greg Thornton <xdissent@me.com>
Date:   Mon Dec 21 06:00:24 2020 -0600

    Mdns responder (#1649)

    * Add mDNSResponder

    * Add mDNSResponder to web ui

    * Fix mDNSResponder pid location

commit 3fa69c9b79
Author: Greg Thornton <xdissent@me.com>
Date:   Mon Dec 21 05:57:23 2020 -0600

    GitHub token for updates (#1650)

    * Add github token option to autoupdate.sh

    * Use github token to check updates

    * Add github token to web ui

    * Use github token in web updates

    * Add github tab in web ui

    * Fix curl in autoupdate.sh

    * Fix github curl auth

commit 74360b8c40
Author: Greg Thornton <xdissent@me.com>
Date:   Mon Dec 21 05:56:32 2020 -0600

    Ignore motion events when night mode is switched on/off (#1648)

    * Ignore motion events if night mode has recently changed.

    * Add night mode motion delay to web ui

    * Change night_delay config to night_mode_event_delay

commit 6a13b282f5
Author: Greg Thornton <xdissent@me.com>
Date:   Mon Dec 21 05:55:30 2020 -0600

    Fix select elements in safari (#1647)

commit 49d1e335cc
Author: drkdoesgit <67248496+drkdoesgit@users.noreply.github.com>
Date:   Mon Dec 21 00:20:46 2020 +0800

    Save snapshots/videos on motion vales are not saved. (#1645)

    * https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/pull/1588

    ###Description:
    Save snapshots/videos on motion vales are not saved.

    ###To Reproduce:
    1. SET **Motion Settings** > **Storage** > **Local Storage** > "Save snapshots on motion" to **Activate**
    2. Reload the configuration.
    3. Changes are not reflected or remains to be **Deactivate**

    ###Changes:
    ui_motion.cgi
    1. Changed the variable `saveSnaphot` to `saveSnapshot`
    2. Added `    echo "saveVideo#:#${save_video}"` for command `get_config`.
    2. Added the the code below for the `save_config` command.
    ```
        if [ -n "${F_saveVideo+x}" ]; then
      F_saveVideo=$(printf '%b' "${F_saveVideo//%/\\x}")
         rewrite_config /system/sdcard/config/motion.conf save_video $F_saveVideo
        echo "Save video set to $F_saveVideo<br/>"
       fi
    ```

    motion.html
    1. Renamed `saveSnaphot` to `saveSnapshot` to reflect the changes done in ui_motion.cgi.

    * Update .gitignore

    remove vsc files

    Co-authored-by: Brian Frianeza <bf@dewise.com>
    Co-authored-by: jmtatsch <jmtatsch@users.noreply.github.com>

commit 50a937cfb7
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Sun Dec 13 10:18:08 2020 +0100

    Update install_cfw.md

    add filename hint for wyzecam v3

commit d43eb62d19
Author: Coby Fleener <coby@users.noreply.github.com>
Date:   Thu Dec 10 14:45:49 2020 -0700

    Update Readme (#1642)

    Minor spelling correction.

commit be4402631a
Author: Ben Russell <ben@benru.co.uk>
Date:   Tue Dec 8 20:58:38 2020 +0000

    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.

commit 04edd48499
Merge: 7b88be2 1c92630
Author: Julian Tatsch <julian@tatsch.it>
Date:   Tue Dec 8 19:10:57 2020 +0100

    Merge branch 'beta'

commit 1c92630953
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Tue Dec 8 15:05:52 2020 +0100

    Full master fixes also into beta (#1639)

    * Fixed the timezone: Europe/Amsterdam

    * Fix 'rtsp-h264' still set as an autostart entry when 'rtsp' is now the (#1636)

    service to use

    In 1e2f96612f the services 'rtsp-h264' and
    'rtsp-mjpeg' were combined into a single 'rtsp' service, however an
    entry for 'rtsp-h264' still remained in the autostart folder. This is a
    problem for the user because this entry does not appear in the Web UI
    which means it cannot be easily removed, and also appears as if an RTSP
    server is not running when it is.

    * Added button to the live page that downloads a JPEG screenshot (#1638)

    * Fixed a missing line break and spelling mistake

    * Added button to the live page that downloads a JPEG screenshot

    Co-authored-by: OhMyGuus <info@guus.ninja>
    Co-authored-by: Ben Russell <ben@benru.co.uk>

commit 7b88be20ee
Author: Ben Russell <ben@benru.co.uk>
Date:   Tue Dec 8 14:00:19 2020 +0000

    Added button to the live page that downloads a JPEG screenshot (#1638)

    * Fixed a missing line break and spelling mistake

    * Added button to the live page that downloads a JPEG screenshot

commit 00ae38fb6b
Author: Ben Russell <ben@benru.co.uk>
Date:   Tue Dec 8 10:31:42 2020 +0000

    Fix 'rtsp-h264' still set as an autostart entry when 'rtsp' is now the (#1636)

    service to use

    In 1e2f96612f the services 'rtsp-h264' and
    'rtsp-mjpeg' were combined into a single 'rtsp' service, however an
    entry for 'rtsp-h264' still remained in the autostart folder. This is a
    problem for the user because this entry does not appear in the Web UI
    which means it cannot be easily removed, and also appears as if an RTSP
    server is not running when it is.

commit f299b6cefd
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Sat Nov 14 12:17:04 2020 +0100

    Update osd.conf

    make osd text white by default and slighly smaller

commit b590eef293
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Sat Nov 14 12:14:26 2020 +0100

    Update index.html

    make light blue the default theme

commit ede5abe316
Merge: 02d5523 cc3c060
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Sat Nov 14 11:26:49 2020 +0100

    Merge pull request #1620 from OhMyGuus/Fixes

    Fixed the timezone: Europe/Amsterdam

commit 853a3927f5
Author: Julian Tatsch <julian@tatsch.it>
Date:   Sat Nov 14 11:25:08 2020 +0100

    fix autostart of rtsp

commit 61a02eaec9
Author: Julian Tatsch <julian@tatsch.it>
Date:   Sat Nov 14 11:18:25 2020 +0100

    Remove traces of distinction between rtsp_h264 and rtsp_mjpeg because everything is handled now by rtsp service and both cant run at the same time anyhow.

commit 914b46e78a
Author: Julian Tatsch <julian@tatsch.it>
Date:   Thu Nov 12 08:56:23 2020 +0100

    Fix a typo in camera.cgi so that setconf is called correctly when saving OSD. Thanks @thehijacker

commit cc3c060da5
Author: OhMyGuus <info@guus.ninja>
Date:   Sat Nov 7 01:58:24 2020 +0100

    Fixed the timezone: Europe/Amsterdam

commit 17095b7283
Merge: 74480c8 02d5523
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Fri Nov 6 22:10:57 2020 +0100

    Merge pull request #1618 from EliasKotlyar/master

    Merge the fixes from master to beta

commit 02d5523f7b
Merge: 064aff2 ac7e2ba
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Fri Nov 6 21:28:46 2020 +0100

    Merge pull request #1592 from josephdouce/patch-1

    Update mqtt-control.sh

commit ac7e2ba07d
Merge: 1e71c66 064aff2
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Fri Nov 6 21:28:29 2020 +0100

    Merge branch 'master' into patch-1

commit 064aff2f66
Merge: 2948300 b0d51be
Author: jmtatsch <jmtatsch@users.noreply.github.com>
Date:   Fri Nov 6 21:25:24 2020 +0100

    Merge pull request #1612 from dewi-ny-je/master

    Merge beta and master branches

commit 1e71c66745
Author: joseph douce <josephdouce@gmail.com>
Date:   Thu Oct 1 12:55:55 2020 +0100

    Update mqtt-control.sh

    changed compression to increase processing speed. -S 25k takes much longer then -m 50, reduced processing time from 10s to 2s

* Corrected detection of night mode

Fixes #1777 "Always getting "sh: bad number" in detectionOn.sh"

* Fixes "sh: bad number" in detectionOn.sh #1777

* Fix for #1814

added xterm-256 color
2022-05-15 03:31:13 +02:00
timstanley1985
f1cf7dad8b Merge beta into master (#1786) 2021-10-24 10:57:50 +02:00
Julian Tatsch
c15370910b Merge branch 'master' into beta 2021-05-11 06:23:18 +02:00
Nazim-ua
3935ddfd50 Fix: waiting for all background jobs to finish before send snapshot (#1720) 2021-04-13 21:36:05 +02:00
timstanley1985
55a85cca64 Remove audio and convert to mp4 so videos play in Telegram app (#1709) 2021-03-19 12:24:16 +01:00
timstanley1985
4a2af3a87e Add dropbox uploads on motion detection (#1703) 2021-03-12 14:27:37 +01:00
timstanley1985
5ef8548434 Refactor dtectionOn.sh (#1698) 2021-03-08 10:26:34 +01:00
Greg Thornton
74360b8c40 Ignore motion events when night mode is switched on/off (#1648)
* Ignore motion events if night mode has recently changed.

* Add night mode motion delay to web ui

* Change night_delay config to night_mode_event_delay
2020-12-21 12:56:32 +01:00
dewi-ny-je
b0d51becde Merge branch 'beta' 2020-10-28 22:44:34 +01:00
Matt Smith
416896e7b2 Add video file to the motion detection user scripts
Since it's in user script space, having access to the tempfile to do our own archiving or actions would be ideal.
2020-09-29 22:52:09 +01:00
Combie81
5548ab554f Moving config entries/cleanup
Moved some configutation options to the config files

Minor text changes

Converted a lot of spaces to tabs
2020-07-16 10:20:39 +02:00
jmtatsch
f73542f653 Update detectionOn.sh
fix cleaning up snapshots
2020-05-09 06:43:59 +02:00
dewi-ny-je
f2813accf7 Reworking permissions of saved files and directories
"save_snapshots_attr" was used also for firectories containing videos, leading to non-obvious permission issues.

Permissions for snapshots and videos were grouped together into a new "save_files_attr" and a new "save_dirs_attr" has been introduced.

Closes #1413
2020-05-08 23:15:28 +02:00
Combie81
d9fde69a60 Disabling SSL / path corrections / misc changes (#1307)
* Disabling SSL / path corrections / misc changes

Lighttpd.conf.dist: Added notes for disabling SSL
SSL left as on by default
Motion.conf.dist: Change pattern to make more sense when items are listed in explorer
Change paths case
resolv.cont.dist: Added public nameservers so that NTP will work by default
rtspserver.conf.dist: Added missing settings that are created after UI page is saved anyway
sendmail.conf.dist: Clarify AUTH entry to match rest of example
recording: Add Recording to path to help seperate/categorise files
Add sub dir with date for faster dir loading
Change from MOV to REC to identify video as "recorting" type
detectionON.sh: Change group/file pattern to make list better/consistent
telegram-bot...: Remove blank line
timelapse.sh: Change path variable name to match rest of code
Add sub directories to help with loaading/filtering of files

* Update resolv.conf.dist

Commented out Publin DNS servers as requested

Co-authored-by: Steven McCombie <smccombie@fugnet.servegame.com>
2020-03-07 21:33:59 +01:00
Julian Tatsch
daf6de2148 move mqtt snapshot to a different topic. Fix #1300 2020-03-07 12:42:54 +01:00
Dmytro Drozdov
74256f7563 Update detectionOn.sh (#1303)
It fix access right problem when you use NFS mount for save.
2020-03-04 10:27:28 +01: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
Tatchai Wijitwiengrat
8858ca43e1 Fix exceeds received frame size (#1292)
* Fix exceeds received frame size

Fix "The total received frame size exceeds the client's buffer size" when record RTSP video.

* Update detectionOn.sh

Increases receive buffer size

* Fix rm command error "is directory"

* Update detectionOn.sh

Change parameter name to "output_buffer_size"
2020-02-29 11:25:44 +01:00
Ashley Eckard
b332579add Allow motion recording on protected rtsp link (#1251)
* record if rtsp is password protected

Found an issue with recording on motion detection would result in empty video files if rtsp was set with user:pass. This fixes that issue.

* update var name

* dynamic port changes
2020-01-22 07:07:12 +01:00
jmtatsch
8ee63c718e Update detectionOn.sh
remove recoding video step for openRTSP captured videos
2019-10-22 07:38:28 +02:00
Seweryn Zeman
159ccef004 Fix FTP video upload fail #1199 (#1200)
* Fixed new stills/video target dir path

* Remove groupname in ftp_* as dir creation is not supported
2019-10-18 16:50:23 +02:00
Seweryn Zeman
37cce78775 Fixed new stills/video target dir path (#1198) 2019-10-17 21:44:03 +02:00
Seweryn Zeman
281d027935 Add directory to group daily stills/videos + mqtt-control upgrades (#1196)
* Added mqtt-control to play sound from /system/sdcard/media

* Turn amber light before recording

* detectionOn code cleanup and unification

* Resize and compress mqtt snapshot

* Send still/video to SMB

* Fixed a+x rights in bin/

* Added openRTSP - enables recording real video on detectionOn

* Added groupname to store files in dir/file structure

* Non-safe env var usage... but unified

* remove mqtt-control PID on stop() even if no kill was made

* mqtt-control kill + rm based on another script

* mqtt-control wait for connection available to be established
2019-10-16 12:30:28 +02:00
Seweryn Zeman
6a3f118255 Turn on amber LED before record; mqtt-control play sound (#1194)
* Added mqtt-control to play sound from /system/sdcard/media

* Turn amber light before recording
2019-10-15 11:03:35 +02:00
Seweryn Zeman
91d5726e5b Master smb (#1193)
* detectionOn code cleanup and unification

* Send still/video to SMB
2019-10-15 11:00:16 +02:00
Seweryn Zeman
dcc24ae4c9 Resize and compress mqtt snapshot (#1192) 2019-10-15 10:57:28 +02:00
Seweryn Zeman
9bb1d2f20e detectionOn code cleanup and unification (#1191) 2019-10-15 10:57:05 +02:00
jmtatsch
25db7d729f Update detectionOn.sh
Fix #957 telegram video not working
2019-09-06 10:55:03 +02:00
Dmytro Drozdov
c7451624ac Change permissions for saved snapshots and video files. (#977)
* To change default permissions 0600

* Change permissions for saved snapshots and video files.

When you use automount to NFSv3, so like this...
mount -o nolock -t nfs 192.168.1.10:/nfs/cams /system/media/nas

You you could not open snapshots from nfs volume. It was have permissions 0600 with "nobody" user.
ls -l /system/media/nas
-rw------- 1 501 1000 162528 Mar 13 13:52 13-03-2019_13.52.49.jpg
-rw------- 1 501 1000 162790 Mar 13 13:53 13-03-2019_13.53.30.jpg
-rw------- 1 501 1000 161054 Mar 13 13:53 13-03-2019_13.53.52.jpg

This commit will correct this problem. 

Setup new variable in /system/sdcard/config/motion.conf.dist will set new permissions for snapshots and videofiles
save_snapshot_attr="0666"
save_video_attr="0666"
2019-03-14 23:11:15 +01:00
Julian Tatsch
ce953aa48e fix telegram message type 2019-02-20 22:32:59 +01:00
Julian Tatsch
179c52280b record videos on motion events 2019-02-18 20:48:42 +01:00
Haris Okanovic
74c87cd1d6 detectionOn.sh: Upload snapshot and/or video stream to ftp server (#922)
Enabling `ftp_snapshot=true` in motion.conf uploads a single image to
ftp server on each motion event, similar to other handlers.

Enabling `ftp_video=true` starts a background task to stream 1fps video
until motion stops. It minimally steams for 10 seconds (configurable),
refreshing the countdown as motion continues.
2019-02-04 20:17:34 +01:00
Haris Okanovic
f1ec32d722 Cleanup detectionOn.sh to improve performance (#913)
Modify as follows:
 1. Run `getimage` once at beginning of script, save image to /tmp
 2. Launch all notification tasks (save snapshot, mqtt, email, telegram,
    and user scripts) as background jobs, use same image image in all
    cases for consistency
 3. Wait for all background jobs to finish before deleting tempfile

In motion.conf.dist:
 * Add default debug_msg_enable=false
 * Fix typo: s/sendemail/send_email

Testing: Ran detectionOn.sh with all options+debugging enabled on a
Wyze Cam V2 and verified the following:
 * LED triggered
 * Snapshot jpg saved to sdcard
 * Old snapshots removed from sdcard
 * Ran few user scripts to read tempfile
 * sendPictureMail.sh, mosquitto_pub.bin, and telegram ran, but I
   didn't verify delivery
2019-02-03 22:13:37 +01:00
saipsa
4014384d7a Telegram bot: Option to configure alert type - text/image (#855)
* Update common_functions.sh

* Update telegram-bot-daemon.sh

* Update detectionOn.sh
2018-12-29 06:31:29 +01:00
Julian Tatsch
c68d626d81 improve naming consistency 2018-12-24 10:42:45 +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
Attila Sukosd
5a35e36a92 Provide the captured image as a parameter to userscripts on motion detection (#598)
This patch allows the user scripts to act directly on the captured image
by passing the path to the scripts directly as the second argument.
This way it's possible to work with the image directly, without
employing dirty tricks to find out which one was the latest image in the
stills directory.
2018-10-25 18:32:23 +02:00
Dopeyr
2980f697eb Ref #727 - Allow snapshot filename to ne configured in motion.conf (#737) 2018-10-12 12:20:34 +02:00
gergles
6cb8301bae Fixing telegram integration in detectionOn.sh (#678)
* Fixing telegram integration in detectionOn.sh

* Update detectionOn.sh

use /tmp for temporary image
2018-09-05 04:17:30 +02:00
saipsa
88414b748d Remove oldest snaps when save_dir is full & run user motion scripts in background (#647)
* Changed removal logic of saved snaps & run custom motion script in background

Oldest files are removed if save_snap directory is full

* Update detectionOn.sh
2018-08-27 05:51:21 +02:00
Julian Tatsch
69db2d677b Undo relative importing 2018-07-21 09:52:17 +02:00
Julian Tatsch
a5efadc959 Fix Telegram action deleting the snap, improved string quoting 2018-07-21 08:32:32 +02:00
Julian Tatsch
67da745397 Add telegram support #582 2018-07-20 13:09:16 +02:00
Dopeyr
062860ff79 Fix motion detection userscripts (#500)
* Correct detection scripts so they can run multiple scripts

* Add some documentation around motion detection scripts
2018-06-21 08:21:21 +02:00
Åskar Andersson
4fecde42ec Customize savedir (#439)
* Update motion.conf.dist

* Update detectionOn.sh
2018-06-09 07:36:21 +02:00
Dopeyr
6ecaeef08e Allow custom scripts to run on motion detection on/off (#432)
* Allow custom scripts to run on motion detection on/off

* Custom user scripts should be ignored
2018-06-08 02:36:03 +02:00
MarkDownPhotos
4e82215ba9 Add PTZ presets and other optimizations. (#389)
* add PTZperset function

* Display asix to OSD

* delete source

* add motor_PTZ function

* Motor adds f parameter (calibrate) and is compatible with the new version of DAFANG.

* calibrate,compatible newer models.

* OSD set POSY 0

* Wait for the previous command to run before running

* Disable Statements That Cause MQTT Alerts

* fix mqtt

* Fixed issue where multi-tasking motor was not moved to the specified position and was interrupted

* Add limit on the number of snapshots

* Add OSD Display AXIS

* Repair Limit Snapshot Number Does Not Take Effect..

* Enable log option

* Keep the original time style

* Keep default osd settings

* Modify loger as a logger

* Api.cgi is not in use

* Clear the old DAFANG calibration failure code.

New DAFANG Run the `/system/sdcard/bin/motor -d f` command to calibrate.

Old and generous Please run `/system/sdcard/bin/motor -d h && /system/sdcard/bin/motor -d v` command to calibrate

* Change the zero point of the motor calibration coordinate to the middle point of the motor.

* Fix the coordinate display of the new motor command.

* fix typo
2018-06-07 07:34:34 +02:00
Knurlnheim
8e79ad5db2 Fixes MQTT use of $PORT 2018-04-21 17:51:37 +02:00
Elias Kotlyar
6e2ff6fef6 Merge branch 'patch-1' of https://github.com/Paxy/Xiaomi-Dafang-Hacks into Paxy-patch-1
# Conflicts:
#	firmware_mod/scripts/detectionOn.sh
2018-04-20 17:00:40 +02:00
Paxy
3363eb1364 Fix Stuck in Alarm
Fix Stuck in Alarm  state if $save_snapshot is false
2018-04-17 17:01:48 +02:00