项目作者: bbrks

项目描述 :
🚨📺 Implements Sony's InfraRed Compatible Control over Internet Protocol (IRCC-IP) for Bravia displays
高级语言: Go
项目地址: git://github.com/bbrks/irccip-go.git
创建时间: 2019-10-04T12:26:36Z
项目社区:https://github.com/bbrks/irccip-go

开源协议:

下载


irccip

irccip implements Sony’s InfraRed Compatible Control over Internet Protocol (IRCC-IP) for Bravia displays

Usage

  1. // Create a client to send commands to a remote display with PSK '0000'
  2. c := irccip.NewClient("http://192.168.1.12", "0000")
  3. // Send the 'Power' key code
  4. if err := c.SendKeyCode(irccip.KeyPower); err != nil {
  5. log.Fatalf("SendKeyCode error: %v", err)
  6. }

Key Codes

The package contains key code constants documented in the Sony Bravia IRCC Codes page:
https://pro-bravia.sony.net/develop/integrate/ircc-ip/ircc-codes/index.html

Finding new IRCC-IP key codes

Query your TV/Display, using the following command, to get a list of available key codes for the display:

  1. $ curl http://192.168.1.12/sony/system -d '{"method": "getRemoteControllerInfo", "id": 1, "params": [], "version": "1.0"}'
  1. {
  2. "result": [
  3. {
  4. "bundled": true,
  5. "type": "IR_REMOTE_BUNDLE_TYPE_AEP_N"
  6. },
  7. [
  8. {
  9. "name": "Num1",
  10. "value": "AAAAAQAAAAEAAAAAAw=="
  11. },
  12. // ...
  13. {
  14. "name": "AndroidMenu",
  15. "value": "AAAAAgAAAMQAAABPAw=="
  16. }
  17. ]
  18. ],
  19. "id": 1
  20. }