4.0.5 • Published 4 years ago

homebridge-broadlink-rm-tv v4.0.5

Weekly downloads
19
License
ISC
Repository
github
Last release
4 years ago

Homebridge Broadlink RM TV+AC File Fork

About this fork

This fork adds support for the TV type indroduced in iOS 12.2. I'm only give support for this specific accessory type!

This fork also contains updates the to Air Conditioner accessory, as detailed in the documenation below.

If you want to use this fork, use this command:

npm i -g homebridge-broadlink-rm-tv

Homebridge Broadlink RM [Original]

Introduction

Welcome to the Broadlink RM Mini and Broadlink RM Pro plugin for Homebridge.

This plugin allows you to control your RM Mini and RM Pro with HomeKit using the Home app and Siri.

Documentation

Full documentation can be found here. With the following additional configuration options available:

Switch Accessory

keydescriptionexampledefault
pingGrace (optional)Pauses ping status changes for the specified period (seconds) to allow device to start-up/shutdown after the change1510

Aircon Accessory

keydescriptionexampledefault
w1DeviceID (optional)Updates device current temperature from a Raspberry Pi Wire-1 thermometers (i.e. ds18b20). Value is the Device ID28-0321544e531ff

"data" key-value object

The device can be setup to manage modes in one of two ways. If your AC unit accepts a hexcade to change mode only (without temperature details) you can set the mode keys (heat/cool) and then the temperatureX values to change the teperature. If your AC unit sends hexcodes that contain the mode AND temperature you can use the modeX codes alone.

When the mode is changed the mode hexcodes are sent first - if set. Then the modeX code is sent to set the temperature, if it is set. If a matching modeX code can't be found, the temperatureX code is sent. If neither of these temperature codes are found either defaultHeatTemperature or defaultCoolTemperature codes will be used depending on if the target Temperature is higher or lower than the current temperature.

keydescription
offA hex code string to be sent when the air conditioner is asked to be turned off.
temperatureXA hex code string where X is any temperature you wish to support e.g. "temperature30".
modeXA hex code string where X is any temperture, and mode is one of "heat","cool", or "auto". Hex code used to set unit to the specified mode and temperature

"temperatureX" and "modeX" key-value object

keydescription
dataHex data stored as string.
pseudo-mode (optional)The mode we set when this hex is sent. i.e. "heat" or "cool". For graphical purposes only (hence use of the term "pseudo"). Not recommended for ModeX key-values.

TV Accessory

keydescriptionexampledefault
enableAutoOffTurn the TV off automatically when onDuration has been reached.truefalse
onDurationThe amount of time before the TV automatically turns itself off (used in conjunction with enableAutoOff).560
enableAutoOnTurn the TV on automatically when offDuration has been reachedfalsetrue
offDurationThe amount of time before the TV automatically turns itself on (used in conjunction with enableAutoOn).560
pingIPAddressWhen an IP address is provided, it is pinged every second. If a response is received then the TV turns on, otherwise it turns off."192.167.1.77"
pingIPAddressStateOnlyUsing this option will prevent the hex code from being sent when the state changestruefalse
pingFrequencyThe frequency in seconds that the IP address should be pinged51
pingGrace (optional)Pauses ping status changes for the specified period (seconds) to allow device to start-up/shutdown after the change1510
datasee below

"data" key-value object

keydescription
onA hex code string to be sent when the tv is powered on.
offA hex code string to be sent when the tv is powered off.
volumesee below
inputssee below
remotesee below

"volume" key-value object

Configuration for volume changes via the Control Centre remote

keydescription
upA hex code string to be sent to turn the TV volume up.
downA hex code string to be sent to turn the TV volume down.

"inputs" key-value object

Inputs contain an array of the below settings, one for each input

keydescription
nameThe name used for the mode, shown in the GUI.
typeOne of the follow to represent the mode: 'other','home_screen','tuner','hdmi','composite_video','s_video','component_video','dvi','airplay','usb','application'
dataA hex code string to be sent to switch the TV to the selected input.

"remote" key-value object

Configuration of button options in the Control Centre remote

keydescription
rewindThe hex code for this button function
fastForwardThe hex code for this button function
nextTrackThe hex code for this button function
previousTrackThe hex code for this button function
arrowUpThe hex code for this button function
arrowDownThe hex code for this button function
arrowLeftThe hex code for this button function
arrowRightThe hex code for this button function
selectThe hex code for this button function
backThe hex code for this button function
exitThe hex code for this button function
playPauseThe hex code for this button function
infoThe hex code for this button function

Thanks

Original: Thanks to @tattn (https://github.com/tattn/homebridge-rm-mini3), @PJCzx (https://github.com/PJCzx/homebridge-thermostat) @momodalo (https://github.com/momodalo/broadlinkjs) whose time and effort got me started.

In this fork: Thanks to @kiwi-cam (https://github.com/kiwi-cam) and @Cloudore (https://github.com/Cloudore) for your work!