- Prepare a clean SD Card
- Install Raspbian with latest NOOBS
- Complete Raspbian installation
- Optional configuration
- Install mosquitto broker
A Raspberry Pi prop 16GB Raspbian image from NOOBS 3.3.1 (2020-02-14) without optional configuration is available for download from PROPS_3_3_1.7z
7Zip is required to unflate .7z the image.
Format an SD Card (16GB Class 10 U1 recommended) with SD Card Formatter from Tuxera.
At the time of writing, the current version is NOOBS 3.3.1.
Download NOOBS (Offline and network install) from NOOBS page at raspberrypi.org and unzip all files in the clean SD Card.
Insert the SD card in the Raspberry Pi (3B/3B+/4) connected to a keyboard, a mouse and an HDMI screen, and turn on the Raspberry:
- Let NOOBS boot
- Check the box Raspbian Full installation
- Select your language and keyboard
- Click Install(i) and proceed (for a few minutes)
- When the installation is finished, reboot
- Complete the wizard that appeared on the first start:
- set country
- change password
- select WiFi network (if relevant)
- update software
After the first start, it is time to complete the configuration to adapt it to the development of Python 3 props.
screen is a full-screen window manager required to start prop program remotely from SSH.
-
MQTT, PyQt5 and Eric IDE
$ sudo apt-get update $ sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools $ sudo apt-get install eric $ sudo pip3 install paho-mqtt PyYAML guizero
Eric IDE is a powerful and user-friendly Python IDE with an easy to use debugger.
The resolution you will get by default via VNC is 1280x720, if you have a large monitor display you can change it in /boot/config.txt
$ sudo nano /boot/config.txt
->
#framebuffer_width=1280
#framebuffer_height=720
framebuffer_width=1920
framebuffer_height=1080
Edit /etc/dhcpcd.conf
$ sudo nano /etc/dhcpcd.conf
->
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
interface wlan0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
Wifi network configuration is editable, order is not relevant if several nerworks are available:
$ cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=FR
#network={
# ssid="free_escape"
# psk="toto00"
# key_mgmt=WPA-PSK
#}
network={
ssid="Linksys_RDC"
psk="toto001"
key_mgmt=WPA-PSK
}
Each room requires a MQTT broker and it's a good idea to run the broker on a Raspberry prop.
Install mosquitto broker:
$ sudo apt-get install mosquitto
Commands to start / stop the service:
$ sudo /etc/init.d/mosquitto stop
$ sudo /etc/init.d/mosquitto start
$ sudo /etc/init.d/mosquitto restart
Or with systemctl :
$ systemctl status mosquitto.service
$ sudo systemctl stop mosquitto.service
$ sudo systemctl start mosquitto.service
To edit mosquitto configuration:
$ sudo nano /etc/mosquitto/mosquitto.conf
log_dest destinations
: send log messages to a particular destination. Possible destinations are: stdout stderr syslog topic.log_type types
: choose types of messages to log. Possible types are: debug, error, warning, notice, information, subscribe, unsubscribe, websockets, none, all. Defaults to error, warning, notice and information.connection_messages [ true | false ]
: if set to true, the log will include entries when clients connect and disconnect. If set to false, these entries will not appear.
The reference is : mosquitto.conf man page
Faure Systems (Apr 8th, 2020)
- company: FAURE SYSTEMS SAS
- mail: dev at faure dot systems
- github: xcape-io
- web: xcape.io
- original: RASPBERRY_PI_PROPS.md