homebridge-easy-mqtt 1.5.3-beta.1 → 1.5.3

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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  All notable changes to homebridge-dummy will be documented in this file.
4
4
 
5
- ## 1.5.3-beta.1 (2025-11-09)
5
+ ## 1.5.3 (2025-11-14)
6
+
7
+ ### Help Requested
8
+ I recently created a new [wiki](https://github.com/mpatfield/homebridge-easy-mqtt/wiki/MQTTThing) to provide config examples for users migrating from MQTTThing. If you have an example of old/new config you'd be willing to share, please [post a message on Discord](https://discord.com/channels/432663330281226270/1412178951295467542) or [open a ticket](https://github.com/mpatfield/homebridge-easy-mqtt/issues/new/choose).
6
9
 
7
10
  ### Added
8
11
  - Deutsche Übersetzungen. Danke, [@steffen-micdev](https://github.com/sponsors/steffen-micdev)!
package/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  <span align="center">
6
6
 
7
- # homebridge-easy-mqtt
7
+ # Homebridge Easy MQTT
8
8
 
9
- Homebridge plugin to integrate simple MQTT devices into Apple HomeKit
9
+ Homebridge plugin to integrate MQTT devices into Apple HomeKit
10
10
 
11
11
  [![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
12
12
  [![Discord](https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=discord)](https://discord.com/channels/432663330281226270/1412178951295467542) \
@@ -21,722 +21,13 @@ Any issues or damage resulting from use of this plugin are not the fault of the
21
21
 
22
22
  ## What does this plugin do?
23
23
 
24
- This plugin is designed to be a simple replacement for the fantastic [homebridge-mqttthing](https://github.com/arachnetech/homebridge-mqttthing) plugin which appears as though it's [no longer](https://github.com/arachnetech/homebridge-mqttthing/commits/master/) being actively developed.
24
+ [MQTT](https://mqtt.org/) is a fairly common communication protocol for smart devices such as [Shelly](https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Mqtt/), [Tasmota](https://tasmota.github.io/docs/MQTT/), [Tuya](https://developer.tuya.com/en/docs/iot/MQTT-protocol?id=Kb65nphxrj8f1) and many others. While these devices are often not directly HomeKit compatible, Homebridge Easy MQTT lets you integrate them into your Apple Home.
25
25
 
26
- **HomebridgeEasyMQTT** currently supports the following accessory types but will be expanded over time as more use cases are requested. If there is an accessory type you'd like to see supported, please [create an issue in GitHub](https://github.com/mpatfield/homebridge-easy-mqtt/issues/new/choose).
26
+ Homebridge Easy MQTT aims to be a simple replacement for the fantastic [MQTTThing](https://github.com/arachnetech/homebridge-mqttthing) plugin which appears as though it's [no longer](https://github.com/arachnetech/homebridge-mqttthing/commits/master/) being actively developed.
27
27
 
28
- - `AirPurifier`
29
- - `AirQualitySensor`
30
- - `CarbonDioxideSensor`
31
- - `CarbonMonoxideSensor`
32
- - `ContactSensor`
33
- - `Doorbell`
34
- - `Fanv2`
35
- - `GarageDoorOpener`
36
- - `HeaterCooler`
37
- - `HumiditySensor`
38
- - `LeakSensor`
39
- - `Lightbulb`
40
- - `LightSensor`
41
- - `LockMechanism`
42
- - `MotionSensor`
43
- - `OccupancySensor`
44
- - `Outlet`
45
- - `SecuritySystem`
46
- - `SmokeSensor`
47
- - `StatelessProgrammableSwitch`
48
- - `Switch`
49
- - `TemperatureSensor`
50
- - `Thermostat`
51
- - `Valve`
52
- - `WindowCovering`
28
+ This plugin is being actively improved over time as more use cases are requested. If there is an accessory type you'd like to see supported, please [create an issue in GitHub](https://github.com/mpatfield/homebridge-easy-mqtt/issues/new/choose).
53
29
 
54
- ## Configuration
55
-
56
- Using the Homebridge Config UI is the easiest way to set up this plugin. However, if you wish to do things manually then you will need to add the following to your Homebridge `config.json`:
57
-
58
- ```json
59
- {
60
- "name": "Easy MQTT",
61
- "accessories": [
62
- {
63
- "info": {
64
- "id": "string",
65
- "name": "string",
66
- "type": "string",
67
- "group": "string",
68
- "manufacturer": "string",
69
- "model": "string",
70
- "serialNumber": "string",
71
- "version": "string"
72
- },
73
- "mqtt": {
74
- "broker": "string",
75
- "username": "string",
76
- "password": "string",
77
- "options": "string",
78
- "onConnect": [
79
- {
80
- "topic": "string",
81
- "message": "string",
82
- }
83
-
84
- ]
85
- },
86
- "history": {
87
- "enabled": true,
88
- "disableRepeatLastData": false,
89
- "size": 4032,
90
- },
91
- "customCharacteristics": [
92
- {
93
- "uuid": "string",
94
- "name": "string",
95
- "getTopic": "string",
96
- "units": "string",
97
- }
98
-
99
- ],
100
- "resetOnRestart": false,
101
- "disableLogging": false,
102
- … // See Topics & Values below for additional attributes for each accessory type
103
- ],
104
- "verbose": false,
105
- "platform": "HomebridgeEasyMQTT"
106
- }
107
- ```
108
-
109
- Required fields are marked with an asterisk (*)
110
-
111
- ### Info
112
- - `id*` - A unique ID to identify this accessory. Changing this value will result in a new accessory.
113
- - `name*` - The display name for the accessory in HomeKit
114
- - `type*` - The type of accessory. See list of currently supported types above.
115
- - `group` - Items sharing the same group name will be grouped together in the Home app UI
116
- - ⚠️ Changing the group name will require you to reconfigure any HomeKit scenes/automations for those accessories
117
- - `manufacturer` - The accessory manufacturer which will display in HomeKit device details
118
- - `model` - The accessory model which will display in HomeKit device details
119
- - `serialNumber` - The accessory serial number which will display in HomeKit device details
120
- - `version` - The accessory software version which will display in HomeKit device details
121
-
122
- ### MQTT:
123
- - `broker` - The URL and port to use for communicating with your MQTT device, defaults to `mqtt://127.0.0.1:1883/`
124
- - `username` - Username
125
- - `password` - Password
126
- - `options` - See [MQTT Options](#mqtt-options) below
127
- - `onConnect` - See [MQTT OnConnect](#mqtt-onconnect) below
128
-
129
- #### Environment Variables
130
-
131
- Alternatively, you may set the following environment variables for broker, username, and password:
132
-
133
- - `EASYMQTT_BROKER` - expects a fully formed url, `protocol://host:port/` where port is optional
134
- - `EASYMQTT_USERNAME`
135
- - `EASYMQTT_PASSWORD`
136
-
137
- Note that setting the this information in the JSON config will override the environment variables.
138
-
139
- ## Topics & Values
140
-
141
- You will need to make sure to populate the appropriate topics based on the accessory type defined below.
142
-
143
- You may define topics using a JSONPath dot notation to assist the parser in finding the right value within the message. You can also add a value transformer to alter the incoming or outgoing value. See [Advanced Topic Notation](#advanced-topic-notation) below for more details.
144
-
145
- As with topics, you will also need to populate the appropriate values based on the type. Note that while they are defined as strings, they will be auto-converted to the appropriate primitives (e.g. boolean or number) where appropriate.
146
-
147
- These values are used for both determining current state and, where appropriate, publishing the new state to MQTT
148
-
149
- ### General Purpose
150
- - `topicGetStatusActive` - Whether or not the accessory is connected/reachable
151
- - `topicGetBatteryLow` - Wether or not the accessory has a low battery
152
- - `topicGetBatteryLevel` - Percentage as a number
153
- - `valueStatusActive` - Accessory is connected/reachable, e.g. "true", "1", or "Alive"
154
- - `valueBatteryLow` - Accessory has a low battery level
155
-
156
- ### On/Off Accessories
157
-
158
- #### Lightbulb
159
- - `maximumBrightness` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for brightness
160
- - `topicGetOn*` - The current state of the outlet, i.e. on/off
161
- - `topicSetOn*` - For setting the state of the outlet
162
- - `valueOn*` - Turned on, e.g. "true", or "1", or "On"
163
- - `valueOff*` - Turned off, e.g. "false", or "0", or "Off"
164
- - `topicGetBrightness` - The current brightness as a percent
165
- - `topicSetBrightness` - For setting the brightness
166
- - `topicGetColorTemperature` - The current color temperature of the lightbulb
167
- - `topicSetColorTemperature` - For setting the color temperature of the lightbulb
168
- - `topicGetHue` - The lightbulb's current hue
169
- - `topicSetHue` - For setting the lightbulb's current hue
170
- - `topicGetSaturation` - The current saturation setting of the lightbulb
171
- - `topicSetSaturation` - For setting the saturation setting of the lightbulb
172
- - `topicGetCurrentConsumption` - Get the current power rate in watts ([Eve only](#eve-app-support))
173
- - `topicGetElectricCurrent` - Get the electrical current in amps ([Eve only](#eve-app-support))
174
- - `topicGetTotalConsumption` - Get the total energy use in kWh ([Eve only](#eve-app-support))
175
- - `topicGetVoltage` - Get the current voltage ([Eve only](#eve-app-support))
176
-
177
- #### Outlet
178
- - `topicGetOn*` - The current state of the outlet, i.e. on/off
179
- - `topicSetOn*` - For setting the state of the outlet
180
- - `topicGetOutletInUse` - Whether or not the outlet is
181
- - `valueOn*` - Turned on, e.g. "true", or "1", or "On"
182
- - `valueOff*` - Turned off, e.g. "false", or "0", or "Off"
183
- - `valueOutletInUse` - Currently being used, e.g. "true", or "1", or "On"
184
- - `topicGetCurrentConsumption` - Get the current power rate in watts ([Eve only](#eve-app-support))
185
- - `topicGetElectricCurrent` - Get the electrical current in amps ([Eve only](#eve-app-support))
186
- - `topicGetTotalConsumption` - Get the total energy use in kWh ([Eve only](#eve-app-support))
187
- - `topicGetVoltage` - Get the current voltage ([Eve only](#eve-app-support))
188
-
189
- #### Switch
190
- - `topicGetOn*` - The current state of the outlet, i.e. on/off
191
- - `topicSetOn*` - For setting the state of the outlet
192
- - `topicGetCurrentConsumption` - Get the current power rate in watts ([Eve only](#eve-app-support))
193
- - `topicGetElectricCurrent` - Get the electrical current in amps ([Eve only](#eve-app-support))
194
- - `topicGetTotalConsumption` - Get the total energy use in kWh ([Eve only](#eve-app-support))
195
- - `topicGetVoltage` - Get the current voltage ([Eve only](#eve-app-support))
196
- - `valueOn*` - Turned on, e.g. "true", or "1", or "On"
197
- - `valueOff*` - Turned off, e.g. "false", or "0", or "Off"
198
-
199
- ### Position Accessories
200
-
201
- #### WindowCovering
202
- - `maximumPosition` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for position
203
- - `topicGetPositionState*` - Get position state (Decreasing, Increasing, Stopped)
204
- - `topicGetCurrentPosition*` - Get current position percent
205
- - `topicGetTargetPosition*` - Get target position percent
206
- - `topicSetTargetPosition*` - Set target position percent
207
- - `topicGetCurrentHorizontalTiltAngle` - Get current horizontal angle (-90° to 90°)
208
- - `topicGetTargetHorizontalTiltAngle` - Get target horizontal angle (-90° to 90°)
209
- - `topicSetTargetHorizontalTiltAngle` - Set target horizontal angle (-90° to 90°)
210
- - `topicGetCurrentVerticalTiltAngle` - Get current vertical angle (-90° to 90°)
211
- - `topicGetTargetVerticalTiltAngle` - Get target vertical angle (-90° to 90°)
212
- - `topicSetTargetVerticalTiltAngle` - Set target vertical angle (-90° to 90°)
213
- - `topicSetHoldPosition` - Set hold (true/false)
214
- - `topicGetObstructionDetected` - Get obstruction detected
215
- - `valuePositionDecreasing` - Closing
216
- - `valuePositionIncreasing` - Opening
217
- - `valuePositionStopped` - Stopped
218
- - `valuePositionHold` - Hold
219
- - `valuePositionResume` - Resume
220
- - `valuePositionObstructed` - Obstruction detected
221
-
222
- ### Sensors
223
-
224
- #### AirQualitySensor
225
- - `topicGetAirQuality*` - Get air quality
226
- - `topicGetNitrogenDioxideDensity` - Get nitrogen dioxide density in µg/m³
227
- - `topicGetOzoneDensity` - Get ozone density in µg/m³
228
- - `topicGetPM2_5Density` - Get PM2.5 density in µg/m³
229
- - `topicGetPM10Density` - Get PM10 density in µg/m³
230
- - `topicGetSulphurDioxideDensity` - Get sulphur dioxide density in µg/m³
231
- - `topicGetVOCDensity` - Get VOC density in µg/m³
232
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
233
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
234
- - `valueAQExcellent` - Air quality excellent
235
- - `valueAQGood` - Air quality good
236
- - `valueAQFair` - Air quality fair
237
- - `valueAQInferior` - Air quality inferior
238
- - `valueAQPoor` - Air quality poor
239
- - `valueAQUnknown` - Air quality unknown
240
- - `valueFault` - Accessory has a fault
241
- - `valueTampered` - Accessory has been tampered with
242
-
243
- #### CarbonDioxideSensor
244
- - `topicGetCarbonDioxideDetected*` - Whether or not the sensor has detected carbon dioxide
245
- - `topicGetCarbonDioxideLevel` - The current carbon dioxide level
246
- - `topicGetCarbonDioxidePeakLevel` - The peak carbon dioxide level
247
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
248
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
249
- - `valueCarbonDioxideDetected*` - Accessory has detected carbon dioxide
250
- - `valueFault` - Accessory has a fault
251
- - `valueTampered` - Accessory has been tampered with
252
-
253
- #### CarbonMonoxideSensor
254
- - `topicGetCarbonMonoxideDetected*` - Whether or not the sensor has detected carbon monoxide
255
- - `topicGetCarbonMonoxideLevel` - The current carbon monoxide level
256
- - `topicGetCarbonMonoxidePeakLevel` - The peak carbon monoxide level
257
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
258
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
259
- - `valueCarbonMonoxideDetected*` - Accessory has detected carbon monoxide
260
- - `valueFault` - Accessory has a fault
261
- - `valueTampered` - Accessory has been tampered with
262
-
263
- #### ContactSensor
264
- - `topicGetContactSensorState*` - Whether or not sensor has detected contact
265
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
266
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
267
- - `valueContactDetected*` - Accessory has detected contact
268
- - `valueFault` - Accessory has a fault
269
- - `valueTampered` - Accessory has been tampered with
270
-
271
- ### HumiditySensor
272
- - `topicGetCurrentRelativeHumidity*` - The current relatively humidity
273
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
274
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
275
- - `valueFault` - Accessory has a fault
276
- - `valueTampered` - Accessory has been tampered with
277
-
278
- #### LeakSensor
279
- - `topicGetLeakDetected*` - Whether or not sensor has detected a leak
280
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
281
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
282
- - `valueLeakDetected*` - Accessory has detected a leak
283
- - `valueFault` - Accessory has a fault
284
- - `valueTampered` - Accessory has been tampered with
285
-
286
- #### LightSensor
287
- - `topicGetCurrentAmbientLightLevel*` - The current light level in lux units
288
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
289
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
290
- - `valueFault` - Accessory has a fault
291
- - `valueTampered` - Accessory has been tampered with
292
-
293
- #### MotionSensor
294
- - `topicGetMotionDetected*` - Whether or not sensor has detected motion
295
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
296
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
297
- - `valueMotionDetected*` - Accessory has detected motion
298
- - `valueFault` - Accessory has a fault
299
- - `valueTampered` - Accessory has been tampered with
300
-
301
- #### OccupancySensor
302
- - `topicGetOccupancyDetected*` - Whether or not sensor has detected occupancy
303
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
304
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
305
- - `valueOccupancyDetected*` - Accessory has detected occupancy
306
- - `valueFault` - Accessory has a fault
307
- - `valueTampered` - Accessory has been tampered with
308
-
309
- #### SmokeSensor
310
- - `topicGetSmokeDetected*` - Whether or not sensor has detected smoke
311
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
312
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
313
- - `valueSmokeDetected*` - Accessory has detected smoke
314
- - `valueFault` - Accessory has a fault
315
- - `valueTampered` - Accessory has been tampered with
316
-
317
- #### TemperatureSensor
318
- - `topicGetCurrentTemperature*` - The current temperature of the sensor
319
- - `temperatureUnits` - The temperature units of the incoming value supplied by the sensor, `C` for Celsius (default) `F` for Fahrenheit
320
- - `topicGetStatusFault` - Whether or not the sensor has a generic fault
321
- - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
322
- - `valueFault` - Accessory has a fault
323
- - `valueTampered` - Accessory has been tampered with
324
-
325
- ### Climate Controllers
326
-
327
- #### Thermostat
328
- - `temperatureUnits` - The temperature units of the incoming value supplied by the thermostat, `C` for Celsius (default) `F` for Fahrenheit
329
- - `topicGetCurrentTemperature*` - Get the current temperature
330
- - `topicGetCurrentHeatingCoolingState*` - Get the current mode (i.e. cooling, heating, off)
331
- - `topicGetTargetHeatingCoolingState*` - Get the target mode (i.e. auto, cooling, heating, off)
332
- - `topicSetTargetHeatingCoolingState*` - Set the target mode (i.e. auto, cooling, heating, off)
333
- - `topicGetTargetTemperature*` - Get the target temperature
334
- - `topicSetTargetTemperature*` - Set the target temperature
335
- - `topicGetCoolingThresholdTemperature` - Get the cooling threshold temperature
336
- - `topicSetCoolingThresholdTemperature` - Set the cooling threshold temparture
337
- - `topicGetHeatingThresholdTemperature` - Get the heating threshold temperature
338
- - `topicSetHeatingThresholdTemperature` - Set the heating threshold temperature
339
- - `topicGetCurrentRelativeHumidity` - Get the current humidity
340
- - `topicGetTargetRelativeHumidity` - Get the target humidity
341
- - `topicSetTargetRelativeHumidity` - Set the target humidity
342
- - `topicGetFilterChangeIndication` - Whether or not the filter needs to be changed. *Required if other filter topics are defined.
343
- - `topicGetFilterLifeLevel` - Filter life remaining as a percentage
344
- - `topicResetFilterIndication` - Used to reset the filter
345
- - `valueModeAuto` - Auto mode
346
- - `valueModeCool` - Cool mode
347
- - `valueModeHeat` - Heat mode
348
- - `valueModeOff` - Thermostat off
349
- - `valueFilterChange` - Indicates that the filter needs to be changed. *Required if `topicGetFilterChangeIndication` is defined.
350
-
351
- #### AirPurifier
352
- - `maximumRotationSpeed` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for rotation speed
353
- - `topicGetActive*` - Get whether or not the accessory is currently active
354
- - `topicSetActive*` - Set whether or not the accessory is currently active
355
- - `topicGetCurrentPurifierState*` - Get the current mode (i.e. inactive, idle, purifying)
356
- - `topicGetTargetPurifierState*` - Get the target mode (i.e. auto, manual)
357
- - `topicSetTargetPurifierState*` - Set the target mode (i.e. auto, manual)
358
- - `topicGetLockPhysicalControls` - Get whether or not the physical controls are locked
359
- - `topicSetLockPhysicalControls` - Set whether or not the physical controls are locked
360
- - `topicGetRotationSpeed` - Get the rotation speed as a percentage
361
- - `topicSetRotationSpeed` - Set the rotation speed as a percentage
362
- - `topicGetSwingMode` - Get whether or not accessory is oscillating
363
- - `topicSetSwingMode` - Set whether or not accessory is oscillating
364
- - `topicGetFilterChangeIndication` - Whether or not the filter needs to be changed. *Required if other filter topics are defined.
365
- - `topicGetFilterLifeLevel` - Filter life remaining as a percentage
366
- - `topicResetFilterIndication` - Used to reset the filter
367
- - `valueStateActive*` - Accessory is currently active
368
- - `valueStateInactive*` - Accessory is currently inactive
369
- - `valueModeAuto` - Auto target mode
370
- - `valueModeIdle` - Idle mode
371
- - `valueModeInactive` - Inactive mode
372
- - `valueModeManual` - Manual target mode
373
- - `valueModePurifying` - Purifying mode
374
- - `valueControlLock` - Physical controls are locked
375
- - `valueControlUnlock` - Physical controls are unlocked
376
- - `valueSwingEnabled` - Accessory is oscillating
377
- - `valueSwingDisabled` - Accessory is not oscillating
378
- - `valueFilterChange` - Indicates that the filter needs to be changed. *Required if `topicGetFilterChangeIndication` is defined.
379
-
380
- #### Fanv2
381
- - `maximumRotationSpeed` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for rotation speed
382
- - `topicGetActive*` - Get whether or not the accessory is currently active
383
- - `topicSetActive*` - Set whether or not the accessory is currently active
384
- - `topicGetCurrentFanState` - Get current fan mode (blowing, idle, inactive)
385
- - `topicGetTargetFanState` - Get target fan mode (auto, manual)
386
- - `topicSetTargetFanState` - Set target fan mode (auto, manual)
387
- - `topicGetLockPhysicalControls` - Get whether or not the physical controls are locked
388
- - `topicSetLockPhysicalControls` - Set whether or not the physical controls are locked
389
- - `topicGetRotationDirection` - Get the fan rotation direction (clockwise, counter clockwise)
390
- - `topicSetRotationDirection` - Set the fan rotation direction (clockwise, counter clockwise)
391
- - `topicGetRotationSpeed` - Get the rotation speed as a percentage
392
- - `topicSetRotationSpeed` - Set the rotation speed as a percentage
393
- - `topicGetSwingMode` - Get whether or not accessory is oscillating
394
- - `topicSetSwingMode` - Set whether or not accessory is oscillating
395
- - `valueStateActive*` - Accessory is currently active
396
- - `valueStateInactive*` - Accessory is currently inactive
397
- - `valueModeBlowing` - Air blowing mode
398
- - `valueModeIdle` - Idle mode
399
- - `valueModeInactive` - Inactive mode
400
- - `valueModeAuto` - Auto target mode
401
- - `valueModeManual` - Manual target mode
402
- - `valueDirectionClockwise` - Rotating clockwise
403
- - `valueDirectionCounterClockwise` - Rotating counter clockwise
404
- - `valueControlLock` - Physical controls are locked
405
- - `valueControlUnlock` - Physical controls are unlocked
406
- - `valueSwingEnabled` - Accessory is oscillating
407
- - `valueSwingDisabled` - Accessory is not oscillating
408
-
409
- #### HeaterCooler
410
- - `maximumRotationSpeed` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for rotation speed
411
- - `temperatureUnits` - The temperature units of the incoming value supplied by the thermostat, `C` for Celsius (default) `F` for Fahrenheit
412
- - `topicGetActive*` - Get whether or not the accessory is currently active
413
- - `topicSetActive*` - Set whether or not the accessory is currently active
414
- - `topicGetCurrentTemperature*` - Get the current temperature
415
- - `topicGetCurrentHeaterCoolerState*` - Get the current mode (i.e. inactive, idle, heating, cooling)
416
- - `topicGetTargetHeaterCoolerState*` - Get the target mode (i.e. auto, heat, cool)
417
- - `topicSetTargetHeaterCoolerState*` - Set the target mode (i.e. auto, heat, cool)
418
- - `topicGetCoolingThresholdTemperature` - Get the cooling threshold temperature
419
- - `topicSetCoolingThresholdTemperature` - Set the cooling threshold temparture
420
- - `topicGetHeatingThresholdTemperature` - Get the heating threshold temperature
421
- - `topicSetHeatingThresholdTemperature` - Set the heating threshold temperature
422
- - `topicGetLockPhysicalControls` - Get whether or not the physical controls are locked
423
- - `topicSetLockPhysicalControls` - Set whether or not the physical controls are locked
424
- - `topicGetRotationSpeed` - Get the rotation speed as a percentage
425
- - `topicSetRotationSpeed` - Set the rotation speed as a percentage
426
- - `topicGetSwingMode` - Get whether or not accessory is oscillating
427
- - `topicSetSwingMode` - Set whether or not accessory is oscillating
428
- - `topicGetFilterChangeIndication` - Whether or not the filter needs to be changed. *Required if other filter topics are defined.
429
- - `topicGetFilterLifeLevel` - Filter life remaining as a percentage
430
- - `topicResetFilterIndication` - Used to reset the filter
431
- - `valueStateActive*` - Accessory is currently active
432
- - `valueStateInactive*` - Accessory is currently inactive
433
- - `valueModeAuto` - Mode is auto
434
- - `valueModeCool` - Mode is cool/cooling
435
- - `valueModeHeat` - Mode is heat/heating
436
- - `valueModeIdle` - Mode is idle
437
- - `valueModeInactive` - Mode is inactive
438
- - `valueControlLock` - Physical controls are locked
439
- - `valueControlUnlock` - Physical controls are unlocked
440
- - `valueSwingEnabled` - Accessory is oscillating
441
- - `valueSwingDisabled` - Accessory is not oscillating
442
- - `valueFilterChange` - Indicates that the filter needs to be changed. *Required if `topicGetFilterChangeIndication` is defined.
443
-
444
- ### Others
445
-
446
- #### GarageDoorOpener
447
- - `topicGetCurrentDoorState*` - Current state of the garage door, i.e. open/opening/closed/closing/stopped
448
- - `topicGetTargetDoorState*` - Target state of the garage door, i.e. open/closed
449
- - `topicSetTargetDoorState*` - Set the target door state, i.e. open/closed
450
- - `topicGetObstructionDetected*` - Whether or not the garage door is obstructed
451
- - `topicGetCurrentLockState` - The current state of the garage lock, i.e. locked/unlocked
452
- - `topicGetTargetLockState` - The target (i.e. desired) state of the garage lock
453
- - `topicSetTargetLockState` - For setting the target (i.e. desired) state of the garage lock
454
- - `valueDoorObstructed*` - Door is obstructed
455
- - `valueDoorStateClosed` - Door is closed
456
- - `valueDoorStateClosing` - Door is closing
457
- - `valueDoorStateOpen` - Door is open
458
- - `valueDoorStateOpening` - Door is opening
459
- - `valueDoorStateStopped` - Door is stopped
460
- - `valueLockStateJammed` - Door lock is jammed
461
- - `valueLockStateSecured` - Door is locked
462
- - `valueLockStateUnsecured` - Door is unlocked
463
-
464
- #### LockMechanism
465
- - `topicGetCurrentLockState*` - The current state of the lock, i.e. locked/unlocked
466
- - `topicGetTargetLockState*` - The target (i.e. desired) state of the lock
467
- - `topicSetTargetLockState*` - For setting the target (i.e. desired) state of the lock
468
- - `valueLockStateSecured*` - Locked state, e.g. "true", "255", or "Locked"
469
- - `valueLockStateUnsecured*` - Unlocked state, e.g. "false", "0", or "Unlocked"
470
- - `valueLockStateJammed` - Lock is jammed, e.g. "254" or "Jammed"
471
-
472
- #### SecuritySystem
473
- - `topicGetCurrentSecurityState*` — The current state of the system
474
- - `topicGetTargetSecurityState*` — The target state of the system
475
- - `topicSetTargetSecurityState*` — For setting the target state of the system
476
- - `topicGetStatusFault` — For getting whether there is a system error
477
- - `topicGetStatusTampered` — For getting whether the system has been tampered with
478
- - `valueArmStay` - System armed in stay mode, e.g. "SA" or "stay"
479
- - `valueArmAway` - System armed in away mode, e.g. "AA" or "away"
480
- - `valueArmNight` - System armed in night mode, e.g. "NA" or "night"
481
- - `valueDisarm` - System armed in away mode, e.g. "D" or "disarmed"
482
- - `valueAlarmTriggered` - When the alarm has been triggered, e.g. "true" or "1" or "triggered"
483
- - `valueFault` - Accessory has a fault
484
- - `valueTampered` - Accessory has been tampered with
485
-
486
- #### StatelessProgrammableSwitch
487
- - `topicEventButtonPress*` - Event for button press event
488
- - `valueSinglePress` - Single press event
489
- - `valueDoublePress` - Double press event
490
- - `valueLongPress` - Long press event
491
-
492
- ### Doorbell
493
- - `maximumBrightness` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for brightness
494
- - `maximumVolume` - Set a maximum to use values (i.e. 1, 2, 3) rather than a percentage for volume
495
- - `topicEventButtonPress*` - Event for button press event
496
- - `topicGetBrightness` - Get the brightness
497
- - `topicSetBrightness` - Set the brightness
498
- - `topicGetMuted` - Get whether or not the doorbell is muted
499
- - `topicSetMuted` - Set whether or not the doorbell is muted
500
- - `topicGetVolume` - Get the volume
501
- - `topicSetVolume` - Set the volume
502
- - `valueSinglePress` - Single press event
503
- - `valueDoublePress` - Double press event
504
- - `valueLongPress` - Long press event
505
- - `valueMuted` - Doorbell muted
506
- - `valueUnmuted` - Doorbell unmuted
507
-
508
- #### Valve
509
- - `valveType` - One of `GENERIC_VALVE` (default), `IRRIGATION`, `SHOWER_HEAD`, or `WATER_FAUCET`
510
- - `topicGetValveActive*` - For getting whether or not the valve is active
511
- - `topicSetValveActive*` - For setting whether or not the valve is active
512
- - `topicGetValveInUse*` - For getting whether or not the valve is in use
513
- - `topicGetStatusFault` - For getting whether or not there is a fault
514
- - `topicGetValveIsConfigured` - For getting wether or not valve is configured
515
- - `topicSetValveIsConfigured` - For setting wether or not valve is configured
516
- - `topicGetValveSetDuration` - For getting the set duration in seconds
517
- - `topicSetValveSetDuration` - For setting the set duration in seconds
518
- - `topicGetValveRemainingDuration` - For getting the time remaining in seconds
519
- - `valueActive*` - Valve is active, e.g. "true", or "1", or "active"
520
- - `valueInactive*` - Valve is not active e.g. "false", or "0", or "active"
521
- - `valueInUse*` - Valve is in use, e.g. "true", or "1", or "used"
522
- - `valueConfigured` - Valve is configured, e.g. "true", or "1", or "configured"
523
- - `valueNotConfigured` - Valve is not configured, e.g. "false", or "0", or "unconfigured"
524
- - `valueFault` - Valve has a fault, e.g. "error", or "-1"
525
-
526
- ## Logging/Debugging:
527
-
528
- By default, devices will log activity, for example when a Switch is turned on or a LockMechanism is unlocked.
529
-
530
- To disable, add the following to the accessories you'd like to silence.
531
-
532
- - `"disableLogging": true`
533
-
534
- You may also turn on additional logging if you'd like to see the MQTT messages passed back and forth. You can do this by adding the following at the top level of the config.
535
-
536
- - `"verbose": true`
537
-
538
- ## MQTT Options
539
-
540
- You are able to pass in any arbitrary MQTT options via `mqtt.options` in the config. This can be a combination of [client options](https://github.com/mqttjs/MQTT.js?tab=readme-ov-file#mqttclientstreambuilder-options) and [publish options](https://github.com/mqttjs/MQTT.js?tab=readme-ov-file#mqttclientpublishtopic-message-options-callback). Just make sure the value provided is valid JSON. For example:
541
-
542
- ```
543
- "options": "{ \"protocolVersion\": \"4\", \"clientId\": \"my-client-id\", \"retain\": true }"
544
- ```
545
-
546
- ## MQTT OnConnect
547
-
548
- Accessories can be configured to publish any number of arbitratry messages to the MQTT server on connect. This can be useful to invoke accessories to give updates on their current status.
549
-
550
- Each entry should have a topic and a message:
551
-
552
- ```
553
- "onConnect": [
554
- {
555
- "topic": "some/arbitrary/topic",
556
- "message": "connected",
557
- },
558
- {
559
- "topic": "another/arbitrary/topic",
560
- "message": "{ \"value\": \"can also be json\" }",
561
- }
562
- ]
563
- ```
564
-
565
- ## Advanced Topic Notation
566
-
567
- ### JSONPaths
568
-
569
- For some devices, the desired values in the MQTT messages are embedded within a JSON object. For example, here is the MQTT message for my door lock that is received when the door is locked:
570
-
571
- ```json
572
- { "time": 1750870005853, "state": 255 }
573
- ```
574
-
575
- Since the value (255) that I need is embedded within JSON, I can use JSONPath syntax to tell the parser how to find the value.
576
-
577
- So, in this example I would define my topic as:
578
-
579
- `zwave/1/door_lock/currentMode$.state`
580
-
581
- The `$.state` at the end tells the parser to grab the value using the key "state".
582
-
583
- This can be arbitrarily complicated and several layers deep. For example,
584
-
585
- ```json
586
- {
587
- "time":1750870005853,
588
- "state": {
589
- "number": {
590
- "value": 255
591
- }
592
- }
593
- }
594
- ```
595
-
596
- would use the topic
597
-
598
- `zwave/1/door_lock/currentMode$.state.number.value`
599
-
600
- You can do the same for the set topic if the device is expecting a JSON object rather than a raw value.
601
-
602
- If, for example, your device is expecting this message:
603
-
604
- ```json
605
- {
606
- "target": "away"
607
- }
608
- ```
609
-
610
- instead of just the raw value "away" you can use:
611
-
612
- `zwave/4/security/set$.target`
613
-
614
- Again, the `$.target` at the end tells the MQTT client to wrap the value a JSON object.
615
-
616
- As with get topics, you can have an arbitrarily complex chain. So if, for example, you want this object:
617
-
618
- ```json
619
- {
620
- "target": {
621
- "mode": {
622
- "value": "away"
623
- }
624
- }
625
- }
626
- ```
627
-
628
- then you would use the topic
629
-
630
- `zwave/4/security/set$.target.mode.value`
631
-
632
- ### Value Transformers
633
-
634
- There are other situations where the value needs to be adjusted or altered entirely.
635
-
636
- For example, you may have an Air Quality Sensor that measures Nitrogen Dioxide in ppm (parts per million) instead of µg/m³ (micrograms per cubic meter) which HomeKit expects. In this case, you need to multiply by the arbitrary number 1883 to get the correct result.
637
-
638
- Using the pipe (`|`) notation, you may add a transformer:
639
-
640
- `airquality/no2|value * 1883`
641
-
642
- This will multiply the value by `1883` to get the desired result.
643
-
644
- Note that `value` is a reserved keyword here to indicate the incoming value you'd like to transform.
645
-
646
- You can also do the same thing on the publish side to transfer it back to ppm. In this case, you would need to divide by 1883.
647
-
648
- `airquality/no2|value / 1883`
649
-
650
- If you need to save values for later use, you may use the special `storage` object which allows you to retain any arbitrary primitive value using "dot" notation, i.e. `storage.foo='bar'`
651
-
652
- For example, here is a use case where a garage door needs to (sometimes) save the door position value:
653
-
654
- `stat/garagedoor/current|if(value=='C' || value=='O') storage.doorPosition=value; return value;`
655
-
656
- Then, the door position can be retrieved later with the following:
657
-
658
- `cmnd/garagerelay/POWER|return (storage.doorPosition===value)?undefined : 'ON'`
659
-
660
- Note that `storage` is shared across all topics for a particular MQTT instance, so take care to use unique keys.
661
-
662
- ### Both JSONPath + Transformer
663
-
664
- You can also combine JSONPath and Transformer notation into a single entity
665
-
666
- `airquality$.no2|value * 1883`
667
-
668
- ## Eve App Support
669
-
670
- If you use [Eve](https://apps.apple.com/us/app/eve-for-matter-homekit/id917695792), then there are some additional features available:
671
- - Opened/closed history, and times opened count with option to reset for `ContactSensor`
672
- - `MotionSensor` history
673
- - Temperature history for `HeaterCooler`, `TemperatureSensor`, and `Thermostat`
674
- - Humidity history for `HumiditySensor` and `Thermostat`
675
- - On/off history for `Lightbulb`, `Outlet`, and `Switch`
676
-
677
- You can also add get topics for watts/amps/volts/kWh for `Lightbulb`, `Outlet`, and `Switch`:
678
- - `topicGetCurrentConsumption` - Get the current power rate in watts
679
- - `topicGetElectricCurrent` - Get the electrical current in amps
680
- - `topicGetTotalConsumption` - Get the total energy use in kWh
681
- - `topicGetVoltage` - Get the current voltage
682
-
683
- To enable history, choose the `History Enabled` option in the config UI.
684
-
685
- There are a couple of advanced options if configuring via JSON:
686
-
687
- ```json
688
- {
689
- "info": …
690
- "mqtt": …
691
- "history": {
692
- "enabled": true,
693
- "disableRepeatLastData": false,
694
- "size": 4032,
695
- },
696
- … // Topic & Values
697
- }
698
- ```
699
-
700
- - `enabled` — used to enable/disable history
701
- - `disableRepeatLastData` — See [fakegato-history](https://github.com/simont77/fakegato-history?tab=readme-ov-file#fakegato-history) for info
702
- - `size` - The maximum number of history entries. Default is 4032 (1 entry every 10 minutes for 28 days)
703
-
704
- ### Custom Characteristics
705
-
706
- Eve users can also add custom characteristics to display any arbitrary numeric information.
707
-
708
- <img src="https://raw.githubusercontent.com/mpatfield/homebridge-easy-mqtt/refs/heads/latest/img/screenshot_1.png">
709
-
710
- Due to the complexity, this was intentionally left out of the plugin config UI, so this can only be configured manually.
711
-
712
- ```json
713
- {
714
- "info": …
715
- "mqtt": …
716
- "customCharacteristics": [
717
- {
718
- "uuid": "string",
719
- "name": "string",
720
- "getTopic": "string",
721
- "units": "string",
722
- }
723
- … // Topic & Values
724
- ],
725
- }
726
- ```
727
-
728
- - `uuid` — A unique string (recommend using a (UUID generator)[https://www.uuidgenerator.net/])
729
- - `name` — The display name for the characteristic
730
- - `getTopic` — The topic which provides the numeric value
731
- - `units` - The units which will be displayed at the end of the numeric value
732
-
733
- Since `customCharacteristics` is an array, you may define as many custom characteristics as you wish.
734
-
735
- ## Persistance
736
-
737
- By default, all accessory values are saved and reloaded when the plugin restarts. However, you may override this behavior by selecting `Reset on Restart` option and accessories will be reset to defaults whenever the plugin or Homebridge restarts.
738
-
739
- - `"resetOnRestart": true`
30
+ Lots more details about Homebridge Easy MQTT can be found on the [wiki](https://github.com/mpatfield/homebridge-easy-mqtt/wiki).
740
31
 
741
32
  ## Credits
742
33
 
@@ -756,6 +47,6 @@ By default, all accessory values are saved and reloaded when the plugin restarts
756
47
 
757
48
  [Keryan Belahcene](https://www.instagram.com/keryan.me) for creating the [Flume](https://github.com/homebridge-plugins/homebridge-flume) header logo which I adapted for this plugin
758
49
 
759
- [@arachnetech](https://github.com/arachnetech) for the fantastic [homebridge-mqttthing](https://github.com/arachnetech/homebridge-mqttthing) plugin which served as the main inspiration for this project
50
+ [homebridge-mqttthing](https://github.com/arachnetech/homebridge-mqttthing) by [@arachnetech](https://github.com/arachnetech) which served as the main inspiration for this project
760
51
 
761
52
  And to the amazing creators/contributors of [Homebridge](https://homebridge.io) who made this plugin possible!
@@ -24,4 +24,4 @@
24
24
 
25
25
  <footer id="footer" class="text-center" style="display: none; font-style: italic; font-size: 0.9em;" i18n="required"></footer>
26
26
 
27
- <script src="ui.js?v=1.5.3-beta.1"></script>
27
+ <script src="ui.js?v=1.5.3"></script>
package/package.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "homebridge-easy-mqtt",
3
3
  "platform": "HomebridgeEasyMQTT",
4
4
  "displayName": "Homebridge Easy MQTT",
5
- "description": "Homebridge plugin for easy control of MQTT devices",
5
+ "description": "Homebridge plugin for MQTT devices",
6
6
  "type": "module",
7
- "version": "1.5.3-beta.1",
7
+ "version": "1.5.3",
8
8
  "homepage": "https://github.com/mpatfield/homebridge-easy-mqtt#readme",
9
9
  "repository": {
10
10
  "type": "git",
Binary file