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