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

jbree/homebridge-cec-accessory: Homebridge support for CEC devices over HDMI

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

开源软件名称:

jbree/homebridge-cec-accessory

开源软件地址:

https://github.com/jbree/homebridge-cec-accessory

开源编程语言:

TypeScript 100.0%

开源软件介绍:

homebridge-cec-accessory

Homebridge support for home theater devices using CEC over HDMI

About

homebridge-cec-accessory was written with Raspberry Pi in mind.

Create homebridge accessories for each CEC device you'd like to control. Currently power and volume are the only available controls, and volume only toggles mute (and probably only works with an attached receiver).

No automatic detection of attached devices is performed. For each device, create an accessory entry in your config.json.

Bug reports, feature requests, and pull requests welcome.

Installation

On a Raspberry Pi

  1. Follow these instructions to install and run homebridge on Raspberry Pi. Don't give up. Hang in there.

  2. Install cec-utils using package manager:
    $ apt-get install cec-utils

  3. Install homebridge-platform-cec:
    $ npm install -g homebridge-cec-accessory

  4. Open an issue if you run into problems.

Configuration

Here is a sample of what you might put in your ~/.homebridge/config.json

"accessories": [
  {
    "accessory": "cec",
    "name": "TV Power",
    "type": "power",
    "address": 0
  },
  {
    "accessory": "cec",
    "name": "Amp Volume",
    "type": "volume",
    "address": 5
  }
]

"name" can be any string you want, but must be unique. Try to keep it short and descriptive.

"type" must be either "power" or "volume".

"address" specifies the CEC destination address of the device, represented as an integer. Here are the possible devices:

0: TV
1: Recording 1
2: Recording 2
3: Tuner 1
4: Playback 1
5: Audio system
6: Tuner 2
7: Tuner 3
8: Playback 2
9: Recording 3
10: Tuner 4
11: Playback 4

Finding Your Devices

The best way I've found to find your devices is to use the cec-client tool which comes as part of the cec-utils package.

From the command line:
$ cec-client -d 1

Once it outputs waiting for input, type scan and press return. This might be slightly confusing, but the number to use for "address" is the value presented as device #, not the decimal separated IP-style address.

Troubleshooting

Under the covers, homebridge-cec-accessory uses the cec-client to interface with your HDMI device. Stopping and starting repeatedly can cause things to go awry.

If the plugin reports that cec-client never reported ready, it's possible that homebridge is running as a user without access to /dev/vchiq. If you're running homebridge as a user named homebridge, you can grant that access by adding the user to the video group with: sudo usermod -a -G video homebridge

If this happens intermittently, restarting may also help.

If you're having trouble doing something with this plugin, verify you can do it with cec-client. If it can't, neither can we.

Additional resources




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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