Skip to content

Commit

Permalink
Beta release of SmartDisplayPi
Browse files Browse the repository at this point in the history
  • Loading branch information
Piflyer committed Feb 21, 2020
1 parent 588ddfc commit 6fb35d6
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 48 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# SmartDisplayPi
## Coming Soon!
## Images are coming soon!
An awesome smart display powered by Google Assistant and Raspberry Pi.

## NOTE
This is still in development.
## Features

* Google Assistant
* Google Assistant
* Built-in home hub powered by Home Assistant
* Airplay compatible speaker
* Bluetooth speaker
Expand All @@ -32,7 +31,7 @@ An awesome smart display powered by Google Assistant and Raspberry Pi.


## Installation guide:
It is *recommended* that you use our pre-built images in our **releases** tab. Our images are based on Raspbian Buster. We will However, if you are up for the challenge, we will be releasing an installer soon.
It is *recommended* that you use our pre-built images in our **releases** tab. Our images are based on Raspbian Buster Lite. We will posting an installer soon if you are up for the challenge. Head over to our Wiki for more information.

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Any help or feedback will greatly be appreciated.
Expand Down
1 change: 0 additions & 1 deletion Web/index2.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
<a href="https://www.tasty.co"><img id="tasty" src="tastylogo.jpeg" ></a>
<div id="gphotosbg"></div>
<a href="http://127.0.0.1:8080/"><img id="gphotosimg" src="googlephotos.png" ></a>
<a href="file:///home/pi/SmartDisplayPi/Web/setup/wizardhome.html"><div id="offline">Offline Mode</div></a>
</div>
<div id="homebutton"></div>
<button id="homesquare" onclick="myFunction()">
Expand Down
4 changes: 2 additions & 2 deletions Web/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<a href="http://localhost:8123/config/dashboard"><img id="halogoset" src="halogo.png"></a>
<div id="hatext">Home Assistant</div>
<div id="hadescr">Control and manage Home Assistant</div>
<a id="bar3" href="http://localhost:8080/index.php?page=wpa_conf"></a>
<a href="http://localhost:8080/index.php?page=wpa_conf"><img id="raspaplogoset" src="raspAP-logo.png"></a>
<a id="bar3" href="http://localhost:8081/index.php?page=wpa_conf"></a>
<a href="http://localhost:8081/index.php?page=wpa_conf"><img id="raspaplogoset" src="raspAP-logo.png"></a>
<div id="raspaptext">RasAP</div>
<div id="raspapdescr">Control and manage network settings via RaspAP</div>
<a id="bar4" href="Setup/wizardhome.html"></a>
Expand Down
33 changes: 7 additions & 26 deletions Web/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
html {
overflow: scroll;
}
::-webkit-scrollbar {
width: 0px;
background: transparent; /* make scrollbar transparent */
}
body {
background: #FAFAFA;
overflow: scroll;
Expand Down Expand Up @@ -397,29 +404,3 @@ body {
border-radius: 100%;
background: #1EAAF1;
}
#setup {
position: absolute;
width: 205px;
height: 33px;
left: 109px;
top: 411px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
font-size: 25px;
line-height: 29px;
color: #373737;
}
#setupdesc {
position: absolute;
width: 213px;
height: 18px;
left: 109px;
top: 440px;
font-family: Roboto;
font-style: normal;
font-weight: 500;
font-size: 15px;
line-height: 18px;
color: #727272;
}
18 changes: 18 additions & 0 deletions assistant.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Google Assistant-Voice
Wants=network-online.target
After=network-online.target

[Service]
Environment=VIRTUAL_ENV=/home/__USER__/env
Environment=PATH=/home/__USER__/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/home/pi/env/bin/python -u /home/pi/googlesamples-assistant-hotword --project-id 'projectid' --device-model-id 'modelid' [--nickname SmartDisplayPi]

WorkingDirectory=/home/__USER__/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=__USER__

[Install]
WantedBy=multi-user.target
27 changes: 27 additions & 0 deletions installga.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
echo "Visit https://developers.google.com/assistant/sdk/guides/library/python/embed/config-dev-project-and-account"
echo "If you need help setting up your Google Assistant SDK credentials."
echo "This is designed for ARM v7 devices (If you have a Raspberry Pi 4, try using GassistPi.)"
echo ""
read -r -p "Please include your credential file with the .json file." configfile
echo ""
read -r -p "Enter your project id from Google Cloud Console." projid
echo ""
read -r -p "Enter the modelid from your Actions on Google Console." modelid
sudo apt-get update
sudo apt-get install python3-dev python3-venv portaudio19-dev libffi-dev libssl-dev libmpg123-dev -y
python3 -m venv env
env/bin/python -m pip install --upgrade pip setuptools wheel
source env/bin/activate
python -m pip install --upgrade google-assistant-library==1.0.1
python -m pip install --upgrade google-assistant-sdk[samples]==0.5.1
python -m pip install --upgrade google-auth-oauthlib[tool]
google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype \
--scope https://www.googleapis.com/auth/gcm \
--save --headless --client-secrets $configfile
echo "We are almost done, hang on tight!"
sed -i 's/modelid/'$modelid'/g' /home/pi/SmartDisplayPi/systemd/assistant.service
sed -i 's/projectid/'$projid'/g' /home/pi/SmartDisplayPi/systemd/assistant.service
sudo mv /home/pi/SmartDisplayPi/assistant.service /lib/systemd/system/assistant.service
sudo systemctl enable assistant.service
sudo systemctl start assistant.service
echo "The script is officially done. You can now reboot if you want."
17 changes: 3 additions & 14 deletions kiosk.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
#!/bin/bash
xset s noblank
xset s off
xset -dpms

unclutter -root &

sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences

/usr/bin/chromium-browser --noerrdialogs --disable-infobars --user-agent="Mozilla/5.0 (SMART-TV; Linux; Tizen 4.0.0.2) AppleWebkit/605.1.15 (KHTML, like Gecko) SamsungBrowser/9.2 TV Safari/605.1.15" --kiosk file:///home/pi/SmartDisplayPi/Web/index2.html&

while true; do
xdotool keydown ctrl+Tab; xdotool keyup ctrl+Tab;
sleep 10
done
xset s noblank
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium-browser Default/Preferences
chromium-browser --noerrdialogs --kiosk file:///home/pi/SmartDisplayPi/Web/index2.html --window-size=800,480 --window-position=0,0

0 comments on commit 6fb35d6

Please sign in to comment.