Skip to content

Latest commit

 

History

History
100 lines (69 loc) · 3.29 KB

install_raspi.md

File metadata and controls

100 lines (69 loc) · 3.29 KB

Install Raspberry Pi

Tested with

  • Raspberry Pi 3 model B+
  • RaspiOS image with desktop and recommended software, Release date 2020-05-27

Setup SmartMeter software

Install the project's SmartMeter software on the Raspberry Pi.

Copy the content of repo's raspi directory onto the Raspberry Pi into the $HOME/smartmeter directory. Alternatively, you may want to run the install script.

curl -L https://raw.githubusercontent.com/cdeck3r/SmartMeter/master/raspi/install.sh | bash 
Setup Dropbox Uploader

GitHub repo of Dropbox Uploader: https://github.com/andreafabrizi/Dropbox-Uploader

You will need a dropbox account.

  1. Go to https://www.dropbox.com/developers/apps and login
  2. Click on Create App,
  3. In section 1, select first radio button Scoped access
  4. In section 2, select App folder
  5. In section 3, name your app
  6. Finally, hit Create App
  7. on the next screen tick all permissions for Files and folders, but not files.permanent_delete
  8. set the Access token expiration to No expiration
  9. click on the Generate button
  10. copy the access token in the file ~/.dropbox_uploader on the Raspberry Pi
Run SmartMeter as a cronjob

Install the provided cronjob example smartmeter.crontab

crontab smartmeter.crontab
crontab -l

The last line verifies that the cronjob got installed. The example schedules the script at reboot and starts it 2 min later to give time for the OS to bring all ressources online.

Run the command below to remove the user's crontab. Note: This will remove all entries.

crontab -r

Bare Raspberry Pi Setup

These instructions describe the initial setup of an unboxed, brand-new Raspberry Pi.

Tools

Prepare RaspiOS

  1. format SD card using SD formatter
  2. Flash the image using Etcher
  3. add empty file SSH to SD card's root directory

Boot and login

  1. Insert SD card into raspberry Pi and bootup
  2. SSH into pi
    • host: raspberrypi.local
    • user: pi
    • pass: raspberry

Setup on shell prompt

  1. Run: sudo raspi-config
    • enable VNC, see menu Interfacing Options
    • configure screen resolution, see Advanced Options -> Resolution
  2. Configure VNC to accept other auth method, required if you want to VNC into the raspi with another viewer than realvnc
    • root shell: sudo su
    • Add the following lines at the end of /root/.vnc/config.d/vncserver-x11
Authentication=VncAuth
Encryption=AlwaysOff
Password=e0fd0472492935da
* Password is set to *foobar*. Use `vncpasswd -server` to create a new one.
  1. Reboot or restart VNC server: systemctl restart vncserver-x11-serviced.service

Service GUI using VNC

  1. Use a VNC client of your choice
    • Server: raspberrypi.local
    • Password: foobar
  2. Complete setup on the service GUI