Documentation Status

TPH forecast with Raspberry Pi and AI.

I explain first boot your Raspberry Pi and set up Python environment for developing.

This project is developing now, yet not finish.

Preparing

Please get somethings next list.

  • Raspberry Pi 3B, 3B+

  • RPi TPH Monitor Rev2

  • micro SD card, 16GB above(recommended)

  • USB connected key board

  • USB connected mouse

  • Raspbian

  • HDMI cable and display

    • use TV instead of display

  • Python development environment

    • We supported only Python 3.7 upper version.

Set up Raspberry Pi

You must set up your Raspberry Pi.

On your Mac or PC(Linux, MS-Windows), you can install Raspbian to microSD card.

Download newest Raspbian

I recommend using official Raspbian which can download from Raspberry Pi Downloads.

You will choose “Raspbian Buster with desktop and recommended software” or “Raspbian Buster with desktop”.

Installing operating system image

You must read installation guide for installing operating system image.

And download balenaEtcher.

macOS

If you use Apple Mac, you can install via brew.

$ brew cask install balenaetcher

First boot

Only first boot time, You must connect USB keyboard, USB mouse, and monitor via HDMI. You must set Wi-Fi network and enable SSH via raspbian-config. Please set fixed IP address, for example 192.168.0.121/24.

Test remote connect

On your Mac or PC, remote connecting test via ssh.

$ ssh pi@192.168.0.121

Package upgrade

I recommend upgrade your Raspbian.

$ sudo apt update
...
$ sudo apt upgrade

Prepare development environment

You can development on your Raspberry Pi.

I recommend preparing development environment on your Mac or PC.

pyenv and pyenv-virtualenv

Please install

macOS, Linux

Install Python via PyEnv

$ pyenv install 3.8.0

And setup pyenv-virtualenv

$ pyenv virtualenv 3.8.0 djrpi380

cf. my home directory.

$ pyenv versions
* system (set by /Users/mitsu/.pyenv/version)
 3.7.4
 3.7.4/envs/djsample374
 3.8.0
 3.8.0/envs/djrpi380
 djrpi380
 djsample374
$ python --version
Python 2.7.16

my environment directory.

$ cd ~/git/hub/django-rpi-tph-monitor
$ pyenv local djrpi380
$ pyenv versions
 system
 3.7.4
 3.7.4/envs/djsample374
 3.8.0
 3.8.0/envs/djrpi380
* djrpi380 (set by /Users/mitsu/git/hub/django-rpi-tph-monitor/.python-version)
 djsample374
$ python --version
Python 3.8.0

MS-Windows

If you use MS-Windows, venv instead of pyenv.

Hydrogen

Hydrogen is an interactive coding environment that supports Python, R, JavaScript and other Jupyter kernels.

$ python -m ipykernel install --user --name=dj3rpi380 --display-name=dj3rpi380

If you multiple pyenv versions, you may repeat this command.

List your ipkernel.

$ jupyter kernelspec list

Let’s begin development “Home automation application”.

Documentation

We published documentation on Read the Docs.

TPH forecast with Raspberry Pi and AI documentation.