Tesla API Security Alarm Project with Raspberry Pi
https://www.cctvcamerapros.com/TeslaPi - This video shows how to create a security alarm that uses an outdoor motion detector to trigger the headlights and horn of a Tesla car. A Raspberry Pi is used to integrate the motion sensor with the Tesla API. Basically, the Tesla’s headlights and horn become security alarm outputs. A Model 3 Tesla is used in the video, but Model S and Model X Teslas will also work with the same software code. The application is written in the Python programming language and is available to download on GitHub. https://github.com/mikehaldas/TeslaPi The logic of the TeslaPi alarm application works as follows. The concept of an “alarm cycle” is used. A cycle is defined by a duration (in seconds) and five escalation levels. The number of levels can be changed. The duration is checked against a timer to keep track of how long motion has been continuously detected or if motion has been detected again within a time threshold. The default threshold is one minute. When motion is detected by the sensor, the “alarm cycle” is started. This does two things. The alarm cycle timer starts and the alarm actions defined by the first escalation level begin. Programmers can define their own alarm escalation rules. These are the default 5 levels. Level 1: Flash Tesla headlights 3 times. Level 2: Flash Tesla headlights 3 times. Level 3: Flash Tesla headlights 3 times. Honk horn 1 time. Level 4: Flash Tesla headlights 3 times. Honk horn 2 times. Level 5: Flash Tesla headlights 3 times. Honk horn 3 times. When Escalation Level 5 is reached or if more time has passed then what is defined in the alarm cycle timer, the Escalation Level is reset and starts over. You can learn more about this project here. https://videos.cctvcamerapros.com/i/tesla-api-security-alarm-raspberry-pi.html
View on YouTube CCTV Installers
https://www.cctvcamerapros.com/TeslaPi - This video shows how to create a security alarm that uses an outdoor motion detector to trigger the headlights and horn of a Tesla car. A Raspberry Pi is used to integrate the motion sensor with the Tesla API. Basically, the Tesla’s headlights and horn become security alarm outputs. A Model 3 Tesla is used in the video, but Model S and Model X Teslas will also work with the same software code. The application is written in the Python programming language and is available to download on GitHub. https://github.com/mikehaldas/TeslaPi The logic of the TeslaPi alarm application works as follows. The concept of an “alarm cycle” is used. A cycle is defined by a duration (in seconds) and five escalation levels. The number of levels can be changed. The duration is checked against a timer to keep track of how long motion has been continuously detected or if motion has been detected again within a time threshold. The default threshold is one minute. When motion is detected by the sensor, the “alarm cycle” is started. This does two things. The alarm cycle timer starts and the alarm actions defined by the first escalation level begin. Programmers can define their own alarm escalation rules. These are the default 5 levels. Level 1: Flash Tesla headlights 3 times. Level 2: Flash Tesla headlights 3 times. Level 3: Flash Tesla headlights 3 times. Honk horn 1 time. Level 4: Flash Tesla headlights 3 times. Honk horn 2 times. Level 5: Flash Tesla headlights 3 times. Honk horn 3 times. When Escalation Level 5 is reached or if more time has passed then what is defined in the alarm cycle timer, the Escalation Level is reset and starts over. You can learn more about this project here. https://videos.cctvcamerapros.com/i/tesla-api-security-alarm-raspberry-pi.html
View on YouTube CCTV Installers
Comments
Post a Comment