Password for all Controller: 1234
SSH-Connect via ssh pi@<<Hostname>>
Code is found in directory: /var/lib/revpiload/
Hostname: MiniFactory
Password: 1234
Runs:
Local Broker for MQTT
Broker address: MiniFactory/
Port: 1883
All topics are under MiniFactory/#
Listens to and logs all MQTT-Communication from the whole MiniFactory system
Converts request for Products to the format that the MiniFactory-PLC needs and sends it to a selected factory
Webshop for MiniFactory
Link: MiniFactory/
PLC-Control for the factory.
Hostname: RightMiniFactory
Password: 1234
Hostname: LeftMiniFactory
Password: 1234
To install follow Tutorial: https://revolutionpi.com/en/tutorials/images/install-jessie
- Install RevPi Bullseye 32-bit Lite
Configs on RevPi after installing:
Open config: sudo raspi-config
- Change Password to
1234 - Change Hostname to desired
- set Timezone to Berlin
- exit with Finish and reboot
Add University NTP server to allow timesync in uni network
sudo nano /etc/systemd/timesyncd.conf- Add Line
NTP=time1.uni-stuttgart.de time2.uni-stuttgart.de time3.uni-stuttgart.de systemctl restart systemd-timesyncd.service
Upload config if RevPiCommander doesn't work:
copy file to /tmp
move into /tmp
sudo cp _config.rsc /var/www/revpi/pictory/projectsInstall packeges if needed:
sudo apt install git
sudo apt install pip
Disable not needed Services:
https://revolutionpi.com/en/tutorials/software-2/activating-deactivating-services
Using PiCtory to configer the modules on the controller
- Got the the website found under the hostname of the controller (for example minifactory/)
- log in login should be set to
adminwith pwhiwi1234- if not std login can be found on the right hand side of the controller
- Config hostname to
MiniFactory
- Broker Address:
"MiniFactory"if installt on MiniFactory Host - Port:
1883
sudo apt-get install mosquitto
sudo systemctl enable mosquitto
sudo systemctl status mosquitto
sudo nano /etc/mosquitto/conf.d/local.conf
Add:
listener 1883
allow_anonymous true
sudo systemctl restart mosquitto
- Clone MQTT into
/var/lib/revpiload/ - add
mqtt_receive.pyas PLC programm (with RevPiCommander)- create log folder in
/var/lib/revpiload/
- create log folder in
sudo apt install pip
sudo pip install django
sudo pip install pillow
- run with
sudo python manage.py runserver 0.0.0.0:80find site at minifactory/
Disable apache2
sudo systemctl stop apache2
sudo systemctl disable apache2
Create service
sudo nano webshop.service
copy into service file
[Unit]
Description=Hosting webshop
After=network.target
[Service]
WorkingDirectory=/var/lib/revpipyload/WebShop
ExecStart=/usr/bin/python /var/lib/revpipyload/WebShop/manage.py runserver 0.0.0.0:80
Restart=always
User=root
[Install]
WantedBy=multi-user.target
execute
sudo systemctl daemon-reload
sudo systemctl enable "webshop"
sudo systemctl start "webshop"
sudo systemctl status "webshop"
enter minifactory/ or http://minifactory/
Doc for webshop found at WebShop/webshop_doc.md
- Config hostname to
LeftMiniFactoryorRightMiniFactory - Clone PLC_Code into
/var/lib/revpiload/ - add
rightline.pyorleftline.pyas PLC programm (with RevPiCommander)- create log folder in
/var/lib/revpiload/
- create log folder in