4.3.5 • Published 3 years ago

@redelva/homebridge-broadlink-rm-samsungtv v4.3.5

Weekly downloads
9
License
ISC
Repository
github
Last release
3 years ago

Homebridge Broadlink RM TV+AC Pro Fork

Version 4.3.1+ notes

There are a couple of changes made in version 4.3.1 which might cause issues when you upgrade. 1. There was a bug in how MAC addresses were stored in the plugin. If you specify a HOST in your config.json by MAC address, you'll likely need to correct this value after you update. 2. In order to fix an issue in iOS 14, all TVs are now seperate accessories. Previously the first TV connected via Homebridge as a bridge. This means that after updating, that first TV will need to be removed and re-added to HomeKit. 3. The Dehumidifer accessory has been updated to use the Humidity readings from your Broadlink device. If your Broadlink device doesn't support Humidity readings, or you don't want to functionality set "noHumidity" : true in your config.json

For other changes, refer to the Change Log here.

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-pro

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.

Like this plugin?

If you like this plugin and want to show your support then please star the Github repo, or better yet; buy me a drink using Paypal.

Thank you!

Documentation

If the plugin is unable to discover your device, it's likely you've registered the device with the cloud so it no longer accepts local connections. In this case, follow these steps: 1. Hold the reset button on your broadlink device until the light flashes 2. In the IHC app (iOS / Android) Go through the "Add Device" steps 3. When you reach the step to add the device to a room - quit the IHC app

This plugin should now be able to discover your device.

Base documentation can be found here. With the following additional configuration options available in this fork:

Switch Accessory

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

Fan Accessory

keydescriptionexampledefault
hideSwingMode (optional)Determines whether we should hide the swing mode UI or not. If true, also changes the accessory type to allow additional Fan icons.truefalse
alwaysResetToDefaults (optional)If set, the fanSpeed is reset to its default when the fan is turned off.truefalse
defaultFanSpeed (optional)Sets the default Speed for the fan when a value isn't already set.50100
stepSize (optional)If set, sets the amount the fanSpeed will step up/down by101

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
heatOnly (optional)Forces the Aircon accessory to only operate in Heat modetruefalse
coolOnly (optional)Forces the Aircon accessory to only operate in Cool modetruefalse
noHumidity (optional)Removes Humidity information from the device. It will be removed when using w1Device or temperatureFilePathtruefalse

"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.

TemperatureSensor Accessory

Adds a temperature and humidity sensor using the Broadlink device's sensors. key | description | example | default --- | ----------- | ------- | ------- noHumidity (optional) | Removes Humidity information from the device. It will be removed when using w1Device or temperatureFilePath | true | false tempertureAdjustment (optional) | An adjustment value to tune the value from the value the broadlink returns | -5 | 0 humidityAdjustment (optional) | An adjustment value to tune the value from the value the broadlink returns | -5 | 0

HumiditySensor Accessory

Adds a temperature and humidity sensor using the Broadlink device's sensors. key | description | example | default --- | ----------- | ------- | ------- humidityAdjustment (optional) | An adjustment value to tune the value from the value the broadlink returns | -5 | 0

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
subType (Optional)Updates the icon in Home to either TV, STB, Stick, or Receiverstbtv

"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), and @lprhodes (https://github.com/lprhodes/homebridge-broadlink-rm) whose time and effort got this started.

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