MyNextCam

The Unofficial SmartThings Blog
Jump to: navigation, search


Nest Security Camera, Keep An Eye On What Matters to You, From Anywhere, For Indoor Use, Works with Alexa

Nest Security Camera, Keep An Eye On What Matters to You, From Anywhere, For Indoor Use, Works with Alexa

Brand: Nest®

Models: all Nest Cam™ and Next Cam IQ™ generations

Type: 'Cameras

Protocol: Wi-Fi

Link to Nest website [1]

Device Type Author:Yves Racine - based on previous work done by Patrick Stuart, and the NST manager authors (tonesto & E_Sch)

ST Community handle http://community.smartthings.com/users/yvesracine/activity

Company Link: http://www.ecomatiqhomes.com#!home/mainPage



The Next Cam's DTH code will be sent free of charge to you upon request when you've contributed to one of My Next packages at my store.



http://www.ecomatiqhomes.com/store

Technical support packages are also available.


If you want to contribute, here is the paypal link below.

https://paypal.me/ecomatiqhomes

Prerequisites

  • Nest Cam operational & connected to Nest Backend via the internet.
  • SmartThings hub fully operational
  • Nest cam's videos must be publicly shared in order to have access to live stream
 refer to https://nest.com/ca/support/article/How-do-I-make-my-Nest-Cam-video-public-or-private
  • Use of the SmartThings classic mobile app (the DTH still doesn't work with the new Samsung Connect mobile app as ST is working on the required migration steps).

Information

Here is a list of ST Capabilities

   capability "Image Capture"
   capability "Sensor"
   capability "Switch"
   capability "Refresh"
   capability "Polling"
   capability "Video Camera"
   capability "Video Capture"
   capability "Health Check"


  • Here is the complete list of commands (see the signature in the DTH code, next to command's implementation for details about parameters):
   command "getStructure"        
   command "setStructure"        
   command "setStructureHome"
   command "setStructureAway"
   command "away"
   command "home"
   command "present"
   command "getCameraInfo"        
   command "getCameraList"
   command "setCameraSettings"        
   command "produceSummaryReport" 
   command "start"
   command "stop"
   command "setStreaming"        
     

List of Attributes available for subscription (in any rule engine like CoRE/WebCoRE/SmartRules)

Please refer to the Nest Developer APIs documentation for more details on each attribute.

https://developers.nest.com/documentation/cloud/api-overview

  attribute "st_postal_code"
  attribute "st_peak_period_start_time"
  attribute "st_peak_period_end_time"
  attribute "st_time_zone"
  attribute "st_eta_begin"
  attribute "cameraId"
  attribute "cameraName"
  attribute "camerasList"
  attribute "locale"
  attribute "software_version"
  attribute "where_id"
  attribute "where_name"
  attribute "label"
  attribute "name_long"
  attribute "is_online"
  attribute "last_connection"
  attribute "last_api_check"
  attribute "device_id"
  attribute "is_streaming"
  attribute "isStreaming"        
  attribute "is_audio_input_enabled"
  attribute "last_is_online_change"
  attribute "is_video_history_enabled"
  attribute "web_url"
  attribute "app_url"
  attribute "is_public_share_enabled"
  attribute "activity_zones"
  attribute "ZoneNames"
  attribute "public_share_url"
  attribute "snapshot_url"
  attribute "last_event"
  attribute "last_event_person"
  attribute "last_event_sound"
  attribute "last_event_motion"
  attribute "last_event_app_url"
  attribute "last_event_web_url"
  attribute "last_event_start_time"
  attribute "last_event_end_time"
  attribute "last_event_urls_expire_time"
  attribute "last_event_animated_image_url"
  attribute "last_event_activity_zone_ids"
  attribute "summaryReport"

Look & Feel

UI Fields


MyNextCamP1.pngMyNextCamP2.png



Upper section of the multi-tile

  • Live Stream window


Lower section of the multi-tile

  • Streaming Status (live, offline, unavailable)
  • 'Take snapshot' button (press to snap a picture)
  • Motion On/off status (indicates if motion detection is on or off)
  • Snapshot picture window to display the latest snapshot
  • Last event's start & end times- if Nest Aware subscriber
  • Triggered zone(s) - if Nest Aware subscriber
  • Refresh

Known issues

Structure are cached

.................................................................................................................................

In order to avoid querying the Nest APIs for the structure data and for better performances, some information is locally cached in the device.

If you make changes to some stucture data and want to update the device immediately (by default, it's done once a day at midnight), please manually press the "refresh" tile.

Troubleshooting

Here are some typical troubleshooting cases explained below. For your specific use cases, you may want to contact the author (there may be some support fees to be applied).'

.................................................................................................................................

Issue #1: I don't know how to create a custom device

.................................................................................................................................

See the explanations of a fellow community member here:

http://community.smartthings.com/t/faq-an-overview-of-using-custom-code-in-smartthings/16772

or

http://thingsthataresmart.wiki/index.php?title=Using_Custom_Code

.................................................................................................................................

Issue #2: I created My Next Cam handler and MyNextManager in the IDE, but I don't know where to execute it

.................................................................................................................................


For the initial setup, under the ST app, click on the Marketspace? item in the bottom menu, and then, on the smartapps link and finally, MyApps (last item in the list).

If you still do not see your smartapp, please make sure that you have published it in the IDE!

For any subsequent execution, under the ST app, click on the "hamburger" menu in the upper right section and then, Smartapps. You should see the smartapp in the list.'


.................................................................................................................................

Issue #3: I executed MyNextManager smartapp, but the 3rd page -after doing the login, and pressing Next- is blank

.................................................................................................................................

If you get a blank screen after pressing 'Next or you get the following error: " Error - bad state. Unable to complete page configuration" or any other ST errors, please check that you've enabled oAuth as specified in step 2f) in the readme.

https://github.com/yracine/device-type-myNext/blob/master/README.md

Also, make sure that you've followed all prerequisites:

http://thingsthataresmart.wiki/index.php?title=MyNextCam#Prerequisites

Refer to MyNextManager smartapp's installation for more details:

http://thingsthataresmart.wiki/index.php?title=MyNextServiceMgr#Issue_.231:_I_don.27t_know_how_to_create_a_custom_smartapp

.................................................................................................................................

Issue #4: My Next Cam's attribute values are off with the Nest mobile app or portal

.................................................................................................................................

First try to refresh the UI by pressing the 'refresh' tile. The ST UI does not allow automatic refresh at the moment.

Please note also that the cloud-to-cloud integration may introduce some delays in getting the latest values.


.................................................................................................................................

Issue #5: I want to disable any notifications from MyNextManager

.................................................................................................................................

Go to the smartapp's last page, and answer 'no' to the following question:

Send a push notification?"''

Be aware that you won't be notified of any connection issues.

.................................................................................................................................

Issue #6: "An unexpected error has occurred" or 'deleteObserver onError: %s' messages in MyNextManager when I press 'Remove'

.................................................................................................................................

'Like any ST connected device, you need first to unselect all your Next devices from all the smartapps & routines as MyNextServiceMgr will not uninstall w/o doing this step.

MyNextManager is the Service Manager for all Next Devices, so uninstalling the smartapp means that all Next devices will be deleted. .................................................................................................................................

Issue #7: I want to get more tracing in the IDE

.................................................................................................................................

Just update the device preferences, and edit the trace parameter, see step 7 in the readme

https://github.com/yracine/device-type-myNext/blob/master/README.md

Do not forget to remove the trace (leave the parameter blank) after your debugging session as this setting may impact performance.


You can now set the trace level to be displayed in the device's preferences (5 is the highest level for logging):

   input("trace", "bool", title: "trace", description:
      "Set it to true to enable tracing (no spaces) or leave it empty (no tracing)")
   input("logFilter", "number",title: "(1=ERROR only,2=<1+WARNING>,3=<2+INFO>,4=<3+DEBUG>,5=<4+TRACE>)",  range: "1..5",
      description: "optional" )        

Under the IDE, to activate live logging, just click on the link below (or the variant according to your shard).

https://graph.api.smartthings.com/ide/logs

You can also edit the device's preferences under the ST mobile app by clicking on its 'gear' button.


Note: To filter the logs for a given device or smartapp, you need to click on its name in the upper section of live logging. This filtering should be done before submitting any logs for analysis.

.................................................................................................................................

Issue #8: I want to upgrade the code but I don't know how.

.................................................................................................................................

Most of the time (unless specified otherwise), you just need to copy and paste the MyNextCam Device's code from the the related txt files, and save & publish.

The same approach should be used for the smartapps.

For more details, please follow the instructions provided at:

https://github.com/yracine/device-type-myNext/blob/master/README.md


.................................................................................................................................

Issue #9: java.util.concurrent.TimeoutException: Execution time exceeded 'x' app execution seconds

.................................................................................................................................

ST has introduced some generic rate limiting rules for all smartapps and device handlers.

For cloud-to-cloud integration, these rate limiting constraints are sometimes too low (due to network latency, servers involved, etc.), and this exception can be raised from time to time. There are some threads about it in the ST community forum:

http://community.smartthings.com/t/rate-limiting-too-restrictive-max-execution-time-exceptions/17985

http://community.smartthings.com/t/execution-times-increasing/19979

http://community.smartthings.com/t/unschedule-api-execution-time-too-long/11232


................................................................................................................................

Issue #10: com.datastax.driver.core.exceptions.ReadTimeoutException

.................................................................................................................................

These exceptions are thrown by the ST backend from time to time. I've been told that ST is working on it. This is not a specific issue with my code.

https://community.smartthings.com/t/cassandra-timeout-during-read-query/46227/3



...............................................................................................................................

Issue #11: I cannot get live stream from My Nest Cam

.................................................................................................................................


In order to be able to view the live stream from the Nest Cam, you'd need to publicly share your Nest Cam's videos. That's the only way to enable live stream at the moment (sadly, no password protected solution).

By publicly sharing the video stream, the code can get the live stream from the old dropcam's (before the Nest acquisition) APIs. This technique has been used in NST manager before me (authors: Tonesto & E_Sch from the ST community).

If you are concerned about privacy issues, refer to the following note from Nest:

The Nest web page with your live video stream is not indexed, so it won’t show up in a search engine like Google. But if you embed the video in another web page, a search engine may be able to find that page.

And, also to the following article from Nest for more configuration details:

https://nest.com/ca/support/article/How-do-I-make-my-Nest-Cam-video-public-or-private

You may want to carefully choose which areas of your house can be publicly shared.

N.B.: Ecomatiqhomes is no way responsible for any security or privacy violations this feature may create for you and/or your family!!


...............................................................................................................................

Issue #12: I cannot create any objects under the new Samsung app

.................................................................................................................................


No custom DTHs can be created under the new Samsung app for the moment as indicated in the prerequisites. You'd need to use the ST classic app to execute MyNextManager in order to create the Next devices. After creating the devices, follow the steps indicated in the installation pdf file included in the zip to force a refresh of the cache in order to make them appear correctly in the new Samsung app.


...............................................................................................................................

Issue #13: Some of my devices under the new Samsung app are disconnected

.................................................................................................................................


If some of your Next devices are disconnected under the new Samsung app, you may have created many of the same devices by executing MyNextManager many times... Under the new Samsung mobile app, you then need to clean them up by pressing the "edit" button next to your location and removing them.

And, for the moment, no custom Cams are working under the new Samsung mobile app!!

For further execution of the MyNextManager smartapp, Refer to issue #2 http://thingsthataresmart.wiki/index.php?title=MyNextCam#Issue_.232:_I_created_My_Next_Cam_handler_and_MyNextManager_in_the_IDE.2C_but_I_don.27t_know_where_to_execute_it