@motolaps/motobox
v1.1.24
Published
raspy: sudo raspi-config change locale de_DE utf8 timezone europe berlin expand filesystem
Downloads
25
Readme
motolaps-motobox
Description
Installation
raspy: sudo raspi-config change locale de_DE utf8 timezone europe berlin expand filesystem
Zu installieren (Bei Raspbian Buster):
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y ufw git
# nodejs
# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install nodejs
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
sudo apt-get install -y libudev-dev libusb-dev libusb-1.0-0 libusb-1.0-0-dev
sudo apt install pigpio
####################################
# TO INSTALL NPM PACKAGES
# sudo chmod 775 /usr/bin/node
# TO USE GPIOs
# sudo chmod u+s /usr/bin/node
####################################
# sudo chown pi:pi -R /usr/lib/node_modules
sudo chown -R pi:pi /home/pi/.npm*
sudo chmod 777 -R /var/log/
# sudo chown -R pi:pi /root/.npm
# sudo chmod -R 777 /root/.npm
# sudo chown -R pi:pi /usr/lib/node_modules
# sudo chmod -R 775 /usr/lib/node_modules
#npm install -g gulp-cli
npm install -g @dotup/dotup-ts-mqtt-cli --unsave-perm
npm install -g @dotup/node-ssdp-cli --unsave-perm
npm install -g @dotup/node-app-installer --unsave-perm
npm install -g @dotup/node-mifare-usb --unsave-perm
npm install -g @dotup/raspberrypi-gpio --unsave-perm
# sudo chmod u+s /usr/bin/node
sudo dd of=/etc/udev/rules.d/10-card.rules << EOF
SUBSYSTEM=="usb", ATTR{idVendor}=="ffff", ATTR{idProduct}=="35", GROUP="users" MODE="0666"
SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", MODE="0666"
KERNEL=="hiddev*", ATTRS{idVendor}=="ffff", MODE="0666"
EOF
sudo chmod 0666 /dev/hidraw*
sudo udevadm control --reload-rules
# TO UPDATE PACKAGES !!!
##
# npm install --prefix ~/moto/motobox/ @motolaps/motobox
##
# Als service
#noin -u dotupNET -r dotup-ts-node-ipc-server
npm install -g @dotup/node-ipc-server
cd ~/.npm-global/lib/node_modules/@dotup/node-ipc-server
nosi
# Als app
#noin -u dotupNET -r motolaps-motobox-codereader-terminal
npm install -g @motolaps/motobox-codereader-terminal
# Als Service
#noin -u dotupNET -r motolaps-motobox-codereader-usb
npm install -g @motolaps/motobox-codereader-usb
cd ~/.npm-global/lib/node_modules/@motolaps/motobox-codereader-usb
nosi
# Als service
#noin -u dotupNET -r motolaps-motobox-simulator
npm install -g @motolaps/motobox-simulator
cd ~/.npm-global/lib/node_modules/@motolaps/motobox-simulator
nosi
#npm install -g @motolaps/motobox-simulator
# Als Service
#noin -u dotupNET -r motolaps-motobox
npm install -g @motolaps/motobox
cd ~/.npm-global/lib/node_modules/@motolaps/motobox
nosi
Link zur config datei damit von home "nano motobox.config.json" möglich ist
cd ln -s .npm-global/lib/node_modules/@motolaps/motobox/dist/assets/motobox.config.json motobox.config.json
Hyper: apt-get install hyperv-daemons
#############################################################
Boot to terminal:
https://stackoverflow.com/questions/30044035/starting-node-app-at-startup-on-raspberry-pi
https://raspberrypi.stackexchange.com/questions/34060/raspberry-pi-autostart-terminal-running-nodejs-for-lxde-environment/34061
https://ubuntu-mate.community/t/solved-boot-raspberry-pi-2-image-directly-to-terminal-console/1569/3
https://www.raspberrypi-spy.co.uk/2014/05/how-to-autostart-apps-in-rasbian-lxde-desktop/
#############################################################
Firewall:
RDP 3389/tcp
Bonjour 5353/udp
SSDP 1900/udp
Node Remote debug 9229/tcp
sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow ssh sudo ufw allow 1900/udp sudo ufw allow 1883/tcp sudo ufw allow 3389/tcp sudo ufw allow 9229/udp sudo ufw enable
#############################################################
Device discovery service:
Status anzeigen: systemctl status motoboard.service
Neustart: systemctl restart motoboard
Logs anzeigen: sudo journalctl --follow -u motoboard.service
Deinstallieren: sudo systemctl stop [servicename] sudo systemctl disable [servicename] rm /etc/systemd/system/[servicename] sudo systemctl daemon-reload sudo systemctl reset-failed
systemd service: After=network-online.target Wants=network-online.target
#############################################################
GPIO Access:
https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=208748
https://www.raspberrypi.org/forums/viewtopic.php?t=5185#p161013
Configuration
Usage
Release Notes
1.0.0
Fixes/Features:
- Initial release
License
MIT © Peter Ullrich
Enjoy!