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 longer possible on Raspberry Pi #3

Closed mbriney closed 5 years ago

mbriney commented 5 years ago

It appears that it's no longer possible if you're running Homebridge on a Raspberry Pi. https://github.com/RPi-Distro/repo/issues/58

Full output from my log:

[2018-11-4 01:12:47] [website-camera] Starting new instance of Chromium: /usr/bin/chromium-browser [2018-11-4 01:12:48] [website-camera] Error: Failed to launch chrome! bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file! errno=2 [1029:1029:1104/011248.701576:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes) [1017:1017:1104/011248.705690:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode. [1017:1017:1104/011248.721406:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display: TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md at onClose (/usr/lib/node_modules/homebridge-website-to-camera/node_modules/puppeteer/lib/Launcher.js:342:14) at Interface.helper.addEventListener (/usr/lib/node_modules/homebridge-website-to-camera/node_modules/puppeteer/lib/Launcher.js:331:50) at emitNone (events.js:111:20) at Interface.emit (events.js:208:7) at Interface.close (readline.js:368:8) at Socket.onend (readline.js:147:10) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9)

werthdavid commented 5 years ago

Hey there. Can you provide more information please?

mbriney commented 5 years ago

Yes definitely

  1. Using a Pi 3 Model B
  2. Running RaspianJessie
  3. Running as the Homebridge user with sudo privileges
werthdavid commented 5 years ago

Hmmm you've already found the issue on rpi-distro.. I honestly don't know how to handle this. I guess updating to stretch is not an option..

You could try using 1.0.8, it works with phantomjs instead of chrome.

Any other ideas?

hendymen commented 5 years ago

Hi,

Tried normal one but having issues with Chromium, Then i came across this issue and tries 1.0.8 of your script on Raspberry Pi with Stretch, it shows up in Homekit however no image appears on the 'camera'.

Using an Raspberry Pi B from Q4 2012 Revision 2.0

And the config;

{ "platform": "website-camera", "cameras": [ { "name": "Website 1", "url": "http://github.com", "width": 800, "height": 400, "renderDelay": 1500 } ] }

No errors appear on booting, is there any other thing i can check?

Kind regards.

werthdavid commented 5 years ago

@MvZeeland do you have an outdated version of Raspbian as well? Sorry, can't do much atm, I'm on vacation πŸ˜„

hendymen commented 5 years ago

@MvZeeland do you have an outdated version of Raspbian as well? Sorry, can't do much atm, I'm on vacation πŸ˜„

Running this version.

Distributor ID: Raspbian Description: Raspbian GNU/Linux 9.4 (stretch) Release: 9.4 Codename: stretch

Enjoy your vacation!

Hussamfhaily commented 5 years ago

How can I enter the username and password of the camera? thanks

werthdavid commented 5 years ago

@Hussamfhaily what do you mean exactly?

werthdavid commented 5 years ago

@MvZeeland @mbriney do you have a raspbian installation with Desktop? Can you run Chromium there?

werthdavid commented 5 years ago

Potentially closed with latest PR. Will close it for now. We can reopen if error still occurs

hendymen commented 5 years ago

Thanks for your reply, eventually i've upgraded my homebridge to an virtual Ubuntu desktop on my server. Because FFMPEG didn't work properly on the raspberry. Also when it worked, it consumed so much CPU it started crashing now and then.

Your plugin works great, however it's updated every 15 seconds or so now. Can we adjust the time it updates from homebridge?

werthdavid commented 5 years ago

As far as I know not, sorry. I think that the Home-App has the logic to request an image only every 15 secs. I might be wrong though, if you find any plugin that gives you control over that please contact me I'll take a look then!