06-16-2023 04:58 AM
I am desperately trying to find a way to turn y nest cam battery on or off by automation or script.
I manage an Airbnb and would like the cameras to be off when people are in the house and turn on when nobody is home. I have a smart home panel installed and want to add the option to manually turn the cameras on / off. I am using Samsung Smartthings. Even better if I could automate this when the alarm system is armed. I do not want to give guests direct access to google home.
I have not been able to control the cameras either by a routine, or through any integration.
I would like to be able to either:
- switch on the camera by an integrated device. E.g. a smart switch
- switch on cameras by a routine
- switch on cameras by direct integration with SmartThings
Is there any way to achieve this?
06-16-2023 08:42 AM - edited 06-16-2023 08:52 AM
Here's how I did this, using a Ring Alarm, Alexa, SmartThings, and Google Home:
# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #
metadata:
name: Nest Cam Off When Home # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”
automations:
# “starters” and “actions” are required; “condition” is optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation
starters:
- type: device.state.OnOff
state: on
# [available operators: is, isNot]
is: false
device: YOUR ARMED AWAY VIRTUAL SWITCH GOES HERE
# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script, and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: device.command.OnOff # Turn the device on or off.
on: false
devices: YOUR CAMERA GOES HERE
Obviously you could create a similar routine to sync camera on/off state with any other device that has an on/off state, to adapt to whatever unique setup you have.