Commit Graph

118 Commits

Author SHA1 Message Date
ehpersonal38 6313cb1d91 Merge pull request #912 from croisez/main
Added possibility in Spectrogram view to activate frequency shifting
2023-05-20 18:14:18 -04:00
ehpersonal38 9c1f4175e2 Revert "Code Consolidation for API preparations & hard coded path replacements" 2023-05-19 20:03:02 -04:00
jaredb7 6b5282037c Merge branch 'BirdNET-pi-main' into New-UI-API 2023-05-17 20:04:19 +10:00
ehpersonal38 0e40aa562a no special characters message 2023-05-16 12:36:32 -04:00
Louis Croisez 04dae073f6 Added option in Spectrogram view to activate a frequency shift in the audio livestream 2023-05-16 10:46:43 +02:00
jaredb7 a80d39d7b6 Replace all authentication code with a function that does the auth for us
Makes things a little tidier and easier to change in the future, a custom message can be passed to authenticateUser() and this is output if the authentication fails.

Added protection around Include and Exclude species pages as these still accessible & data can still be written to include and exclude species.txt even with a password.
2023-05-13 01:07:19 +10:00
jaredb7 66863f2e6b Save password last to avoid auth check preventing saving other settings
Because saveSetting() checks each time to see that the user has authenticated, if the password is changed first then very next setting will cause a auth prompt (as the password changed) and if cancelled then the other setting won't save.

Putting it last will allow us to save all the other setting and then change the password, then the next attempt to execute a action or access a page that required auth will prompt the user the the password.
2023-05-12 23:09:15 +10:00
jaredb7 6af59a2908 Fix caddyfile not updating due to command execution being intercepted by auth prompt
We always want this command to execute regardless and rebuild the caddy config accordingly.
2023-05-11 06:55:29 +10:00
jaredb7 69c4a6d3b1 Move remaining files to use new code
Include and Exclude list updated to use the calculated path to their respective x_species_list.txt files

Move play.php over to also use the new calculated paths to disk_check_exclude

Spectrogram.php remove unused code & replace setting save code with new function

Stats.php removed old code, update paths to use calculated path.

Rename setSetting func to saveSetting
Remove old code from other pages
2023-05-09 20:29:57 +10:00
jaredb7 ac9a0e4cbe Consolidate code in remaining pages, setting page updates
The Config and Advanced setting pages received changes to use the new setSetting() function which looks after creating or updated the setting in the required config files.
Optionally it also specification of a command to run after saving the settings.
Some variables like models, audio formats and frequency shift tools were also moved into common.php

Service Controls page received changes with the replacement of the actual command to execute with a sort of shorthand human friendly version e.g. service <action> <service_name> -- service restart livestream.service

These commands map to the original commands in serviceMaintenance() so this could be called through the API without needing the full-blown commend.
views.php was updated to accommodate this also

System Controls page received a small change to make the process checking for new git updates or getting the last commit hash a single function call.

Include and Exclude species updated to use getFilePath() to generate a path to the required file instead of the hard coded path

Views.php also received similar treatment with replacing some hard coded paths with generated paths, but logic changes to handle the change in running service commands
2023-05-08 23:24:15 +10:00
jaredb7 e7e2ec472c Incert the LogLevel_ into the config file is they don't exisst
Update the saving of the LogLevel_ settings to create the setting in the config file if it doesn't exist at the time of saving, the setting is created with the chosen value.

Moves the RTSP javascript code into it's script tag and moved it be near the controls for the RTSP URL.
2023-04-19 21:01:53 +10:00
jaredb7 fa5662fa00 Update Birdnet Snipper to insert out new setting options
Update Birdnet Snipper to insert out new setting options
Update log level descriptions.
2023-04-13 22:42:01 +10:00
jaredb7 1b3a31c3ee Allow user configurable log level option for some services
After some services were recently quieted down by adjusting the log level for e.g ffmpeg. It would be nice if the user can easily adjust the log level again so that that they can investigate or debug a issue since output is not generated by default, so now the Livestream, Spectrogream and Birdnet Recording have a adjustable log levels to help with this.
2023-04-12 21:32:44 +10:00
ehpersonal38 56f168a280 remove trailing birdnet_url slash, if there is one 2023-04-07 21:29:12 -04:00
ehpersonal38 f8e68551a3 Revert "Revert "Merge pull request #829 from lloydbayley/main""
This reverts commit 712f4b034a.
2023-04-07 21:24:49 -04:00
ehpersonal38 712f4b034a Revert "Merge pull request #829 from lloydbayley/main"
This reverts commit 3abc483ef5, reversing
changes made to 21beea2f2d.
2023-04-07 21:08:42 -04:00
lloydbayley 0acb3cec62 Update advanced.php
Missed a capitalisation...oops!
2023-04-07 23:35:34 +10:00
lloydbayley 3c421aae62 Update advanced.php
Tidy Up UI
2023-04-07 23:22:38 +10:00
jaredb7 bb1ac2dd70 Fix alignment of new RTSP stream URL input field
Remove style that was indenting the input field, this isn't needed anymore since we aren't trying to align with the label
2023-04-07 08:59:58 +10:00
ehpersonal38 825e3926fa Lloyd's suggestions
Co-Authored-By: lloydbayley <21309308+lloydbayley@users.noreply.github.com>
2023-04-06 13:26:31 -04:00
jaredb7 8fbc8fdb16 Slight cosmetic change to the RTSP input boxes
Move the first input box down one line instead of being inline with the label. Makes alignment simple and work on mobile
2023-04-03 20:22:30 +10:00
jaredb7 ae94cbc189 Enhancement to allow simultaneous RTSP stream recording
Updated birdnet_recording.sh
With a functional change around how ffmpeg is used to make use if it's functionality to accept multiple input streams and map each to a output file.
Due to the original implementation generating a  filename that contain the date/time streams would be writing to the same file - a small change was make each stream go to it's one file with unique filenames.

Updated livestream.sh & spectrogram.php
The Livestream service would fail if the RTSP stream setting was more than 1 stream (i.e comma separated list of streams)
Made some improvements so streaming is possible from any of the URL's, The Spectrogram page received a new control and some Javascript that allows the user to change between streams, the setting gets saved and the livestream service restarted so it uses's the correct stream.
This control is not visible if there are no RTSP streams configured
By default the livestream service will stream the the first RTSP URL, if the setting is not set or invalid

Updated advanced.php
With a small GUI change around RTSP steam entry by providing a input field for each URL and a button to add more fields.
In the background nothing changes as we use some Javascript to extract the valus entered and fill in the original rtsp_stream value with the correct comma separated string

Updated server.py
To work with the recording filename changes so that the correct filename is stored in the DB

Updated update_birdnet_snippets.sh
To support a new setting RTSP_STREAM_TO_LIVESTREAM on the Spectrogram page and in the livestream service
2023-04-01 22:29:02 +10:00
ehpersonal38 a45018b473 making things more secure 2023-03-30 14:15:01 -04:00
ehpersonal38 61a67c517e Wrap CUSTOM_IMAGE_TITLE in quotes 2023-03-17 17:05:09 -04:00
ehpersonal38 f532e9cabe better Advanced Settings formatting and explanations 2023-03-15 13:57:24 -04:00
ehpersonal38 be70c54d68 Update advanced.php 2023-03-14 22:37:28 -04:00
ehpersonal38 ab67799958 CUSTOM_IMAGE fixes 2023-03-14 22:35:46 -04:00
ehpersonal38 4ec6b4ff31 Merge branch 'custom_image' of https://github.com/mcguirepr89/BirdNET-Pi into custom_image 2023-03-14 22:32:29 -04:00
ehpersonal38 9efc79f0b2 Initial CUSTOM_IMAGE commit 2023-03-14 22:30:59 -04:00
ehpersonal38 6638016546 Initial CUSTOM_IMAGE commit 2023-03-14 22:28:10 -04:00
ehpersonal38 6d6a09f2ff Clarifying how pitch shifting works 2023-03-07 18:09:26 -05:00
ehpersonal38 c5459a2283 Forgot to change this label 2023-03-06 16:33:14 -05:00
ehpersonal38 adefbadb5f Adding support to create minimalist raw spectrogram images 2023-03-06 16:26:29 -05:00
ehpersonal38 75bc9918ef issue #742 2023-02-17 20:06:56 -05:00
ehpersonal38 8491d216c4 Workaround for #276 2023-02-14 19:59:55 -05:00
Patrick McGuire f6a07cacdd typo 2022-12-16 06:06:43 -05:00
Patrick McGuire 5df0210df4 aplay -> arecord 2022-12-16 05:51:26 -05:00
Patrick McGuire 69481061ea Update advanced.php 2022-12-16 05:49:58 -05:00
lloydbayley 690d184f62 Update advanced.php
Fix spelling error
2022-11-07 22:30:15 +11:00
ehpersonal38 a26a5ec352 Update advanced.php 2022-10-03 10:49:43 -04:00
Louis Croisez b49f8f730d Bugfixes + added choice between ffmpeg and sox tools 2022-10-03 16:06:44 +02:00
Louis Croisez f3a183a158 Correction bug in freq shifting configuration 2022-10-02 19:18:36 +02:00
Louis Croisez 88a9b63458 Added config parameters for frequency shift feature 2022-10-02 19:05:54 +02:00
Patrick McGuire 6444ae3e44 Update advanced.php 2022-10-01 17:06:01 -04:00
ehpersonal38 29358943ba password obfuscation in advanced 2022-07-24 13:17:17 -04:00
ehpersonal38 6985f3ba3a Update advanced.php 2022-07-22 18:54:25 -04:00
ehpersonal38 e19c7c6ba3 silence update indicator 2022-06-30 16:28:52 -04:00
ehpersonal38 daf8469b42 "You cannot" styling 2022-06-11 09:54:29 -04:00
mcguirepr89 0ca75921ca more space for the URL and password 2022-06-02 08:19:25 -04:00
ehpersonal38 4088e505a5 Merge branch 'main' into ui-tweaks 2022-05-16 13:33:06 -04:00