Hi,
I currently have a very basic IP cam that does not have any logic like movement sensors or storing data, so I am considering switching.
I would like to have a camera that:
Triggers actions based on movement (movement detection)
Stores data into the cloud instantly
If possible battery operated so I can put it anywhere I like.
Integrated with Home assistant.
Reason is that I want it to point to the entrance and if someone would come in and turn off the mains (close to the entrance) and take the camera with them, I still would like to have the fragment stored in the cloud.
If you want to take Security Cameras seriously I would ditch the whole idea of battery / WiFi cameras. Also why do you wanât your security information floating about in the cloud?
I would look at 2K resolution minimum and for anything wider than a drive I would look into 4K Cameras. Most of these battery Cams are 720p with the odd few 1080p.
You will also want them with EXIR IR LEDâs for night time use.
If you use POE you can run a single CAT5e or CAT6 cable to each cam to provide both Data and Power.
There are some NVRâs you can tie into HA. Or look at some of the other options like Blue Iris, Synology, Zoneminder etc.
as per above, on all points to be honest. I personally use a few hikvision camera that are great quality and very good value for money
A long time ago I wrote an article with my findings, feel free to have a look, you might find something interesting in it:
I also use HikVision Cameras, you can use their line crossing etc to trigger automationâs
- alias: Tripwire
trigger:
platform: state
entity_id: binary_sensor.driveway_line_crossing
from: 'off'
to: 'on'
condition:
condition: or # 'when dark' condition: either after sunset or before sunrise
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
action:
- service: homeassistant.turn_on
entity_id: group.HallLights
I use them with my Synology NAS, I can also use other sensors to trigger the NAS to record, for example when a door opens.
I have not read @lolouk44 guide, but also consider the lens size. A 4mm lens will give you a nice wide shot for you garden, but you might need a 6mm lens for your drive (narrower lens) or even a 12mm for an alleyway.
Thanks guys for the feedback!!
Iâll have a look at the advice and looking at the Synology option with these hikvision cameras could be an option as I do have a Synology NAS. But the reason for the cloud is in the scenario that someone enters my apartment (donât have a driveway or garden, just a 100m2 apartment) and just decides to shut down the mains and take all electronics with them and then I do not have any evidence to show the police. Thatâs why I thought sending it to the cloud instantly would be a good idea, or isnât it?
Remember that cloud storing will take A LOT of bandwidth.
For this very reason I have SD cards in my cameras instead of an NVR which can indeed be taken away: Itâs quite unlikely that the thieves would go through the trouble of getting up a ladder / roof to take the cameras down and get the SDs out.
Hikvision can anyway send alerts based on events, Iâve got mines to record on motion detection and email me photos on line crossing (I get 3 pic centered around the line crossing event time).
But if you prefer you could save the line crossing event on an FTP location / NAS share that then gets synced in the cloud (e.g. Dropbox)
That might indeed be a good alternative! Have storage to the SD card, but do email/store offsite some pictures.
Remember, Iâm living in an apartment with no roof, but a ceiling at 3m (9 feet) high, so not too difficult if youâd want to take the camera.
I definitely think thereâs value to getting video clips stored off-site. I use a synology with foscam cameras but am well aware that the NAS could be nicked. My cameras are indoor and not difficult to reach (although all located where youâd have to cross the room to get to them). Itâs a new setup but Iâm thinking of using the synology actions to push stills / short clips if Iâm not in home mode to my free google or microsoft storage and set up to delete regularly.
Thatâs exactly my thought! So if the NAS can synchronize instantly to the cloud in case of movement youâd be ok. If possible also as you say only in away mode not to have the NAS active all the time, but I realize hibernation startup might be too slow.
HikVision is a greate option but keep in mind that the official prices are two times bigger than you can buy it Cheap and good quality cameras are Reolink, easy to buy in Europe and US (aliexpress, amazon). SD card in cameras is nice if you want to use official app for the phone. You will see alerts and can see what was happend thanks to SD recording. Unfortunately, at the night, when is raining or are some mosquitos or something like that, you will get a lot of fake alarms and SD Card will be full shortly.
Yea, ideally you want to tie in the whole setup with Deepstack or Tensorflow etc to check what the camera triggers is actual people etc.
The line crossing and movement in boxes option on the HikVision Cameras work pretty well though.
You can also remove sections where you donât want HikVision / Synology to look for movement.
I know that the ones that I use can trigger on built-in motion detection and take snapshots but I donât use the camera snapshot capability since you can use cgi commands from HA to take snapshots and send them based on the built-in camera motion detection trigger.
And I also use Blue Iris software as a DVR to use the BI motion detection to trigger video recordings to my PC.
Do you have some sample code or examples I could have a look at? I could use my movement sensor to trigger the snapshots from my current basic camera to test and play around.
i would focus on the camera recording system as cameras change over time and you will likely have a mix ⊠i use blue iris security software and it supports a vast area of camerasâŠiâm currently using cameras from foscam, ubiquiti (very good picture quality and good price), hkvision, doorbird (door camera/doorbell) ⊠in all i have 25 cameras controlled via blue iris for motion detection, recording (NAS) and alerts (sent to HA via MQTT messages) btw, (stay away from wifi cameras, they will not scale to large systems (iâve tried) -> use ethernet with POE). i then use my blue iris server to serve camera streams to HA and HADashboards throughout my home. In addition, iâm using tensorflow on my HA system to qualify motion detection from Blueiris with alerts for people,cars and trucks for certain cameras.
if you use video cameras with HA be aware of processing power particularly if you add object detection via tensorflow or similar ⊠i started a year ago with HA 1) hassio on rpi3 and lasted 3 days due to limitations for OS enhancements ; 2) i went to debian on RPI3 3 months after i started with cameras and video; 3) moved to intel NUC with ubuntu 18.x; then i started using tensorflow ; 4) now using Intel Skull Canyon NUC on ubuntu 18.x with 16GB DRAM and all is well ⊠iâm supporting 25 video cameras, 5 HADashboards, 5 cameras with tensorflow object detection along with over a 130 components.
Here are a couple of examples of motion detection sensors triggered by the camera built-in detector for newer and older Foscam cameraâs:
- platform: command_line
name: "Kitchen Camera Motion"
command: 'curl -k --silent "http://192.168.1.51:8001/get_status.cgi?user=XXXX&pwd=YYYY" | grep -oP "(?<=alarm_status=).*?(?=;)"'
value_template: >-
{%- if value == "0" -%}
None
{%- elif value == "1" -%}
Detected
{%- endif -%}
scan_interval: 3
- platform: command_line
name: "Garage Camera Motion"
command: 'curl -k --silent "http://192.168.1.52:8002/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=YYYYYY" | grep -oP "(?<=motionDetectAlarm>).*?(?=</motionDetectAlarm>)"'
value_template: >-
{%- if value == "0" -%}
Disabled
{%- elif value == "1" -%}
None
{%- elif value == "2" -%}
Detected
{%- endif -%}
scan_interval: 3
the automation I have set up right now for a âtrespass alarm systemâ doesnât use the motion sensors above but instead uses door and window sensors that trigger the âalarm systemâ warning siren and the snapshot service and then sends the snapshots via pushbullet. You can easily adapt the code to use any binary sensor so you will need to create a binary_sensor out of the above (non-binary) camera motion sensors:
- alias: Tresspass Warning
initial_state: 'on'
trigger:
# test switch
- platform: state
entity_id: input_boolean.bool_7
to: 'on'
- platform: state
entity_id: binary_sensor.door_window_sensor_1_sensor
to: 'on'
- platform: state
entity_id: binary_sensor.door_window_sensor_2_sensor
to: 'on'
- platform: state
entity_id: binary_sensor.door_window_sensor_3_sensor
to: 'on'
- platform: state
entity_id: binary_sensor.door_window_sensor_4_sensor
to: 'on'
- platform: state
entity_id: binary_sensor.comp_rm_motion_template
to: 'on'
- platform: state
entity_id: sensor.sunroom_east_pe_beam
to: 'OFF'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.bool_6
state: 'on'
action:
- delay: '00:00:05'
- service: camera.snapshot
data_template:
entity_id: >
{% set mapper = {
'binary_sensor.door_window_sensor_1_sensor':'camera.kitchen',
'binary_sensor.door_window_sensor_2_sensor':'camera.dummy',
'binary_sensor.door_window_sensor_3_sensor':'camera.dining_room',
'binary_sensor.door_window_sensor_4_sensor':'camera.new_living_room',
'binary_sensor.comp_rm_motion_template':'camera.living_room',
'input_boolean.bool_7':'camera.dummy',
'sensor.sunroom_east_pe_beam':'camera.diningroom' } %}
{{ mapper[trigger.entity_id] }}
filename: >
{% set mapper = {
'binary_sensor.door_window_sensor_1_sensor':'/config/www/snapshots/kitchen_alarm_1.jpg',
'binary_sensor.door_window_sensor_2_sensor':'/config/www/snapshots/dummy_alarm_1.jpg',
'binary_sensor.door_window_sensor_3_sensor':'/config/www/snapshots/diningroom_alarm_1.jpg',
'binary_sensor.door_window_sensor_4_sensor':'/config/www/snapshots/new_livingroom_alarm_1.jpg',
'binary_sensor.comp_rm_motion_template':'/config/www/snapshots/livingroom_alarm_1.jpg',
'input_boolean.bool_7':'/config/www/snapshots/dummy_alarm_1.jpg',
'sensor.sunroom_east_pe_beam':'/config/www/snapshots/diningroom_pe_alarm_1.jpg' } %}
{{ mapper[trigger.entity_id] }}
- service: script.burglar_alarm
data_template:
triggered_by: "{{ trigger.to_state.attributes.friendly_name }}"
- delay: '00:00:05'
- service: notify.pushbullet_notify #notify.gmail_notify_alarm
data_template:
#title: Alarm System
message: 'Warning - Trespass alarm has been triggered!'
data:
file: >
{% set mapper = {
'binary_sensor.door_window_sensor_1_sensor':'/config/www/snapshots/kitchen_alarm_1.jpg',
'binary_sensor.door_window_sensor_2_sensor':'/config/www/snapshots/dummy_alarm_1.jpg',
'binary_sensor.door_window_sensor_3_sensor':'/config/www/snapshots/diningroom_alarm_1.jpg',
'binary_sensor.door_window_sensor_4_sensor':'/config/www/snapshots/new_livingroom_alarm_1.jpg',
'binary_sensor.comp_rm_motion_template':'/config/www/snapshots/livingroom_alarm_1.jpg',
'sensor.sunroom_east_pe_beam':'/config/www/snapshots/diningroom_pe_alarm_1.jpg' } %}
{{ mapper[trigger.entity_id] }}
just to be aware that the âmapperâ requires a line entry for every possible situation (trigger in this case) so thatâs why I needed to create the âcamera.dummyâ entry since I donât have a camera that corresponds to that motion sensor but I still wanted it to trigger the alarm.
Found this old thread, maybe you can help me out. If I upload from my cameras to my Home Assistant when motion is detected (FTP plugin running), can I then upload the clip to Dropbox or similar? Do you know?