The IHFRS is a smart-home camera that leverages the use of a FLIR Lepton 3.5 sensor to monitor a living area for abnormal spikes in temperature. It features native Apple Homekit integration and has a local web interface and WiFi host for setup.
Future work for this project includes moving processing to an ESP32, integration with Matter (to easily support multiple smart-home ecosystems), the addition of machine learning to reduce false positives, and to offer more user-controlled settings via the GUI.
Installation
- On the SD card for your Raspberry Pi, install Raspbian OS Lite. (You must choose 32-bit if using Pi Zero W, read below)
- If using Raspberry Pi Imager (suggested), make sure to use the settings cog to set the following BEFORE installing...
- Hostname: your choice
- Enable SSH: (password authentication)
- Set username and password: Username must = "pi" for now. Password can be your choice.
- Configure wireless LAN: Be sure to choose a 2.4GHz capable network.
- Set wireless LAN country: "US"
- Set locale settings
- If you choose to flash the OS using other means, ensure you set the above settings, so you can connect wirelessly to the PI.
- If using Raspberry Pi Imager (suggested), make sure to use the settings cog to set the following BEFORE installing...
- Download the IHFRS code files using either of these methods:
- From the "top-level" of this repository: (where you currently are)
- Click the green "Code" button and download the zip file to your computer
- OR
- Right-click on the
IHFRS
folder, then "Download linked file as.."
- From the "top-level" of this repository: (where you currently are)
- Insert SD card into RPI and turn on. Allow RPI to boot and connect to Wi-Fi (~2 mins).
- If you did not set up the Wi-Fi, hostname, etc., now is the time to connect a keyboard and monitor and use
sudo raspi-config
to set up those settings. There are other ways to do this as well.
- If you did not set up the Wi-Fi, hostname, etc., now is the time to connect a keyboard and monitor and use
- Ensure your RPI is on your local network:
- Use terminal or command prompt to
ping *hostname*
- OR
- Try connecting to RPI using SSH
- OR
- Try connecting with FTP or SFTP utility
- Use terminal or command prompt to
- Use FTP or SFTP to upload
IHFRS
folder only to home directory/home/pi/
on the RPI. - SSH into your RPI and run the following, in order:
cd /IHFRS
sudo python init_setup.py
(~8 mins)- Observe the output as it runs. You will be required to answer multiple questions. No RED text should appear.
- use
y
to reboot the PI when it reaches the end.
- Make the necessary hardware connections. Pictures are shown at the very bottom of this README.
- TCAM hardware connection (JUMPER [MODE - GND], 5V, GND, TXD0, RXD0, SPI0_MISO, SPI0_CE0, SPI0_CLK)
- MQ2 Sensor connection (5V, GND, GPIO4) (Use "DO" (Digital Out) on the MQ2 sensor for GPIO4, NOT "AO")
- In the SSH session (Working directory is still IHFRS) run
python IHFRS_run.py
- The code is now running. (This will be automatic later on.)
- Hardware and base code for TCAM board featuring the FLIR Lepton 3.5 sensor.
- Python Implementation of TCAM code and special assistance with tracking down errors.
- HAP-Python Library for Homekit Integration
- RaspiWiFi - Initial WiFi configuration for RPI