hjdhjd / homebridge-doorbird

Homebridge plugin for Doorbird
Apache License 2.0
54 stars 14 forks source link

Video Source #65

Closed 19kirk79 closed 4 years ago

19kirk79 commented 4 years ago

hi, I face an issue with the new version 0.2.x of doorbird plugin. With the old 0.1 version I configured doorbird but as video source I used my Ubiquiti Cam that has a better field of view. This was done by the following lines in the config: "videoConfig": { "source": "-re -f mjpeg -i http://10.0.0.82:8888/cam1.mjpg", "stillImageSource": "-i http://10.0.0.86/snap.jpeg", This is not working any more with the new version of the plugin.

In addition if someone (hopefully) can fix this: as you see I had to convert mit Ubiquiti rtsp stream to an mjpg stream. Maybe someone can tell me to use the direct stream.

In case there is no fix, can I somehow rollback to version 0.1x?

brownad commented 4 years ago

Ah I see, you used the plugin for a non-doorbird camera with the doorbird accessories. The changes recently are meant to align the doorbird product quite tightly. If the option to override the stream is to be used then its a bit of a revert on the nice new logic.

You could always stay on an older version of the plugin since you’re not using the audio part.

On 4 Jun 2020, at 09:05, 19kirk79 notifications@github.com wrote:

hi, I face an issue with the new version 0.2.x of doorbird plugin. With the old 0.1 version I configured doorbird but as video source I used my Ubiquiti Cam that has a better field of view. This was done by the following lines in the config: "videoConfig": { "source": "-re -f mjpeg -i http://10.0.0.82:8888/cam1.mjpg http://10.0.0.82:8888/cam1.mjpg", "stillImageSource": "-i http://10.0.0.86/snap.jpeg http://10.0.0.86/snap.jpeg", This is not working any more with the new version of the plugin.

In addition if someone (hopefully) can fix this: as you see I had to convert mit Ubiquiti rtsp stream to an mjpg stream. Maybe someone can tell me to use the direct stream.

In case there is no fix, can I somehow rollback to version 0.1x?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brownad/homebridge-doorbird/issues/65, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUK4CZKDKRLPR5U3LWOMD3RU5ITXANCNFSM4NSMCIEQ.

19kirk79 commented 4 years ago

Hi brownad, thx for your fast reply. Exactly, I have a doorbird but "mixed it up" with a Ubiquiti dome cam thats higher mounted an has a better overview. So if I understand correctly there is no (and will not be) way to do that now and in future? Thats no good news :/ Thats what I loved with your plugin/homebridge, that its in my decision how to use my components.

How can I install the old version? Cheers

brownad commented 4 years ago

Didn’t say won’t be done. Something that can be supported, just needs a clear definition of that use case as the config is now exploding in a good way

For now try this

npm uninstall -g homebridge-doorbird npm install -g homebridge-doorbird@0.0.9

OR whichever version you want, should get you back up and running

On 4 Jun 2020, at 09:22, 19kirk79 notifications@github.com wrote:

Hi brownad, thx for your fast reply. Exactly, I have a doorbird but "mixed it up" with a Ubiquiti dome cam thats higher mounted an has a better overview. So if I understand correctly there is no (and will not be) way to do that now and in future? Thats no good news :/ Thats what I loved with your plugin/homebridge, that its in my decision how to use my components.

How can I install the old version? Cheers

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/brownad/homebridge-doorbird/issues/65#issuecomment-638691564, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUK4CYKV5CIATF4P7NJ5BTRU5KUJANCNFSM4NSMCIEQ.

19kirk79 commented 4 years ago

Thx a lot for your help and in general for your plugin. I´m looking forward for a possible future release where I could use my Ubiquiti cam (currently in homebridge with Homebridge Camera Ffmpeg Ufv) again with a new version.

Thx!

hjdhjd commented 4 years ago

@19kirk79 It’s an interesting question about whether this should or shouldn’t be in the plugin. I have a near identical scenario and I never contemplated “mixing” the cameras. I am the author of homebridge-UniFi-protect2 which, similar to this plugin, autoconfigures UniFi cameras that use Protect.

I’ve been refactoring some of the code here. I need to think about how to elegantly support a scenario like this. It’s definitely an edge case...but one I share it seems. 😀

19kirk79 commented 4 years ago

it´s clear, that not the standard scenario of the average doorbird user but for me its best practice :) I had to do some tricks to get it working. thoug the unifi ufv plugin directly works fine (I didn´t know your Unifi protect 2*) I am not able to use this stream with the doorbird 0.0.9 plugin so I have to convert it to mjpg (with vlc) and then it works as "source". tricky but very nice. I´m happy to have found someone else who is interessted in ;)

*I dont use Unifi Protect/Cloudkey. I´m still with the old Unifi Video running as App on my Qnap NAS.

hjdhjd commented 4 years ago

@19kirk79 Try the latest release on Github. I've added in support for this use case...meaning you can explicitly specify a source and source and stillImageSource if you want. I would caution you to be careful if you try to do so and enable audio, as there are some things going on behind the scenes when that happens, and you will need to then further specify mapvideo and mapaudio parameters to make it work. Give it a go!

19kirk79 commented 4 years ago

You are the best, thanks! just before I click update: is there any advantage in comparison to 0.0.9? I will give it a try later then (sunday-family). With 0.0.9 its not possible (because of lack of knowledge of rtsp streams to have it really working) to use Unifi Cams "directly" (as its done by camera-ffmpg-ufv). Just with the converted stream as I wrote before. Would this work now?

hjdhjd commented 4 years ago

@19kirk79 it should work as long as you do not enable audio support. Leave audio support disabled, and you should be able to specify the stream (aka source and stillImageSource), similar to what you did previously. If you enable audio support, there are other parameters to ffmpeg that change that you will need to adjust further.

19kirk79 commented 4 years ago

hi, I tried it out but it´s not working. this is the old config that works with 0.0.9. "videoConfig": { "source": "-re -f mjpeg -i http://10.0.0.82:8888/cam1.mjpg", "stillImageSource": "-i http://10.0.0.86/snap.jpeg", "packetSize": "", "maxStreams": 2, "maxWidth": "", "maxHeight": "", "maxFPS": ""

in addition I tried out

hjdhjd commented 4 years ago

@19kirk79 post the entirety of your Doorbird config section, redact out what is sensitive...

I just tried this right now on my setup (admittedly just for snapshots) and it works just fine...I might even keep this setup for image snapshots because the quality is so much better than Doorbird’s on my G4 Pro. :smile:

What you posted above should work just fine, at least for snapshots. Moreover...I suspect you need to delete the Doorbird from your Home app and re-add it. If you’re using an older version like 0.0.9...you’ll need to reinstall the Doorbird accessory in the Home app, otherwise, it’s going to look unresponsive.

My guess is that’s the issue. :smile:

Give it a go.

19kirk79 commented 4 years ago

You were absolutlely right. after uninstalling, removing at the persist folder and re-adding doorbird in home it works with my old config as written above. What I did not manage so far is to grab the rtsp stream directly as the ffmpeg camera plugin does for my other unifi cam. Due to the fact that this is also using ffmpeg I guess its just a kind of using the stream.

"platform": "camera-ffmpeg-ufv", "name": "UniFi Video (ffmpeg)", "nvrs": [ { "apiHost": "10.0.0.99", "apiPort": 7080, "apiProtocol": "http", "apiKey": "xxx"

Any idea on this?

hjdhjd commented 4 years ago

@19kirk79 I haven’t used UFV, sorry I can’t help much there. On Protect, the RTSP stream is published and you can subscribe to it like anything else.

Closing this issue out.