homebridge-broadlink-rm-blaster 1.4.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +67 -4
  3. package/config.schema.json +535 -22
  4. package/dist/accessories/advancedAccessory.d.ts +16 -0
  5. package/dist/accessories/advancedAccessory.js +106 -0
  6. package/dist/accessories/advancedAccessory.js.map +1 -0
  7. package/dist/accessories/basicAccessory.d.ts +3 -0
  8. package/dist/accessories/basicAccessory.js +22 -1
  9. package/dist/accessories/basicAccessory.js.map +1 -1
  10. package/dist/accessories/dimmerAccessory.d.ts +1 -0
  11. package/dist/accessories/dimmerAccessory.js +20 -0
  12. package/dist/accessories/dimmerAccessory.js.map +1 -1
  13. package/dist/accessories/fanAccessory.d.ts +66 -0
  14. package/dist/accessories/fanAccessory.js +655 -0
  15. package/dist/accessories/fanAccessory.js.map +1 -0
  16. package/dist/accessories/temperatureHumiditySensorAccessory.d.ts +2 -1
  17. package/dist/accessories/temperatureHumiditySensorAccessory.js +4 -2
  18. package/dist/accessories/temperatureHumiditySensorAccessory.js.map +1 -1
  19. package/dist/accessories/tvAccessory.d.ts +1 -0
  20. package/dist/accessories/tvAccessory.js +12 -1
  21. package/dist/accessories/tvAccessory.js.map +1 -1
  22. package/dist/configTypes.d.ts +63 -1
  23. package/dist/learner.js +309 -9
  24. package/dist/learner.js.map +1 -1
  25. package/dist/mqttClient.d.ts +17 -0
  26. package/dist/mqttClient.js +106 -0
  27. package/dist/mqttClient.js.map +1 -0
  28. package/dist/mqttCommand.d.ts +7 -0
  29. package/dist/mqttCommand.js +59 -0
  30. package/dist/mqttCommand.js.map +1 -0
  31. package/dist/mqttLink.d.ts +16 -0
  32. package/dist/mqttLink.js +62 -0
  33. package/dist/mqttLink.js.map +1 -0
  34. package/dist/platform.d.ts +3 -2
  35. package/dist/platform.js +72 -5
  36. package/dist/platform.js.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/mqttPublisher.d.ts +0 -12
  39. package/dist/mqttPublisher.js +0 -55
  40. package/dist/mqttPublisher.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,92 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [1.7.0] - 2026-08-07
10
+
11
+ ### Added
12
+ - MQTT control for simple on/off accessories, advanced accessories, dimmer
13
+ lights and TVs, alongside fans. Simple accessories, advanced accessories
14
+ and TVs take `{"state": "ON"}`; dimmers also take `{"level": 50}`.
15
+ - Accessories controlled over MQTT publish their own on/off state as
16
+ `{"state": "ON"}` whenever they turn on or off, however that was
17
+ triggered.
18
+ - Fans: a "Swing On Power On" option that starts the fan oscillating
19
+ whenever it is turned on, sent once the speed has settled. Skipped if it
20
+ is already swinging, since the signal is usually a toggle.
21
+
22
+ ### Changed
23
+ - MQTT commands are now read from `<topic>/set` rather than `<topic>`,
24
+ which is left to carry the accessory's state. An existing fan keeps its
25
+ configured topic, but whatever publishes to it has to move to
26
+ `<topic>/set`.
27
+ - Retaining MQTT messages is set per device and per accessory - "Retain
28
+ sensor data messages" on an RM device, "Retain state messages" on an
29
+ accessory - instead of one setting covering everything. Both default to
30
+ on, so retaining carries on as before.
31
+
32
+ ### Fixed
33
+ - Sliding a fan on fired a signal the instant HomeKit reported it active,
34
+ while the slider was still moving. On a fan whose speed button is also
35
+ its power button that press is part of the very sequence the slider is
36
+ about to work out, so it read as one signal too many. Turning on now
37
+ waits on the same settle as the slider, and a slide sends one burst at
38
+ the end. Turning off stays immediate.
39
+ - Turning a simple accessory or TV off with no Power Off Signal configured
40
+ logged "Sent Power Off" while actually re-sending Power On, which only
41
+ turns anything off if that signal is a toggle. The log now names the
42
+ signal really sent.
43
+
44
+ ## [1.6.0] - 2026-08-07
45
+
46
+ ### Added
47
+ - Fans: a new accessory type. A fan has any number of speeds (one cycle
48
+ button, or separate up and down buttons), optional swing, and any number
49
+ of extra on/off features such as cooling, each exposed as its own
50
+ labelled switch. Power can come from a dedicated button - a single
51
+ toggle or separate on/off - or from whichever speed, swing or feature
52
+ button actually powers the fan.
53
+ - Fans: an optional signal sent every time the fan is turned on, for
54
+ things like maxing out a heater's thermostat.
55
+ - Fans: an optional resync switch that clears what the plugin thinks the
56
+ fan is doing without sending any signals, for when the fan has been used
57
+ from its own remote.
58
+ - Fans: swing can also be put on its own switch, since the Home app hides
59
+ its built-in oscillate control once an accessory is more than just a
60
+ fan.
61
+ - Fans can be driven from MQTT. Give a fan a topic and it listens on
62
+ `<base topic>/<topic>` for messages like
63
+ `{"state":"ON", "speed": 100, "swing": "ON"}`. Anything left out is not
64
+ changed, and retained messages are applied on connect.
65
+ - `broadlink-rm-learner`: a "Just show hex code" option that captures one
66
+ signal and prints it for copy/pasting, without saving anything.
67
+
68
+ ### Changed
69
+ - "Basic Accessories" renamed to "Simple On/Off Accessories" in the Config
70
+ UI form and the learner.
71
+ - The learner's menu order now matches the Config UI form's sections.
72
+
73
+ ### Fixed
74
+ - Dragging a fan's speed slider sent a signal for every position it passed
75
+ through. It is now debounced (0.5s by default) and acts only on where
76
+ the slider lands.
77
+ - A fan feature with no name took the whole accessory down at startup,
78
+ which could happen after saving the fan in the Config UI. Unusable
79
+ features are skipped with a warning instead.
80
+ - Blank rows left behind in any accessory list by saving the Config UI
81
+ form no longer log warnings about accessories named "undefined".
82
+ - Config UI field descriptions no longer lose text wrapped in angle
83
+ brackets, which the form renders as HTML. The MQTT base topic
84
+ description had been affected since 1.3.0.
85
+
86
+ ## [1.5.0] - 2026-08-06
87
+
88
+ ### Added
89
+ - Advanced Accessories: a new standalone accessory type where one button
90
+ press sends multiple signals in sequence, with a configurable timeout
91
+ between them. An optional Off signal gives it real on/off state (a
92
+ normal Switch); without one, it's an auto-resetting momentary trigger
93
+ instead. `broadlink-rm-learner` can learn these too.
94
+
9
95
  ## [1.4.0] - 2026-08-05
10
96
 
11
97
  ### Added
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Broadlink RM Blaster 1.4.0
1
+ # Broadlink RM Blaster 1.7.0
2
2
 
3
3
  **This Homebridge plugin has been 100% vibe coded with Claude.**
4
4
 
@@ -23,12 +23,14 @@ hb-service add homebridge-broadlink-rm-blaster
23
23
 
24
24
  - **Multiple RM devices** configure several Broadlink RMs and assign each accessory to whichever one
25
25
  - **Interactive code learning** learn codes straight from your remote and add them to your config
26
- - **Basic accessories** power on/off
26
+ - **Simple on/off accessories** power on/off
27
+ - **Advanced accessories** one press sends multiple signals in sequence, with a configurable timeout between them
27
28
  - **Dimmer lights** one signal per discrete brightness level
29
+ - **Fans** speed control, optional swing, extra on/off features (e.g. cooling), and an optional resync switch
28
30
  - **TVs** power on/off plus a usable remote in the iOS Remote app
29
31
  - **Temperature/humidity sensor** optionally expose sensor data
30
32
  - **ntfy.sh notifications** push notification when a RM fails to connect
31
- - **MQTT publishing** optionally publish sensor data to a MQTT broker
33
+ - **MQTT** optionally publish sensor data to a broker, and drive fans from MQTT messages
32
34
  - **Fully configurable** via the Homebridge Config UI X plugin settings form
33
35
 
34
36
  ## Configuration
@@ -45,10 +47,71 @@ your config, run this in the Homebridge shell:
45
47
  broadlink-rm-learner
46
48
  ```
47
49
 
48
- Run `broadlink-rm-learner --help` for usage details.
50
+ Run `broadlink-rm-learner --help` for usage details. Advanced Accessories
51
+ (multiple signals per press) and Fans (speed levels, modes, swing) can be
52
+ learned too, alongside Simple On/Off Accessories, TVs, and Dimmer Lights.
53
+ There's also a "just show hex code" option that captures a single signal
54
+ and prints it for copy/pasting, without saving anything.
49
55
 
50
56
  Backs up `config.json` to `config.json.backup` once per session before writing anything.
51
57
 
58
+ ## MQTT
59
+
60
+ Enable MQTT in the plugin settings to publish temperature and humidity
61
+ readings, and to control accessories over MQTT.
62
+
63
+ Tick "Control via MQTT" on an accessory and give it a topic. It then reads
64
+ commands from the MQTT base topic followed by that topic and `/set`, and
65
+ publishes its own on/off state to the same topic without `/set`:
66
+
67
+ | | Topic |
68
+ | --- | --- |
69
+ | Commands in | `broadlinkrm/bedroom-fan/set` |
70
+ | State out | `broadlinkrm/bedroom-fan` |
71
+
72
+ State is published as `{"state": "ON"}` or `{"state": "OFF"}` whenever the
73
+ accessory turns on or off, however it was triggered. It is retained unless
74
+ you untick "Retain state messages" on that accessory, so a subscriber
75
+ connecting later immediately gets the last known state. Commands are JSON,
76
+ and anything left out is not changed.
77
+
78
+ ### Simple on/off accessories, advanced accessories and TVs
79
+
80
+ ```json
81
+ { "state": "ON" }
82
+ ```
83
+
84
+ | Key | Values |
85
+ | --- | --- |
86
+ | `state` | `ON` or `OFF` |
87
+
88
+ ### Dimmer lights
89
+
90
+ ```json
91
+ { "state": "ON", "level": 50 }
92
+ ```
93
+
94
+ | Key | Values |
95
+ | --- | --- |
96
+ | `state` | `ON` or `OFF` |
97
+ | `level` | `0` to `100` |
98
+
99
+ ### Fans
100
+
101
+ ```json
102
+ { "state": "ON", "speed": 100, "swing": "ON" }
103
+ ```
104
+
105
+ | Key | Values |
106
+ | --- | --- |
107
+ | `state` | `ON` or `OFF` |
108
+ | `speed` | `0` to `100` |
109
+ | `swing` | `ON` or `OFF` |
110
+
111
+ `{"speed": 50}` on its own only changes the speed. `"state": "OFF"` turns
112
+ the fan off and ignores the rest of the message. Retained messages are
113
+ applied when the plugin connects.
114
+
52
115
  ## Debugging
53
116
 
54
117
  To send a single hex code straight to your RM, bypassing Homebridge/HomeKit entirely run this in the Homebridge shell: