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

Enabling automatic update of location with GPS (via gpsd service) #42

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
730e053
First commit for location autoupdate (via gpsd) - !experimental!
Kytutr Apr 24, 2024
13061fb
Merge pull request #1 from Kytutr/experimental_gpsd_integration
Kytutr Apr 24, 2024
7ae2231
Adjusting installation scripts to my fork
Apr 25, 2024
60d21a0
Merge pull request #2 from Kytutr/adjusting_installation
Kytutr Apr 25, 2024
60724e0
Fixing BASE_URL for TL_WHL installation
Apr 25, 2024
ab4a5b3
Adjusting/fixig installation and update
Apr 25, 2024
d049839
Adding info to the README
Kytutr Apr 25, 2024
27a1148
Adding ommited [
Kytutr Apr 25, 2024
3d85ca8
Merge pull request #3 from Kytutr/adjustments_for_installation
Kytutr Apr 25, 2024
238fd74
Merge branch 'main' into location_autoupdate
Kytutr Apr 25, 2024
061ba7a
Merge pull request #4 from Kytutr/location_autoupdate
Kytutr Apr 25, 2024
46c74b4
Keeping links as they are
Kytutr Apr 25, 2024
f2e36a8
Well, let's not change too much
Kytutr Apr 25, 2024
2e9f0bf
Keeping links as they are
Kytutr Apr 25, 2024
21867a3
Keeping links as they are
Kytutr Apr 25, 2024
e267fec
Fixing updating location_autoupdate service
Kytutr Apr 25, 2024
414b3d4
Fixing updating location_autoupdate service
Kytutr Apr 25, 2024
b3c19b1
Fixing updating location_autoupdate service
Kytutr Apr 25, 2024
0d3e92a
Fixing updating location_autoupdate service - last commit for this, I…
Kytutr Apr 25, 2024
694a084
Just getting all needed fixes for update scripts
Kytutr Apr 25, 2024
04f6f5f
And one more small fix for update_birdnet_snippes.sh
Kytutr Apr 25, 2024
3af07ed
Fixing updating location_autoupdate service - one more last commit
Kytutr Apr 25, 2024
90237f4
Fixing updating location_autoupdate service - one more last commit
Kytutr Apr 25, 2024
0e6d0bd
Fixing updating location_autoupdate service - taking care about Pytho…
Kytutr Apr 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions homepage/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ function copyOutput(elem) {
'sudo systemctl restart spectrogram_viewer.service',
'sudo systemctl disable --now spectrogram_viewer.service',
'sudo systemctl enable --now spectrogram_viewer.service',
'sudo systemctl stop location_autoupdate.service',
'sudo systemctl restart location_autoupdate.service',
'sudo systemctl disable --now location_autoupdate.service',
'sudo systemctl enable --now location_autoupdate.service',
'sudo systemctl enable '.get_service_mount_name().' && sudo reboot',
'sudo systemctl disable '.get_service_mount_name().' && sudo reboot',
'stop_core_services.sh',
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ EOF
systemctl enable birdnet_analysis.service
}

install_location_autoupdate() {
install_location_autoupdate_service() {
cat << EOF > $HOME/BirdNET-Pi/templates/location_autoupdate.service
[Unit]
Description=The gpsd based location autoupdate for BirdNET
Expand All @@ -69,7 +69,6 @@ ExecStart=$PYTHON_VIRTUAL_ENV /usr/local/bin/location_autoupdate.py
WantedBy=multi-user.target
EOF
ln -sf $HOME/BirdNET-Pi/templates/location_autoupdate.service /usr/lib/systemd/system
systemctl enable location_autoupdate.service
}

create_necessary_dirs() {
Expand Down Expand Up @@ -436,6 +435,7 @@ install_services() {
install_cleanup_cron
install_weekly_cron
increase_caddy_timeout
install_location_autoupdate_service # But does not enable, as it's experimental feature

create_necessary_dirs
generate_BirdDB
Expand Down
6 changes: 6 additions & 0 deletions scripts/update_birdnet_snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ if ! [ -L /etc/avahi/services/http.service ];then
systemctl restart avahi-daemon.service
fi

# Add location autoupdate service if it ain't there
if ! [ -L /usr/lib/systemd/system/location_autoupdate.service ];then
# symbolic link does not work here, so just copy
ln -sf $HOME/BirdNET-Pi/templates/location_autoupdate.service /usr/lib/systemd/system
fi

if [ -L /usr/local/bin/analyze.py ];then
rm -f /usr/local/bin/analyze.py
fi
Expand Down