Creating a Smart Thermostat using a Raspberry Pi, Python, and TypeScript
Student Qualifications
- Logical thinking and math skills
- Facility with computers
- A computer running macOS, Windows, or Linux
Class Description
In this class you’ll build and program a smart thermostat that you can connect to a heating, ventilation and air conditioning (HVAC) system to control the temperature. You’ll be able to control the system from a web browser on a smartphone or other computer on the local area network.
Hardware
Screen Shot from Browser
What You’ll Learn
You’ll learn how to:
- create a web application
- using the Python language and the Flask webapp framework for the server
- TypeScript for the client
- develop software and deploy it on a Raspberry Pi
- control physical devices (relays and a temperature sensor)
Software and services we’ll use:
- JetBrains IntelliJ IDEA Ultimate with its Python plugin (or another IDE if you know it very well)
- git
- github
About the Teacher
Dave Briccetti is a computer programming teacher for kids, professional software developer, community technology and music volunteer, open source software developer, creator of educational videos, and blogger. He uses and teaches many languages, including Python, JavaScript, TypeScript, Scala, Java, Kotlin, Rust and Ruby.
Resources
- Python documentation
- Flask documentation
- TypeScript
- Dave Briccetti’s resources
- Smart Thermostat Github repository, containing a completed implementation of this project
- Python Lessons Github repository
- YouTube Python playlist
- YouTube Electronics playlist
Session 1, 2021-01-15
Getting Acquainted
Skills inventory
Setup
- Download and install software as needed
- Python
- IDEA
- Join Discord server
Overview and Demo of the Project
VNC to the Raspberry Pi, where it’s running
The app in the client (web browser)
The source code