lprhodes / homebridge-broadlink-rm

Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
570 stars 285 forks source link

Wondering if we can add set top box and tv stick accessories to this plug in #685

Open roberkane212 opened 4 years ago

roberkane212 commented 4 years ago

I was wondering if set top box and tv stick could be added as they are now available in HomeKit. And are also available through Broadlink example below. This os possible, just want to know if this plug in can handle it A51B0EAC-A9B9-4A21-ABBE-49CED6AB639D

kiwi-cam commented 3 years ago

This fork isn't being developed anymore unfortunately. Fortunately there are forks which was still being worked on. I personally have done work on homebirdge-broadlink-rm-pro which does now support these devices.

roberkane212 commented 3 years ago

@kiwi-cam i don’t see any documentation saying how I can expose these devices

kiwi-cam commented 3 years ago

You need to set them up as a TV, then set a value for subType: https://github.com/kiwi-cam/homebridge-broadlink-rm#tv-accessory

roberkane212 commented 3 years ago

@kiwi-cam do you possibly have a sample config of this subType? I’m guessing it would go something like "name":"TV", "type":"tv", “subType”:”?” "data": { "off": "HEX...", "on": "HEX...", "remote": { "select": "HEX...", "arrowUp": "HEX...", "arrowDown": "HEX...", "arrowLeft": "HEX...", "arrowRight": "HEX...", "back": "HEX...", "exit": "HEX...", "playPause": "HEX...", "info": "HEX..." }, "powerMode": { "show": "HEX..." }, "volume": { "up": "HEX...", "down": "HEX..." }, "inputs": [ { "name": "INPUT 1", "type": "hdmi", "data": "HEX..."

kiwi-cam commented 3 years ago

Looks good. Here's what I'm using:

{
    "name": "Home Theatre",
    "type": "tv",
    "subType": "stb",
    "pingIPAddress": "192.168.x.x",
    "pingFrequency": 5,
    "pingIPAddressStateOnly": true,
    "pingGrace": 15,
    "disableLogs": true,
    "data": {
        "on": "260056009493131213121336133...",
        "off": "2600560094931312131213361...",
        "remote": {
            "select": "26004e009295141113121...",
            "arrowUp": "26004e00929512131312133...",
            "arrowDown": "26004e00929511141113123...",
            "arrowLeft": "26005200929412131213113...",
            "arrowRight": "26004e00929511141114113...",
            "back": "26004e00939412150f1413...",
            "playPause": "26004e009294121312151...",
            "exit": "26004e009295111510150f3911...",
            "info": "26004e009294121312131139..."
        },
        "volume": {
            "up": "26004e00929514111213143514...",
            "down": "26004e0092951412121114361..."
        },
        "inputs": [{
                "name": "Function",
                "type": "hdmi",
                "data": "26004e00929412131213113911381..."
            },
            {
                "name": "Optical",
                "type": "other",
                "data": "2600560092951312111411381..."
            },
            {
                "name": "Home",
                "type": "other",
                "data": "26004e009295111510150f391..."
            }
        ]
    }
}
roberkane212 commented 3 years ago

@kiwi-cam thanks I’m going to try it. What happens when you list type as other?

kiwi-cam commented 3 years ago

The code checks subType for the values "stb", "receiver", and "stick". Anything else will just appear as a TV.

If you set type to other... it won't be a supported type and will throw an error homebridge-broadlink-rm doesn't support accessories of type "${accessory.type}".