• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

werthdavid/homebridge-website-to-camera: Homebridge plugin that displays a Websi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

werthdavid/homebridge-website-to-camera

开源软件地址:

https://github.com/werthdavid/homebridge-website-to-camera

开源编程语言:

JavaScript 100.0%

开源软件介绍:

homebridge-website-to-camera

Homebridge plugin for displaying a Website (intended for Google Maps-->Traffic) as Camera

NPM version PRs Welcome Downloads

If you find my work useful you can buy me a coffee, I am very thankful for your support.

Buy Me A Coffee

Installation

Make sure you have Homebridge installed.

  1. Download the latest Chromium sudo apt-get install chromium-browser
  2. Verify the Chromium installation by running chromium-browser, output should be similar to (chromium-browser:30533): Gtk-WARNING **: cannot open display
  3. Install this plugin using: sudo npm install -g homebridge-website-to-camera
  4. Update your Homebridge config.json using the sample below (append in the block 'platforms' not 'accessories')

Configuration

Update your config similar to this:

 "platforms": [
      {
         "platform": "website-camera",
         "cameras": [
            {
               "name": "Website 1",
               "url": "https://github.com",
               "chromiumPath": "/usr/bin/chromium-browser"
            }
         ]
      }
   ]

You can add multiple cameras!

Config file

Take a look at the example config.json

Fields:

  • name name of the camera (required)
  • id unique(!) identifier for that specific camera (optional)
  • url the URL of the website that is to be captured (required)
  • scale HomeApp requests a (device dependent) size for the preview-image. With e.g. scale set to 2 (default) the virtual browser window is set to this size. Best is to skip this field.
  • OR width / height the width/height of the virtual browser window. This is optional and overrides scale.
  • chromiumPath path to chromium-executable (defaults to "/usr/bin/chromium-browser")
  • timeout timeout in ms for waiting until the page has no more pending requests. resembles to puppeteer.goto() (defaults to 10000 --> 10s)
  • renderTimeout timeout in ms for waiting AFTER the page has loaded before taking the screenshot. userful for PWAs. (defaults to 1ms)
  • ignoreHTTPSErrors ignore HTTPS errors, useful for self-signed certificates (defaults to false)
  • cacheTime will cache the image for the given time (in seconds) and a new screenshot will be created only if the time since the last screenshot is bigger than the given time
  • jsFile specify the full path of a custom JS-file that will be injected to the page (e.g. if you want to hide cookie-banners)
  • live enabled live mode to use with ffmpeg plugin (defaults to false). See below!
  • liveSnapshotInterval takes a screenshot of the website in the specified interval (in milliseconds). 1000 is a good value to start with.
  • liveRefreshInterval how often the page should be reloaded in live-mode (in milliseconds). If live mode is not enabled the page will be opened every time a screenshot is taken so refreshing is not needed.
  • livePort when live is set to true, this will be the port where the live server is running (defaults to 8554). make sure you use a free port especially if you have multiple cameras.

Usage

In some cases, the camera is not visible in Home-App:

  • Press + on top right corner in Home-App
  • Press Add device
  • Press Code missing
  • Select Camera
  • Provide the code from Homebridge startup output (as stated in your config.json)

AppleTV / Live-Stream


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap