Documentation
¶
Overview ¶
Package mitv talks to the LAN remote API of Xiaomi HyperOS displays and TVs: the HTTP server on port 6095 that switches inputs and changes volume.
Index ¶
Constants ¶
const ( SourceDP = 29 SourceUSBC = 30 )
The ids of the monitor-only inputs.
const Port = 6095
Port is where the remote API listens.
Variables ¶
var ErrNotFound = errors.New("mitv: no monitor found")
ErrNotFound means no HyperOS monitor answered on the local network.
var ErrRejected = errors.New("mitv: request rejected")
ErrRejected means the device answered but refused the request.
Functions ¶
Types ¶
type Link ¶
type Link struct {
Host string
// contains filtered or unexported fields
}
Link is a client for one device.
func (*Link) DeviceName ¶
DeviceName answers whether the device is reachable, with its name.
func (*Link) IsMonitor ¶ added in v1.4.1
IsMonitor tells a monitor from the other devices with the same remote API, such as TVs: MonitorBar must never switch a TV in another room. A monitor's name says so, unless its owner renamed it (#5); then its DP or USB-C input does, which TVs don't have.