potmat / homebridge-google-nest-sdm

A Homebridge plugin for Google Nest devices that uses the Google Smart Device Management API. Supports Cameras, Doorbells, Displays, and Thermostats. Includes support for HomeKit Secure Video.
ISC License
155 stars 17 forks source link

Camera Shows as "<null> Camera" #6

Closed davet9713 closed 2 years ago

davet9713 commented 2 years ago

I've got two registered Nest cameras in my account, with two rooms "Front Yard" and "Dining Room"

For some reason when the cameras enumerate in the plugin, "Dining Room Camera" comes in OK, but the other camera displays as " Camera". I've noticed in the Nest app that the "Where" location of that camera has two fields.. one for the Room (Front Yard) and a second field for Label (empty). I've tried setting the label to something other than blank but it has no effect.

When attempting to view this camera, most times it will be "No Response" when touching the placeholder Nest image and the log looks something like this (stream and oauth codes changed to "..."). Sometimes repeatedly backing out of the "No Response" screen in Home app and retrying will yield a stream that works for a little while before becoming "No Response" again.

[23/11/2021, 18:04:43] [homebridge-google-nest-sdm] Execution of command sdm.devices.commands.CameraLiveStream.GenerateRtspStream returned {"streamUrls":{"rtspUrl":"rtsps://stream-uc2-bravo.dropcam.com:443/sdm_live_stream/...?auth=...","streamToken":"...","expiresAt":"2021-11-23T23:09:43.034Z"} [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] Stream command: ffmpeg -i rtsps://stream-uc2-bravo.dropcam.com:443/sdm_live_stream/... -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -bf 0 -r 30 -b:v 1196k -bufsize 1196k -maxrate 2392k -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)2:trunc(ih/2)2 -payload_type 99 -ssrc 15333555 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params RxJ4z1jiQiYh8TAwkhSiWO8KXJIuKPtUf0XwsmrF srtp://192.168.116.131:60897?rtcpport=60897&pkt_size=1378 -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 10810710 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params mOlmzIlgthxo82+kr9qYTPMgbG29wFjHjNR3V3FB srtp://192.168.116.131:56973?rtcpport=56973&pkt_size=188 -loglevel level+verbose Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-omx-rpi --enable-mmal --enable-indev=alsa --enable-outdev=alsa Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libavutil 56. 51.100 / 56. 51.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libavcodec 58. 91.100 / 58. 91.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libavformat 58. 45.100 / 58. 45.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libavdevice 58. 10.100 / 58. 10.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libavfilter 7. 85.100 / 7. 85.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libswscale 5. 7.100 / 5. 7.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libswresample 3. 7.100 / 3. 7.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [info] libpostproc 55. 7.100 / 55. 7.100 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [tcp @ 0x3e8c080] [verbose] Starting connection attempt to 34.96.108.124 port 443 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] [tcp @ 0x3e8c080] [verbose] Successfully connected to 34.96.108.124 port 443 Camera [23/11/2021, 18:04:43] [homebridge-google-nest-sdm] Camera [23/11/2021, 18:04:54] [homebridge-google-nest-sdm] [rtsp @ 0x3e89a00] [error] method DESCRIBE failed: 404 Not Found Camera [23/11/2021, 18:04:54] [homebridge-google-nest-sdm] Camera [23/11/2021, 18:04:54] [homebridge-google-nest-sdm] [error] rtsps://stream-uc2-bravo.dropcam.com:443/sdm_live_stream/...&auth=...: Server returned 404 Not Found Camera [23/11/2021, 18:04:54] [homebridge-google-nest-sdm] Camera [23/11/2021, 18:04:54] [homebridge-google-nest-sdm] FFmpeg exited with code: 1 and signal: null (Error) Camera [23/11/2021, 18:04:54] [homebridge-google-nest-sdm] Executing command sdm.devices.commands.CameraLiveStream.StopRtspStream with parameters {"streamExtensionToken":"..."} [23/11/2021, 18:04:55] [homebridge-google-nest-sdm] Execution of command sdm.devices.commands.CameraLiveStream.StopRtspStream returned undefined [23/11/2021, 18:04:55] [homebridge-google-nest-sdm] Stopped video stream. Camera [23/11/2021, 18:04:55] [homebridge-google-nest-sdm] Event received: {

potmat commented 2 years ago

You can actually make the <null> Camera thing happen in the Nest app and the Home app! For newly added legacy cameras they will often show up this way if there is no label. This happened to me when I recently bought a new old stock outdoor cam from eBay.

After setting the label to something you will probably need to clear the cached accessories in Homebridge and restart.

As for the 404 error, see this case: https://github.com/potmat/homebridge-google-nest-sdm/issues/4

davet9713 commented 2 years ago

Yeah, I tried setting the label and the clearing all cached accessories before I filed the report... it still comes through as " Camera". The only difference is that the one that works without issue is an old legacy Nest branded indoor Camera that's a couple years old, the one coming through a is a newer Google branded Nest outdoor camera (wired not battery) that I purchased last month.

potmat commented 2 years ago

@davet9713 : Ahh. Fair enough, I don't have one of the new cameras. It's possible they are reported differently in the API. The problem with developing a plugin like this is I can't add features dependant on specific Nest devices if I don't own one myself. You could always lend me yours :)

davet9713 commented 2 years ago

If I do a device list from the Google side and send you the output, would that help?

From: Ted Potma @.> Sent: Wednesday, November 24, 2021 12:15 PM To: potmat/homebridge-google-nest-sdm @.> Cc: David Toth @.>; Mention @.> Subject: Re: [potmat/homebridge-google-nest-sdm] Camera (Issue #6)

@davet9713 https://github.com/davet9713 : Ahh. Fair enough, I don't have one of the new cameras. It's possible they are reported differently in API. The problem with developing a plugin like this is I can't add features dependant on specific Nest devices if I don't own one myself.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/potmat/homebridge-google-nest-sdm/issues/6#issuecomment-978073202 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWRNYLBIQHFYZ6OBLROHOXTUNUMPVANCNFSM5IUV74YQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/AWRNYLGR5OD4NUVQXFYOVKLUNUMPVA5CNFSM5IUV74Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHJGDM4Q.gif

davet9713 commented 2 years ago

"parentRelations": [

    {

      "parent": "enterprises/592e3e76-5bc9-45b5-b64e-82f30d1f2da3/structures/AVPHwEvIFYZhOnB4t0bbFadhz_o6f3vqn83tnvBOeqE5BBD4LecSyAj_qWQI7eOY0CxHyOXkx_sRirrLDG_CvQ76UcJjkw/rooms/AVPHwEs8aNPdIUxH7Dec1gTInB-S4uSdlQN3f9ln4UIfusWHWFO6iIPiM23LDVqYDDJJdIWQtpf6Y8r4r9aM0ZJvQaZL-JVlHlq8GxH5fk75T_F79ddQR1xic0a3uuVn4e_ItmEx-D2ANqQ",

      "displayName": "\u003cnull\u003e"

    }

So this is what spits back from a device list… then I had a whacky thought…

If you look at the Camera in the NEST app, it says it’s in “Front Yard” with a label of “Front Deck” but if you look at the camera list in Google Home that app says the camera is called “Front Yard (Front Deck)” in room “

So it actually looks like this is a glitch on the Google/Nest side that they aren’t correctly mapping the rooms from the Nest app over to Google for the newer model cameras.

I’ve changed the room in Google Home from to Front Yard and it prompted me to remove room as it had no more devices in it. After removing the cached item from homebridge the camera now appears as Front Yard Camera in Apple Home

From: Ted Potma @.> Sent: Wednesday, November 24, 2021 12:15 PM To: potmat/homebridge-google-nest-sdm @.> Cc: David Toth @.>; Mention @.> Subject: Re: [potmat/homebridge-google-nest-sdm] Camera (Issue #6)

@davet9713 https://github.com/davet9713 : Ahh. Fair enough, I don't have one of the new cameras. It's possible they are reported differently in API. The problem with developing a plugin like this is I can't add features dependant on specific Nest devices if I don't own one myself.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/potmat/homebridge-google-nest-sdm/issues/6#issuecomment-978073202 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWRNYLBIQHFYZ6OBLROHOXTUNUMPVANCNFSM5IUV74YQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

potmat commented 2 years ago

Hi @davet9713, yes I mentioned in one of my previous comments that the <null> label is visible in the Nest or Google Home apps in some cases as well, particularly when adding a new camera. Glad you sorted it out, I will add it to the FAQ.