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

DietPi-Software | Google Assistant SDK and AIY kit. #1065

Closed
R1CH-T opened this issue Jul 9, 2017 · 48 comments
Closed

DietPi-Software | Google Assistant SDK and AIY kit. #1065

R1CH-T opened this issue Jul 9, 2017 · 48 comments
Assignees
Milestone

Comments

@R1CH-T
Copy link

R1CH-T commented Jul 9, 2017

Hey Dan,

A while back, I received one of those funky, DIY, cardboard Google assistants from the MagPi:
https://aiyprojects.withgoogle.com/voice/

I decided to have a go at adding this functionality to DietPi, by adding two new installation options to DietPi-Software: One for the standard Assistant SDK and one for the AIY kit.

For each of these options, I have tried to implement the instructions from each of the following sites, respectively:

SDK: https://developers.google.com/assistant/sdk/prototype/getting-started-pi-python/run-sample

AIY Kit: https://github.com/google/aiyprojects-raspbian/blob/master/HACKING.md#setting-up-the-image

Could you please take a look at my attempt at this in the link below and let me know if I have done it correctly. I will have a go at testing this soon, but I wanted you to take a look first; this is my first attempt at doing this sort of thing myself.

R1CH-T@b5b8f1c

Thanks, Rich.

P.S. Do you have one of the AIY Kits, yet?

@R1CH-T R1CH-T changed the title Google Assistant SDK and AIY kit. DietPi-Software | Google Assistant SDK and AIY kit. Jul 9, 2017
@R1CH-T
Copy link
Author

R1CH-T commented Jul 9, 2017

I haven't tested the SDK installer yet, but I've gotten the installer for the AIY kit to work, by adding these to dietpi-software:

Added to the end of the:

aSOFTWARE_CATEGORIES_DIETPI=(

"────Voice Control─────────────────────────────────────────" #20

Just after the section:

#Printing

		#Voice Control
		#--------------------------------------------------------------------------------
		index_current=154

				 aSOFTWARE_WHIP_NAME[$index_current]='Google Assistant SDK'
				 aSOFTWARE_WHIP_DESC[$index_current]='Google Assistant SDK for any device'
			aSOFTWARE_CATEGORY_INDEX[$index_current]=20
					  aSOFTWARE_TYPE[$index_current]=0
			 aSOFTWARE_ONLINEDOC_URL[$index_current]='???????'
				aSOFTWARE_REQUIRES_ALSA[$index_current]=1
					
		#------------------
		index_current=155

				 aSOFTWARE_WHIP_NAME[$index_current]='Google Assistant AIY Kit'
				 aSOFTWARE_WHIP_DESC[$index_current]='Google AIY Kit for Raspberry Pi'
			aSOFTWARE_CATEGORY_INDEX[$index_current]=20
					  aSOFTWARE_TYPE[$index_current]=0
			 aSOFTWARE_ONLINEDOC_URL[$index_current]='???????'
				aSOFTWARE_REQUIRES_ALSA[$index_current]=1
		aSOFTWARE_REQUIRES_BUILDESSENTIAL[$index_current]=1
				aSOFTWARE_REQUIRES_GIT[$index_current]=1
		
		# - Disabled for All non-rpi
		for ((i=10; i<=$MAX_HW_MODEL; i++))
		do

			aSOFTWARE_AVAIL_HW_MODEL[$index_current,$i]=0

		done
		
		#------------------

Just before:

Install_Linux_Software(){

```
#GoogleVoiceSDK
	INSTALLING_INDEX=154
	if (( ${aSOFTWARE_INSTALL_STATE[$INSTALLING_INDEX]} == 1 )); then

		Banner_Installing
		
		AGI python3-dev python3-venv
		
		python3 -m venv env
		env/bin/python -m pip install --upgrade pip setuptools
		source env/bin/activate
		
		python -m pip install --upgrade google-assistant-library
		
		python -m pip install --upgrade google-auth-oauthlib[tool]
					
		INSTALL_URL_ADDRESS='https://www.googleapis.com/auth/assistant-sdk-prototype'
		/DietPi/dietpi/func/check_connection "$INSTALL_URL_ADDRESS"

		if (( $? == 0 )); then
		
		cp /boot/client_secret_*.json "$FP_DIETPI_USERDATA_DIRECTORY"/assistant.json
		
		google-oauthlib-tool --client-secrets "$FP_DIETPI_USERDATA_DIRECTORY"/assistant.json --scope "$INSTALL_URL_ADDRESS" --save --headless
		
		
		
		else

			Error_NoConnection_NoInstall

		fi

	fi
	
	#GoogleVoiceAIY
	INSTALLING_INDEX=155
	if (( ${aSOFTWARE_INSTALL_STATE[$INSTALLING_INDEX]} == 1 )); then

		Banner_Installing

		INSTALL_URL_ADDRESS='https://github.com/google/aiyprojects-raspbian.git'
		/DietPi/dietpi/func/check_connection "$INSTALL_URL_ADDRESS"

		if (( $? == 0 )); then

			AGI python python-dev

			git clone "$INSTALL_URL_ADDRESS" "$FP_DIETPI_USERDATA_DIRECTORY"/voice-recognizer-raspi

			cd "$FP_DIETPI_USERDATA_DIRECTORY"/voice-recognizer-raspi
			
			scripts/install-deps.sh
			scripts/install-services.sh
			scripts/configure-driver.sh
			scripts/install-alsa-config.sh
			
			cp /boot/client_secret_*.json ${HOME}/assistant.json

			source env/bin/activate
			python3 src/main.py

		else

			Error_NoConnection_NoInstall

		fi

	fi

I get all the way through the process (after several hours of fiddling about), but still get the following errors:

(env) root@AIY:/mnt/dietpi_userdata/voice-recognizer-raspi# python3 src/main.py
[2017-07-10 00:45:43,780] WARNING:main:File /tmp/status-led specified for --led-fifo does not exist.
[2017-07-10 00:45:43,792] INFO:audio:started recording
[2017-07-10 00:45:43,798] INFO:main:ready...
Press the button on GPIO 23 then speak, or press Ctrl+C to quit...
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
arecord: main:722: audio open error: No such file or directory
[2017-07-10 00:45:43,804] ERROR:audio:Microphone recorder died unexpectedly, aborting...

root@AIY:/mnt/dietpi_userdata/voice-recognizer-raspi# python3 checkpoints/check_audio.py
Failed to find the voiceHAT soundcard. Refer to HACKING.md for how to
setup the voiceHAT driver: https://git.io/v99yK
Press Enter to close...

Frustrating!

EDIT: Maybe a similar problem: xtools-at/AssistantPi#5

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

I have just opened an issue on Google's AIO projects' Github:

google/aiyprojects-raspbian#94

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 10, 2017

@R1CH-T

Hi Rich,

P.S. Do you have one of the AIY Kits, yet?

I don't, but I believe i'll need to obtain one if I'am to be any assistance here. It seems a large implementation that would need much testing, although you've done great so far, looks good.

ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
arecord: main:722: audio open error: No such file or directory
[2017-07-10 00:45:43,804] ERROR:audio:Microphone recorder died unexpectedly, aborting...

Seems the microphone is failing open a ALSA stream. If the AIY kit image works flawlessly, it could be a lack of documentation for the manual installation, or a slip in the configuration somewhere.

Could you please take a look at my attempt at this in the link below and let me know if I have done it correctly.

It looks all in order, however, I usually have everything outside of any DietPi scripts, in note form, before I implement it.

You will have issues with your /etc/asound.conf, this will be overridden during dietpi-software installation at some point, i'll need to add support for this special configuration.


Cant see to find a copy of the MagPi 57 anywhere for purchase lol. I'am assuming the voice hat is required for this project (https://github.com/google/aiyprojects-raspbian)?

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 10, 2017

@R1CH-T

It may be worth trying https://github.com/google/aiyprojects-raspbian/blob/master/HACKING.md#setting-up-the-image on Raspbian. If that is successful, we could compare the installs and try to find out why it only fails on DietPi.

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 10, 2017

@R1CH-T

root@AIY:/mnt/dietpi_userdata/voice-recognizer-raspi# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
softvol
micboost
default
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions

Doesnt seem like the dtoverlay is loaded for voice hat?

Are these applied to /DietPi/config.txt (our RAMdisk location for config.txt:
https://github.com/google/aiyprojects-raspbian/blob/master/scripts/configure-driver.sh#L27-L35

Applied to /boot/config.txt, settings will be lost during reboot. Needs to be applied to our RAMdisk location /DietPi/config.txt.

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

Thanks for the feedback. 🥇
I was up very late last night looking at this stuff, so I've just read these replies.

It may be worth trying https://github.com/google/aiyprojects-raspbian/blob/master/HACKING.md#setting-up-the-image on Raspbian. If that is successful, we could compare the installs and try to find out why it only fails on DietPi.

I was thinking along those lines, last night, before my brain melted. ;)

Doesnt seem like the dtoverlay is loaded for voice hat?
Are these applied to /DietPi/config.txt (our RAMdisk location for config.txt:
https://github.com/google/aiyprojects-raspbian/blob/master/scripts/configure-driver.sh#L27-L35
Applied to /boot/config.txt, settings will be lost during reboot. Needs to be applied to our RAMdisk location /DietPi/config.txt.

I'll take a look. I won't have as much time to hack on this during the week, but I'll do my best. :)

Cant see to find a copy of the MagPi 57 anywhere for purchase lol. I'am assuming the voice hat is required for this project (https://github.com/google/aiyprojects-raspbian)?

Hehe. Yeah. I think that every copy on the planet sold within two days!
I'd send you mine, but it kinda defeats the object...
There is a wait-list though, if it helps: https://docs.google.com/forms/d/e/1FAIpQLSev7IQBFUaDlv5tx1Decxd5Ya5AqYSEvD72hJySeaRDogaqAw/viewform?c=0&w=1

I've gotten a reply over at the other issue page, so I'll have a go with his suggestion there, too:

Could you run the checkpoint scripts:
https://github.com/google/aiyprojects-raspbian/tree/master/checkpoints
Also did use disable the HDMI audio? You should get this device listing:

$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
softvol
micboost
default
sysdefault:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar,
Default Audio Device
dmix:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar,
Direct sample mixing device
dsnoop:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar,
Direct sample snooping device
hw:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar,
Direct hardware device without any conversions
plughw:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar,
Hardware device with all software conversions

Another thing to check is whether the driver got loaded:

$ lsmod | grep snd
snd_soc_bcm2835_i2s 6546 2
snd_soc_googlevoicehat_soundcard 3351 3
snd_soc_googlevoicehat_codec 3936 1
snd_soc_core 179915 3 snd_soc_googlevoicehat_codec,snd_soc_googlevoicehat_soundcard,snd_soc_bcm2835_i2s
snd_compress 10384 1 snd_soc_core
snd_pcm_dmaengine 5894 1 snd_soc_core
snd_pcm 98501 4 snd_pcm_dmaengine,snd_soc_googlevoicehat_soundcard,snd_soc_core
snd_timer 23904 2 snd_pcm
snd 70032 8 snd_compress,snd_timer,snd_soc_core,snd_pcm

It could be something to do with HDMI: I set it up headless with /boot/dietpi.txt, but didn't completely disable it.
It also does look like it's a problem with drivers not loading...

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

🥇 🥇

Doesnt seem like the dtoverlay is loaded for voice hat?

Are these applied to /DietPi/config.txt (our RAMdisk location for config.txt:
https://github.com/google/aiyprojects-raspbian/blob/master/scripts/configure-driver.sh#L27-L35

Applied to /boot/config.txt, settings will be lost during reboot. Needs to be applied to our RAMdisk location /DietPi/config.txt.

Bingo!

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

https://github.com/google/aiyprojects-raspbian/tree/master/scripts

scripts/install-deps.sh:

...
for config in status-led.ini voice-recognizer.ini; do
  if [[ ! -f "${HOME}/.config/${config}" ]] ; then
    echo "Installing ${config}"
    cp "config/${config}.default" "${HOME}/.config/${config}"
  fi

(puts status-led.ini and voice-recognizer.ini into /root/.config)

scripts/install-services.sh:

...
for service in systemd/*.service; do
  sed "s:/home/pi/voice-recognizer-raspi:${repo_path}:g" "$service" \
    > "/lib/systemd/system/$(basename "$service")"
done
...

(tries to use /home/pi)

scripts/configure-driver.sh:

...
sed -i \
  -e "s/^dtparam=audio=on/#\0/" \
  -e "s/^#\(dtparam=i2s=on\)/\1/" \
  /boot/config.txt
grep -q "dtoverlay=i2s-mmap" /boot/config.txt || \
  echo "dtoverlay=i2s-mmap" >> /boot/config.txt
grep -q "dtoverlay=googlevoicehat-soundcard" /boot/config.txt || \
  echo "dtoverlay=googlevoicehat-soundcard" >> /boot/config.txt
grep -q "dtparam=i2s=on" /boot/config.txt || \
  echo "dtparam=i2s=on" >> /boot/config.txt

(writes to /boot/config.txt)

scripts/install-alsa-config.sh:

...
asoundrc=/home/pi/.asoundrc
global_asoundrc=/etc/asound.conf

for rcfile in "$asoundrc" "$global_asoundrc"; do
  if [[ -f "$rcfile" ]] ; then
    echo "Renaming $rcfile to $rcfile.bak..."
    sudo mv "$rcfile" "$rcfile.bak"
  fi
done

(tries to use /home/pi again)

Fixing these should do the job, hopefully...

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

Would it be possible to use some sort of globally applied alias' to catch these sorts of things in dietpi? Or maybe some symlinks, or something, so we don't have to alter any such code again? Some catch-alls?

It'd be handy to have stuff redirected to /mnt/dietpi_userdata in most cases, I feel. (As well as /DietPi/).

Changing where ${HOME} etc point to would be useful.

If this is too problematic, perhaps the code could be altered upstream to make it a little friendlier to non-standard distros.

EDIT: Having thought about it, though, it might just be easier to stick the whole thing in /home/pi and run the whole thing as user pi.

@R1CH-T
Copy link
Author

R1CH-T commented Jul 10, 2017

Success!

I just disabled the sound through Audio Options, changed the scripts and it works!

The light in the arcade button on top triggers voice recognition, though doesn't flash like it should and the service is broken; but I think we can both see what's wrong, there:

root@AIY:~# systemctl status voice-recognizer.service
● voice-recognizer.service - voice recognizer
   Loaded: loaded (/lib/systemd/system/voice-recognizer.service; enabled)
   Active: failed (Result: start-limit) since Mon 2017-07-10 18:31:02 UTC; 1min 30s ago
  Process: 582 ExecStart=/home/pi/voice-recognizer-raspi/env/bin/python3 -u src/main.py (code=exited, status=217/USER)

scripts/install-services.sh: DOES NOT NEED CHANGING.

set -o errexit

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root (use sudo)" 1>&2
   exit 1
fi

cd "$(dirname "${BASH_SOURCE[0]}")/.."
repo_path="$PWD"

for service in systemd/*.service; do
  sed "s:/mnt/dietpi_userdata/voice-recognizer-raspi:${repo_path}:g" "$service" \
    > "/lib/systemd/system/$(basename "$service")"
done

# voice-recognizer is not enabled by default, as it doesn't work until
# credentials are set up, so we explicitly enable the other services.
systemctl enable alsa-init.service
systemctl enable ntpdate.service
systemctl enable status-led.service
systemctl enable status-led-on.service
systemctl enable status-led-off.service
systemctl enable status-monitor.service

scripts/configure-driver.sh:

set -o errexit

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root (use sudo)" 1>&2
   exit 1
fi

set -e

sed -i \
  -e "s/^dtparam=audio=on/#\0/" \
  -e "s/^#\(dtparam=i2s=on\)/\1/" \
  /DietPi/config.txt
grep -q "dtoverlay=i2s-mmap" /DietPi/config.txt || \
  echo "dtoverlay=i2s-mmap" >> /DietPi/config.txt
grep -q "dtoverlay=googlevoicehat-soundcard" /DietPi/config.txt || \
  echo "dtoverlay=googlevoicehat-soundcard" >> /DietPi/config.txt
grep -q "dtparam=i2s=on" /DietPi/config.txt || \
  echo "dtparam=i2s=on" >> /DietPi/config.txt

scripts/install-alsa-config.sh:

set -o errexit

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root (use sudo)" 1>&2
   exit 1
fi

cd "$(dirname "${BASH_SOURCE[0]}")/.."

asoundrc="${HOME}/.asoundrc"
global_asoundrc=/etc/asound.conf

for rcfile in "$asoundrc" "$global_asoundrc"; do
  if [[ -f "$rcfile" ]] ; then
    echo "Renaming $rcfile to $rcfile.bak..."
    sudo mv "$rcfile" "$rcfile.bak"
  fi
done

sudo cp scripts/asound.conf "$global_asoundrc"
echo "Installed voiceHAT ALSA config at $global_asoundrc"

Once those services in the first script are all sorted out, it should work perfectly!
(Though that could be done upstream, it still wouldn't make them point to the correct directory in DietPi.)

My next job will be to do the same thing with the Assistant SDK, so you can try it out on some of your hardware. (You'll just need a mike and sound output.)

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 11, 2017

@R1CH-T

scripts/install-services.sh:
...
for service in systemd/*.service; do
sed "s:/home/pi/voice-recognizer-raspi:${repo_path}:g" "$service"
> "/lib/systemd/system/$(basename "$service")"
done
...
(tries to use /home/pi)
If this is too problematic, perhaps the code could be altered upstream to make it a little friendlier to non-standard distros.
Changing where ${HOME} etc point to would be useful.

Yep, they could use "$HOME"/voice-recognizer-raspi to support the current user installing the software.

scripts/configure-driver.sh:

I can make this easier by adding the soundcard as an option in dietpi-config. Selecting it would have the same effect. Can also apply the asound.conf at the same time.


/home/pi/voice-recognizer-raspi/env/bin/python3 -u src/main.py

Try running that command manually, if it fails, should give you some verbose information.

It'd be handy to have stuff redirected to /mnt/dietpi_userdata in most cases

Yep 👍

@R1CH-T
Copy link
Author

R1CH-T commented Jul 12, 2017

Adding the following lines to the installation entry fixes all outstanding issues and the AIY Kit now seems to work perfectly:

sed -i s:/boot/config.txt:/DietPi/config.txt:g scripts/configure-driver.sh
sed -i s:/home/pi/:d${HOME}:g scripts/install-alsa-config.sh
sed -i s:User=pi::g /lib/systemd/system/status-led.service
sed -i s:User=pi::g /lib/systemd/system/status-monitor.service
sed -i s:User=pi::g /lib/systemd/system/voice-recognizer.service

The suggested dietpi-software entries would therefore be:

	index_current=155

				 aSOFTWARE_WHIP_NAME[$index_current]='Google Assistant AIY Kit'
				 aSOFTWARE_WHIP_DESC[$index_current]='Google AIY Kit for Raspberry Pi'
			aSOFTWARE_CATEGORY_INDEX[$index_current]=20
					  aSOFTWARE_TYPE[$index_current]=0
			 aSOFTWARE_ONLINEDOC_URL[$index_current]='???????'
				aSOFTWARE_REQUIRES_ALSA[$index_current]=1
		aSOFTWARE_REQUIRES_BUILDESSENTIAL[$index_current]=1
				aSOFTWARE_REQUIRES_GIT[$index_current]=1
		
		# - Disabled for All non-rpi
		for ((i=10; i<=$MAX_HW_MODEL; i++))
		do

			aSOFTWARE_AVAIL_HW_MODEL[$index_current,$i]=0

		done
		
		#------------------


	#GoogleVoiceAIY
	INSTALLING_INDEX=155
	if (( ${aSOFTWARE_INSTALL_STATE[$INSTALLING_INDEX]} == 1 )); then

		Banner_Installing

		INSTALL_URL_ADDRESS='https://github.com/google/aiyprojects-raspbian.git'
		/DietPi/dietpi/func/check_connection "$INSTALL_URL_ADDRESS"

		if (( $? == 0 )); then

			AGI python python-dev

			git clone "$INSTALL_URL_ADDRESS" "$FP_DIETPI_USERDATA_DIRECTORY"/voice-recognizer-raspi

			cd "$FP_DIETPI_USERDATA_DIRECTORY"/voice-recognizer-raspi
			
			sed -i s:/boot/config.txt:/DietPi/config.txt:g scripts/configure-driver.sh
			sed -i s:/home/pi/:d${HOME}:g scripts/install-alsa-config.sh
			
			scripts/install-deps.sh
			scripts/install-services.sh
			scripts/configure-driver.sh
			scripts/install-alsa-config.sh
			
			sed -i s:User=pi::g /lib/systemd/system/status-led.service
			sed -i s:User=pi::g /lib/systemd/system/status-monitor.service
			sed -i s:User=pi::g /lib/systemd/system/voice-recognizer.service
			
			cp /boot/client_secret_*.json ${HOME}/assistant.json

			source env/bin/activate
			python3 src/main.py

		else

			Error_NoConnection_NoInstall

		fi

	fi

To automatically start on boot, run systemctl enable voice-recognizer.

EDIT: From what I can tell from the project's Github, I believe that this should work on any Raspberry Pi (and maybe other devices), without needing the Voice Hat; so there should be no need to have a separate install option for the SDK.

We just have to use different sound devices and alter the file '~/.config/voice-recognizer.ini':

# Default config file for the voice-recognizer service.
# Should be installed to ~/.config/voice-recognizer.ini

# Select the trigger: gpio (default), clap, ok-google.
# trigger = clap

# Select the trigger sound:
# trigger-sound = path_to_your_sound.wav

# Uncomment to enable the Cloud Speech API for local commands.
# cloud-speech = true

# Uncomment to change the language. The following are supported:
# Embedded Assistant API [cloud-speech = false] (at launch)
#   en-US
# Cloud Speech API with local TTS [cloud-speech = true]
#   de-DE en-GB en-US es-ES fr-FR it-IT
#   (This is limited by the local TTS. Cloud Speech API supports many more.)
# language = en-US

# Path to client secrets for the Assistant API.
assistant-secrets = ~/assistant.json

# Path to service account credentials for the Cloud Speech API.
cloud-speech-secrets = ~/cloud_speech.json

# Uncomment to play Assistant responses for local actions.  You should make
# sure that you have IFTTT applets for your actions to get the correct
# response, and also that your actions do not call say().
# assistant-always-responds = true

i.e. Change trigger =gpio to =ok-google

@Fourdee Fourdee added this to the v155 milestone Jul 13, 2017
@R1CH-T
Copy link
Author

R1CH-T commented Jul 14, 2017

I haven't had a lot of time to look at this over the last couple of days, but I have just been looking through 'dietpi-config'. I am trying to figure out how to add an option for the AOI Hat sound hardware. I'm trying to get this down pat, which may take a little time, but I'd just like to ask if you have any templates or tools, which help you construct the statements to do this stuff.

I'd also like to add an option to install a relay driver called Crelay, which allows the control of USB and GPIO relays from a Linux machine, via the command line, as well as providing a simple web interface. This would be very useful for hardware hackers (including myself), and will expand the appeal of DietPi (especially if voice control can be integrated). ;)

EDIT: I have gotten this to work on a Linux x86-64 desktop and a Raspberry Pi (in minutes) by following the instructions on the GitHub page.

@R1CH-T
Copy link
Author

R1CH-T commented Jul 15, 2017

I've been at work all week and did the best I could, but I have finally had the chance to go through the dietpi-config code again. I am still at a loss: This script is 5000+ lines of code and I am having a little bit more trouble with this than I had with the dietpi-installer, despite that one being >14000 lines.

The dietpi-installer was pretty straight-forward and it took only took me a weekend to figure out the basics, but dietpi-config seems more complex. I keep getting lost because of a combination of ignorance, inexperience and 'various distractions' (i.e. Family, etc.). So: Could you please give us some more tips, as a follow-on from https://github.com/Fourdee/DietPi/issues/490#issuecomment-244416570?

Maybe someone else involved in the project might be able to help with this, if they have the knowledge?

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 15, 2017

@R1CH-T

Hi Rich,

but dietpi-config seems more complex. So: Could you please give us some more tips, as a follow-on from #490 (comment)?

Yep, DietPi-Config uses multiple external script functions to apply its settings. The main one is dietpi-set_hardware, which applies soundcards and such.

Is the DietPi-Config additions you are trying to apply, for the voice HAT soundcard?

I am trying to figure out how to add an option for the AOI Hat sound hardware.

I'll write up the steps needed to add this today, or, I can make the changes here and send the commit?

I keep getting lost because of a combination of ... 'various distractions' (i.e. Family, etc.).

Know the feeling lol 👍

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 15, 2017

@R1CH-T

Guide for adding soundcards:
https://github.com/Fourdee/DietPi/issues/1075#issuecomment-315530565

Should cover it, but let me know if any issues/unsure.

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 15, 2017

@R1CH-T

https://github.com/ondrej1024/crelay EDIT: I have gotten this to work on a Linux x86-64 desktop and a Raspberry Pi (in minutes) by following the instructions on the GitHub page.

This would make a great dietpi-software addition. Is this something you'd like to try adding, or, want me to take a look? :)

@R1CH-T
Copy link
Author

R1CH-T commented Jul 15, 2017

@Fourdee

Thanks for the quick response.
...and sorry for the slow reply.

I'll write up the steps needed to add this today, or, I can make the changes here and send the commit?

Thanks for the walk-through: You might want to consider adding this to the README.md.
Just don't send any commits, yet...

Fourdee added this to the v155 milestone 2 days ago

Well, It looks like I've got until v155 comes out, to get this sorted. :-)

If I don't get enough time, I'd appreciate it if you would do the honours, but it shouldn't come to that; I'll have a proper look at this ASAP and then post my attempt. At the end of the day, you're gonna have to be satisfied with it (and test it, to make sure it doesn't break anything else), before you add it to the main release.

https://github.com/ondrej1024/crelay

This would make a great dietpi-software addition. Is this something you'd like to try adding, or, want me to take a look? :)

I want to have a go at adding this to dietpi-software, under Hardware Projects and it shouldn't take very long for me to do so, but if you think that it should go elsewhere, it's up to you. I intend to create a separate issue for this as-and-when.

My top priority in this is to make sure that the Voice installer works on a 'vanilla' RasPi and then add an option to turn on the extra functionality of the AIY Hat. (Meaning sound drivers: The rest of the functions, I think, just re-map the GPIO pins.)

Thanks again,
Rich.

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 16, 2017

@R1CH-T

Hi Rich,

Thanks for the walk-through: You might want to consider adding this to the README.md.

Thanks, great suggestion 👍

If I don't get enough time, I'd appreciate it if you would do the honours, but it shouldn't come to that; I'll have a proper look at this ASAP and then post my attempt. At the end of the day, you're gonna have to be satisfied with it (and test it, to make sure it doesn't break anything else), before you add it to the main release.

Yep no worries, regardless, good stuff for giving it a go, most people don't lol 😄 . If you get no joy with it, let me know and i'll implement what you have. I'll do additional testing aswell.

Well, It looks like I've got until v155 comes out, to get this sorted. :-)

Hehe, I put in the milestone for my benefit, mainly to stop me from forgetting/mislaying the ticket. We can always move this to v200 if it requires it 😉

https://github.com/ondrej1024/crelay I want to have a go at adding this to dietpi-software, under Hardware Projects, I intend to create a separate issue for this as-and-when.

Perfect 👍

@R1CH-T
Copy link
Author

R1CH-T commented Jul 16, 2017

Thanks @Fourdee.

...processing...

@R1CH-T
Copy link
Author

R1CH-T commented Jul 18, 2017

Google Voice Hat Drivers:

Hi, Dan: I've just spent a couple of hours on this (since 8:30ish) and here is my take; based of my current understanding:

Straight from my notes, from this morning:
https://github.com/Fourdee/DietPi/issues/1075#issuecomment-315530565
https://github.com/google/aiyprojects-raspbian/tree/master/scripts

Please look in https://github.com/google/aiyprojects-raspbian/tree/master/scripts.

Step 1.

In /DietPi/dietpi/func/dietpi-set_hardware:

Under "# - Disable known soundcard dtoverlays":

Add sed -i '/dtoverlay=i-googlevoicehat-soundcard/d' "$FP_RPI_CONFIG"

Under "Soundcard_Main()":

	#googlevoicehat-soundcard
			googlevoicehat-soundcard)

				# - enable dtoverlay
				echo -e "\ndtoverlay=$INPUT_DEVICE_VALUE" >> "$FP_RPI_CONFIG"

				# - i2s-mmap
				sed -i '/dtoverlay=i2s-mmap=/c\dtoverlay=i2s-mmap=on' "$FP_RPI_CONFIG"
				
				# - i2s
				sed -i '/dtoverlay=i2s=/c\dtoverlay=i2s=on' "$FP_RPI_CONFIG"
				
;;

Under "# - Apply asound.conf":

This is where I'm starting to get way out of my depth: The script voice-recognizer-raspi/scripts/install-alsa-config.sh simply backs up the originals and then copies voice-recognizer-raspi/scripts/asound.conf into /home and /etc. I think that the contents of voice-recognizer-raspi/scripts/asound.conf should be added to the end of the #googlevoicehat-soundcard entry. i.e:

	#googlevoicehat-soundcard
			googlevoicehat-soundcard)

				# - enable dtoverlay
				echo -e "\ndtoverlay=$INPUT_DEVICE_VALUE" >> "$FP_RPI_CONFIG"

				# - i2s-mmap
				sed -i '/dtoverlay=i2s-mmap=/c\dtoverlay=i2s-mmap=on' "$FP_RPI_CONFIG"
				
				# - i2s
				sed -i '/dtoverlay=i2s=/c\dtoverlay=i2s=on' "$FP_RPI_CONFIG"
				
				# - Apply asound.conf	

						cat << _EOF_ > /etc/asound.conf
				
					options snd_rpi_googlemihat_soundcard index=0 # - I Don't know if this applies...

					pcm.softvol {
					type softvol
					slave.pcm dmix
					control {
					name Master
					card 0
					}
				}

				pcm.micboost {
					type route
					slave.pcm dsnoop
					ttable {
						0.0 30.0
						1.1 30.0
					}
				}

				pcm.!default {
					type asym
					playback.pcm "plug:softvol"
					capture.pcm "plug:micboost"
				}

				ctl.!default {
					type hw
					card 0
				}
				_EOF_

Step 2.

In DietPi/dietpi/dietpi-config

Under "Menu_AudioOptions()":

Add the menu option:

whiptail_menu_array+=("googlevoicehat-soundcard" "Google Raspberry Pi Voice Hat Audio")

Please take a look and see if any of it is OK, based off of Google's own method; which seems to work.

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 18, 2017

@R1CH-T

Great work 👍

options snd_rpi_googlemihat_soundcard index=0 #

Should not be required. In DietPi, enabling an overlay will disable the onboard soundcard, resulting in the addon card being the 1st device index 0.
I also believe this would need to be added to module run-time options (eg, create file with contents of above: /etc/modprobe.d/googlemihat_soundcard.conf.

The script voice-recognizer-raspi/scripts/install-alsa-config.sh simply backs up the originals and then copies voice-recognizer-raspi/scripts/asound.conf into /home and /etc.

Tricky. Quick solution may be be to remove that reference in the install script, prior to running it, eg:

sed -i '/asound.conf/d' installscript.sh # Will delete all lines with "asound.conf" in "installscript.sh"

- Apply asound.conf

This needs to be put at the end of Soundcard_Main(), as it will be overwritten currently:

		# - Apply asound.conf
		if [ "$INPUT_DEVICE_VALUE" = "googlevoicehat-soundcard" ]; then
		
			cat << _EOF_ > /etc/asound.conf
options snd_rpi_googlemihat_soundcard index=0 # - I Don't know if this applies...

pcm.softvol {
    type softvol
    slave.pcm dmix
    control {
        name Master
        card $SOUNDCARD_TARGET_CARD # Is 0 by default (correct)
    }
}

pcm.micboost {
    type route
    slave.pcm dsnoop
    ttable {
        0.0 30.0
        1.1 30.0
    }
}

pcm.!default {
    type asym
    playback.pcm "plug:softvol"
    capture.pcm "plug:micboost"
}

ctl.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
}
_EOF_

		elif (( $ALSA_EQ_ENABLED )); then

			cat << _EOF_ > /etc/asound.conf
ctl.eq {
    type equal
    controls "$HOME/.alsaequal.bin"
}

pcm.plugequal {
    type equal
    slave.pcm "plughw:$SOUNDCARD_TARGET_CARD,$SOUNDCARD_TARGET_DEVICE"
    controls "$HOME/.alsaequal.bin"
}

pcm.!default {
    type plug
    slave.pcm plugequal
    slave.channels 2
}

ctl.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
}
_EOF_

			if (( ! $(dpkg --get-selections | grep -ci -m1 '^libasound2-plugin-equal') )); then

				apt-get install -y libasound2-plugin-equal

			fi

		else

			cat << _EOF_ > /etc/asound.conf
pcm.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
ctl.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
}
_EOF_

		fi

- i2s-mmap

			sed -i '/dtoverlay=i2s-mmap=/c\dtoverlay=i2s-mmap=on' "$FP_RPI_CONFIG"	
			# - i2s
			sed -i '/dtoverlay=i2s=/c\dtoverlay=i2s=on' "$FP_RPI_CONFIG"

Just noticed these are additional overlays, that wont exist in config.txt. So we'll need to add entries for these instead:

echo -e "dtoverlay=i2s-mmap=on" >> "$FP_RPI_CONFIG"
echo -e "dtoverlay=i2s=on" >> "$FP_RPI_CONFIG"

Then also add removal lines in the reset section:

sed -i '/dtoverlay=i2s=/d' "$FP_RPI_CONFIG" # Will cover both items

@R1CH-T
Copy link
Author

R1CH-T commented Jul 18, 2017

This thread is starting to get very long now, so I'll be as brief as I can be. :)

I've read over your last reply and I think I see what you're doing there and follow it ~99%.

I think It's about time you took charge of this one now, if that's OK. I now see that, with the possible exception of scripts/install-deps.sh,we should pretty much do away with the installation scripts entirely and handle all of this through DietPi's methods, including setting up the system services required (using the contents of scripts/install-services.sh as a guide). For example; the "status-led" services will not be required if the Voice Hat is not being used.

I know that you'd probably prefer to be able to test this on your own Voice Hat hardware, but I'm more than happy to do this. This will take forever if I try to write it all myself, in the limited time I have. From what I can see, we've got enough of this sorted out, that you might as well go ahead and give me something to test.

If I get positive results, both with and without the Voice Hat, we can try it out on a variety of hardware.

As the scope of this has now changed in my mind, I think that it might be best to call it:

aSOFTWARE_WHIP_NAME[$index_current]='Google Assistant'
aSOFTWARE_WHIP_DESC[$index_current]='Google Assistant, including the Voice Hat, AIY Kit for Raspberry Pi.'

And maybe miss out the # - Disabled for All non-rpi for the time being.

Let me know what you think.

EDIT: Oh yeah, we should probably make it default to trigger with 'OK Google', rather than using the button on top (GPIO - pin23, I think):

# Default config file for the voice-recognizer service.
# Should be installed to ~/.config/voice-recognizer.ini

# Select the trigger: gpio (default), clap, ok-google.
# trigger = clap

# Select the trigger sound:
# trigger-sound = path_to_your_sound.wav

# Uncomment to enable the Cloud Speech API for local commands.
# cloud-speech = true

# Uncomment to change the language. The following are supported:
# Embedded Assistant API [cloud-speech = false] (at launch)
#   en-US
# Cloud Speech API with local TTS [cloud-speech = true]
#   de-DE en-GB en-US es-ES fr-FR it-IT
#   (This is limited by the local TTS. Cloud Speech API supports many more.)
# language = en-US

# Path to client secrets for the Assistant API.
assistant-secrets = ~/assistant.json

# Path to service account credentials for the Cloud Speech API.
cloud-speech-secrets = ~/cloud_speech.json

# Uncomment to play Assistant responses for local actions.  You should make
# sure that you have IFTTT applets for your actions to get the correct
# response, and also that your actions do not call say().
# assistant-always-responds = true

It might be best to have a couple of different config options to turn this stuff on-and-off, if you see what I'm saying... Though I don't want to over-complicate things, at this stage...
(I think that it might be a little early to start thinking about adding support for Mycroft and Alexa right now...).

@R1CH-T
Copy link
Author

R1CH-T commented Jul 21, 2017

Hi, Dan.

I got to the stage, three days ago where I started to think "This is way to complicated for me" and I kinda bailed. It was unfair of me to be throwing this thing into your lap, especially as you have your own busy schedule and have other considerations and priorities (as well as a roadmap to follow).

I basically realised that there were, very likely, several more pieces to this jigsaw than I'd considered and I decided that I needed to take a break.

After taking this break and giving it a couple of days, I realised that the best way for me to get my head around this, would be for me to have a stab at working at an installer for the Crelay driver / controller / web interface; which I mentioned before.

To this end, I have opened an issue for this at https://github.com/Fourdee/DietPi/issues/1091.

We have covered the installation stage for the software and drivers here, but the parts of the process I hadn't considered, up until now, are updating and uninstalling. (I think that you might be able to give me some pointers around this in the other thread).

I also need to test the stuff we have discussed here, too. To this end, I have set up a DietPi image on a Pi3 running BerryBoot, which I have configured, updated and then cloned, in order to make repeated reinstallations fast and manageable, directly on a RasPi. (Thanks for that work, by the way). I will try to devote as much time as I can to these, this weekend, as I'm going for an "Unplugged Holiday" soon, so I need to get my affairs in order :). As you said: It can wait until "version-whatever", but I would like to include this soon.

Please take a look at the links above and over the next couple of days, give me some feedback so that I will hopefully be able to use any insights that I can gain from the process, and help me figure out all of the steps that I need to follow here.

If you are on a deadline, please disregard this.

Rich.

@Fourdee Fourdee modified the milestones: v156, v157 Sep 22, 2017
@mpember
Copy link

mpember commented Sep 28, 2017

Just an FYI...

Google seem to have reworked their code and created a new branch with a new API.

The good news is that they appear to have rewritten their install scripts to allow for non-standard install paths.

I haven't had a chance to give the new code a go. I will have a try over the weekend. They say there is no migration path from the old to the new code layout / API, so you are required to do a clean install.

@R1CH-T
Copy link
Author

R1CH-T commented Oct 14, 2017

Thanks for the heads-up @mpember.

I do actually remember hearing something about this a while back, but didn't have the chance to check it out. I'll have to look it over.

Did you manage to try it out, in the end?

@mpember
Copy link

mpember commented Oct 14, 2017

I did. Since it was a bit of a hatchet job (by me), I can't be 100% sure that the steps are 100% accurate. That said...

Remove the old service configs. The new codebase is not designed to use the fragmented service structure.
sudo systemctl disable status-led.service
sudo systemctl disable status-led-on.service
sudo systemctl disable status-led-off.service
sudo systemctl disable status-monitor.service
sudo systemctl disable voice-recognizer.service

Download the new AIY code
git clone -b voicekit --single-branch https://github.com/google/aiyprojects-raspbian.git /mnt/dietpi_userdata/voicekit

Install driver and ALSA config (If doing a clean install)
cd /mnt/dietpi_userdata/voicekit
sudo scripts/configure-driver.sh
sudo scripts/install-alsa-config.sh

There is only one file in the new "voicekit" code that still uses a hard-coded home path. I have raised this as an issue with Google and gotten no response.
google/aiyprojects-raspbian#139

The new code only comes with examples for a service script using the new structure. They no longer provide a systemd config file Their assumption is that developers should be integrating the code into a custom project and not simply cloning a Google-provided service. If you want to see the files that I use, they are available here.

The bit I didn't document was the rebuilding of the 'env' contents for the new code. I butchered it due to my own incompetence and it is likely someone with a better knowledge of python will know exactly which steps are required.

I have successfully upgraded both of my AIY kits to use the new system and they are working fine.

If there are any questions, just shout.

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 14, 2017

@R1CH-T

Finally got one on order. Once it arrives i'll be able to get involved in this ticket.
https://twitter.com/DietPi_/status/914686122948689921

@Fourdee Fourdee modified the milestones: v157, v158 Oct 19, 2017
@R1CH-T
Copy link
Author

R1CH-T commented Oct 26, 2017

@Fourdee
Cool.
Sorry, I missed this update. :(
I look forward to hearing your thoughts.

@mpember
Copy link

mpember commented Oct 29, 2017

It looks like the voicekit has been updated to contain a systemd service config file and the expected script name for the service will remain as main.py (in the /mnt/dietpi_data/voice-recognizer-raspi/src folder).

Since the instructions are to copy one of the examples to main.py, it may be worth chucking a note somewhere to inform users where to locate the files. I understand that most DietPi users with a voicekit are likely to familiar with the setup, but it should protect against the odd 'I installed it and it doesn't work' forum posts.

@Fourdee Fourdee self-assigned this Nov 11, 2017
@Fourdee
Copy link
Collaborator

Fourdee commented Nov 11, 2017

@Fourdee
Copy link
Collaborator

Fourdee commented Nov 11, 2017

Lightweight justice 😄
image

Fourdee referenced this issue Nov 11, 2017
+ DietPi-Software | Google AIY: Now available for installation:
https://github.com/Fourdee/DietPi/issues/1065
@Fourdee
Copy link
Collaborator

Fourdee commented Nov 11, 2017

Pretty much done.

Will run one more test install to check installation and online guide.

@Fourdee
Copy link
Collaborator

Fourdee commented Nov 11, 2017

@R1CH-T

I now see why the Google AIY kit is worth a purchase, so much fun 👍

@mpember
Copy link

mpember commented Nov 11, 2017

Is there a need to have the service run as root? Mine is working fine as the dietpi user.

@Fourdee
Copy link
Collaborator

Fourdee commented Nov 12, 2017

Tested and completed.

@Fourdee Fourdee closed this as completed Nov 12, 2017
@R1CH-T
Copy link
Author

R1CH-T commented Nov 14, 2017

Thank you so much for this, @Fourdee!

Also; thanks for your input, too, @mpember. It would not have been possible without you.

This stuff is going to be a moving target and is one of Google's top priorities, so I am in awe of what has been accomplished here.

I now see why the Google AIY kit is worth a purchase, so much fun 👍

I got lucky, in a way: When I subscribed to the MAGPI and got this kit, a year ago, I immediately jumped on the hype train. As the magazine transitioned to what it is now and became a fully legitimate, commercial publication, I was happy to join in.

I really don't think that most people understand how much joy can be derived from these sorts of projects. It was so much fun playing with this.... :)

Ordinary users, like myself, can make small, but significant contributions to the development of these embedded platforms; but it takes lots of work and it is not easy at all.

Much Respect,

Rich

@mpember
Copy link

mpember commented Dec 28, 2017

FYI, Google have changed the default branch to be the new vision-based kit. This means that the script needs to explicitly request the voicekit branch.

@Fourdee
Copy link
Collaborator

Fourdee commented Dec 29, 2017

@mpember

Many thanks, confirmed with their online doc:
https://aiyprojects.withgoogle.com/voice/#makers-guide-1-1--source-code

Alternately, the project source is available on GitHub: https://github.com/google/aiyprojects-raspbian/tree/voicekit. Note it is released under the "voicekit" branch.

@Fourdee Fourdee reopened this Dec 29, 2017
Fourdee referenced this issue Dec 29, 2017
+ DietPi-Software | Google AIY: Updated install to gitbranch=voicekit.
Many thanks to @mpember for the heads up:
https://github.com/Fourdee/DietPi/issues/1065#issuecomment-354304388
@Fourdee
Copy link
Collaborator

Fourdee commented Dec 29, 2017

Completed.

@Fourdee Fourdee closed this as completed Dec 29, 2017
@Fourdee Fourdee mentioned this issue Jan 28, 2018
Fourdee referenced this issue Jan 28, 2018
**v6.0** (previously v160)
(28/01/18)

**Important Information:**
**All DietPi images have been re-created. Existing installations (v159 or lower), can no longer be updated, or supported. To continue support, users must install the latest v6.0 image.**
 - https://github.com/Fourdee/DietPi/issues/1385
 - All images are now Debian Stretch (excluding Odroid's)
 - ARMbian based images are now mainline kernel 4.13+.
 - Native PC (EFI): is now an ISO, with clonezilla bundled. Simplifies installation via Rufus write: https://github.com/Fourdee/DietPi/issues/1171#issuecomment-336522021
 - If you are happy with your existing installation of v159 (or lower), you are not required to install the v6.0 image, however, we cannot continue to provide support for v159 (or lower) installations.

**Minor notes:**
The XMAS tree has now been taken down, stored away on github history for next year. Hope you all had a good one :D

**Changes / Improvements / Optimizations:**

General | DietPi RPi kernel, now reverted to stock RPi kernel: https://github.com/Fourdee/DietPi/issues/1378

General | We have completed much needed backbone work for DietPi, which will allow for improved expansion in source code. This includes the use of dietpi-globals.

DietPi-Globals | New script which optimizes most used DietPi commands and vars, throughout our scripts. Also exported to bash session, please type 'G_' then press 'TAB' to see a full list of options: https://github.com/Fourdee/DietPi/issues/1311

General | FHS compliance completed. /etc/dietpi has moved to /var/lib/dietpi. RAMlog store has moved to /var/tmp/dietpi: https://github.com/Fourdee/DietPi/issues/1297#issuecomment-352241193

General | We have refreshed our terminal messages look & feel, oriented on RPi boot messages, and with process animation: https://github.com/Fourdee/DietPi/pull/1377

General | wget: Now set to prefer IPv4 by default (generally faster, can be changed by 'CONFIG_PREFER_IPVERSION' in dietpi.txt): https://github.com/Fourdee/DietPi/issues/1285#issuecomment-353230187

General | APT: Now set to force IPv4 by default (generally faster, can be changed by 'CONFIG_PREFER_IPVERSION' in dietpi.txt): https://github.com/Fourdee/DietPi/issues/1285#issuecomment-353230187

General | SparkySBC: CPU gov default changed to Performance, reports of increased stability.

General | Swapfile generation is now completed during 1st run of dietpi-software (previously boot stage): https://github.com/Fourdee/DietPi/issues/1270#issue-278797206

General | DietPi-Funtime: Removed from DietPi. Although it looked pretty, it did absolutely nothing (except slow down a program)

DietPi-Automation | All dietpi.txt entries have been renamed and cleaned up.

DietPi-Automation | dietpi.txt: CONFIG_NTP_MODE will now be applied during 1st run of device: https://github.com/Fourdee/DietPi/issues/1379

DietPi-Boot | Improved the method of initial FS_partition and FS_expansion during 1st run, via systemD services. 'fs_force_resize=' in dietpi.txt is no longer supported: https://github.com/Fourdee/DietPi/issues/1285#issuecomment-352159930

DietPi-Banner | IP: Will now also list the active network adapter used (eg: eth0/wlan0)

DietPi-Config | Dion Audio LOCO V1/V2: Soundcards added for RPi.

DietPi-Config | Locale: en_GB.UTF-8 is now automatically installed, alongside user selected choice. Required for DietPi scripts to function.

DietPi-Drive_Manager | Added support for exFAT, many thanks @MichaIng : https://github.com/Fourdee/DietPi/pull/1312

DietPi-Globals | Global variables and functions are now exported during login. Please see the sourcecode for more information: https://github.com/Fourdee/DietPi/issues/1311

DietPi-Set_Hardware | Sparky SBC: enable aotg.aotg1_speed compatibility setting for USB 1.1, when USB-DAC configured: https://github.com/Fourdee/DietPi/issues/1301

DietPi-Set_Software | "pool" directive is now used for NTPD: https://github.com/Fourdee/DietPi/pull/1404

DietPi-Software | NAA Daemon: Updated to latest (3.5.2-36). Existing installs will be patched automatically: https://github.com/Fourdee/DietPi/issues/1305

DietPi-Software | PHP-FPM: Increased from "$CPU_CORES_TOTAL" to "pm.max_children = $(( $CPU_CORES_TOTAL * 3 ))". This should avoid failed forking of PHP-FPM processes/requests : https://github.com/Fourdee/DietPi/issues/1298

DietPi-Software | ownCloud/Nextcloud: Added option to choose data directory via dietpi.txt pre installation: https://github.com/Fourdee/DietPi/issues/1314#issuecomment-352782055

DietPi-Software | ownCloud/Nextcloud: Switch to pretty URLs (without "index.php") on Apache

DietPi-Software | ownCloud/Nextcloud: Automated backup restoring on install and creation und uninstall to ownCloud/Nextcloud data directory

DietPi-Software | ownCloud: Switch to non-package/archive installation. This allows usage of preferred web based updater.

DietPi-Software | Nextcloud: Resolved OPcache admin panel warnings now also on Lighttpd

DietPi-Software | UrBackup: Installation updated to latest version 2.1.20. For new installations only: https://github.com/Fourdee/DietPi/issues/1335

DietPi-Software | NodeRed: Corrected user which nodered runs under, now runs as its own user, created during install: https://github.com/Fourdee/DietPi/issues/1294#issuecomment-354314318

DietPi-Software | SqueezeBox/LMS (Stretch): Installation resolved: https://github.com/Fourdee/DietPi/issues/1124

DietPi-Software | MySQL: Completely remove MySQL from DietPi in favour of MariaDB: https://github.com/Fourdee/DietPi/issues/1397

DietPi-Software | Ampache: MySQL DB and configs have been updated (adds correct userdata folder for music by default): https://github.com/Fourdee/DietPi/issues/1420

run_ntpd | Added support for systemd-timesyncd completion/detection: https://github.com/Fourdee/DietPi/issues/1379

**Bug Fixes:**

General | Fixed two systemd error messages during shutdown and boot: https://github.com/Fourdee/DietPi/issues/1330

DietPi-Automation | Resolved an issue where AUTO_SETUP_TIMEZONE was not being applied correctly, thanks @k-plan: https://github.com/Fourdee/DietPi/issues/1285#issuecomment-356310496

DietPi-Automation | dietpi.txt: CONFIG_NTP_MIRROR will now be applied to systemd-timesyncd configuration: https://github.com/Fourdee/DietPi/issues/1379

DietPi-Config | Resolved an issue with WiFi Country code, failing to set on some devices: https://github.com/Fourdee/DietPi/issues/838

DietPi-Config | Resolved an issue where disabling IPv6 didn't have an effect on AMD64 devices: https://github.com/Fourdee/DietPi/issues/1343#issuecomment-359652751

DietPi-Services | dietpi-wifi-monitor: Is no longer controlled, to prevent WiFi drop during software installs/updates etc: https://github.com/Fourdee/DietPi/issues/1288#issuecomment-350653480

DietPi-Software | General: MySQL using software titles now have their own database user, instead of accessing as "root": https://github.com/Fourdee/DietPi/issues/1397#issuecomment-359655198

DietPi-Software | qBittorrent: Resolved an issue with inability to log into web interface: https://github.com/Fourdee/DietPi/issues/1366

DietPi-Software | Resolved an issue where our custom LD_LIBRARY_PATH would cause APT failures. LD_LIBRARY_PATH has now been reverted, apologies if this effected your system: https://github.com/Fourdee/DietPi/issues/1329

DietPi-Software | Resolved an issue where APT installations would fail if services were masked. All known 

DietPi software services, will be enabled/unmasked, before installation: https://github.com/Fourdee/DietPi/issues/1320

DietPi-Software | WiFi Hotspot (Stretch): Resolved an issue where hostapd would fail to run due to missing libssl1.0.0 lib, not available in repos: https://github.com/Fourdee/DietPi/issues/1299

DietPi-Software | Shairport-sync (Stretch): Resolved an issue where this would fail to install, due to pre-req URLS becomming invalid: https://github.com/Fourdee/DietPi/issues/1303

DietPi-Software | Plex Media Server: Resolved uninstall to include /var/lib/plexmediaserver in removal (which is not completed via apt purge).

DietPi-Software | MariaDB: Resolved an issue where MariaDB would fail to uninstall correctly: https://github.com/Fourdee/DietPi/pull/1280

DietPi-Software | Aira2 (Stretch): Resolved installation, now used APT installation: https://github.com/Fourdee/DietPi/issues/1310

DietPi-Software | Mosquitto: Resolved various issues with failed install, due to Mosq repo not being maintained (deb's missing from repo header list, requires non-stretch available packages). deb's are now hosted on dietpi.com: https://github.com/Fourdee/DietPi/issues/1306

DietPi-Software | ownCloud/Nextcloud: Fixed an installation issue on Jessie with MariaDB: https://github.com/Fourdee/DietPi/pull/1319

DietPi-Software | Google AIY: Updated install to gitbranch=voicekit. Many thanks to @mpember for the heads up: https://github.com/Fourdee/DietPi/issues/1065#issuecomment-354304388

DietPi-Software | OpenJDK: Replaces OracleJDK: https://github.com/Fourdee/DietPi/issues/1401

DietPi-Update | dietpi.txt is now checked for missing entries, and, will now be patched during the update: https://github.com/Fourdee/DietPi/issues/1292#issuecomment-350818969

Sparky SBC | Kernel updated, which resolves issues with HQPlayer playback: https://www.computeraudiophile.com/forums/topic/32132-allo-sparky-usbridge/?do=findComment&comment=753100

**Allo Web Interface v5:**

Sparky SBC: Matrix Audio X-SPDIF 2, native DSD is now added to kernel, many thanks @sudeep: sparkysbc/Linux#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants