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

camera not responding #35

Closed WesleyLiekens closed 2 years ago

WesleyLiekens commented 2 years ago

Camera not responding and im not sure what the problem is i have tried the standard settings in the example and just changed the path to the chromium app

macOS monterey node v16.13.0 nam v8.1.1

CONFIG: { "platform": "website-camera", "cameras": [ { "name": "Google Maps Traffic", "url": "http://google.com", "height": 1334, "width": 750, "timeout": 10000, "chromiumPath": "/Applications/Chromium.app/" } ] }

OUTPUT: [10/29/2021, 10:16:27 AM] [website-camera] Starting new instance of Chromium: /Applications/Google Chrome.app/ [10/29/2021, 10:16:27 AM] [website-camera] Error: Failed to launch the browser process! spawn /Applications/Google Chromium.app/ EACCES

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

at onClose (/usr/local/lib/node_modules/homebridge-website-to-camera/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/homebridge-website-to-camera/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:185:85)
at ChildProcess.emit (node:events:390:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
werthdavid commented 2 years ago

Can you start chromium from command-line? I think /Applications/Chromium.app/ is not the correct path, there should be an executable inside that folder. Can you please run "ls /Applications/Chromium.app/"

WesleyLiekens commented 2 years ago

I get this

Last login: Mon Nov 29 19:19:32 on ttys000 wesleyliekens@Mac-mini-van-Wesley ~ % ls /Applications/Chromium.app Contents wesleyliekens@Mac-mini-van-Wesley ~ %

im on macOS, the path to my apps is according to every source I find /Applications/(name).app and when I drag the chromium.app file to terminal it gives me

Last login: Mon Nov 29 19:21:53 on ttys000 wesleyliekens@Mac-mini-van-Wesley ~ % /Applications/Chromium.app

werthdavid commented 2 years ago

I think your Path should be like this: "chromiumPath": "/Applications/Chromium.app/Contents/MacOS/Google Chrome"

WesleyLiekens commented 2 years ago

ok so it seems the path is /Applications/Chromium.app/Contents/MacOS/Chromium it still doesn't work tho

I get [11/29/2021, 9:08:24 PM] [homebridge-website-to-camera] Starting new instance of Chromium: /Applications/Chromium.app/Contents/MacOS/Chromium [11/29/2021, 9:08:24 PM] [homebridge-website-to-camera] Chromium started [11/29/2021, 9:08:24 PM] [homebridge-website-to-camera] Opening new page [11/29/2021, 9:08:24 PM] [homebridge-website-to-camera] Setting Viewport to 1200x900 [11/29/2021, 9:08:24 PM] [homebridge-website-to-camera] Going to page: https://github.com/ [11/29/2021, 9:09:04 PM] [homebridge-website-to-camera] Loading finished, waiting 1ms before taking screenshot [11/29/2021, 9:09:07 PM] [homebridge-website-to-camera] Created screenshot [11/29/2021, 9:09:07 PM] [homebridge-website-to-camera] Got screenshot [11/29/2021, 9:09:21 PM] [homebridge-website-to-camera] Opening new page [11/29/2021, 9:09:21 PM] [homebridge-website-to-camera] Setting Viewport to 1200x900 [11/29/2021, 9:09:21 PM] [homebridge-website-to-camera] Going to page: https://github.com/ [Website BC8C] The image snapshot handler for the given accessory is slow to respond! See https://git.io/JtMGR for more info. [Website BC8C] The image snapshot handler for the given accessory didn't respond at all! See https://git.io/JtMGR for more info.

edit. screenshot works but then it keeps on loading until the no response message. that is how its supposed to work for now correct?

werthdavid commented 2 years ago

That doesn't sound too bad though... What device are you using for watching the "camera"? iPhone? Be aware that currently only the preview works, no live updates if you "click" on the camera

werthdavid commented 2 years ago

now possible with v2.0.0 and ffmpeg

WesleyLiekens commented 2 years ago

Great work!