werthdavid / homebridge-website-to-camera

Homebridge plugin that displays a Website as virtual camera (intended for Google Maps Traffic)
MIT License
54 stars 7 forks source link

No response - this camera is not responding #23

Closed Tobias007 closed 3 years ago

Tobias007 commented 4 years ago

Hi David,

tried to get the plugin working, however it always says in homekit "no response".

I started to debug your code:

issue seems to be, it is never jumping in the following function: Camera.prototype.handleSnapshotRequest

All other functions like: Camera.prototype.prepareStream Camera.prototype.handleStreamRequest ... are called when I click on the camera in homekit.

it also jumps into the live request:

` let sessionIdentifier = this.hap.uuid.unparse(sessionID); this.log("TH5"); if (requestType === "start" && this.pendingSessions[sessionIdentifier]) {

    // TODO Implement "live" update mechanism
    this.ongoingSessions[sessionIdentifier] = undefined;
            this.log("TH8_NoLive");

`

Did I overlook something? It seems it's not requesting the still picture but rather the live stream only?

thanks a lot in advance.

Tobias

werthdavid commented 4 years ago

Hey, that sounds weird... Which iOS version are you using? The regular "Home"-App? The thing is that the camera only shows a preview if you are in the overview, if you tap on the camera (live mode), it will not work! That's unfortunately a known limitation...

Tobias007 commented 4 years ago

Hi,

thanks for the quick reply. I'm using the normal HomeApp on Mac. I think I found the issue: I just installed in addition the camera-ffmpeg plugin (as I wanted to check if real webcam streams are working). I got this to work and out of a sudden as well the webpage-to-camera plugin also worked and it jumped into the Camera.prototype.handleSnapshotRequest function.

Very strange - probably some node modules missing?

Another small thing - the website cameras, as you mentioned, might not appear automatically (only with manual code). Any clue why it is like that. In ffmepg the camera automatically appeared. (I'm asking, because we have remote sites, and you can only add by number if you are onsite in the physical network...).

Thanks a lot for your help and for the effort you spent on this amazing plugin ;)

Tobias

Tobias007 commented 4 years ago

.. and the behaviour of the homekit app is indeed different between iOS and MacOS. I'm on iOS14: preview works, live stream as known not On Mac: Preview: image wrongly sized, Livestream: correct size (still picture).

DjamikTea commented 3 years ago

Hello, the same problem on iOS 14 and iOS 13

werthdavid commented 3 years ago

Hey guys,

I have no idea why the cameras on this plugin do not automcatically appear... What is the exact name of the plugin where it works? Maybe I can get some inspiration from there...

I don't have a Mac anymore so I'm not sure how I can investigate that..

DjamikTea commented 3 years ago

Hi guys, after adding the plugin, you will have a camera with a description "default". If you go to "add accessories"> "no code or no possibility to scan" and you will see another camera. IMG_5265

The code will be the one that generated the homebridge.

IMG_5270