Skip to content

Commit 8554ed1

Browse files
authored
Merge pull request #17 from SEPIA-Framework/dev
Release candidate for SEPIA Home v2.5.1
2 parents 0196d85 + df336ad commit 8554ed1

21 files changed

+316
-34
lines changed

CHANGELOG.md

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

3+
### v2.5.1 - 2020.10.XX
4+
5+
Updated client to v0.23.0:
6+
* Added support for PWA (progressive web app) feature of browsers/OS via new basic service worker and PWA manifest file
7+
* Android 10 support aka set 'targetSdkVersion' to 29, updated Cordova to v9, android-platform plugin to v8.1.0 and several other plugins
8+
* Implemented context menu for every result card, e.g. radio/music-stream (+ playlist button, if available), news (read or copy), weather, etc.
9+
* Improved presentation of weather results and added more mini icons
10+
* Greatly extended capabilities of custom view frames with proper integration of microphone, new scoped functions (e.g. 'handleSpeechToTextInput') and secure loading from SEPIA client (folder available in Android as well) or server (SEPIA web-server folder)
11+
* New folders for HTML 'templates', 'custom-data' and 'local_data' + automatic file path expansion for the tags '<custom_data>/', '<local_data>/', '<app_data>/' (root folder), '<assist_server>/' (URL to SEPIA web-server), '<teach_server>/' and '<chat_server>/'
12+
* Added example custom view to new 'xtensions/custom-data/' folder
13+
* Support for new service-actions 'open_settings', 'frames_view_action', 'close_frames_view' and 'switch_stt_engine'
14+
* Support for new service-action 'custom_event' to trigger internal events that can e.g. be captured in the new custom view frames (works very well with SDK services)
15+
* Added new remote-action type 'sync' for remote my-view, list and time-event updates and implemented it to update timers instantly across active devices
16+
* Start and stop audio streams via new remote-action type 'audio_stream' + 'control' and changed data type 'music' to 'media'
17+
* Added functions to get and show user clients and to send remote-actions via WebSocket chat-server
18+
* Added 'connect', 'disconnect', 'wakeWordOn', 'wakeWordOff' and 'reload' to remote-action "hotkeys" (shortcuts: 'co', 'dc', 'ww', 'wm', 'F5')
19+
* Added request source check to some remote-actions to allow e.g. 'mic' or 'connect' only if source is "protected" (aka coming from 'sepia-chat-server' or 'clexi-remote' + clexi-ID)
20+
* Automatically mark open lists as out-of-date if any active client changes the data
21+
* New client event 'sepia_alarm_event' that will be broadcasted (to CLEXI) when an alarm is triggered/removed/stopped
22+
* New client event 'sepia-audio-player-event' that will inform about audio streams (start/stop/URL etc.)
23+
* Additional client events for 'sepia-account-error' and 'sepia-client-error' + 'sepia-state' event will now inform about 'connection' state (active, closed, etc.)
24+
* Increased maximal number of custom buttons from 16 to 42 and in addition load custom buttons that were stored via assistant user (this way admins can create buttons for all users at once)
25+
* Updated icon-set for custom command buttons and improved material-icons loading procedure
26+
* Improved login-restore procedure on app start and added automatic login-retry after connection or server error
27+
* Improved checks and handling of expired login tokens and prevent login-refresh try if client-ID was changed
28+
* Added settings button to login-box to quickly change device ID etc. before login
29+
* New touch-bar control style selectable via settings that uses only the bottom of the screen for swipe and automatically minimizes text input field (double-tap triggers back button)
30+
* New animations for speech input (speech-bubble-box 'processing')
31+
* Very basic dual-screen support (e.g. Surface-Duo, wip)
32+
* Added (very) basic big-screen mode to optionally remove size-limit of client window (settings)
33+
* Added 'deviceId' to all account related API calls
34+
* Interpret double-space as line-break in chat messages
35+
* Added support for automatic-actions to UI pop-up and used it to trigger several retry-button actions automatically after few seconds delay (e.g. after connection loss)
36+
* Fixed a bug that could sometimes crash the event queue after an empty speech result so that the client would not return to idle state
37+
* Fixed a bug in Android speech recognition that could crash the app when the service was not supported/activated
38+
* Added an auto-reset trigger if client is in 'loading' state for more than 45s and (if enabled) made sure that the wake-word listener will restart reliably
39+
* Added 'keywords' field to remote terminal cmd 'get wakeword'
40+
* Improved audio-player error handling
41+
* Made the client more secure by adding 'DOMPurify' library and better sanitizing injected HTML code in cards, actions and chat
42+
* Improved demo mode with new test actions (e.g. for 'open_frames_view' action via "action frame_1")
43+
* Added some more language codes to the experimental ASR settings
44+
* Improved audio recorder code + added ability to define custom sound for mic activation confirm and default recorder buffer length (hidden in "Hey SEPIA" settings page)
45+
* Added settings option to select avatar independently from skin, made possible by splitting CSS files for skin and avatar + added ability to load 'base' skins and avatars when adding new skins
46+
* New skins "flaming squirrel" and "flaming squirrel dark"
47+
* Added support for "alive-ping" messages from WebSocket chat-server
48+
* Send device info (device local-site etc.) to chat-server ('userOrDeviceInfo' via 'Client.sendOrRequestDataUpdate')
49+
* Added new smart-home room types to local device-site menu
50+
* Added support for 'userPreferredSearchEngine' and search-engine selector to settings
51+
* Added new 'Assistant.waitForOpportunitySayLocalTextAndRunAction' function to make it easier to trigger text + action etc. via custom views
52+
* Fixed an occasional render bug in chat (Chromium only)
53+
* Improved support for storage-access API (web-dev)
54+
* UI + UX improvements, better error messages, fixes and smaller improvements for very old browsers (e.g. IE11 and old Androids)
55+
56+
Updated Control-HUB (admin-tools) to v1.4.0:
57+
* Improved code-ui with new user custom-services manager to load, edit and delete previously uploaded services (source-code)
58+
* Improved code-ui to automatically select smart-service extension type when service file is opened
59+
* New user-roles editor UI (replaces old, error-prone input field)
60+
* Optimized CLEXI connection flow by using 'pingAndConnect' instead of just 'connect'
61+
* Added new CLEXI remote terminal 'set' command examples ('micReset', 'connect', 'disconnect') and tweaked log colors
62+
* Added button to client-connections page to show active clients via new 'getOwnClientConnections' chat-server endpoint
63+
* Added 'DOMPurify' library with new function 'sanitizeHtml' and applied it to code, tts and smart home page
64+
* Added statistics button to chat-server card in server overview page
65+
* New room types 'entrance' and 'attic' for smart-home page
66+
* Several smaller UI tweaks (e.g. for pop-up messages), updated material icons and improved icon loading
67+
* Added support for PWA (progressive web app) feature of browsers/OS via new basic service worker and PWA manifest file
68+
69+
Updated Assist-server to v2.5.1:
70+
* New news section 'maker' and new news outlets 'NY Times', 'The Guardian', '1E9', 'SPIEGEL Start' (replaces 'Bento'), 'Raspberry Pi' and 'SEPIA' + improved default selection for different sections
71+
* Added SDK endpoint 'get-services' to load a list of user installed services
72+
* Improved SDK service upload, store source code and load it via new '/get-service-source' endpoint
73+
* New 'EventsBroadcaster' class, adaptations to 'RemoteActionEndpoint' and new method 'sendRemoteAction' (ServiceBuilder) for services
74+
* New 'changeEvent' class and broadcaster to push e.g. user-data updates like changed lists and alarms directly to active clients
75+
* Added new "custom view demo" (Xtensions/WebContent/views/custom-view-demo.html)
76+
* Added new command 'frame_control' to create custom commands for custom view frames more easily
77+
* Allow parameter extraction in services via named-groups in 'setCustomTriggerRegX'
78+
* Added 'qwant' and 'ecosia' as default web search options and evaluate user preference (if given via client 'prefSearchEngine')
79+
* Fixed a nasty bug inside the string conversion method for optional parameters (could prevent runtime commands from working when custom JSON was used)
80+
* Renamed legacy service 'OpenDashboard' to 'SettingsService' and fixed it to open settings info page
81+
* Added new 'ActionBuilder' class to make usage in services easier + adjustments to handle changes in 'ACTIONS' class (core-tools)
82+
* Fixes and improvements for some NLU parameters and services (e.g. 'AlarmName', 'NewsSection', 'SportsTeam', 'OpenCustomLink') + slightly improved 'RssFeedReader'
83+
* New 'Room' parameter types 'entrance' and 'attic'
84+
* Fixed a bug in smart device type filter that could prevent automatic device loading from HUBs like 'FHEM' or 'openHAB'
85+
* Sanitized device loading procedure for internal smart home HUB to improve timing for larger lists of items
86+
* Automatically replace "/" at the end of smart home interface URLs to improve UX
87+
* Added new 'validUntil' field to authentication endpoint and improved error code for expired tokens
88+
* Added 'playlistURL' to card-data of each radio station if available
89+
* Added CORS support for static file hosting + 2 new config options for assist.[].properties: 'enable_cors' and 'enable_file_cors'
90+
* Updated Bundesliga service and teams for new season
91+
* Moved 'ThreadManager' to core tools and adjusted code
92+
* Changed threshold for failed login attempts from 3 to 5
93+
* Tweaked 'saveStatistics' method to introduce random delay of 0-1s to reduce multiple quasi-simultaneous requests to DB
94+
* Increased WebSocket maximal message size from 64 KB to 256 KB
95+
* Smaller fixes and improvements (as usual)
96+
97+
Updated WebSocket Chat-Server to v1.3.1:
98+
* Increased WebSocket maximal message size from 64 KB to 256 KB
99+
* Added "broadcast to all devices" feature to remote-action handler and allow client-to-client actions for devices with same user
100+
* Improved error messages for several handlers, e.g. 'SepiaAuthenticationHandler'
101+
* Added new 'ClientManager' class and related endpoint '/getOwnClientConnections' to get a list of active clients for a specific user-id
102+
* Added message data type 'ping' and new background service to test if a client is still alive and active (ClientPingRequestHandler)
103+
* Added new statistics and endpoint (basically identical to the other servers)
104+
* Added 'userOrDeviceInfo' to 'updateData' handler to obtain 'deviceLocalSite' and 'deviceGlobalLocation' info from client
105+
* Changed remote-action type 'music' to 'media'
106+
107+
Updated Teach-Server to v2.2.1:
108+
* Added 'frame_control' with examples and description to Teach-UI config ('common.js')
109+
* New 'getAllCustomAssistantCommands' endpoint to get commands that were defined via assistant user
110+
* Improved server statistics log
111+
* Minor tweaks and fixes, e.g. in teach-ui 'common.js'
112+
113+
Updated Core-tools to v2.2.7:
114+
* Moved 'ThreadManager' class from assist server to core tools, merged with old class and improved code
115+
* Added 'frame_control' command to 'CMD'
116+
* Cleaned up 'ACTIONS' class, fixed some legacy stuff and added 'button_custom_event', 'close_frames_view', 'frames_view_action' and 'switch_stt_engine'
117+
* Fixed and improved 'unescapeHTML' method (Converters)
118+
* Added CORS control method for static server files
119+
* Smaller fix to avoid 'user agent' issues with 'Connectors' class
120+
* Added 'node_red' name to 'CLIENTS' for future integrations
121+
* Improved error code handling for failed user-account login requests
122+
* Added "authentication time" statistics to 'BasicStatistics' class (for all servers)
123+
* Replaced old 'javax.xml.bind.DatatypeConverter' with 'org.apache.commons.codec.DecoderException' to resolve Java version conflicts
124+
* A few new methods, e.g. 'writeStringToFile' (FilesAndStreams) and 'getId' (UserDataList)
125+
126+
Other servers, tools and common changes:
127+
* Updated all servers to core-tools v2.2.7 and JUnit 14.3.1
128+
* Improvements to README files and more API docs (see API folder in sepia-docs repository)
129+
* Improved server scripts with: new embedded Java download links, extended backup procedure (added custom views), proxy test during server start ('test-cluster.sh' only)
130+
* Experimental Node.js support + Node-RED Nodes: https://github.com/SEPIA-Framework/sepia-node-js-client (check dev branch too)
131+
* In preparation: updated SDK, DIY client scripts and Docker containers
132+
3133
### v2.5.0 - 2020.06.06
4134

5135
Updated client to v0.22.0:

Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ RUN echo "Downloading SEPIA-Home (custom bundle) ..." && \
6262
# Set up Nginx (HTTP)
6363
sudo cp nginx/sites-available/sepia-fw-http.conf /etc/nginx/sites-enabled/sepia-fw-http.conf
6464
#
65+
# Optional, final modifications imported from build folder:
66+
# ADD *.sh /home/admin/SEPIA/
67+
# RUN cd ~/SEPIA && sudo find . -iname "*.sh" -exec chmod +x {} \;
68+
#
6569
# ---------------------
6670
# Please read: https://github.com/SEPIA-Framework/sepia-docs/wiki/SEPIA-inside-virtual-environments
6771
#
@@ -70,12 +74,13 @@ RUN echo "Downloading SEPIA-Home (custom bundle) ..." && \
7074
# Comment: https://www.elastic.co/guide/en/elasticsearch/reference/5.3/vm-max-map-count.html (the container will inherit this from the host)
7175
#
7276
# Set up SEPIA
73-
# Before you can run the server you first need to set up the database and core-accounts. Data will be stored in a shared folder, e.g.:
74-
# - Create an EMPTY shared folder: SEPIA_SHARE=/home/[my-user]/sepia-home-share && mkdir -p $SEPIA_SHARE
75-
# - Make a Docker volume out of it: docker volume create --opt type=none --opt device=$SEPIA_SHARE --opt o=bind sepia-home-share
76-
# - Run container with terminal: docker run --rm --name=sepia_home -it -v sepia-home-share:/home/admin/SEPIA sepia/home:vX.Y.Z /bin/bash
77-
# - Inside container finish setup: bash setup.sh (steps 4 and 1)
78-
# - Exit container and run server: docker run --rm --name=sepia_home -p 20726:20726 -it -v sepia-home-share:/home/admin/SEPIA sepia/home:vX.Y.Z
77+
# NOTE: This has to be done (e.g. by sharing external config folder) before server can run without error
78+
# e.g.:
79+
# 0 - Create an EMPTY shared folder: SEPIA_SHARE=/home/[my-user]/sepia-home-share && mkdir -p $SEPIA_SHARE
80+
# 1 - Make a Docker volume out of it: docker volume create --opt type=none --opt device=$SEPIA_SHARE --opt o=bind sepia-home-share
81+
# 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
82+
# 2 - Inside container finish setup: bash setup.sh (run at least setup steps 4 and 1)
83+
# 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
7984
# ---------------------
8085

8186
# Start

sepia-client-installation/rpi/README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ network={
3939

4040
### 4) Configure the Client via Remote Connection
4141

42-
* Continue the setup in your [SEPIA Control HUB](https://github.com/SEPIA-Framework/sepia-admin-tools/tree/master/admin-web-tools) by opening the 'client connections' page
42+
* Continue the setup in your [SEPIA Control HUB](https://github.com/SEPIA-Framework/sepia-admin-tools/tree/master/admin-web-tools) by opening the 'client connections' page. Make sure to use the HTTP address (not HTTPS) to avoid mixed-content errors due to the 'ws://' URL below!
4343
* The CLEXI server of your newly installed SEPIA Client should be reachable at `ws://[rpi-IP]:9090/clexi` (via Nginx proxy)
4444
* Enter your CLEXI-ID from the previous step (or use the default) and press the 'CONNECT' button. The remote terminal window at the bottom will show the status of the connection.
4545
* By default your headless client will start the 'setup mode'. This might take a while, depending on your RPi model. You should hear the audio message "ready for setup" at some point
@@ -105,3 +105,16 @@ Tested with: Raspian Buster, RPi4
105105
* If you have problems with the touchscreen (swapped axis etc.) run `bash update_hyperpixel4_boot.sh`
106106
* 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 (chromium bug)
107107
* Continue with the step 'SEPIA Client Setup' of the common instruction above or configure system via display/touchscreen
108+
109+
## Basic uninstallation steps
110+
111+
There is no uninstall script yet and some things will depend on your specific installation variant. The easiest way is to simply reinstall the OS but here are roughly the required steps:
112+
* Open the folder `~/sepia-client` and run `shutdown.sh`
113+
* Delete folder `~/sepia-client`
114+
* Delete folder `~/clexi`
115+
* Delete folder `~/.config/openbox` and remove 'openbox' via `sudo apt-get remove openbox`
116+
* Remove Chromium via `sudo apt-get remove chromium-browser`
117+
* Open `~/.bashrc` and remove the SEPIA entry below '# Run SEPIA-Client on login?'
118+
* Delete, check or adjust your ALSA config `~/.asoundrc` prüfen oder entfernen
119+
120+
Whats left are packages like Node.js, Xserver and hardware related stuff (if you've installed a touchscreen or microphone etc.).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=Sets up gpio-poweroff to handle Hyperpixel backlight upon shutdown/reboot
3+
ConditionPathExists=/usr/bin/hyperpixel4-init
4+
ConditionPathExists=/boot/overlays/gpio-poweroff.dtbo
5+
ConditionPathExists=/usr/bin/dtoverlay
6+
DefaultDependencies=no
7+
Before=umount.target
8+
9+
[Service]
10+
Type=oneshot
11+
ExecStart=/bin/sh -c '/sbin/rmmod gpio-backlight;/usr/bin/dtoverlay /boot/overlays/gpio-poweroff.dtbo gpiopin=19 active_low=1'
12+
13+
[Install]
14+
WantedBy=reboot.target halt.target poweroff.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Stop Chromium
4+
is_chromium_running=0
5+
case "$(ps aux | grep chromium-browser)" in *"sepia-client"*) is_chromium_running=1;; *) is_chromium_running=0;; esac
6+
if [ "$is_chromium_running" -eq "1" ]; then
7+
echo "Stopping Chromium with SEPIA"
8+
#kill $(ps aux | grep "[c]hromium-browser .*sepia-client" | awk '{print $2}')
9+
kill $(ps aux | grep "[c]hromium-browser.*sepia-client.*index.html" | awk '{print $2}')
10+
sleep 2
11+
else
12+
echo "It seems no Chromium with SEPIA was running"
13+
fi
14+
15+
# Stop Xvfb
16+
is_xvfb_running=0
17+
case "$(ps aux | grep Xvfb)" in *"Xvfb :2072"*) is_xvfb_running=1;; *) is_xvfb_running=0;; esac
18+
if [ "$is_xvfb_running" -eq "1" ]; then
19+
echo "Stopping Xvfb server"
20+
kill $(ps aux | grep '[X]vfb :2072' | awk '{print $2}')
21+
sleep 2
22+
else
23+
echo "It seems no Xvfb server was running"
24+
fi
25+
26+
# Stop CLEXI
27+
is_clexi_running=0
28+
case "$(ps aux | grep clexi)" in *clexi-server.js*) is_clexi_running=1;; *) is_clexi_running=0;; esac
29+
if [ "$is_clexi_running" -eq "1" ]; then
30+
echo "Stopping CLEXI server"
31+
pkill -f "clexi-server.js"
32+
else
33+
echo "It seems no CLEXI server was running"
34+
fi
35+
36+
echo ""
37+
echo "DONE."

0 commit comments

Comments
 (0)