Skip to content

Commit 58c9f67

Browse files
authored
Merge pull request #28 from SEPIA-Framework/dev
SEPIA-Home v2.6.2 release candidate
2 parents 98e8450 + c1d4a08 commit 58c9f67

40 files changed

+982
-182
lines changed

CHANGELOG.md

+74
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
## Release history and changelog
22

3+
### v2.6.2 - 2022.05.08
4+
5+
Updated client to v0.24.2:
6+
* Added virtual keyboard for DIY clients with touchscreen + 'virtualKeyboard' URL parameter
7+
* Remember media player volume and added option 'playerVolume' to settings file
8+
* Added support for remote media volume control with new slider component
9+
* Added volume control for Youtube player widget
10+
* Added Teach-UI basic command import/export + support for file drag & drop
11+
* Added new settings option for 'defaultNewsRegion' + append 'defaultNewsRegion' and 'appRegionCode' to assistant requests
12+
* New avatar 'Proto' + improved avatar code
13+
* New skins 'Blue Canary', 'Odyssey AI' and 'Vectors Reloaded' + style tweaks
14+
* New URL parameter 'skinId'
15+
* Improved 'awaitDialog' timer to reset properly and increased awaitDialog time from 15s to 20s
16+
* Added CLEXI GPIO events for audio 'eventEffectsOn' and 'eventEffectsOff' + fixed a bug in LED control
17+
* Fixed a shared remote-actions bug for 'play-on' music-cards
18+
* Fixed a bug in 'stt-socket-worker' to properly handle 'no-speech' events
19+
* Fixed a bug in microphone test function for invalid rms values
20+
* Updated Porcupine to v2.1 (replaced v2.0)
21+
* Added pages for Porcupine wake-word format conversion and activation restore ('xtensions' folder)
22+
* Improved settings import/export with new 'UI.showFileImportAndViewPopup' component
23+
* Improved storing and loading of app-settings from server (account-data)
24+
* Added 'environment' to settings file and read at start (if no URL parameter is given)
25+
* Improved login-retry timer
26+
* Updated web-audio lib to v0.9.11 with better pre-load cache and error handling
27+
* Updated CLEXI lib to v0.9.1 and implemented basic 'clexi.requestStateRefresh'
28+
* Improved iOS build script (still beta)
29+
* Smaller fixes and code tweaks (credits, dual-screen, onchange listeners, input events, etc.)
30+
31+
Updated Control-HUB (admin-tools) to v1.4.3:
32+
* Improved smart-home page with better UX for authentication data and tweaked some styles
33+
* Fixed some smaller bugs in new light skin
34+
* Improved code uploader to make use of new JSON response format and info
35+
* Improved login error handling
36+
* Updated CLEXI lib to v0.9.1 to support 'hasSubscription' feature
37+
38+
Updated Assist-server to v2.6.2:
39+
* New automatic-setup feature using YAML config file to define setup tasks, users and DNS + improved setup code (create random passwords, write log etc.)
40+
* Added a new TTS endpoint to support byte-range streaming audio-files (required by Apple devices and potantially faster for large files)
41+
* Added new settings option to switch between new streaming and old static TTS audio ('/tts/' and '/tts-stream/')
42+
* Added installer for 'txt2pho' TTS engine (German MBROLA only) + tweaked some voice speeds
43+
* Better checks for correct smart-home HUB authentication types + smaller smart-home interface tweaks
44+
* Added 'appRegionCode' and new 'defaultNewsRegion' to NluInput class (to be used in services)
45+
* Improved News service to support 'language' parameter (e.g.: "show me news in German") + 'defaultNewsRegion' and 'appRegionCode' to make news independant of user language
46+
* Added a 'region' parameter to news-outlets.json
47+
* Improved settings loader and 'getConfig' endpoint with new 'PropertiesReader' that will return ALL settings (properties file + defaults)
48+
* Streamlined SDK endpoint responses to return JSON format and added more useful info
49+
* Updated media-player widgets to support volume memory + volume control for Youtube (see client as well)
50+
* Replaced Porcupine v2.0 files with v2.1 but added a download script for old version (in case you need v2.0)
51+
* Fixed a bug in TTS settings.json that broke German Mary-TTS
52+
* Smaller fixes and code tweaks
53+
54+
Updated Core-tools to v2.2.11:
55+
* Added new 'appendLineToFile' and 'readYamlFile' to 'FilesAndStreams' class
56+
* Updated Jackson lib and added 'jackson-dataformat-yaml' dependency
57+
* Improved HTTP GET method 'Connectors.apacheHttpGETjson'
58+
* Added new property-file reader with caching
59+
* Added new 'Spark.streamFile' feature for byte-range requests (see new TTS features above)
60+
* Added new 'createRandomString' and 'shuffleString' methods to 'Security' class
61+
* Changed 'smart_speaker' string in 'ENVIRONMENTS' (we have both now 'smart_speaker' and just 'speaker')
62+
63+
Updated WebSocket Chat-Server to v1.3.4:
64+
* Updated eclipse.paho MQTT client to v1.2.5
65+
* Updated core-tools to v2.2.11
66+
67+
Updated Teach-Server to v2.2.4:
68+
* Updated core-tools to v2.2.11
69+
70+
Other servers, tools and common changes:
71+
* Improved SEPIA-Home install and run scripts, added an automatic-setup template and an option to create one single, external folder for user data (using symlinks)
72+
* Improved DIY client package with more Pulseaudio scripts e.g. for AEC (beta), more hardware scripts, better installation and run scripts etc.
73+
* Improved CLEXI to support WS281x and APA102 RGB LEDs via SPI bus (new GPIO item)
74+
* Updated SDK to support new SEPIA-Home v2.6.2
75+
* Improved Docker container with automatic-setup, extra user folder and simplified update (just pull new container)
76+
377
### v2.6.1 - 2022.01.30
478

579
Updated client to v0.24.1:

Dockerfile

+17-9
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ RUN echo 'Installing SEPIA-Home...' && \
2020
ntpdate nginx \
2121
espeak-ng espeak-ng-espeak libpopt0 && \
2222
#
23-
# Update time-sync - NOTE: not possible in Docker; will use host clock
24-
# sudo ntpdate -u ntp.ubuntu.com
23+
# Update time-sync - NOTE: not possible in Docker? will use host clock?
24+
# sudo timedatectl set-ntp true
2525
#
2626
# Clean up
2727
apt-get clean && apt-get autoclean && apt-get autoremove -y && \
@@ -45,7 +45,7 @@ USER admin
4545

4646
RUN echo "Downloading SEPIA-Home (custom bundle) ..." && \
4747
#
48-
# Make target and temporary folder (SEPIA should be in ~/SEPIA !!)
48+
# Make target and temporary folder (SEPIA should be in ~/SEPIA)
4949
mkdir -p ~/SEPIA/tmp && \
5050
cd ~/SEPIA/tmp && \
5151
#
@@ -63,7 +63,18 @@ RUN echo "Downloading SEPIA-Home (custom bundle) ..." && \
6363
bash setup.sh 7 && \
6464
#
6565
# Set up Nginx (HTTP)
66-
sudo cp nginx/sites-available/sepia-fw-http.conf /etc/nginx/sites-enabled/sepia-fw-http.conf
66+
sudo cp nginx/sites-available/sepia-fw-http.conf /etc/nginx/sites-enabled/sepia-fw-http.conf && \
67+
#
68+
# Prepare automatic-setup and user1
69+
cd automatic-setup && \
70+
cp template.yaml config.yaml && \
71+
sed -i 's/nickname: Testy/nickname: Boss/' config.yaml && \
72+
sed -i 's/email: test@sepia.localhost/email: user1@sepia.localhost/' config.yaml && \
73+
sed -i 's/password: test12345/password: <random>/' config.yaml && \
74+
touch docker-setup && cd .. && \
75+
#
76+
# Set up external data folder
77+
bash scripts/create-external-data-folder.sh -yu
6778
#
6879
# Optional, final modifications imported from build folder:
6980
# ADD *.sh /home/admin/SEPIA/
@@ -77,13 +88,10 @@ RUN echo "Downloading SEPIA-Home (custom bundle) ..." && \
7788
# Comment: https://www.elastic.co/guide/en/elasticsearch/reference/5.3/vm-max-map-count.html (the container will inherit this from the host)
7889
#
7990
# Set up SEPIA
80-
# NOTE: This has to be done (e.g. by sharing external config folder) before server can run without error
81-
# e.g.:
91+
# NOTE: If the file '$SEPIA_SHARE/setup/automatic-setup/docker-setup' exists the automatic setup will run
8292
# 0 - Create an EMPTY shared folder: SEPIA_SHARE=/home/[my-user]/sepia-home-share && mkdir -p $SEPIA_SHARE
8393
# 1 - Make a Docker volume out of it: docker volume create --opt type=none --opt device=$SEPIA_SHARE --opt o=bind sepia-home-share
84-
# 1 - Run container with terminal: docker run --rm --name=sepia_home -it -v sepia-home-share:/home/admin/SEPIA sepia/home:vX.X.X /bin/bash
85-
# 2 - Inside container finish setup: bash setup.sh (run at least setup steps 4 and 1)
86-
# 3 - Exit container and run as server: docker run --rm --name=sepia_home -p 20726:20726 -d -v sepia-home-share:/home/admin/SEPIA sepia/home:vX.X.X
94+
# 3 - Run the server: docker run --rm --name=sepia_home -p 20726:20726 -d -v sepia-home-share:/home/admin/sepia-home-data sepia/home:vX.X.X
8795
# ---------------------
8896

8997
# Start

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Installation without script (any platform):
3030
* The run-script will ping the servers to see if everything started as planned. You can repeat this test with test-cluster.bat/test-cluster.sh to make sure. If you see errors check sepia-*/log.out.
3131
* You should be able to reach the web-app of SEPIA via one of the URLs suggested at the end of the run-script, e.g.: http://localhost:20721/app/index.html (replace 'localhost' with the server IP if you are on a different machine).
3232
* Extend the now visible login-box to verify the hostname field. The hostname should point to your SEPIA server (e.g. localhost or an IP like 192.168.0.10).
33-
* For testing purposes (only!) you can use the admin-acount to log-in, by default the ID is "admin@sepia.localhost" or "uid1003" (don't use the "assistant" account). The password has been set during setup.
33+
* For testing purposes (only!) you can use the admin-acount to log-in, by default the ID is `admin@sepia.localhost` or `uid1003` (don't use the "assistant" account!). The password has been set during setup. Check out the 'next steps' section to learn how to create new users.
3434

3535
NOTE: Using the web-app via local network IPs (except 127.0.0.1 aka localhost) will limit the functionality of some features like the speech-recognition, geo-location and notifications due to security reasons (browser restriction, requires HTTPS to work).
3636
See the "Secure server" section below for further instructions on how to set up your own HTTPS web-server, BUT if you are just using your own local servers there is another solution that will work fine. You can add exceptions
@@ -41,7 +41,7 @@ to your browser as well :-) see [this guide](https://github.com/SEPIA-Framework/
4141
If your local tests worked well it is time to **create your own (non-admin) account**:
4242

4343
* To create new users ([detailed tutorial](https://github.com/SEPIA-Framework/sepia-docs/wiki/Create-and-Edit-Users)) use the SEPIA Control-HUB (aka tools page or admin-tools): http://localhost:20721/tools/index.html (registration via 'real' e-mail is possible in theory but not fully implemented in the clients right now).
44-
* Login to the Control-HUB using your admin account. By extending the login-box you can check if the right server for authentication is selected (very similar to the hostname above) it should look like this 'http://localhost:20721' or this 'http://192.168.0.10:20721' for example.
44+
* Login to the Control-HUB using your admin account (default username and email are `uid1003` and `admin@sepia.localhost`). By extending the login-box you can check if the right server for authentication is selected (very similar to the hostname above) it should look like this 'http://localhost:20721' or this 'http://192.168.0.10:20721' for example.
4545
* Open the menu (top-left) and go to the "User Management" page. Choose an email (can be fake, but a real address could come in handy later for password reset etc.) then press "put on whitelist", add a password and finally press "create". Note the message in the result-box indicating your new ID.
4646
* You should now be able to log-in with your new account (use the ID received during "create" or the email you chose).
4747

sepia-client-installation/rpi/README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
## Common Instructions
44

5-
Tested with Raspberry Pi OS Buster and Bullseye on RPi4 B 2GB and 4GB.
6-
Expected to work with RPi3 1GB and might even work with RPi Zero 512GB if wake-word is disabled.
5+
Tested with Raspberry Pi OS Buster (recommended) and Bullseye on RPi4 B 2GB and 4GB.
6+
Works on RPi3 1GB and maybe even on RPi Zero 512GB if wake-word and display are disabled.
77

88
### 1) Install Raspberry Pi OS Lite
99

@@ -31,17 +31,16 @@ Expected to work with RPi3 1GB and might even work with RPi Zero 512GB if wake-w
3131
Use `bash menu.sh` to choose a specific hardware installation script or run them manually. Here you'll find a few more tips:
3232

3333
* **USB microphone** and the audio jack for sound:
34-
* This script might be useful to set the correct default devices: `bash install_usb_mic.sh`
35-
* Alternatively try `sudo raspi-config` and check the audio settings
36-
* **Reboot** the system
34+
* `pulsemixer` should be enough to set up your devices.
35+
* Alternatively try `bash install_usb_mic.sh` and check the audio settings via `sudo raspi-config`
3736
* For **WM8960 microphone boards** like ReSpeaker (2 and 4 mic HAT), Waveshare Audio-HAT, Adafruit Voice Bonnet:
3837
* Install drivers: `bash install_respeaker_mic.sh`
39-
* Optionally run `bash update_respeaker_boot.sh` to deactivate the default RPi audio jack and HDMI (audio) if you don't use it
40-
* **Reboot** the system
38+
* **Reboot** the system and check settings via `pulsemixer`
4139
* For **Hyperpixel** touchscreen:
4240
* Install drivers: `curl https://get.pimoroni.com/hyperpixel4 | bash`
4341
* **Reboot** the system
4442
* If you have problems with the touchscreen (swapped axis etc.) run `bash update_hyperpixel4_boot.sh`
43+
* There are more hardware scripts available in the 'install' folder
4544
* Tweak for small displays to fix Chromium "bug" (use AFTER step "2a SEPIA Client Installation" is finished):
4645
* If your screen width is smaller than 500px, e.g. 480px (typical Hyperpixel width) you can use `bash adapt_to_small_screen.sh 20` to shift the screen by 20px
4746

sepia-client-installation/rpi/import_self_signed_SSL_cert.sh

+4
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ read -p "Press any key to import to '/usr/local/share/ca-certificates/' (CTRL+C
1616
sudo cp "downloads/$2.crt" "/usr/local/share/ca-certificates/$2.crt"
1717
echo "Updating ca-certificates ..."
1818
sudo update-ca-certificates
19+
#For Chromium import cert to NSSDB:
20+
#certutil -d "sql:$HOME/.pki/nssdb" -A -t "C,," -n "$1" -i "/usr/local/share/ca-certificates/$2.crt"
21+
echo "For Chromium import you might need to run:"
22+
echo "bash import_self_signed_SSL_to_Chromium.sh \"$1\" \"$2\""
1923
echo "DONE"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -e
3+
if [ "$#" -ne 2 ]; then
4+
echo "Usage: bash import_self_signed_SSL_to_Chromium.sh [host:port] [cert-name]"
5+
echo "Example: bash import_self_signed_SSL_to_Chromium.sh \"sepia-home.local:20726\" sepia-home"
6+
exit 1
7+
fi
8+
echo "Importing '/usr/local/share/ca-certificates/$2.crt' as '$1' into NSSDB"
9+
certutil -d "sql:$HOME/.pki/nssdb" -A -t "C,," -n "$1" -i "/usr/local/share/ca-certificates/$2.crt"
10+
echo "DONE"

sepia-client-installation/rpi/install_chromium_92_from_archive.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ mkdir -p chromium-deb-files
1010
cd chromium-deb-files
1111
PLATFORM=""
1212
VERSION=""
13-
if [ $(cat /etc/debian_version) -lt 11 ]; then
13+
IS_BUSTER=$(echo "$(cat /etc/debian_version)" | awk '{if ($1 < 11 && $1 >= 10) print "true"; else print "false"}')
14+
if [ "$IS_BUSTER" = "true" ]; then
1415
VERSION="92.0.4515.98~buster-rpt2"
1516
else
1617
VERSION="92.0.4515.98-rpt2"

sepia-client-installation/rpi/install_iqaudio_zero_hat.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ sudo apt-get install -y git
99
git clone https://github.com/iqaudio/Pi-Codec.git
1010
cd Pi-Codec
1111
sudo alsactl restore -f IQaudIO_Codec_OnboardMIC_record_and_SPK_playback.state
12-
DRIVER_FOLDER=$(pwd)
12+
#DRIVER_FOLDER=$(pwd)
1313
echo ""
1414
echo "Some notes:"
1515
echo ""
16-
echo "After setup (and reboot) check: raspi-config -> system options -> audio"
17-
echo ""
18-
echo "You might need to run 'pulsemixer' afterwards and change source setup (F3) to:"
19-
echo "Multichannel Duplex"
16+
echo "Run 'pulsemixer' afterwards and change source setup (F3) to:"
17+
echo "Multichannel Duplex (or your preferred settings)"
2018
echo ""
2119

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
echo "This script will install the Raspiaudio MIC+ HAT with on-board speakers."
3+
echo ""
4+
echo "NOTE: It will download and execute the official script via 'sudo'."
5+
echo ""
6+
read -p "Press any key to continue (or CTRL+C to abort)."
7+
echo ""
8+
sudo wget -O - mic.raspiaudio.com | sudo bash
9+
echo ""
10+
echo "Some notes:"
11+
echo ""
12+
echo "Volume of the mic seems to be very low at least on RPi OS Bullseye."
13+
echo "You might need to set a high gain value via client settings."
14+
echo ""
15+
echo "Run 'pulsemixer' afterwards and change source setup (F3) to:"
16+
echo "Multichannel Duplex"
17+
echo ""
18+

sepia-client-installation/rpi/install_respeaker_mic.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ echo "This script will install WM8960 boards like ReSpeaker (2 and 4 mic HAT), W
44
echo "Please follow the instructions precisely!"
55
echo "The installation may require you to reboot -> install 2nd time (after kernal updates) -> reboot again."
66
echo ""
7-
echo "You can use 'bash update_respeaker_boot.sh' to deactivate RPi's default audio jack and HDMI (audio)."
8-
echo "Depending on your setup you might need to edit ~/.asoundrc as well to set the correct defaults."
9-
echo ""
107
read -p "Press any key to continue (or CTRL+C to abort)."
118
echo ""
129
sudo apt-get update
@@ -23,10 +20,10 @@ echo ""
2320
echo "If you don't see any cards after first reboot (arecord -l) try:"
2421
echo "sudo service seeed-voicecard stop && sudo service seeed-voicecard start && arecord -l"
2522
echo ""
26-
echo "Then check: raspi-config -> system options -> audio (look for seeed or WM8960 etc.)"
23+
echo "Check out subfolder './pulseaudio' to configure 4mic linear and 6mic devices."
2724
echo ""
28-
echo "You might need to run 'pulsemixer' afterwards and change source setup (F3) to:"
29-
echo "Multichannel Duplex"
25+
echo "Run 'pulsemixer' afterwards and change source setup (F3) to:"
26+
echo "Multichannel Duplex (or your preferred settings)"
3027
echo ""
3128
echo "If that doesn't work try to run the setup once more and repeat the steps:"
3229
echo "cd $DRIVER_FOLDER && sudo ./install.sh"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
# check: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/tree/master/src/modules/echo-cancel for Parameters
3+
4+
# masters - use: 'pactl list short sources' and 'pactl list short sinks' to get names
5+
source_master=alsa_input.platform-soc_sound.multichannel-input
6+
sink_master=alsa_output.platform-soc_sound.multichannel-output
7+
8+
# names
9+
source_name=input.aec_source
10+
sink_name=output.aec_sink
11+
12+
# properties
13+
source_properties=device.description=$source_name
14+
sink_properties=device.description=$sink_name
15+
16+
# other options
17+
aec_method='speex'
18+
aec_args='"filter_size_ms=200 agc=0 denoise=0 dereverb=0 echo_suppress=1 echo_suppress_attenuation=0 echo_suppress_attenuation_active=0"'
19+
#note for speex: attenuation is negative db, filtering needs channels=1
20+
#note 2: on recording speex usually takes around 5s to calibrate ... each time!
21+
#aec_method='webrtc'
22+
#aec_args='"voice_detection=0 noise_suppression=1 analog_gain_control=0 digital_gain_control=0 high_pass_filter=1 drift_compensation=1 intelligibility_enhancer=1 extended_filter=0"'
23+
#aec_args='"mobile=1 routing_mode=loud-speakerphone comfort_noise=0"'
24+
#note for webrtc: remove channels and use master format if you want to experiment with beamforming
25+
#aec_method='null'
26+
#aec_args=
27+
28+
# more stuff to potentially improve performance:
29+
#if [ $(pactl list modules short | grep module-suspend-on-idle | wc -l) -gt 0 ]; then
30+
# pactl unload-module module-suspend-on-idle
31+
#fi
32+
33+
# load the module
34+
if [ $(pactl list modules short | grep module-echo-cancel | wc -l) -gt 0 ]; then
35+
pactl unload-module module-echo-cancel
36+
echo "Pulseaudio: unloaded old instance of 'module-echo-cancel'"
37+
fi
38+
pactl load-module module-echo-cancel \
39+
source_name=$source_name \
40+
source_master=$source_master \
41+
source_properties=$source_properties \
42+
sink_name=$sink_name sink_master=$sink_master \
43+
sink_properties=$sink_properties \
44+
rate=32000 \
45+
channels=1 \
46+
use_master_format=0 \
47+
aec_method=$aec_method \
48+
aec_args=$aec_args
49+
50+
pactl set-default-source $source_name
51+
pactl set-default-sink $sink_name

sepia-client-installation/rpi/pulseaudio/aec_respeaker_2mic_hat.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ aec_method='webrtc'
2121
aec_args='"voice_detection=0 noise_suppression=0 analog_gain_control=0 digital_gain_control=0 high_pass_filter=0"'
2222

2323
# load the module
24-
pactl unload-module module-echo-cancel
24+
if [ $(pactl list modules short | grep module-echo-cancel | wc -l) -gt 0 ]; then
25+
pactl unload-module module-echo-cancel
26+
echo "Pulseaudio: unloaded old instance of 'module-echo-cancel'"
27+
fi
2528
pactl load-module module-echo-cancel \
2629
source_name=$source_name \
2730
source_master=$source_master \

0 commit comments

Comments
 (0)