homebridge-mitv is a plugin for Homebridge which allows you to control your Mi TV. Tested working for Mi TV 4A (小米电视4A)
- Turn on and off the TV
- Remote control
Install homebridge:
npm install -g homebridge
Install homebridge-mitv:
npm install -g homebridge-mitv
Add MiTVPlatform
to your config.json
in your home directory inside .homebridge
.
Single TV Example:
{
"platforms": [{
"platform": "MiTVPlatform",
"tv": {
"ip": "192.168.1.2",
"name": "Mi TV"
}
}]
}
Multiple TVs Example:
{
"platforms": [{
"platform": "MiTVPlatform",
"tvs": [{
"ip": "192.168.1.2",
"name": "Bedroom TV"
}, {
"ip": "192.168.1.3",
"name": "Living Room TV"
}]
}]
}
- This plugin cannot detect whether the TV is sleep or not, so the status cannot be synchronized between HomeKit and TV.
- When the remote key is pressed, HomeKit sends a "activate" command which makes homebridge-mitv send a power keystroke request. I haven't found a workaround yet. Any help would be greatly appreciated.