Brandawg93 / homebridge-nest-cam_old

Use your Nest Cam as IP camera in HomeKit.
Apache License 2.0
89 stars 14 forks source link

Unable to see live stream #6

Closed simplytoast1 closed 5 years ago

simplytoast1 commented 6 years ago

Running on a Mac with FFMPEG installed and get San;shots but not a video stream.

KhaosT commented 6 years ago

Huh, is ffmpeg running when you tap stream on your iOS device? You can check this by open Activity Monitor on macOS.

Sent from my iPhone

On Nov 27, 2017, at 5:48 PM, ddorato notifications@github.com wrote:

Running on a Mac with FFMPEG installed and get San;shots but not a video stream.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

JJJ commented 6 years ago

@ddorato What hardware? Running OK for me on a Pi 3.

ooii commented 6 years ago

Same issue here. When I tap stream on my iOS device, I have the following message in homebridge

[NexusStreamer]OK
[NexusStreamer]Redirect
[NexusStreamer]Error

And ffmpeg is not started (installed at /usr/local/bin/ffmpeg). Running it on OSX with useOMX set to false, node v8.9.1 and latest homebridge and its modules.

KhaosT commented 6 years ago

This is Nest API returning an error… not exactly sure why it’s doing that…

Sent from my iPhone

On Dec 19, 2017, at 12:35 PM, ooii notifications@github.com wrote:

Same issue here. When I tap stream on my iOS device, I have the following message in homebridge

[NexusStreamer]OK [NexusStreamer]Redirect [NexusStreamer]Error And ffmpeg is not started (installed at /usr/local/bin/ffmpeg).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ooii commented 6 years ago

Can you please give more details about what settings should I enable/disable in nest home? The video is shared publicly without password.

JJJ commented 6 years ago

With this plugin active, you should not need to share the stream at all. The point of the plugin is to do all that work automatically for you (without exposing your camera feeds) and the README.md should probably be updated to express that.

ooii commented 6 years ago

Thanks for your answer @JJJ. I disabled public sharing of the camera, I got only [NexusStreamer]Error messages. Since I enabled it back, I have [NexusStreamer]Playback Begin when I open the camera but ffmpeg is never started.

Note that I'm running homebridge-nest-platform as well as homebridge-nest-cam.

Here is my config part of the homebridge-nest-cam plugin. Is it correct? I'm running it on OSX High Sierra with node v8.9.1 and latest homebridge and its modules.

{
   "platform": "Nest-cam",
   "username": "mail@mycompany.com",
   "password": "mypasswd",
   "useOMX": false                
}
maartenvant commented 6 years ago

Strange thing is for me I only see my nest cam as an motion sensor.... no stream at all. Doesn't even recognise it as a cam.

Got no error running homebridge in the terminal...

I see this coming by in the terminal when starting homebridge:

Any tips?

JJJ commented 6 years ago

@maartenvant To my knowledge, this plugin will not setup Nest cameras as motion sensors. The regular homebridge-nest plugin does this, which comes with support for both the Thermostat and using cameras as motion sensors.

I believe if you are seeing a motion sensor options in HomeKit, you may be running both plugins, but if you're not seeing video, this one isn't configured correctly yet.

maartenvant commented 6 years ago

I've got both homebridge-nest and homebridge-nest-cam installed as described in the step by step. also my config file contains both in config.json (attached)

homebridge-nest only showed my Thermostat (no motion sensors)

After installing the homebridge-nest-cam the motion sensor showed up.

config.txt

JJJ commented 6 years ago

I've got both homebridge-nest and homebridge-nest-cam installed as described in the step by step.

Can you link me to these instructions? I do not think this plugin requires homebridge-nest, but I may be incorrect. As is, I've always ran both of them.

After installing the homebridge-nest-cam the motion sensor showed up.

From the Homebridge Nest instructions, it supports motion and not video; this plugin (Homebridge Nest Cam) supports video but not motion.

Your config.txt seems OK, and I assume you're using correct values for everything you've obfuscated or trimmed out. You could remove a few blank lines, but I don't think that will cause breakage.


One thing that wasn't obvious to me when I set this up, is that each camera needs to be added manually through the Home app - they will not automatically appear in "Default Room". Put another way, you'll need to go through the steps of adding a new accessory for each Nest camera you own, as if it was any brand new camera you were setting up with Home.

maartenvant commented 6 years ago

The link to the homebridge-nest-cam = https://www.npmjs.com/package/homebridge-nest-cam

JJJ commented 6 years ago

Those instructions do not say to install Homebridge Nest; they only say to install Homebridge.

It looks to me like Nest-cam has created your Entryway camera, you just need to add & configure it using the workflow in the Home app itself.

maartenvant commented 6 years ago

Got it working.

Unfortunately I have NodeJS v6.10.2 running and not Node version of >=8.0.0. Homebridge is giving me a warning but it is still working only if I'm not checking the live stream. as soon as I click on the screenshot of my camera home bridge crashes.

I can't upgrade because other plugins do not work very well with NodeJS 8.0 >

FFMPEG is installed

When it is crashing I get the following error: `events.js:160 throw er; // Unhandled 'error' event ^

Error: spawn ffmpeg ENOENT at exports._errnoException (util.js:1018:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)`

Or somebody knows how to solve it without upgrading, or I just have to accept it.

I do get a fresh screenshot when I open the Home app.

Thanks

JJJ commented 6 years ago

@maartenvant You'll need to recompile using a version of Node greater than 8.0 to get streaming working; it relies on functionalities that your Node version does not have yet.

Glad you got screenshots working, at least.

DomenicoColandrea86 commented 6 years ago

@JJJ , I have Node v8.9.1 installed and I am seeing same issue.

screen shot 2018-02-16 at 2 54 46 pm
daniyo27 commented 6 years ago

Anyone able to get this resolved? I have the same exact problem. I have Node v8.9.3 installed along with FFMPEG. The same exact error is seen as @DomenicoColandrea86 's screenshot. I cannot use OMX as it is on a x86 platform

zhoujli commented 6 years ago

The live video works fine after I install the plugin. But after a few days, there is this [NexusStreamer]Error when I try to do live video.

andrewnorris commented 6 years ago

I was getting the following error when I first installed;

[NexusStreamer]OK [NexusStreamer]Redirect [NexusStreamer]Error

However, after I went into my Nest camera settings and increase the settings to High, I got

[NexusStreamer]OK [NexusStreamer]Playback Again with Live support

It's a little laggy, but altogether pretty solid.

jonathansimmons commented 6 years ago

So I've been doing a lot to try and make the live stream my first go around all my cameras showed up and added fine, but when I tried to watch live I was shown a still then eventually a "Not Responding" error. The log just shows:

[NexusStreamer]OK
[NexusStreamer]Playback Begin

but the playback never actually started.

In an attempt to fix thing I removed the plugin, upgraded from 8.11.2 to 10.4.0. After the upgrade suddenly only 2 of my 7 camera where listed as available to add. Ignoring why the other 5 were missing I again tested live playback and it's still not working.

Here are is my current setup:

FFMPEG:

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100

Node: v8.11.2 Homebridge: 0.4.43 npm: 5.6.0

All my camera are set to High Streaming speed. I have 150/150mps. The camera respond fine in the nest app on wifi or remote. Any help would be appreciated.

jonathansimmons commented 6 years ago

I was able to get all the camera to show up again by clearing out ~/.homebridge/persist and ~/.homebridge/accessories.

However, I still cannot get live playback.

KhaosT commented 6 years ago

This is Nest’s API refuse to send the stream. Can you check your camera setting and see what’s the quality setting is right now?

Sent from my iPhone

On Jun 10, 2018, at 8:37 PM, Jonathan Simmons notifications@github.com wrote:

I was able to get all the camera to show up again by clearing out ~/.homebridge/persist and ~/.homebridge/accessories.

However, I still cannot get live playback.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jonathansimmons commented 6 years ago

They are all set to high, should I try a low quaility?

KhaosT commented 6 years ago

High should be good. Which camera are you using?

Sent from my iPhone

On Jun 10, 2018, at 8:45 PM, Jonathan Simmons notifications@github.com wrote:

They are all set to high, should I try a low quaility?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jonathansimmons commented 6 years ago

I have 4 Nest cam's and two Nest cam outdoors. I also have a doorbell but it's not installed right now because we're packing to move.

Side note: I did have to turn off two-factor to even get the plugin to work but as I've read I think that is to be expected.

I also tried turning on useOMX but my homebridge is running on a 2010 Mac Pro with 32gb of RAM so I don't think it matters.

jonathansimmons commented 6 years ago

@KhaosT and I talked in the slack channel a bit. HE suggested my symptoms pointed more to an encoding issue than the plugin itself.

We observed that with ffmpeg 4 install the process never showed up in Activity Monitor. After downgraded to ffmpeg 3.4.2 as a test, the process did show up in activity monitor but I still never got a live stream and the process dies after about 5-10 second.

I'm running homebridge on a 2010 mac pro running macOS 10.12 with 32gb of ram.

Hopefully this info might help someone else sort out the issue.

djglisson2 commented 6 years ago

Virtually identical problem here as @jonathansimmons is experiencing in virtually every way. Nothing but fresh screenshots upon viewing in the Home app, and never any live video. It times out with a 'Not Responding' message just like he mentioned. Receiving the same NexusStreamer Feedback ('OK' followed by 'Playback begin'). I can't see my install of FFMPEG 4.0.1 showing in Activity Monitor (but avoiding downgrading as that doesn't seem to solve it either).

I'm running a 2013 Mac Pro with MacOS 10.13 and I'm only trying to access one Nest Cam, but those are the only real differentiators. Would love to see this solved. Thanks for any help ahead of time!

UPDATE: After kicking some tires, ffmpeg 4.0.1 does seem to pop up briefly in the Activity Monitor. Process dies after 5-10 seconds (just like version 3.4.2 above). The main problem remains though. No video. Just screenshots.

djglisson2 commented 6 years ago

If anyone in here is successfully using this plugin and streaming on a Mac, would you mind sharing what version of FFMPEG, Node, Homebridge and NPM you're on? If the problem is in an update of something, knowing what it's successful on would help narrow that down...

wearemonsters commented 6 years ago

@djglisson2

This is working for me on a Mac OS 10.11.16 (El Capitan)

node v8.11.3 ffmpeg 4.0.1 homebridge 0.4.44 npm 5.6.0

djglisson2 commented 6 years ago

Appreciate that, @wearemonsters!

Identical versions here. Just went in and reinstalled everything to make sure there's nothing wonky on the installations. No change.

The only difference between you and I (and @jonathansimmons ) is the MacOS. What are the odds that FFMPEG or something else broke after El Capitain? Slim, I'm sure, but worth asking. Anyone out there running this successfuly on Sierra or High Sierra? @ooii were you ever able to get up and running?

And not for nothing, I installed FFMPEG 4.0.1 via Homebrew. Are folks doing it differently or is that an okay way to do it?

wearemonsters commented 6 years ago

@djglisson2 I installed ffmeg via homebrew as well.

djglisson2 commented 6 years ago

@KhaosT : You developed this and have the most experience with it. Know of anyone using your work and running it successfully on either of the two newer MacOS versions? Would love to know if I'm barking up the wrong tree with that idea.

@wearemonsters thanks for the home-brew confirmation. I figured if I was seeing anything at all, it must be installed right, but good to have it confirmed.

Additionally, I wanted to put it out there that we're using the term "screenshots" for what we are actually seeing, but given how FFMPEG is showing up so briefly in Activity Monitor, it may be more accurate that it's grabbing the first frame of the video feed and then ending right after for some reason. Saying that aloud in case that creates any additional ideas for tackling this from people that know more about how it works than I do. Is there a parameter or something that would require it to continue to encode?

jonathansimmons commented 6 years ago

@djglisson2 a friendly reminder that this is open source and with such @khaost doesn’t own us anything.

That being said I can tell you that when we were digging into it he was able to get it running with the following config.

ffmpeg 3.1.2 --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb

He mentions the ffmpeg version but I forgot to ask what OS. Given the facts we know, I think this is an ffmpeg issue on the more recent OS. I’m not sure how to resolve that though.

ooii commented 6 years ago

Hi,

I have the following setting:

macOS 10.12 (16A323)
node v9.3.0
ffmpeg 3.3.3
homebridge 0.4.33
homebridge-nest-cam 0.0.5
npm 5.6.0

I was having issues with live feed not starting (see comment) but one day, I figured out that it is working for me. I can't say what has made it working but I have live feed now.

Hope that will help.

djglisson2 commented 6 years ago

@jonathansimmons TOOOOTALLY. And I appreciate the extra tip here. Gives me another tire or two to kick.

@ooii, that blows away my thought that a recent MacOS is to blame. I felt like the newer OS idea was a real long shot anyway, so I'm glad we can put that to bed (at least as it pertains to 10.12, but very likely 10.13 too). And I'll check against the versions you mentioned while I'm at it. Thank you so much for that.

@KhaosT to his point, if you're reading this but not in a place to lend a hand or just don't have anything to add, no worries at all. If it's not clear, I totally appreciate the work you've done to get us this far. Thanks for all you do.

KhaosT commented 6 years ago

I’ll try take another look this weekend, life is kinda busy these days 😅

KhaosT commented 6 years ago

@ooii @djglisson2 can you guys try v0.0.10? I changed a few parameters and now it works with latest ffmpeg I believe.

jonathansimmons commented 6 years ago

I just tried with the following settings:

Mac OS 10.13.5 (17F77) node: v8.11.2 ffmpeg: 4.0.1 homebridge: 0.4.43 homebridge-nest-cam: 0.0.10 npm: 5.6.0

Still no live video, but I'm getting a different error now:

[NexusStreamer]OK
[NexusStreamer]Redirect
[NexusStreamer]Error
[NexusStreamer]OK
[NexusStreamer]Redirect
[NexusStreamer]Error
KhaosT commented 6 years ago

Can you check your nest camera settings? Here is mine

screen shot 2018-06-27 at 9 47 38 pm
jonathansimmons commented 6 years ago

Another interesting point is that for me the still has stopped updating.

When I first installed the still would update anytime I switched between rooms in the home app. Now, the still is whatever image it got when I first added the camera.

Before I started my test tonight I removed the cameras to re-add them. Each of them had a still from two weeks ago.

jonathansimmons commented 6 years ago

My settings are similar except my quailty is higher

screen shot 2018-06-27 at 11 59 49 pm
KhaosT commented 6 years ago

@jonathansimmons interesting, if I switch to High I also have the same issue... Can you try downgrade to middle and see if that works for you?

jonathansimmons commented 6 years ago

LOL, I was trying just that.

So changing my quality to the middle of the road seems to have sort of fixed it. now when I tap it after a few seconds it goes live. The video is delayed by anywhere from 10-15 seconds though. If I just leave it open I eventually get a no response error. That is fixed by exiting the live view and relaunching.

KhaosT commented 6 years ago

@jonathansimmons v0.0.11 should fix the issue with quality setting to high, it was a dumb error 😅

djglisson2 commented 6 years ago

AYYYYYYY!!!! @KhaosT you did it, my man! Video is live and beautiful. Can't speak to what the video delay is on my setup (my baby is asleep and I'm not going in there to test that until later today), but really... thank you, thank you sir! Is there a way I can (virtually) buy you a beer? Have a venmo or anything?

UPDATE: The video delay is typically just 5 seconds. Given all it's doing to make the feed accessible to HomeKit, I'm guessing that's pretty darn great. Thanks again, @KhaosT !

KhaosT commented 6 years ago

Glad to know it works :)

disruptivepatternmaterial commented 6 years ago

Rasp Pi 3b+ node v10.9.0 nest cam outdoor and non-iq indoor

I see ffmpeg start up when I click into a video, still image works ok.

log in homebridge is

[NexusStreamer]Connected
[NexusStreamer]OK
[NexusStreamer]Playback Begin
ERR_STREAM_DESTROYED
[NexusStreamer]Connection Closed

ffmpeg

ffmpeg

ffmpeg version N-81800-gf013ba4 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Raspbian 4.9.2-10)
  configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx --enable-omx-rpi

  libavutil      55. 30.100 / 55. 30.100
  libavcodec     57. 58.103 / 57. 58.103
  libavformat    57. 51.100 / 57. 51.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100

OMX is true in the config, installed the ffmpeg linked to in the install here.

Any tips on what to look for? I read this thread and I cannot seem to find any overlap.

schmittx commented 5 years ago

Raspberry Pi Model 3B+ Node v8.12.0 Nest Hello doorbell

Similar problem, still image look fine but when tapping camera in Home app to view live stream, it never works. I've tried adjusting the quality within Nest app but same result every time.

Homebridge log:

[NexusStreamer]Connected
[NexusStreamer]OK
[NexusStreamer]Redirect
[NexusStreamer]Redirecting...
[NexusStreamer]Connection Closed
[NexusStreamer]Connected
[NexusStreamer]OK
[NexusStreamer]Playback Begin
undefined
[NexusStreamer]Connection Closed

FFmpeg configuration:

ffmpeg version N-92418-gee47ac97d7 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
  configuration: --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 23.101 / 56. 23.101
  libavcodec     58. 39.100 / 58. 39.100
  libavformat    58. 22.100 / 58. 22.100
  libavdevice    58.  6.100 / 58.  6.100
  libavfilter     7. 43.100 /  7. 43.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
KhaosT commented 5 years ago

Here it doesn’t look like the ffmpeg is compiled with RTSP support… make sure you build ffmpeg with that.

Sent from my iPhone

On Nov 11, 2018, at 6:43 PM, Matt Schmitt notifications@github.com wrote:

Raspberry Pi Model 3B+ Node v8.12.0 Nest Hello doorbell

Similar problem, still image look fine but when tapping camera in Home app to view live stream, it never works. I've tried adjusting the quality within Nest app but same result every time.

Homebridge log:

[NexusStreamer]Connected [NexusStreamer]OK [NexusStreamer]Redirect [NexusStreamer]Redirecting... [NexusStreamer]Connection Closed [NexusStreamer]Connected [NexusStreamer]OK [NexusStreamer]Playback Begin undefined [NexusStreamer]Connection Closed FFmpeg configuration:

ffmpeg version N-92418-gee47ac97d7 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 configuration: --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree libavutil 56. 23.101 / 56. 23.101 libavcodec 58. 39.100 / 58. 39.100 libavformat 58. 22.100 / 58. 22.100 libavdevice 58. 6.100 / 58. 6.100 libavfilter 7. 43.100 / 7. 43.100 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

schmittx commented 5 years ago

@KhaosT That did it, everything is working well now. Thanks!