rpellerin / raspberry-pi-home-automation Goto Github PK
View Code? Open in Web Editor NEWHow to build a security camera with a Raspberry Pi
How to build a security camera with a Raspberry Pi
Needs two encoder.output = [circular, photo]
Store their ID for 6 months in Redis, as an expiring key of a hash or something. Do not process activities if their ID is found in Redis.
Must extract logic into functions into files
Read this for the sake of reading: https://raspberrypi.stackexchange.com/questions/62523/always-on-security-camera-uploading-to-cloud-looping-video-recording-saving
Read https://blog.cavelab.dev/2021/11/home-assistant-manual-alarm/ + add link in my future blog post
Read https://blog.cavelab.dev/2022/12/rpi-security-alarm/ + add link in my future blog post
Switch from emails to Pushover or have both
Turn on a buzzer/beeper after toggle on/off the alarm
Handle the relay? Google about spike and current flowing back when toggling on/off
Make sure the Arduino doesn't draw too much current from the Pi, and the Pi neither
Sound an alarm when motion or door opens, and alarm is enabled
Re-read, anything interesting in there? https://stackoverflow.com/questions/25593249/simplest-solution-in-arming-disarming-your-raspberry-pi-home-alarm
Write blog article that points to this repo with https://www.youtube.com/watch?v=RiU3FkZqWHA, reusing the content of README.md, and having README.md pointing to the article. In the article, talk about the motivation and hardware with photos:
RF kit + maybe a 17cm copper spring antenna to better receive? Also, the transmitter is smaller than the receiver.
Retriggerable basically means that as long as movement in front of the sensor is detected, the light stays on. While the non-retriggerable mode is the exact opposite. No matter how much movement is in front of the PIR sensor, it will stay high for the period given by Tx; after that it will go off for the period given by Ti and after that if movement is still detected it will go on again, and so forth.
[...] the non-retriggerable mode is what we want because we will have more photos during a sequence of movements instead of a long period for the camera trigger.
In the README.md, talk about software, code + howto. Mention the default code examples that come with rc-switch, specifically the "receive demo" one
Copy the code of the remote controller of the remove controlled socket, onto the keyfob (see video)
Set up the Arduino https://docs.arduino.cc/tutorials/uno-r4-wifi/r4-wifi-getting-started
sudo adduser $USER dialout
Install the CLI: https://arduino.github.io/arduino-cli/0.20/installation/
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh`
arduino-cli config init
arduino-cli core update-index
arduino-cli board list # Check it's recognized, after plugging the Arduino in the USB port of the Raspberry Pi
arduino-cli core install arduino:renesas_uno # For Uno 4
arduino-cli core list # Check it's installed
arduino-cli lib search rc-switch
arduino-cli lib install rc-switch
arduino-cli compile --fqbn arduino:renesas_uno:unor4wifi ArduinoSketch # An error about libfl.so.2 missing? `sudo apt install libfl2`
arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:renesas_uno:unor4wifi ArduinoSketch
arduino-cli monitor -p /dev/ttyACM0 # To test
python3 -m pip install pyserial
Bonus = code for emitting:
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600); // To allow writing logs
// Transmitter is connected to Arduino Pin #10 , and GND + 5V
mySwitch.enableTransmit(10);
// Set Protocol (default is 1, will work for most outlets)
mySwitch.setProtocol(1);
mySwitch.setPulseLength(100); // update with correct value
}
void loop() {
// mySwitch.sendTriState("FFFFFFFFFFFF"); // ON, update with correct value
delay(1000);
// mySwitch.sendTriState("FFFFFFFFFFF0"); // OFF, update with correct value
delay(1000);
}
https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf
Use configparser
from Python?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.