/HomeHub

Touchscreen interface for Raspberry Pi home system.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

HomeHub

Install Node

https://linuxize.com/post/how-to-install-node-js-on-raspberry-pi/

Autostart

On a Raspberry Pi 4 run the following command:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

Then add the following line:

@lxterminal -e /home/pi/HomeHub/start.sh

Automatically Turn Off Display at Night

Edit crontab

crontab -e

Add the following lines

# Turn monitor on
0 7  * * * /usr/bin/vcgencmd display_power 1

# Turn monitor off
0 20 * * * /usr/bin/vcgencmd display_power 0

OctoPrint iFrameSupport (Required)

Run the following commands:

~/oprint/bin/octoprint config set --bool server.allowFraming true
sudo service octoprint restart

Pico Text to Speech Installation (Required)

Force the audio output to HDMI: https://www.raspberrypi.org/documentation/configuration/audio-config.md#:~:text=The%20Raspberry%20Pi%20has%20two,plugged%20into%20the%20headphone%20jack.

sudo apt-get install pulseaudio
sudo modprobe snd_bcm2835
sudo apt-get install alsa-utils
start-pulseaudio-x11
sudo apt-get install mpg123
sudo nano /etc/modules

Then add the line: snd_bcm2835

sudo apt-get install mplayer
sudo nano /etc/mplayer/mplayer.conf

Then add the line: nolirc=yes

wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-data_1.0+git20130326-3_all.deb
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-3_armhf.deb
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-3_armhf.deb
sudo dpkg -i libttspico-data_1.0+git20130326-3_all.deb
sudo dpkg -i libttspico0_1.0+git20130326-3_armhf.deb
sudo dpkg -i libttspico-utils_1.0+git20130326-3_armhf.deb

npm install

Installs node modules.

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.