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

Release 2.5 #2030

Merged
merged 82 commits into from
Dec 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
cf57396
Updated Python versions to use for CI (#1933)
s-martin Dec 23, 2022
d2acaad
Update README.md
Dec 30, 2022
800b06f
Create php.yml (#1823)
s-martin Dec 30, 2022
439fbd0
add badge for PHP CI (#1947)
s-martin Dec 30, 2022
815e7f1
Phoniebox Calendar 2023
MiczFlor Jan 2, 2023
750ab70
Including new calendar 2023
MiczFlor Jan 2, 2023
cdf0d4a
Cal 2023 new colors
MiczFlor Jan 2, 2023
33b7173
Delete 2023-Phoniebox-Calendar.jpg
MiczFlor Jan 2, 2023
4812b81
Cal 2023 new colours
MiczFlor Jan 2, 2023
0416d48
Update README.md
MiczFlor Jan 2, 2023
6dfeb55
Update README.md
MiczFlor Jan 2, 2023
39a2f0f
Remove Gmusic (#1939)
s-martin Jan 21, 2023
701bee8
Delete scripts/python-phoniebox directory (#1935)
s-martin Jan 21, 2023
46d5d0d
Clarify when to open an issue or a discussion (#1961)
s-martin Jan 24, 2023
58abfc6
Bump phpunit/phpunit from 9.5.27 to 9.5.28 (#1965)
dependabot[bot] Feb 1, 2023
f4cd4e4
Fix Pirate Audio Button Volume Up (#1975)
s-martin Feb 26, 2023
10181b1
Bump phpunit/phpunit from 9.5.28 to 9.6.4 (#1976)
dependabot[bot] Mar 2, 2023
cc6cc64
add patch for serializable (#1953)
s-martin Mar 2, 2023
b854286
Use existing actions for Docker GitHub Action (#1980)
s-martin Mar 4, 2023
29edd74
removed "is set" check (#1967) (#1968)
AlvinSchiller Mar 10, 2023
927520c
Fix docs for 2.x (#1949)
s-martin Mar 12, 2023
3bebe59
Close devices (#1985)
s-martin Mar 12, 2023
b943248
Added check for state in shutdown button handler (#1984)
topas-rec Mar 12, 2023
70b0bc5
Feature "sync shared" (#1978)
AlvinSchiller Mar 12, 2023
ac17907
Update CODEOWNERS
s-martin Mar 12, 2023
7de55e1
Delete stretch install scripts (#1936)
s-martin Mar 12, 2023
ca75406
Add bullseye Dockerfile (#1986)
s-martin Mar 12, 2023
3901c69
Test files not used anymore (#1988)
s-martin Mar 16, 2023
61e2bde
added python 3.10 to version matrix (#1996)
AlvinSchiller Mar 19, 2023
3e9fc25
new python dependecies added (#1990)
AlvinSchiller Mar 26, 2023
c8cfa17
Bump phpunit/phpunit from 9.6.4 to 9.6.6 (#2004)
dependabot[bot] Apr 2, 2023
0350d07
Bump php-mock/php-mock-phpunit from 2.6.1 to 2.7.1 (#2005)
dependabot[bot] Apr 2, 2023
1314d39
Add armv7 Docker test (#1992)
s-martin Apr 3, 2023
5a416c2
Improve the docs
s-martin Apr 28, 2023
34121a2
Improve docs
s-martin Apr 29, 2023
f97f945
Added links to discussions
s-martin Apr 29, 2023
247d03f
Fix #1848 (#2017)
s-martin May 1, 2023
6025bfa
Bump phpunit/phpunit from 9.6.6 to 9.6.7 (#2021)
dependabot[bot] May 2, 2023
7e785e9
Add docker
s-martin May 2, 2023
af98361
set indent_size of 2 for js and yaml files (#2027)
AlvinSchiller May 5, 2023
bdb4de8
add Coverage action (#2032)
s-martin May 10, 2023
6aef729
Add coverage badge
s-martin May 10, 2023
a0325c4
Bump phpunit/phpunit from 9.6.7 to 9.6.8 (#2037)
dependabot[bot] Jun 2, 2023
e7a8bf9
Bump docker/setup-qemu-action from 2.1.0 to 2.2.0 (#2043)
dependabot[bot] Jul 2, 2023
6102d3d
Bump docker/setup-buildx-action from 2.5.0 to 2.8.0 (#2042)
dependabot[bot] Jul 2, 2023
339e836
Bump phpunit/phpunit from 9.6.8 to 9.6.9 (#2045)
dependabot[bot] Jul 2, 2023
7f086ef
Bump php-mock/php-mock-phpunit from 2.7.1 to 2.7.2 (#2044)
dependabot[bot] Jul 2, 2023
0bb3833
Bump docker/setup-buildx-action from 2.8.0 to 2.9.1 (#2052)
dependabot[bot] Aug 17, 2023
83afd65
Bump docker/setup-buildx-action from 2.9.1 to 2.10.0 (#2062)
dependabot[bot] Sep 1, 2023
015897e
Bump phpunit/phpunit from 9.6.9 to 9.6.11 (#2061)
dependabot[bot] Sep 1, 2023
52f30de
Make test gpio control work again (#2034)
topas-rec Sep 2, 2023
fabe48e
Bump mopidy-iris from 3.54.2 to 3.68.0 (#2060)
dependabot[bot] Sep 2, 2023
6ef0c24
Bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#2069)
dependabot[bot] Oct 1, 2023
5a350a1
Bump actions/checkout from 3 to 4 (#2072)
dependabot[bot] Oct 1, 2023
aef2dc3
Bump docker/build-push-action from 4 to 5 (#2071)
dependabot[bot] Oct 1, 2023
442e17c
Bump phpunit/phpunit from 9.6.11 to 9.6.13 (#2068)
dependabot[bot] Oct 1, 2023
a003088
Bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#2070)
dependabot[bot] Oct 1, 2023
7253971
Abort installation if user is not "pi" (#2076)
AlvinSchiller Oct 10, 2023
0079ff6
Fixes rc-522, see also #2075 (#2078)
s-martin Oct 10, 2023
61962f9
fix some warnings (#2081)
s-martin Oct 18, 2023
597d6ee
Unified Test runs in Docker (#2082)
AlvinSchiller Oct 20, 2023
da59be5
Update Status Badge (#2083)
AlvinSchiller Oct 20, 2023
58b3b13
Bump mopidy-iris from 3.68.0 to 3.69.2 (#2088)
dependabot[bot] Nov 3, 2023
7c06608
Bump php-mock/php-mock-phpunit from 2.7.2 to 2.8.0 (#2089)
dependabot[bot] Nov 3, 2023
c568882
Merge Autohotspot setup into main install script (#2086)
AlvinSchiller Nov 4, 2023
38a02f6
add autohotspot config checks (#2091)
AlvinSchiller Nov 5, 2023
093cc61
Make changes for Raspberry Pi OS Bookworm (#2084)
s-martin Nov 8, 2023
0457616
Update Documentation (#2008)
AlvinSchiller Nov 8, 2023
f610e5e
Further Optimizations (#2092)
AlvinSchiller Nov 9, 2023
54ee74d
rename install script to "install-jukebox.sh" (#2110)
AlvinSchiller Nov 14, 2023
332b239
Fixing paths to future3 docs
s-martin Nov 25, 2023
2b03969
Bump coverallsapp/github-action from 1 to 2 (#2129)
dependabot[bot] Dec 1, 2023
51ad2a5
Bump phpunit/phpunit from 9.6.13 to 9.6.15 (#2130)
dependabot[bot] Dec 1, 2023
465d158
Bump php-mock/php-mock-phpunit from 2.8.0 to 2.9.0 (#2131)
dependabot[bot] Dec 1, 2023
4a190f2
Bookworm Web Interface 403 (#2128)
AlvinSchiller Dec 2, 2023
b9f5028
feat: add stop/shutdown by rfid after 120,180,240min (#2134)
t0b3 Dec 4, 2023
fbcfd89
Update README.md
s-martin Dec 4, 2023
c1ef80a
Update for v3 releases
AlvinSchiller Dec 12, 2023
c9254cf
Update for v2 releases
AlvinSchiller Dec 12, 2023
b3d1374
add workflow for release automation (#2171)
AlvinSchiller Dec 20, 2023
588cc5d
Updates for next release (#2175)
AlvinSchiller Dec 21, 2023
ecca988
Update version-number for next release 2.5.0
AlvinSchiller Dec 21, 2023
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
Prev Previous commit
Next Next commit
Merge Autohotspot setup into main install script (#2086)
* merge autohotspot setup into main install script

* added autohotspot config step

* fix intendation

* fix tests

* add "iw" to needed packages.
Update docker packages

* refactored into sample confs.
disable autohotspot service if not selected.
remove old docs

* use crontab command.
reactivate disable powermanagment.
update comments.
remove obsolete files and calls.

* hamonized function calls

* only copy original file if not already present.

even with multiple invocation we want to keep the first original file.
Delete autohotspot service in helperscript

* update CODEOWNERS

* remove changes for autohotspot if not selected

* ignore output on service check

* fixes for "clear autohotspot configurations"

* added test for autohotsppt installation

* fix intendation

* check for activated wifi device

* moved autohotspot installation to separate script

moved autohotspot.sh to sampleconfig

* fix remove crontab entry

* unified: dont remove autohotspot configuration

* fix refactored device / ssid check logic

on boot or after unblock of wifi the device can give additional errorcodes (-11)
this caused incorrectly a hotspot start

* fix conf file copy handling on multiple invocation

* update docs

* refactored duplications

* fix for deactivated wifi on startup

also check for hard blocked wifi

* add --force-hotspot option for easier testing

* update script with changes from original source

* extend service handling durin installation

* some clean up

* fix var checks

* update docs

* update docs
AlvinSchiller authored Nov 4, 2023
commit c56888279883eeaac500ea8d6a0376f8391657b4
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/components/controls/buttons_usb_encoder/ @jeripeierSBB
/components/synchronisation/sync-shared @AlvinSchiller
/scripts/installscripts/buster-install-default.sh @jeripeierSBB
/scripts/installscripts/buster-install-default-with-autohotspot.sh @jeripeierSBB
/scripts/helperscripts/setup_autohotspot.sh @Groovylein
3 changes: 2 additions & 1 deletion ci/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -20,12 +20,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install \
alsa-utils \
build-essential \
git \
iw \
locales \
sudo \
systemd \
wireless-tools \
wget \
wpasupplicant \
# install internally used packages here to speed up GitHub Action
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@ After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/autohotspot
ExecStart=%AUTOHOTSPOT_SCRIPT%
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
219 changes: 219 additions & 0 deletions misc/sampleconfigs/autohotspot.sh.stretch-default2-Hotspot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
#!/bin/bash
#version 0.962-N/HS

#You may share this script on the condition all references to RaspberryConnect.com
#must be included in copies or derivatives of this script.

#A script to switch between a wifi network and a non internet routed Hotspot
#Works at startup or with a seperate timer or manually without a reboot
#Other setup required find out more at
#http://www.raspberryconnect.com

#Additions where made for the Phoniebox project
#https://github.com/MiczFlor/RPi-Jukebox-RFID

if [ $# -gt 0 ] ; then
if [ $# -eq 1 ] && [ "$1" == "--force-hotspot" ]; then
FORCE_HOTSPOT=1
else
echo "ignoring unrecognized parameter: $*"
fi
fi

NO_SSID='NoSSid'
ssidChk="$NO_SSID"

wifidev="wlan0" #device name to use. Default is wlan0.
#use the command: iw dev ,to see wifi interface name

IFSdef=$IFS
cnt=0
#These four lines capture the wifi networks the RPi is setup to use
wpassid=$(awk '/ssid="/{ print $0 }' /etc/wpa_supplicant/wpa_supplicant.conf | awk -F'ssid=' '{ print $2 }' | sed 's/\r//g'| awk 'BEGIN{ORS=","} {print}' | sed 's/\"/''/g' | sed 's/,$//')
IFS=","
ssids=($wpassid)
IFS=$IFSdef #reset back to defaults


#Note:If you only want to check for certain SSIDs
#Remove the # in in front of ssids=('mySSID1'.... below and put a # infront of all four lines above
# separated by a space, eg ('mySSID1' 'mySSID2')
#ssids=('mySSID1' 'mySSID2' 'mySSID3')

#Enter the Routers Mac Addresses for hidden SSIDs, seperated by spaces ie
#( '11:22:33:44:55:66' 'aa:bb:cc:dd:ee:ff' )
mac=()

ssidsmac=("${ssids[@]}" "${mac[@]}") #combines ssid and MAC for checking

CreateAdHocNetwork()
{
echo "Creating Hotspot"
ip link set dev "$wifidev" down
ip a add %AUTOHOTSPOT_IP%/24 brd + dev "$wifidev"
ip link set dev "$wifidev" up
dhcpcd -k "$wifidev" >/dev/null 2>&1
systemctl start dnsmasq
systemctl start hostapd
}

KillHotspot()
{
echo "Shutting Down Hotspot"
ip link set dev "$wifidev" down
systemctl stop hostapd
systemctl stop dnsmasq
ip addr flush dev "$wifidev"
ip link set dev "$wifidev" up
dhcpcd -n "$wifidev" >/dev/null 2>&1
}

CheckWifiUp()
{
echo "Checking WiFi connection ok"
sleep 20 #give time for connection to be completed to router
if ! wpa_cli -i "$wifidev" status | grep 'ip_address' >/dev/null 2>&1
then #Failed to connect to wifi (check your wifi settings, password etc)
echo 'Wifi failed to connect, falling back to Hotspot.'
wpa_cli terminate "$wifidev" >/dev/null 2>&1
CreateAdHocNetwork
fi
}

InitWPA() {
wpa_supplicant -B -i "$wifidev" -c /etc/wpa_supplicant/wpa_supplicant.conf >/dev/null 2>&1
}

CheckServices()
{
#After some system updates hostapd gets masked using Raspbian Buster, and above. This checks and fixes
#the issue and also checks dnsmasq is ok so the hotspot can be generated.
#Check Hostapd is unmasked and disabled
if (systemctl -all list-unit-files hostapd.service | grep "hostapd.service masked") >/dev/null 2>&1 ;then
systemctl unmask hostapd.service >/dev/null 2>&1
fi
if (systemctl -all list-unit-files hostapd.service | grep "hostapd.service enabled") >/dev/null 2>&1 ;then
systemctl disable hostapd.service >/dev/null 2>&1
systemctl stop hostapd >/dev/null 2>&1
fi
#Check dnsmasq is disabled
if (systemctl -all list-unit-files dnsmasq.service | grep "dnsmasq.service masked") >/dev/null 2>&1 ;then
systemctl unmask dnsmasq >/dev/null 2>&1
fi
if (systemctl -all list-unit-files dnsmasq.service | grep "dnsmasq.service enabled") >/dev/null 2>&1 ;then
systemctl disable dnsmasq >/dev/null 2>&1
systemctl stop dnsmasq >/dev/null 2>&1
fi
}

CheckDevice()
{
local j=0
while [ true ] #wait for wifi if busy, usb wifi is slower.
do
echo "Device availability check: try $j"
if [ $j -ge 5 ]; then
#if no wifi device,ie usb wifi removed, activate wifi so when it is
#reconnected wifi to a router will be available
echo "No wifi device connected"
InitWPA
exit 1
elif (iw dev "$wifidev" info 2>&1 >/dev/null) ; then
echo "wifi device available"
if (rfkill list wifi -rno HARD,SOFT | grep -i "unblocked.*unblocked") >/dev/null 2>&1 ; then
local wifidev_up=$(ip link show "$wifidev" up)
if [ -z "$wifidev_up" ]; then
echo "wifi is down. setting up"
ip link set dev "$wifidev" up
sleep 2
fi
return
else
echo "wifi is deactivated"
exit 0
fi
else
j=$((j + 1))
sleep 2
fi
done
}

FindSSID()
{
if [ -n "$FORCE_HOTSPOT" ]; then return; fi

#Check to see what SSID's and MAC addresses are in range
local i=0; j=0
while [ $i -eq 0 ]
do
scanreply=$(iw dev "$wifidev" scan ap-force 2>&1)
ssidreply=$(echo "$scanreply" | egrep "^BSS|SSID:")
echo "SSID availability check: try $j"
if [ $j -ge 5 ]; then
ssidreply=""
i=1
elif [ -z "$ssidreply" ] ; then
echo "Error scan SSID's: $scanreply"
j=$((j + 1))
sleep 2
else
echo "SSID's in range:"
echo "$ssidreply"
i=1
fi
done

for ssid in "${ssidsmac[@]}"
do
if (echo "$ssidreply" | grep "$ssid") >/dev/null 2>&1
then
#Valid SSid found, passing to script
echo "Valid SSID Detected, assesing Wifi status"
ssidChk=$ssid
return 0
fi
done
}

CheckSSID()
{
#Create Hotspot or connect to valid wifi networks
if [ "$ssidChk" != "$NO_SSID" ]
then
if systemctl status hostapd | grep "(running)" >/dev/null 2>&1
then #hotspot running and ssid in range
KillHotspot
echo "Hotspot Deactivated, Bringing Wifi Up"
InitWPA
CheckWifiUp
elif { wpa_cli -i "$wifidev" status | grep 'ip_address'; } >/dev/null 2>&1
then #Already connected
echo "Wifi already connected to a network"
else #ssid exists and no hotspot running connect to wifi network
echo "Connecting to the WiFi Network"
InitWPA
CheckWifiUp
fi
else #ssid or MAC address not in range
if systemctl status hostapd | grep "(running)" >/dev/null 2>&1
then
echo "Hostspot already active"
elif { wpa_cli status | grep "$wifidev"; } >/dev/null 2>&1
then
echo "Cleaning wifi files and Activating Hotspot"
wpa_cli terminate >/dev/null 2>&1
ip addr flush "$wifidev"
ip link set dev "$wifidev" down
rm -r /var/run/wpa_supplicant >/dev/null 2>&1
CreateAdHocNetwork
else #"No SSID, activating Hotspot"
CreateAdHocNetwork
fi
fi
}

CheckServices
CheckDevice
FindSSID
CheckSSID
Loading