homebridge-easy-mqtt 1.3.0-beta.2 → 1.3.0-beta.4

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 (64) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/README.md +158 -106
  3. package/config.schema.json +579 -6
  4. package/dist/accessory/abstract/base.d.ts +0 -1
  5. package/dist/accessory/abstract/base.js +0 -19
  6. package/dist/accessory/abstract/base.js.map +1 -1
  7. package/dist/accessory/abstract/mqtt.d.ts +4 -1
  8. package/dist/accessory/abstract/mqtt.js +40 -3
  9. package/dist/accessory/abstract/mqtt.js.map +1 -1
  10. package/dist/accessory/lock.js +2 -2
  11. package/dist/accessory/lock.js.map +1 -1
  12. package/dist/accessory/onoff/lightbulb.js +4 -4
  13. package/dist/accessory/onoff/onoff.js +2 -2
  14. package/dist/accessory/security.js +7 -7
  15. package/dist/accessory/security.js.map +1 -1
  16. package/dist/accessory/sensor/carbonDioxide.d.ts +8 -0
  17. package/dist/accessory/sensor/carbonDioxide.js +15 -0
  18. package/dist/accessory/sensor/carbonDioxide.js.map +1 -0
  19. package/dist/accessory/sensor/carbonMonoxide.d.ts +8 -0
  20. package/dist/accessory/sensor/carbonMonoxide.js +15 -0
  21. package/dist/accessory/sensor/carbonMonoxide.js.map +1 -0
  22. package/dist/accessory/sensor/contact.d.ts +9 -0
  23. package/dist/accessory/sensor/contact.js +17 -0
  24. package/dist/accessory/sensor/contact.js.map +1 -0
  25. package/dist/accessory/sensor/humidity.d.ts +8 -0
  26. package/dist/accessory/sensor/humidity.js +13 -0
  27. package/dist/accessory/sensor/humidity.js.map +1 -0
  28. package/dist/accessory/sensor/leak.d.ts +8 -0
  29. package/dist/accessory/sensor/leak.js +13 -0
  30. package/dist/accessory/sensor/leak.js.map +1 -0
  31. package/dist/accessory/sensor/motion.d.ts +8 -0
  32. package/dist/accessory/sensor/motion.js +13 -0
  33. package/dist/accessory/sensor/motion.js.map +1 -0
  34. package/dist/accessory/sensor/occupancy.d.ts +8 -0
  35. package/dist/accessory/sensor/occupancy.js +13 -0
  36. package/dist/accessory/sensor/occupancy.js.map +1 -0
  37. package/dist/accessory/sensor/sensor.d.ts +9 -0
  38. package/dist/accessory/sensor/sensor.js +36 -0
  39. package/dist/accessory/sensor/sensor.js.map +1 -0
  40. package/dist/accessory/sensor/smoke.d.ts +8 -0
  41. package/dist/accessory/sensor/smoke.js +13 -0
  42. package/dist/accessory/sensor/smoke.js.map +1 -0
  43. package/dist/accessory/{temperatureSensor.d.ts → sensor/temperature.d.ts} +4 -5
  44. package/dist/accessory/sensor/temperature.js +13 -0
  45. package/dist/accessory/sensor/temperature.js.map +1 -0
  46. package/dist/accessory/thermostat.d.ts +19 -0
  47. package/dist/accessory/thermostat.js +116 -0
  48. package/dist/accessory/thermostat.js.map +1 -0
  49. package/dist/homebridge/platform.js +37 -1
  50. package/dist/homebridge/platform.js.map +1 -1
  51. package/dist/homebridge-ui/public/index.html +1 -1
  52. package/dist/homebridge-ui/public/ui.js +1 -1
  53. package/dist/i18n/en.d.ts +127 -27
  54. package/dist/i18n/en.js +171 -71
  55. package/dist/i18n/en.js.map +1 -1
  56. package/dist/i18n/i18n.d.ts +127 -27
  57. package/dist/i18n/template.d.ts +127 -27
  58. package/dist/model/enums.d.ts +30 -2
  59. package/dist/model/enums.js +28 -0
  60. package/dist/model/enums.js.map +1 -1
  61. package/dist/model/types.d.ts +85 -27
  62. package/package.json +1 -1
  63. package/dist/accessory/temperatureSensor.js +0 -25
  64. package/dist/accessory/temperatureSensor.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,13 +2,15 @@
2
2
 
3
3
  All notable changes to homebridge-dummy will be documented in this file.
4
4
 
5
- ## 1.3.0-beta.0 (2025-09-XX)
5
+ ## 1.3.0-beta.4 (2025-09-XX)
6
6
 
7
7
  ### HELP NEEDED! (no coding experience required)
8
8
 
9
9
  Would you like to see Homebridge Easy MQTT in your language? Please consider [getting involved](https://github.com/mpatfield/homebridge-easy-mqtt/issues/4).
10
10
 
11
11
  ### Added
12
+ - Support for Thermostats
13
+ - Support for CO, CO2, Contact, Humidity, Leak, Motion, Occupancy, and Smoke sensors
12
14
  - Support for arbitrary custom characteristics ([documentation](https://github.com/mpatfield/homebridge-easy-mqtt#custom-characteristics))
13
15
  - JSONPath support in setter topics ([documentation](https://github.com/mpatfield/homebridge-easy-mqtt#jsonpaths))
14
16
  - Banner image in config UI
package/README.md CHANGED
@@ -23,7 +23,23 @@ Any issues or damage resulting from use of this plugin are not the fault of the
23
23
 
24
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.
25
25
 
26
- **HomebridgeEasyMQTT** currently supports `Lightbulb`, `LockMechanism`, `Outlet`, `SecuitySystem`,`Switch`, and `TemperatureSensor`, but will be expanded over time as more use cases are discovered. If there is an accessory type you'd like to see supported, please feel free to [create an issue in GitHub](https://github.com/mpatfield/homebridge-easy-mqtt/issues/new/choose).
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).
27
+
28
+ - `CarbonDioxideSensor`
29
+ - `CarbonMonoxideSensor`
30
+ - `ContactSensor`
31
+ - `HumiditySensor`
32
+ - `LeakSensor`
33
+ - `Lightbulb`
34
+ - `LockMechanism`
35
+ - `MotionSensor`
36
+ - `OccupancySensor`
37
+ - `Outlet`
38
+ - `SecuritySystem`
39
+ - `SmokeSensor`
40
+ - `Switch`
41
+ - `TemperatureSensor`
42
+ - `Thermostat`
27
43
 
28
44
  ## Configuration
29
45
 
@@ -58,123 +74,159 @@ Using the Homebridge Config UI is the easiest way to set up this plugin. However
58
74
  }
59
75
 
60
76
  ],
61
- "topicGetStatusActive": "string",
62
- "topicGetCurrentLockState": "string",
63
- "topicGetTargetLockState": "string",
64
- "topicSetTargetLockState": "string",
65
- "topicGetOn": "string",
66
- "topicSetOn": "string",
67
- "valueStatusActive": "string",
68
- "valueLockStateSecured": "string",
69
- "valueLockStateUnsecured": "string",
70
- "valueLockStateJammed": "string",
71
- "valueOn": "string",
72
- "valueOff": "string",
73
- "disableLogging": false
74
- }
75
-
77
+ "disableLogging": false,
78
+ // See Topics & Values below for additional attributes for each accessory type
76
79
  ],
77
80
  "verbose": false,
78
81
  "platform": "HomebridgeEasyMQTT"
79
82
  }
80
83
  ```
81
84
 
82
- All fields are required unless noted as "(Optional)"
85
+ Required fields are marked with an asterisk (*)
83
86
 
84
- Info:
85
- - `id` - A unique ID to identify this accessory. Changing this value will result in a new accessory.
86
- - `name` - The display name for the accessory in HomeKit
87
- - `type` - The type of accessory, currently Lightbulb, LockMechanism, Outlet, SecuitySystem, Switch, and Temperature Sensor are supported
88
- - `manufacturer` - (Optional) The accessory manufacturer which will display in HomeKit device details
89
- - `model` - (Optional) The accessory model which will display in HomeKit device details
90
- - `serialNumber` - (Optional) The accessory serial number which will display in HomeKit device details
91
- - `version` - (Optional) The accessory software version which will display in HomeKit device details
87
+ ### Info
88
+ - `id*` - A unique ID to identify this accessory. Changing this value will result in a new accessory.
89
+ - `name*` - The display name for the accessory in HomeKit
90
+ - `type*` - The type of accessory, currently Lightbulb, LockMechanism, Outlet, SecuritySystem, Switch, and Temperature Sensor are supported
91
+ - `manufacturer` - The accessory manufacturer which will display in HomeKit device details
92
+ - `model` - The accessory model which will display in HomeKit device details
93
+ - `serialNumber` - The accessory serial number which will display in HomeKit device details
94
+ - `version` - The accessory software version which will display in HomeKit device details
92
95
 
93
- MQTT:
94
- - `broker` - The URL and port to use for communicating with your MQTT device
95
- - `username` - (Optional) Username
96
- - `password` - (Optional) Password
97
- - `options` - (Optional) See [MQTT Options](#mqtt-options) below
96
+ ### MQTT:
97
+ - `broker*` - The URL and port to use for communicating with your MQTT device
98
+ - `username` - Username
99
+ - `password` - Password
100
+ - `options` - See [MQTT Options](#mqtt-options) below
98
101
 
99
- Topics:
102
+ ## Topics & Values
100
103
 
101
- You will need to make sure to populate the appropriate topics based on the type.
104
+ You will need to make sure to populate the appropriate topics based on the accessory type defined below.
102
105
 
103
106
  You may define topics using a JSONPath dot notation to assist the parser in finding the right value within the message. See [JSONPaths](#jsonpaths) below for more details.
104
107
 
105
- - General Purpose
106
- - `topicGetStatusActive` - (Optional) Whether or not the accessory is connected/reachable
107
-
108
- - Lightbulb
109
- - `topicGetBrightness` - (Optional) The current brightness as a percent
110
- - `topicSetBrightness` - (Optional) For setting the brightness
111
- - `topicGetHue` - (Optional) The lightbulb's current hue
112
- - `topicSetHue` - (Optional) For setting the lightbulb's current hue
113
- - `topicGetColorTemperature` - (Optional) The current color temperature of the lightbulb
114
- - `topicSetColorTemperature` - (Optional) For setting the color temperature of the lightbulb
115
- - `topicGetSaturation` - (Optional) The current saturation setting of the lightbulb
116
- - `topicSetSaturation` - (Optional) For setting the saturation setting of the lightbulb
117
-
118
- - LockMechanism
119
- - `topicGetCurrentLockState` - The current state of the lock, i.e. locked/unlocked
120
- - `topicGetTargetLockState` - The target (i.e. desired) state of the lock
121
- - `topicSetTargetLockState` - For setting the target (i.e. desired) state of the lock
122
-
123
- - Outlet
124
- - `topicGetOn` - The current state of the outlet, i.e. on/off
125
- - `topicSetOn` - For setting the state of the outlet
126
- - `topicGetOutletInUse` - (Optional) Whether or not the outlet is currently being used
127
-
128
- - SecuitySystem
129
- - `topicGetCurrentSecurityState` — The current state of the system
130
- - `topicGetTargetSecurityState` — The target state of the system
131
- - `topicSetTargetSecurityState` For setting the target state of the system
132
- - `topicGetStatusTampered` For getting whether the system has been tampered with
133
- - `topicGetStatusFault` — For getting whether there is a system error
134
-
135
- - Switch
136
- - `topicGetOn` - The current state of the switch, i.e. on/off
137
- - `topicSetOn` - For setting the state of the switch
138
-
139
- - TemperatureSensor
140
- - `topicGetCurrentTemperature` - The current temperature of the sensor
141
- - `temperatureUnits` - (Optional) The temperature units of the incoming value supplied by the sensor, `C` for Celsius (default) `F` for Fahrenheit
142
-
143
- Values:
144
-
145
- As with Topics, you will 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
- - General Purpose
148
- - `valueStatusActive` - Accessory is connected/reachable, e.g. "true", "1", or "Alive"
149
-
150
- - Lightbulb
151
- - `valueOn` - Turned on, e.g. "true", or "1", or "On"
152
- - `valueOff` - Turned off, e.g. "false", or "0", or "Off"
153
-
154
- - LockMechanism
155
- - `valueLockStateSecured` - Locked state, e.g. "true", "255", or "Locked"
156
- - `valueLockStateUnsecured` - Unlocked state, e.g. "false", "0", or "Unlocked"
157
- - `valueLockStateJammed` - (Optional) Lock is jammed, e.g. "254" or "Jammed"
158
-
159
- - Outlet
160
- - `valueOn` - Turned on, e.g. "true", or "1", or "On"
161
- - `valueOff` - Turned off, e.g. "false", or "0", or "Off"
162
- - `valueOutletInUse` - Currently being used, e.g. "true", or "1", or "On"
163
-
164
- - SecuritySystem
165
- - `valueArmStay` — (Optional) system armed in stay mode, e.g. "SA" or "stay"
166
- - `valueArmAway` — (Optional) system armed in away mode, e.g. "AA" or "away"
167
- - `valueArmNight` (Optional) system armed in night mode, e.g. "NA" or "night"
168
- - `valueDisarm` (Optional) system armed in away mode, e.g. "D" or "disarmed"
169
- - `valueAlarmTriggered` — (Optional) when the alarm has been triggered, e.g. "true" or "1" or "triggered"
170
- - `valueTampered` — (Optional) when the system has been tampered with, e.g. "true" or "1" or "tampered"
171
- - `valueFault` (Optional) when the system has a general fault, e.g. "true" or "1" or "fault"
172
-
173
- - Switch
174
- - `valueOn` - Turned on, e.g. "true", or "1", or "On"
175
- - `valueOff` - Turned off, e.g. "false", or "0", or "Off"
176
-
177
- Logging/Debugging:
108
+ 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.
109
+
110
+ ### General Purpose
111
+ - `topicGetStatusActive` - Whether or not the accessory is connected/reachable
112
+ - `topicGetBatteryLow` - Wether or not the accessory has a low battery
113
+ - `topicGetBatteryLevel` - Percentage as a number
114
+ - `valueStatusActive` - Accessory is connected/reachable, e.g. "true", "1", or "Alive"
115
+ - `valueBatteryLow` - Accessory has a low battery level
116
+
117
+ ### On/Off Accessories
118
+ - `topicGetOn*` - The current state of the outlet, i.e. on/off
119
+ - `topicSetOn*` - For setting the state of the outlet
120
+ - `valueOn*` - Turned on, e.g. "true", or "1", or "On"
121
+ - `valueOff*` - Turned off, e.g. "false", or "0", or "Off"
122
+
123
+ #### Lightbulb
124
+ - `topicGetBrightness` - The current brightness as a percent
125
+ - `topicSetBrightness` - For setting the brightness
126
+ - `topicGetColorTemperature` - The current color temperature of the lightbulb
127
+ - `topicSetColorTemperature` - For setting the color temperature of the lightbulb
128
+ - `topicGetHue` - The lightbulb's current hue
129
+ - `topicSetHue` - For setting the lightbulb's current hue
130
+ - `topicGetSaturation` - The current saturation setting of the lightbulb
131
+ - `topicSetSaturation` - For setting the saturation setting of the lightbulb
132
+
133
+ #### Outlet
134
+ - `topicGetOutletInUse` - Whether or not the outlet is currently being used
135
+ - `valueOutletInUse` - Currently being used, e.g. "true", or "1", or "On"
136
+
137
+ #### Switch
138
+ -
139
+
140
+ ### Sensors
141
+ - `topicGetStatusFault` - Whether or not the sensor has a generic fault
142
+ - `topicGetStatusTampered` - Whether or not the sensor has been tampered with
143
+ - `valueFault` - Accessory has a fault
144
+ - `valueTampered` - Accessory has been tampered with
145
+
146
+ #### CarbonDioxideSensor
147
+ - `topicGetCarbonDioxideDetected*` - Whether or not the sensor has detected carbon dioxide
148
+ - `topicGetCarbonDioxideLevel` - The current carbon dioxide level
149
+ - `topicGetCarbonDioxidePeakLevel` - The peak carbon dioxide level
150
+ - `valueCarbonDioxideDetected*` - Accessory has detected carbon dioxide
151
+
152
+ #### CarbonMonoxideSensor
153
+ - `topicGetCarbonMonoxideDetected*` - Whether or not the sensor has detected carbon monoxide
154
+ - `topicGetCarbonMonoxideLevel` - The current carbon monoxide level
155
+ - `topicGetCarbonMonoxidePeakLevel` - The peak carbon monoxide level
156
+ - `valueCarbonMonoxideDetected*` - Accessory has detected carbon monoxide
157
+
158
+ #### ContactSensor
159
+ - `topicGetContactSensorState*` - Whether or not sensor has detected contact
160
+ - `valueContactDetected*` - Accessory has detected contact
161
+
162
+ ### HumiditySensor
163
+ - `topicGetCurrentRelativeHumidity` - The current relatively humidity
164
+
165
+ #### LeakSensor
166
+ - `topicGetLeakDetected*` - Whether or not sensor has detected a leak
167
+ - `valueLeakDetected*` - Accessory has detected a leak
168
+
169
+ #### MotionSensor
170
+ - `topicGetMotionDetected*` - Whether or not sensor has detected motion
171
+ - `valueMotionDetected*` - Accessory has detected motion
172
+
173
+ #### OccupancySensor
174
+ - `topicGetOccupancyDetected*` - Whether or not sensor has detected occupancy
175
+ - `valueOccupancyDetected*` - Accessory has detected occupancy
176
+
177
+ #### SmokeSensor
178
+ - `topicGetSmokeDetected*` - Whether or not sensor has detected smoke
179
+ - `valueSmokeDetected*` - Accessory has detected smoke
180
+
181
+ #### TemperatureSensor
182
+ - `topicGetCurrentTemperature*` - The current temperature of the sensor
183
+ - `temperatureUnits` - The temperature units of the incoming value supplied by the sensor, `C` for Celsius (default) `F` for Fahrenheit
184
+
185
+ ### Others
186
+
187
+ #### LockMechanism
188
+ - `topicGetCurrentLockState*` - The current state of the lock, i.e. locked/unlocked
189
+ - `topicGetTargetLockState*` - The target (i.e. desired) state of the lock
190
+ - `topicSetTargetLockState*` - For setting the target (i.e. desired) state of the lock
191
+ - `valueLockStateSecured*` - Locked state, e.g. "true", "255", or "Locked"
192
+ - `valueLockStateUnsecured*` - Unlocked state, e.g. "false", "0", or "Unlocked"
193
+ - `valueLockStateJammed` - Lock is jammed, e.g. "254" or "Jammed"
194
+
195
+ #### SecuritySystem
196
+ - `topicGetCurrentSecurityState*` — The current state of the system
197
+ - `topicGetTargetSecurityState*` — The target state of the system
198
+ - `topicSetTargetSecurityState*` — For setting the target state of the system
199
+ - `topicGetStatusFault` — For getting whether there is a system error
200
+ - `topicGetStatusTampered` — For getting whether the system has been tampered with
201
+ - `valueArmStay` - System armed in stay mode, e.g. "SA" or "stay"
202
+ - `valueArmAway` - System armed in away mode, e.g. "AA" or "away"
203
+ - `valueArmNight` - System armed in night mode, e.g. "NA" or "night"
204
+ - `valueDisarm` - System armed in away mode, e.g. "D" or "disarmed"
205
+ - `valueAlarmTriggered` - When the alarm has been triggered, e.g. "true" or "1" or "triggered"
206
+ - `valueFault` - Accessory has a fault
207
+ - `valueTampered` - Accessory has been tampered with
208
+
209
+ ### Thermostat
210
+ - `temperatureUnits` - The temperature units of the incoming value supplied by the thermostat, `C` for Celsius (default) `F` for Fahrenheit
211
+ - `topicGetCurrentHeatingCoolingState*` - Get the current mode (i.e. cooling, heating, off)
212
+ - `topicGetTargetHeatingCoolingState*` - Get the target mode (i.e. auto, cooling, heating, off)
213
+ - `topicSetTargetHeatingCoolingState*` - Set the target mode (i.e. auto, cooling, heating, off)
214
+ - `topicGetCurrentTemperature*` - Get the current temperature
215
+ - `topicGetTargetTemperature*` - Get the target temperature
216
+ - `topicSetTargetTemperature*` - Set the target temperature
217
+ - `topicGetCurrentRelativeHumidity` - Get the current humidity
218
+ - `topicGetTargetRelativeHumidity` - Get the target humidity
219
+ - `topicSetTargetRelativeHumidity` - Set the target humidity
220
+ - `topicGetCoolingThresholdTemperature` - Get the cooling threshold temperature
221
+ - `topicSetCoolingThresholdTemperature` - Set the cooling threshold temparture
222
+ - `topicGetHeatingThresholdTemperature` - Get the heating threshold temperature
223
+ - `topicSetHeatingThresholdTemperature` - Set the heating threshold temperature
224
+ - `valueModeAuto` - Auto mode
225
+ - `valueModeCool` - Cool mode
226
+ - `valueModeHeat` - Heat mode
227
+ - `valueModeOff` - Thermostat off
228
+
229
+ ## Logging/Debugging:
178
230
 
179
231
  By default, devices will log activity, for example when a Switch is turned on or a LockMechanism is unlocked.
180
232
 
@@ -281,7 +333,7 @@ Due to the complexity, this was intentionally left out of the plugin config UI,
281
333
  - `uuid` — A unique string (recommend using a (UUID generator)[https://www.uuidgenerator.net/])
282
334
  - `name` — The display name for the characteristic
283
335
  - `getTopic` — The topic which provides the numeric value
284
- - `units` (Optional) The units which will be displayed at the end of the numeric value
336
+ - `units` - The units which will be displayed at the end of the numeric value
285
337
 
286
338
  Since `customCharacteristics` is an array, you may define as many custom characteristics as you wish.
287
339