isy-nodejs 1.0.2-alpha.3 → 1.0.2-alpha.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 (417) hide show
  1. package/dist/esm/CodeGeneration/NodeClassFactory.js +76 -33
  2. package/dist/esm/CodeGeneration/NodeClassFactory.js.map +1 -1
  3. package/dist/esm/CodeGeneration/NodeFactory.js +245 -0
  4. package/dist/esm/CodeGeneration/NodeFactory.js.map +1 -0
  5. package/dist/esm/Converters.js +15 -1
  6. package/dist/esm/Converters.js.map +1 -1
  7. package/dist/esm/Definitions/Global/Drivers.js.map +1 -1
  8. package/dist/esm/Definitions/Global/Events.js.map +1 -1
  9. package/dist/esm/Devices/ISYDevice.js +0 -33
  10. package/dist/esm/Devices/ISYDevice.js.map +1 -1
  11. package/dist/esm/Devices/ISYDeviceNode.js +2 -2
  12. package/dist/esm/Devices/ISYDeviceNode.js.map +1 -1
  13. package/dist/esm/Devices/Insteon/Generated/AlertModuleArmed.js +49 -0
  14. package/dist/esm/Devices/Insteon/Generated/AlertModuleArmed.js.map +1 -0
  15. package/dist/esm/Devices/Insteon/Generated/AlertModuleSiren.js +54 -0
  16. package/dist/esm/Devices/Insteon/Generated/AlertModuleSiren.js.map +1 -0
  17. package/dist/esm/Devices/Insteon/Generated/BallastRelayLampSwitch.js +54 -0
  18. package/dist/esm/Devices/Insteon/Generated/BallastRelayLampSwitch.js.map +1 -0
  19. package/dist/esm/Devices/Insteon/Generated/BinaryAlarm.js +46 -0
  20. package/dist/esm/Devices/Insteon/Generated/BinaryAlarm.js.map +1 -0
  21. package/dist/esm/Devices/Insteon/Generated/BinaryControl.js +46 -0
  22. package/dist/esm/Devices/Insteon/Generated/BinaryControl.js.map +1 -0
  23. package/dist/esm/Devices/Insteon/Generated/DimmerLamp.js +75 -0
  24. package/dist/esm/Devices/Insteon/Generated/DimmerLamp.js.map +1 -0
  25. package/dist/esm/Devices/Insteon/Generated/DimmerLampSwitch.js +78 -0
  26. package/dist/esm/Devices/Insteon/Generated/DimmerLampSwitch.js.map +1 -0
  27. package/dist/esm/Devices/Insteon/Generated/DimmerLampSwitchLed.js +80 -0
  28. package/dist/esm/Devices/Insteon/Generated/DimmerLampSwitchLed.js.map +1 -0
  29. package/dist/esm/Devices/Insteon/Generated/DimmerMotorSwitch.js +74 -0
  30. package/dist/esm/Devices/Insteon/Generated/DimmerMotorSwitch.js.map +1 -0
  31. package/dist/esm/Devices/Insteon/Generated/DimmerSwitch.js +40 -0
  32. package/dist/esm/Devices/Insteon/Generated/DimmerSwitch.js.map +1 -0
  33. package/dist/esm/Devices/Insteon/Generated/DoorLock.js +45 -0
  34. package/dist/esm/Devices/Insteon/Generated/DoorLock.js.map +1 -0
  35. package/dist/esm/Devices/Insteon/Generated/Ezio2x4Input.js +42 -0
  36. package/dist/esm/Devices/Insteon/Generated/Ezio2x4Input.js.map +1 -0
  37. package/dist/esm/Devices/Insteon/Generated/Ezio2x4Output.js +47 -0
  38. package/dist/esm/Devices/Insteon/Generated/Ezio2x4Output.js.map +1 -0
  39. package/dist/esm/Devices/Insteon/Generated/EzrainInput.js +42 -0
  40. package/dist/esm/Devices/Insteon/Generated/EzrainInput.js.map +1 -0
  41. package/dist/esm/Devices/Insteon/Generated/EzrainOutput.js +49 -0
  42. package/dist/esm/Devices/Insteon/Generated/EzrainOutput.js.map +1 -0
  43. package/dist/esm/Devices/Insteon/Generated/FanLincMotor.js +53 -0
  44. package/dist/esm/Devices/Insteon/Generated/FanLincMotor.js.map +1 -0
  45. package/dist/esm/Devices/Insteon/Generated/I3KeypadFlags.js +93 -0
  46. package/dist/esm/Devices/Insteon/Generated/I3KeypadFlags.js.map +1 -0
  47. package/dist/esm/Devices/Insteon/Generated/I3PaddleFlags.js +81 -0
  48. package/dist/esm/Devices/Insteon/Generated/I3PaddleFlags.js.map +1 -0
  49. package/dist/esm/Devices/Insteon/Generated/ImeterSolo.js +49 -0
  50. package/dist/esm/Devices/Insteon/Generated/ImeterSolo.js.map +1 -0
  51. package/dist/esm/Devices/Insteon/Generated/IrLincTx.js +39 -0
  52. package/dist/esm/Devices/Insteon/Generated/IrLincTx.js.map +1 -0
  53. package/dist/esm/Devices/Insteon/Generated/KeypadButton.js +46 -0
  54. package/dist/esm/Devices/Insteon/Generated/KeypadButton.js.map +1 -0
  55. package/dist/esm/Devices/Insteon/Generated/KeypadDimmer.js +78 -0
  56. package/dist/esm/Devices/Insteon/Generated/KeypadDimmer.js.map +1 -0
  57. package/dist/esm/Devices/Insteon/Generated/KeypadRelay.js +56 -0
  58. package/dist/esm/Devices/Insteon/Generated/KeypadRelay.js.map +1 -0
  59. package/dist/esm/Devices/Insteon/Generated/OnOffControl.js +39 -0
  60. package/dist/esm/Devices/Insteon/Generated/OnOffControl.js.map +1 -0
  61. package/dist/esm/Devices/Insteon/Generated/Pir2844.js +64 -0
  62. package/dist/esm/Devices/Insteon/Generated/Pir2844.js.map +1 -0
  63. package/dist/esm/Devices/Insteon/Generated/Pir2844OnOff.js +50 -0
  64. package/dist/esm/Devices/Insteon/Generated/Pir2844OnOff.js.map +1 -0
  65. package/dist/esm/Devices/Insteon/Generated/Pir2844c.js +64 -0
  66. package/dist/esm/Devices/Insteon/Generated/Pir2844c.js.map +1 -0
  67. package/dist/esm/Devices/Insteon/Generated/RelayLamp.js +54 -0
  68. package/dist/esm/Devices/Insteon/Generated/RelayLamp.js.map +1 -0
  69. package/dist/esm/Devices/Insteon/Generated/RelayLampSwitch.js +56 -0
  70. package/dist/esm/Devices/Insteon/Generated/RelayLampSwitch.js.map +1 -0
  71. package/dist/esm/Devices/Insteon/Generated/RelayLampSwitchLed.js +58 -0
  72. package/dist/esm/Devices/Insteon/Generated/RelayLampSwitchLed.js.map +1 -0
  73. package/dist/esm/Devices/Insteon/Generated/RelaySwitch.js +42 -0
  74. package/dist/esm/Devices/Insteon/Generated/RelaySwitch.js.map +1 -0
  75. package/dist/esm/Devices/Insteon/Generated/RelaySwitchOnlyPlusQuery.js +44 -0
  76. package/dist/esm/Devices/Insteon/Generated/RelaySwitchOnlyPlusQuery.js.map +1 -0
  77. package/dist/esm/Devices/Insteon/Generated/RemoteLinc2.js +42 -0
  78. package/dist/esm/Devices/Insteon/Generated/RemoteLinc2.js.map +1 -0
  79. package/dist/esm/Devices/Insteon/Generated/Siren.js +66 -0
  80. package/dist/esm/Devices/Insteon/Generated/Siren.js.map +1 -0
  81. package/dist/esm/Devices/Insteon/Generated/SirenAlert.js +35 -0
  82. package/dist/esm/Devices/Insteon/Generated/SirenAlert.js.map +1 -0
  83. package/dist/esm/Devices/Insteon/Generated/TempLinc.js +83 -0
  84. package/dist/esm/Devices/Insteon/Generated/TempLinc.js.map +1 -0
  85. package/dist/esm/Devices/Insteon/Generated/Thermostat.js +83 -0
  86. package/dist/esm/Devices/Insteon/Generated/Thermostat.js.map +1 -0
  87. package/dist/esm/Devices/Insteon/Generated/X10.js +49 -0
  88. package/dist/esm/Devices/Insteon/Generated/X10.js.map +1 -0
  89. package/dist/esm/Devices/Insteon/Generated/index.js +39 -0
  90. package/dist/esm/Devices/Insteon/Generated/index.js.map +1 -0
  91. package/dist/esm/Devices/Insteon/InsteonBaseDevice.js +3 -4
  92. package/dist/esm/Devices/Insteon/InsteonBaseDevice.js.map +1 -1
  93. package/dist/esm/Devices/Insteon/InsteonFanDevice.js +2 -2
  94. package/dist/esm/Devices/Insteon/InsteonFanDevice.js.map +1 -1
  95. package/dist/esm/Devices/Insteon/InsteonRelayDevice.js.map +1 -1
  96. package/dist/esm/Devices/Insteon/KeypadButton.js +11 -11
  97. package/dist/esm/Devices/Insteon/KeypadButton.js.map +1 -1
  98. package/dist/esm/Devices/Insteon/index.js +16 -29
  99. package/dist/esm/Devices/Insteon/index.js.map +1 -1
  100. package/dist/esm/Devices/Lutron/Generated/LoadShed.js +45 -0
  101. package/dist/esm/Devices/Lutron/Generated/LoadShed.js.map +1 -0
  102. package/dist/esm/Devices/NodeFactory.js +45 -8
  103. package/dist/esm/Devices/NodeFactory.js.map +1 -1
  104. package/dist/esm/Devices/Scene/index.js +2 -2
  105. package/dist/esm/Devices/Scene/index.js.map +1 -1
  106. package/dist/esm/Devices/UDI/Generated/Channel.js +42 -0
  107. package/dist/esm/Devices/UDI/Generated/Channel.js.map +1 -0
  108. package/dist/esm/Devices/UDI/Generated/Em3MainChannel.js +54 -0
  109. package/dist/esm/Devices/UDI/Generated/Em3MainChannel.js.map +1 -0
  110. package/dist/esm/Devices/UDI/Generated/Main.js +45 -0
  111. package/dist/esm/Devices/UDI/Generated/Main.js.map +1 -0
  112. package/dist/esm/Devices/UDI/Generated/PulseCounter.js +46 -0
  113. package/dist/esm/Devices/UDI/Generated/PulseCounter.js.map +1 -0
  114. package/dist/esm/Devices/UDI/Generated/Relay.js +45 -0
  115. package/dist/esm/Devices/UDI/Generated/Relay.js.map +1 -0
  116. package/dist/esm/Devices/UDI/Generated/TemperatureSensor.js +38 -0
  117. package/dist/esm/Devices/UDI/Generated/TemperatureSensor.js.map +1 -0
  118. package/dist/esm/Devices/ZWave/Generated/ColorSwitch.js +57 -0
  119. package/dist/esm/Devices/ZWave/Generated/ColorSwitch.js.map +1 -0
  120. package/dist/esm/Devices/ZWave/Generated/DimmerSwitch.js +65 -0
  121. package/dist/esm/Devices/ZWave/Generated/DimmerSwitch.js.map +1 -0
  122. package/dist/esm/Devices/ZWave/Generated/index.js +3 -0
  123. package/dist/esm/Devices/ZWave/Generated/index.js.map +1 -0
  124. package/dist/esm/Devices/ZWave/index.js +1 -0
  125. package/dist/esm/Devices/ZWave/index.js.map +1 -1
  126. package/dist/esm/Devices/index.js +9 -3
  127. package/dist/esm/Devices/index.js.map +1 -1
  128. package/dist/esm/ISY.js +13 -8
  129. package/dist/esm/ISY.js.map +1 -1
  130. package/dist/esm/ISYDevice.js +7 -1
  131. package/dist/esm/ISYDevice.js.map +1 -1
  132. package/dist/esm/ISYNode.js +13 -4
  133. package/dist/esm/ISYNode.js.map +1 -1
  134. package/dist/esm/ISYScene.js +13 -12
  135. package/dist/esm/ISYScene.js.map +1 -1
  136. package/dist/esm/Matter/Behaviors/BehaviorRegistry.js +13 -0
  137. package/dist/esm/Matter/Behaviors/BehaviorRegistry.js.map +1 -0
  138. package/dist/esm/Matter/Behaviors/Insteon/ISYOnOffBehavior.js +3 -0
  139. package/dist/esm/Matter/Behaviors/Insteon/ISYOnOffBehavior.js.map +1 -1
  140. package/dist/esm/Matter/Bridge/Server.js +65 -56
  141. package/dist/esm/Matter/Bridge/Server.js.map +1 -1
  142. package/dist/esm/Matter/Mappings/Insteon.js +28 -10
  143. package/dist/esm/Matter/Mappings/Insteon.js.map +1 -1
  144. package/dist/esm/Model/ClassDefinition.js +22 -3
  145. package/dist/esm/Model/ClassDefinition.js.map +1 -1
  146. package/dist/esm/Model/ClusterMap.js +45 -19
  147. package/dist/esm/Model/ClusterMap.js.map +1 -1
  148. package/dist/esm/Model/NodeInfo.js +1 -1
  149. package/dist/esm/Model/NodeInfo.js.map +1 -1
  150. package/dist/esm/Utils.js.map +1 -1
  151. package/dist/esm/types/CodeGeneration/NodeClassFactory.d.ts +6 -3
  152. package/dist/esm/types/CodeGeneration/NodeClassFactory.d.ts.map +1 -1
  153. package/dist/esm/types/CodeGeneration/NodeFactory.d.ts +75 -0
  154. package/dist/esm/types/CodeGeneration/NodeFactory.d.ts.map +1 -0
  155. package/dist/esm/types/Converters.d.ts +9 -3
  156. package/dist/esm/types/Converters.d.ts.map +1 -1
  157. package/dist/esm/types/Definitions/Global/Drivers.d.ts.map +1 -1
  158. package/dist/esm/types/Definitions/Global/Events.d.ts +2 -2
  159. package/dist/esm/types/Definitions/Global/Events.d.ts.map +1 -1
  160. package/dist/esm/types/Devices/DeviceMap.d.ts +1 -1
  161. package/dist/esm/types/Devices/DeviceMap.d.ts.map +1 -1
  162. package/dist/esm/types/Devices/EndpointFor.d.ts +7 -5
  163. package/dist/esm/types/Devices/EndpointFor.d.ts.map +1 -1
  164. package/dist/esm/types/Devices/ISYDevice.d.ts.map +1 -1
  165. package/dist/esm/types/Devices/ISYDeviceNode.d.ts +5 -13
  166. package/dist/esm/types/Devices/ISYDeviceNode.d.ts.map +1 -1
  167. package/dist/esm/types/Devices/Insteon/Generated/AlertModuleArmed.d.ts +76 -0
  168. package/dist/esm/types/Devices/Insteon/Generated/AlertModuleArmed.d.ts.map +1 -0
  169. package/dist/esm/types/Devices/Insteon/Generated/AlertModuleSiren.d.ts +88 -0
  170. package/dist/esm/types/Devices/Insteon/Generated/AlertModuleSiren.d.ts.map +1 -0
  171. package/dist/esm/types/Devices/Insteon/Generated/BallastRelayLampSwitch.d.ts +88 -0
  172. package/dist/esm/types/Devices/Insteon/Generated/BallastRelayLampSwitch.d.ts.map +1 -0
  173. package/dist/esm/types/Devices/Insteon/Generated/BinaryAlarm.d.ts +64 -0
  174. package/dist/esm/types/Devices/Insteon/Generated/BinaryAlarm.d.ts.map +1 -0
  175. package/dist/esm/types/Devices/Insteon/Generated/BinaryControl.d.ts +64 -0
  176. package/dist/esm/types/Devices/Insteon/Generated/BinaryControl.d.ts.map +1 -0
  177. package/dist/esm/types/Devices/Insteon/Generated/DimmerLamp.d.ts +144 -0
  178. package/dist/esm/types/Devices/Insteon/Generated/DimmerLamp.d.ts.map +1 -0
  179. package/dist/esm/types/Devices/Insteon/Generated/DimmerLampSwitch.d.ts +150 -0
  180. package/dist/esm/types/Devices/Insteon/Generated/DimmerLampSwitch.d.ts.map +1 -0
  181. package/dist/esm/types/Devices/Insteon/Generated/DimmerLampSwitchLed.d.ts +156 -0
  182. package/dist/esm/types/Devices/Insteon/Generated/DimmerLampSwitchLed.d.ts.map +1 -0
  183. package/dist/esm/types/Devices/Insteon/Generated/DimmerMotorSwitch.d.ts +138 -0
  184. package/dist/esm/types/Devices/Insteon/Generated/DimmerMotorSwitch.d.ts.map +1 -0
  185. package/dist/esm/types/Devices/Insteon/Generated/DimmerSwitch.d.ts +51 -0
  186. package/dist/esm/types/Devices/Insteon/Generated/DimmerSwitch.d.ts.map +1 -0
  187. package/dist/esm/types/Devices/Insteon/Generated/DoorLock.d.ts +64 -0
  188. package/dist/esm/types/Devices/Insteon/Generated/DoorLock.d.ts.map +1 -0
  189. package/dist/esm/types/Devices/Insteon/Generated/Ezio2x4Input.d.ts +52 -0
  190. package/dist/esm/types/Devices/Insteon/Generated/Ezio2x4Input.d.ts.map +1 -0
  191. package/dist/esm/types/Devices/Insteon/Generated/Ezio2x4Output.d.ts +70 -0
  192. package/dist/esm/types/Devices/Insteon/Generated/Ezio2x4Output.d.ts.map +1 -0
  193. package/dist/esm/types/Devices/Insteon/Generated/EzrainInput.d.ts +52 -0
  194. package/dist/esm/types/Devices/Insteon/Generated/EzrainInput.d.ts.map +1 -0
  195. package/dist/esm/types/Devices/Insteon/Generated/EzrainOutput.d.ts +76 -0
  196. package/dist/esm/types/Devices/Insteon/Generated/EzrainOutput.d.ts.map +1 -0
  197. package/dist/esm/types/Devices/Insteon/Generated/FanLincMotor.d.ts +88 -0
  198. package/dist/esm/types/Devices/Insteon/Generated/FanLincMotor.d.ts.map +1 -0
  199. package/dist/esm/types/Devices/Insteon/Generated/I3KeypadFlags.d.ts +168 -0
  200. package/dist/esm/types/Devices/Insteon/Generated/I3KeypadFlags.d.ts.map +1 -0
  201. package/dist/esm/types/Devices/Insteon/Generated/I3PaddleFlags.d.ts +142 -0
  202. package/dist/esm/types/Devices/Insteon/Generated/I3PaddleFlags.d.ts.map +1 -0
  203. package/dist/esm/types/Devices/Insteon/Generated/ImeterSolo.d.ts +71 -0
  204. package/dist/esm/types/Devices/Insteon/Generated/ImeterSolo.d.ts.map +1 -0
  205. package/dist/esm/types/Devices/Insteon/Generated/IrLincTx.d.ts +51 -0
  206. package/dist/esm/types/Devices/Insteon/Generated/IrLincTx.d.ts.map +1 -0
  207. package/dist/esm/types/Devices/Insteon/Generated/KeypadButton.d.ts +64 -0
  208. package/dist/esm/types/Devices/Insteon/Generated/KeypadButton.d.ts.map +1 -0
  209. package/dist/esm/types/Devices/Insteon/Generated/KeypadDimmer.d.ts +150 -0
  210. package/dist/esm/types/Devices/Insteon/Generated/KeypadDimmer.d.ts.map +1 -0
  211. package/dist/esm/types/Devices/Insteon/Generated/KeypadRelay.d.ts +94 -0
  212. package/dist/esm/types/Devices/Insteon/Generated/KeypadRelay.d.ts.map +1 -0
  213. package/dist/esm/types/Devices/Insteon/Generated/OnOffControl.d.ts +44 -0
  214. package/dist/esm/types/Devices/Insteon/Generated/OnOffControl.d.ts.map +1 -0
  215. package/dist/esm/types/Devices/Insteon/Generated/Pir2844.d.ts +98 -0
  216. package/dist/esm/types/Devices/Insteon/Generated/Pir2844.d.ts.map +1 -0
  217. package/dist/esm/types/Devices/Insteon/Generated/Pir2844OnOff.d.ts +76 -0
  218. package/dist/esm/types/Devices/Insteon/Generated/Pir2844OnOff.d.ts.map +1 -0
  219. package/dist/esm/types/Devices/Insteon/Generated/Pir2844c.d.ts +98 -0
  220. package/dist/esm/types/Devices/Insteon/Generated/Pir2844c.d.ts.map +1 -0
  221. package/dist/esm/types/Devices/Insteon/Generated/RelayLamp.d.ts +88 -0
  222. package/dist/esm/types/Devices/Insteon/Generated/RelayLamp.d.ts.map +1 -0
  223. package/dist/esm/types/Devices/Insteon/Generated/RelayLampSwitch.d.ts +94 -0
  224. package/dist/esm/types/Devices/Insteon/Generated/RelayLampSwitch.d.ts.map +1 -0
  225. package/dist/esm/types/Devices/Insteon/Generated/RelayLampSwitchLed.d.ts +100 -0
  226. package/dist/esm/types/Devices/Insteon/Generated/RelayLampSwitchLed.d.ts.map +1 -0
  227. package/dist/esm/types/Devices/Insteon/Generated/RelaySwitch.d.ts +57 -0
  228. package/dist/esm/types/Devices/Insteon/Generated/RelaySwitch.d.ts.map +1 -0
  229. package/dist/esm/types/Devices/Insteon/Generated/RelaySwitchOnlyPlusQuery.d.ts +63 -0
  230. package/dist/esm/types/Devices/Insteon/Generated/RelaySwitchOnlyPlusQuery.d.ts.map +1 -0
  231. package/dist/esm/types/Devices/Insteon/Generated/RemoteLinc2.d.ts +52 -0
  232. package/dist/esm/types/Devices/Insteon/Generated/RemoteLinc2.d.ts.map +1 -0
  233. package/dist/esm/types/Devices/Insteon/Generated/Siren.d.ts +109 -0
  234. package/dist/esm/types/Devices/Insteon/Generated/Siren.d.ts.map +1 -0
  235. package/dist/esm/types/Devices/Insteon/Generated/SirenAlert.d.ts +37 -0
  236. package/dist/esm/types/Devices/Insteon/Generated/SirenAlert.d.ts.map +1 -0
  237. package/dist/esm/types/Devices/Insteon/Generated/TempLinc.d.ts +148 -0
  238. package/dist/esm/types/Devices/Insteon/Generated/TempLinc.d.ts.map +1 -0
  239. package/dist/esm/types/Devices/Insteon/Generated/Thermostat.d.ts +148 -0
  240. package/dist/esm/types/Devices/Insteon/Generated/Thermostat.d.ts.map +1 -0
  241. package/dist/esm/types/Devices/Insteon/Generated/X10.d.ts +76 -0
  242. package/dist/esm/types/Devices/Insteon/Generated/X10.d.ts.map +1 -0
  243. package/dist/esm/types/Devices/Insteon/Generated/index.d.ts +39 -0
  244. package/dist/esm/types/Devices/Insteon/Generated/index.d.ts.map +1 -0
  245. package/dist/esm/types/Devices/Insteon/InsteonBaseDevice.d.ts +4 -10
  246. package/dist/esm/types/Devices/Insteon/InsteonBaseDevice.d.ts.map +1 -1
  247. package/dist/esm/types/Devices/Insteon/InsteonDevice.d.ts +22 -28
  248. package/dist/esm/types/Devices/Insteon/InsteonDevice.d.ts.map +1 -1
  249. package/dist/esm/types/Devices/Insteon/InsteonFanDevice.d.ts +3 -3
  250. package/dist/esm/types/Devices/Insteon/InsteonFanDevice.d.ts.map +1 -1
  251. package/dist/esm/types/Devices/Insteon/InsteonLeakSensorDevice.d.ts +1 -1
  252. package/dist/esm/types/Devices/Insteon/InsteonLeakSensorDevice.d.ts.map +1 -1
  253. package/dist/esm/types/Devices/Insteon/InsteonRelayDevice.d.ts.map +1 -1
  254. package/dist/esm/types/Devices/Insteon/KeypadButton.d.ts +19 -19
  255. package/dist/esm/types/Devices/Insteon/KeypadButton.d.ts.map +1 -1
  256. package/dist/esm/types/Devices/Insteon/index.d.ts +6 -42
  257. package/dist/esm/types/Devices/Insteon/index.d.ts.map +1 -1
  258. package/dist/esm/types/Devices/Lutron/Generated/LoadShed.d.ts +64 -0
  259. package/dist/esm/types/Devices/Lutron/Generated/LoadShed.d.ts.map +1 -0
  260. package/dist/esm/types/Devices/NodeFactory.d.ts +18 -7
  261. package/dist/esm/types/Devices/NodeFactory.d.ts.map +1 -1
  262. package/dist/esm/types/Devices/Scene/index.d.ts +2 -1
  263. package/dist/esm/types/Devices/Scene/index.d.ts.map +1 -1
  264. package/dist/esm/types/Devices/UDI/Generated/Channel.d.ts +51 -0
  265. package/dist/esm/types/Devices/UDI/Generated/Channel.d.ts.map +1 -0
  266. package/dist/esm/types/Devices/UDI/Generated/Em3MainChannel.d.ts +72 -0
  267. package/dist/esm/types/Devices/UDI/Generated/Em3MainChannel.d.ts.map +1 -0
  268. package/dist/esm/types/Devices/UDI/Generated/Main.d.ts +59 -0
  269. package/dist/esm/types/Devices/UDI/Generated/Main.d.ts.map +1 -0
  270. package/dist/esm/types/Devices/UDI/Generated/PulseCounter.d.ts +58 -0
  271. package/dist/esm/types/Devices/UDI/Generated/PulseCounter.d.ts.map +1 -0
  272. package/dist/esm/types/Devices/UDI/Generated/Relay.d.ts +64 -0
  273. package/dist/esm/types/Devices/UDI/Generated/Relay.d.ts.map +1 -0
  274. package/dist/esm/types/Devices/UDI/Generated/TemperatureSensor.d.ts +44 -0
  275. package/dist/esm/types/Devices/UDI/Generated/TemperatureSensor.d.ts.map +1 -0
  276. package/dist/esm/types/Devices/ZWave/Generated/ColorSwitch.d.ts +90 -0
  277. package/dist/esm/types/Devices/ZWave/Generated/ColorSwitch.d.ts.map +1 -0
  278. package/dist/esm/types/Devices/ZWave/Generated/DimmerSwitch.d.ts +124 -0
  279. package/dist/esm/types/Devices/ZWave/Generated/DimmerSwitch.d.ts.map +1 -0
  280. package/dist/esm/types/Devices/ZWave/Generated/index.d.ts +3 -0
  281. package/dist/esm/types/Devices/ZWave/Generated/index.d.ts.map +1 -0
  282. package/dist/esm/types/Devices/ZWave/index.d.ts.map +1 -1
  283. package/dist/esm/types/Devices/index.d.ts +7 -21
  284. package/dist/esm/types/Devices/index.d.ts.map +1 -1
  285. package/dist/esm/types/ISY.d.ts.map +1 -1
  286. package/dist/esm/types/ISYDevice.d.ts +19 -28
  287. package/dist/esm/types/ISYDevice.d.ts.map +1 -1
  288. package/dist/esm/types/ISYNode.d.ts +25 -8
  289. package/dist/esm/types/ISYNode.d.ts.map +1 -1
  290. package/dist/esm/types/ISYScene.d.ts +5 -6
  291. package/dist/esm/types/ISYScene.d.ts.map +1 -1
  292. package/dist/esm/types/Matter/Behaviors/BehaviorRegistry.d.ts +11 -0
  293. package/dist/esm/types/Matter/Behaviors/BehaviorRegistry.d.ts.map +1 -0
  294. package/dist/esm/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts +1 -4
  295. package/dist/esm/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts.map +1 -1
  296. package/dist/esm/types/Matter/Behaviors/Insteon/ISYOnOffBehavior.d.ts +5 -4
  297. package/dist/esm/types/Matter/Behaviors/Insteon/ISYOnOffBehavior.d.ts.map +1 -1
  298. package/dist/esm/types/Matter/Bridge/Server.d.ts +1 -1
  299. package/dist/esm/types/Matter/Bridge/Server.d.ts.map +1 -1
  300. package/dist/esm/types/Model/ClassDefinition.d.ts +6 -2
  301. package/dist/esm/types/Model/ClassDefinition.d.ts.map +1 -1
  302. package/dist/esm/types/Model/ClusterMap.d.ts +12 -21
  303. package/dist/esm/types/Model/ClusterMap.d.ts.map +1 -1
  304. package/dist/esm/types/Model/EnumDefinition.d.ts +1 -1
  305. package/dist/esm/types/Utils.d.ts +18 -0
  306. package/dist/esm/types/Utils.d.ts.map +1 -1
  307. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  308. package/package.json +2 -2
  309. package/src/CodeGeneration/NodeClassFactory.ts +144 -39
  310. package/src/CodeGeneration/NodeFactory.ts +341 -0
  311. package/src/Converters.ts +23 -3
  312. package/src/Definitions/Global/Drivers.ts +1 -0
  313. package/src/Definitions/Global/Events.ts +3 -3
  314. package/src/Devices/Brultech/Generated/Channel.ts +8 -6
  315. package/src/Devices/Brultech/Generated/Main.ts +9 -9
  316. package/src/Devices/DeviceMap.ts +1 -1
  317. package/src/Devices/ISYDevice.ts +8 -57
  318. package/src/Devices/ISYDeviceNode.ts +143 -166
  319. package/src/Devices/Insteon/Generated/AlertModuleArmed.ts +13 -21
  320. package/src/Devices/Insteon/Generated/AlertModuleSiren.ts +18 -29
  321. package/src/Devices/Insteon/Generated/BallastRelayLampSwitch.ts +18 -29
  322. package/src/Devices/Insteon/Generated/BinaryAlarm.ts +14 -17
  323. package/src/Devices/Insteon/Generated/BinaryControl.ts +14 -17
  324. package/src/Devices/Insteon/Generated/DimmerLamp.ts +25 -51
  325. package/src/Devices/Insteon/Generated/DimmerLampSwitch.ts +36 -64
  326. package/src/Devices/Insteon/Generated/DimmerLampSwitchLed.ts +31 -60
  327. package/src/Devices/Insteon/Generated/DimmerMotorSwitch.ts +24 -47
  328. package/src/Devices/Insteon/Generated/DimmerSwitch.ts +13 -14
  329. package/src/Devices/Insteon/Generated/DoorLock.ts +11 -15
  330. package/src/Devices/Insteon/Generated/Ezio2x4Input.ts +12 -11
  331. package/src/Devices/Insteon/Generated/Ezio2x4Output.ts +12 -18
  332. package/src/Devices/Insteon/Generated/EzrainInput.ts +12 -11
  333. package/src/Devices/Insteon/Generated/EzrainOutput.ts +20 -28
  334. package/src/Devices/Insteon/Generated/FanLincMotor.ts +15 -27
  335. package/src/Devices/Insteon/Generated/I3KeypadFlags.ts +19 -39
  336. package/src/Devices/Insteon/Generated/I3PaddleFlags.ts +17 -33
  337. package/src/Devices/Insteon/Generated/ImeterSolo.ts +11 -15
  338. package/src/Devices/Insteon/Generated/IrLincTx.ts +10 -12
  339. package/src/Devices/Insteon/Generated/{KeypadButtonAdv.ts → KeypadButton.ts} +23 -26
  340. package/src/Devices/Insteon/Generated/KeypadDimmer.ts +30 -57
  341. package/src/Devices/Insteon/Generated/KeypadRelay.ts +30 -43
  342. package/src/Devices/Insteon/Generated/OnOffControl.ts +15 -12
  343. package/src/Devices/Insteon/Generated/Pir2844.ts +15 -20
  344. package/src/Devices/Insteon/Generated/Pir2844OnOff.ts +16 -23
  345. package/src/Devices/Insteon/Generated/Pir2844c.ts +15 -20
  346. package/src/Devices/Insteon/Generated/RelayLamp.ts +29 -41
  347. package/src/Devices/Insteon/Generated/RelayLampSwitch.ts +29 -42
  348. package/src/Devices/Insteon/Generated/RelayLampSwitchLed.ts +24 -39
  349. package/src/Devices/Insteon/Generated/RelaySwitch.ts +14 -17
  350. package/src/Devices/Insteon/Generated/RelaySwitchOnlyPlusQuery.ts +15 -20
  351. package/src/Devices/Insteon/Generated/RemoteLinc2.ts +12 -11
  352. package/src/Devices/Insteon/Generated/Siren.ts +18 -29
  353. package/src/Devices/Insteon/Generated/SirenAlert.ts +11 -8
  354. package/src/Devices/Insteon/Generated/TempLinc.ts +18 -36
  355. package/src/Devices/Insteon/Generated/Thermostat.ts +18 -36
  356. package/src/Devices/Insteon/Generated/X10.ts +13 -21
  357. package/src/Devices/Insteon/Generated/index.ts +38 -0
  358. package/src/Devices/Insteon/InsteonBaseDevice.ts +5 -4
  359. package/src/Devices/Insteon/InsteonFanDevice.ts +3 -4
  360. package/src/Devices/Insteon/InsteonRelayDevice.ts +1 -0
  361. package/src/Devices/Insteon/KeypadButton.ts +31 -31
  362. package/src/Devices/Insteon/index.ts +18 -26
  363. package/src/Devices/Lutron/Generated/LoadShed.ts +11 -15
  364. package/src/Devices/NCD/Generated/Relay.ts +12 -18
  365. package/src/Devices/NodeFactory.ts +67 -13
  366. package/src/Devices/Poly/Generated/MatterBridge.ts +84 -0
  367. package/src/Devices/Scene/Generated/Scene.ts +33 -65
  368. package/src/Devices/Scene/index.ts +2 -1
  369. package/src/Devices/UDI/Generated/Channel.ts +8 -6
  370. package/src/Devices/UDI/Generated/Em3MainChannel.ts +8 -6
  371. package/src/Devices/UDI/Generated/Main.ts +9 -9
  372. package/src/Devices/UDI/Generated/PulseCounter.ts +8 -6
  373. package/src/Devices/UDI/Generated/Relay.ts +11 -15
  374. package/src/Devices/UDI/Generated/TemperatureSensor.ts +8 -6
  375. package/src/Devices/ZWave/Generated/ColorSwitch.ts +16 -24
  376. package/src/Devices/ZWave/Generated/DimmerSwitch.ts +25 -49
  377. package/src/Devices/ZWave/Generated/index.ts +2 -0
  378. package/src/Devices/ZWave/index.ts +5 -1
  379. package/src/Devices/ZigBeeLegacy/Generated/Relay.ts +12 -18
  380. package/src/Devices/ZigBeeLegacy/Generated/Thermostat.ts +17 -33
  381. package/src/Devices/index.ts +17 -12
  382. package/src/ISY.ts +8 -2
  383. package/src/ISYDevice.ts +68 -57
  384. package/src/ISYNode.ts +32 -8
  385. package/src/ISYScene.ts +31 -28
  386. package/src/Matter/Behaviors/BehaviorRegistry.ts +26 -0
  387. package/src/Matter/Behaviors/Insteon/ISYOnOffBehavior.ts +6 -0
  388. package/src/Matter/Bridge/Server.ts +39 -15
  389. package/src/Matter/Mappings/Insteon.ts +39 -14
  390. package/src/Model/ClassDefinition.ts +34 -4
  391. package/src/Model/ClusterMap.ts +73 -57
  392. package/src/Model/NodeInfo.ts +1 -1
  393. package/src/Utils.ts +38 -0
  394. package/tsconfig.json +7 -1
  395. package/src/Devices/Insteon/Generated/AlertModuleSirenAdv.ts +0 -123
  396. package/src/Devices/Insteon/Generated/BallastRelayLampSwitchAdv.ts +0 -123
  397. package/src/Devices/Insteon/Generated/BinaryAlarmAdv.ts +0 -91
  398. package/src/Devices/Insteon/Generated/BinaryControlAdv.ts +0 -91
  399. package/src/Devices/Insteon/Generated/DimmerLampSwitchAdv.ts +0 -207
  400. package/src/Devices/Insteon/Generated/DimmerLampSwitchLedAdv.ts +0 -215
  401. package/src/Devices/Insteon/Generated/DimmerMotorSwitchAdv.ts +0 -191
  402. package/src/Devices/Insteon/Generated/DimmerSwitchOnlyAdv.ts +0 -73
  403. package/src/Devices/Insteon/Generated/Ezio2x4InputAdv.ts +0 -75
  404. package/src/Devices/Insteon/Generated/EzrainInputAdv.ts +0 -75
  405. package/src/Devices/Insteon/Generated/KeypadDimmerAdv.ts +0 -207
  406. package/src/Devices/Insteon/Generated/KeypadRelayAdv.ts +0 -131
  407. package/src/Devices/Insteon/Generated/OnOffControlAdv.ts +0 -65
  408. package/src/Devices/Insteon/Generated/Pir2844Adv.ts +0 -139
  409. package/src/Devices/Insteon/Generated/Pir2844OnOffAdv.ts +0 -107
  410. package/src/Devices/Insteon/Generated/Pir2844cAdv.ts +0 -139
  411. package/src/Devices/Insteon/Generated/RelayLampOnlyAdv.ts +0 -123
  412. package/src/Devices/Insteon/Generated/RelayLampSwitchAdv.ts +0 -131
  413. package/src/Devices/Insteon/Generated/RelayLampSwitchLedAdv.ts +0 -139
  414. package/src/Devices/Insteon/Generated/RelaySwitchOnlyAdv.ts +0 -81
  415. package/src/Devices/Insteon/Generated/RelaySwitchOnlyPlusQueryAdv.ts +0 -89
  416. package/src/Devices/Insteon/Generated/RemoteLinc2Adv.ts +0 -75
  417. package/src/Devices/Insteon/Generated/SirenArm.ts +0 -55
@@ -1,182 +1,159 @@
1
-
1
+ import type { Category } from '../Definitions/Global/Categories.js';
2
+ import type { Command } from '../Definitions/Global/Commands.js';
2
3
  import type { Driver } from '../Definitions/Global/Drivers.js';
3
- import {type ISY } from '../ISY.js';
4
- import type { ISYDevice } from '../ISYDevice.js';
5
- import { ISYNode} from '../ISYNode.js';
4
+ import type { Event } from '../Definitions/Global/Events.js';
5
+ import type { Family } from '../Definitions/index.js';
6
+ import { type ISY } from '../ISY.js';
7
+ import type { ISYDevice, ISYDeviceInfo } from '../ISYDevice.js';
8
+ import { ISYNode } from '../ISYNode.js';
6
9
  import type { ISYScene } from '../ISYScene.js';
7
10
  import type { DriverState } from '../Model/DriverState.js';
8
11
  import type { NodeInfo } from '../Model/NodeInfo.js';
9
- import type { Category } from '../Definitions/Global/Categories.js';
10
- import type { Command } from '../Definitions/Global/Commands.js';
11
- import type { Event } from '../Definitions/Global/Events.js';
12
12
  import type { StringKeys } from '../Utils.js';
13
- import type { Family } from '../Definitions/index.js';
14
13
 
15
- export interface ISYDeviceInfo
14
+ export class ISYDeviceNode<
15
+ T extends Family,
16
+ D extends ISYNode.DriverSignatures,
17
+ C extends ISYNode.CommandSignatures,
18
+ E extends ISYNode.EventSignatures = { [x in keyof D]: Event.DriverToEvent<D[x]> & { driver: x } } & { [x in keyof C]: Event.CommandToEvent<C[x]> & { command: x } }
19
+ >
20
+ extends ISYNode<T, D, C, E>
21
+ implements ISYDeviceInfo
16
22
  {
17
- type: string;
18
- deviceClass: any;
23
+ public declare family: T;
19
24
 
20
- productName: string;
25
+ public readonly typeCode: string;
26
+ public readonly deviceClass: any;
27
+ public readonly category: Category;
28
+ public readonly subCategory: number;
21
29
 
22
- productId: string | number;
30
+ //public readonly isDimmable: boolean;
23
31
 
24
- modelName: string;
32
+ //public _parentDevice: ISYDeviceNode<T, any, any, any>;
33
+ //public readonly children: Array<ISYDeviceNode<T, any, any, any>> = [];
25
34
 
35
+ public _enabled: any;
36
+ productName: string;
37
+ model: string;
26
38
  modelNumber: string;
27
-
28
- }
29
-
30
- export class ISYDeviceNode<
31
- T extends Family,
32
- D extends ISYNode.DriverSignatures,
33
- C extends ISYNode.CommandSignatures,
34
- E extends ISYNode.EventSignatures = {[x in keyof D]: Event.DriverToEvent<D[x]> & {driver: x}} & {[x in keyof C]: Event.CommandToEvent<C[x]> & {command: x}}
35
- >
36
- extends ISYNode<T, D, C, E> implements ISYDeviceInfo
37
- {
38
- public declare family: T;
39
-
40
- public readonly typeCode: string;
41
- public readonly deviceClass: any;
42
- public readonly category: Category;
43
- public readonly subCategory: number;
44
-
45
-
46
- declare
47
-
48
- //public readonly isDimmable: boolean;
49
-
50
- //public _parentDevice: ISYDeviceNode<T, any, any, any>;
51
- //public readonly children: Array<ISYDeviceNode<T, any, any, any>> = [];
52
-
53
-
54
- public _enabled: any;
55
- productName: string;
56
- model: string;
57
- modelNumber: string;
58
- version: string;
59
-
60
- constructor (isy: ISY, node: NodeInfo) {
61
-
62
- super(isy, node);
63
-
64
- this.family = node.family as T;
65
- this.nodeType = 1;
66
- this.type = node.type;
67
- this._enabled = node.enabled;
68
- this.deviceClass = node.deviceClass;
69
- this.parentAddress = node.pnode;
70
- const s = this.type.split(".");
71
- this.category = Number(s[0]) as Category;
72
- this.subCategory = Number(s[1]);
73
-
74
- // console.log(nodeDetail);
75
- // if (this.parentAddress !== this.address && this.parentAddress !== undefined) {
76
- // this._parentDevice = isy.getDevice(this.parentAddress) as unknown as ISYDeviceNode<T, any, any, any>;
77
- // if (!isNullOrUndefined(this._parentDevice)) {
78
- // this._parentDevice.addChild(this);
79
- // }
80
- // }
81
- // if (Array.isArray(node.property)) {
82
- // for (const prop of node.property) {
83
- // this.local[prop.id] = this.convertFrom(prop.value, prop.uom, prop.id as Driver.Literal);
84
- // this.formatted[prop.id] = prop.formatted;
85
- // this.uom[prop.id] = prop.uom;
86
- // this.logger(
87
- // `Property ${Controls[prop.id].label} (${prop.id}) initialized to: ${this.local[prop.id]} (${this.formatted[prop.id]})`
88
- // );
89
- // }
90
- // } else if (node.property) {
91
- // this.local[node.property.id] = this.convertFrom(
92
- // node.property.value,
93
- // node.property.uom,
94
- // node.property.id as Driver.Literal
95
- // );
96
- // this.formatted[node.property.id] = node.property.formatted;
97
- // this.uom[node.property.id] = node.property.uom;
98
- // this.logger(
99
- // `Property ${Controls[node.property.id].label} (${node.property.id}) initialized to: ${this.local[node.property.id]} (${this.formatted[node.property.id]})`
100
- // );
101
- // }
102
- }
39
+ version: string;
40
+
41
+ constructor(isy: ISY, node: NodeInfo) {
42
+ super(isy, node);
43
+
44
+ this.family = node.family as T;
45
+ this.nodeType = 1;
46
+ this.type = node.type;
47
+ this._enabled = node.enabled;
48
+ this.deviceClass = node.deviceClass;
49
+ this.parentAddress = node.pnode;
50
+ const s = this.type.split('.');
51
+ this.category = Number(s[0]) as Category;
52
+ this.subCategory = Number(s[1]);
53
+
54
+ // console.log(nodeDetail);
55
+ // if (this.parentAddress !== this.address && this.parentAddress !== undefined) {
56
+ // this._parentDevice = isy.getDevice(this.parentAddress) as unknown as ISYDeviceNode<T, any, any, any>;
57
+ // if (!isNullOrUndefined(this._parentDevice)) {
58
+ // this._parentDevice.addChild(this);
59
+ // }
60
+ // }
61
+ // if (Array.isArray(node.property)) {
62
+ // for (const prop of node.property) {
63
+ // this.local[prop.id] = this.convertFrom(prop.value, prop.uom, prop.id as Driver.Literal);
64
+ // this.formatted[prop.id] = prop.formatted;
65
+ // this.uom[prop.id] = prop.uom;
66
+ // this.logger(
67
+ // `Property ${Controls[prop.id].label} (${prop.id}) initialized to: ${this.local[prop.id]} (${this.formatted[prop.id]})`
68
+ // );
69
+ // }
70
+ // } else if (node.property) {
71
+ // this.local[node.property.id] = this.convertFrom(
72
+ // node.property.value,
73
+ // node.property.uom,
74
+ // node.property.id as Driver.Literal
75
+ // );
76
+ // this.formatted[node.property.id] = node.property.formatted;
77
+ // this.uom[node.property.id] = node.property.uom;
78
+ // this.logger(
79
+ // `Property ${Controls[node.property.id].label} (${node.property.id}) initialized to: ${this.local[node.property.id]} (${this.formatted[node.property.id]})`
80
+ // );
81
+ // }
82
+ }
83
+ manufacturer: string;
103
84
  productId: string | number;
104
85
  modelName: string;
105
86
 
106
- _parentDevice: ISYDevice<T, any, any, any>;
107
- children: ISYNode<any, any, any, any>[];
108
-
109
- public addChild<K extends ISYNode<any,any, any, any>>(childDevice: K) {
110
- this.children.push(childDevice);
111
- }
112
-
113
- // override get parentNode() : ISYDevice<T, any, any, any> {
114
- // super.parentNode()
115
- // if (this._parentDevice === undefined) {
116
- // if (this.parentAddress !== this.address && this.parentAddress !== null && this.parentAddress !== undefined) {
117
- // this._parentDevice = this.isy.getDevice(this.parentAddress) as unknown as ISYDeviceNode<T, Driver.Literal, string>;
118
- // if (this._parentDevice !== null) {
119
- // this._parentDevice.addChild(this);
120
- // }
121
- // }
122
- // this._parentDevice = null;
123
- // }
124
- // return this._parentDevice;
125
- // }
126
-
127
- // public async readProperty(propertyName: Driver.Literal): Promise<DriverState> {
128
- // var result = await this.isy.sendRequest(`nodes/${this.address}/${propertyName}`);
129
- // this.logger(JSON.stringify(result), "debug");
130
- // return result.property;
131
- // }
132
-
133
- // public async readProperties(): Promise<DriverState[]> {
134
- // var result = await this.isy.sendRequest(`nodes/${this.address}/status`);
135
- // this.logger(JSON.stringify(result), "debug");
136
- // return result.property;
137
- // }
138
-
139
- // public async updateProperty(propertyName: Driver.Literal, value: string): Promise<any> {
140
- // const val = this.convertTo(Number(value), Number(this.uom[propertyName]));
141
- // this.logger(`Updating property ${Controls[propertyName].label}. incoming value: ${value} outgoing value: ${val}`);
142
- // this.pending[propertyName] = value;
143
- // return this.isy.sendRequest(`nodes/${this.address}/set/${propertyName}/${val}`).then((p) => {
144
- // this.local[propertyName] = value;
145
- // this.pending[propertyName] = null;
146
- // });
147
- // }
148
-
149
-
150
-
151
-
152
-
153
- // public override handlePropertyChange(driver: any, value: any, formattedValue: string) {
154
- // let changed = false;
155
- // const priorVal = this.local[driver];
156
- // try {
157
- // const val = this.convertFrom(value, this.uom[driver]);
158
-
159
- // if (this.local[driver] !== val) {
160
- // this.logger(`Property ${Controls[driver].label} (${driver}) updated to: ${val} (${formattedValue})`);
161
- // this.local[driver] = val;
162
- // this.formatted[driver] = formattedValue;
163
- // this.lastChanged = new Date();
164
- // changed = true;
165
- // } else {
166
- // this.logger(`Update event triggered, property ${Controls[driver].label} (${driver}) is unchanged.`);
167
- // }
168
- // if (changed) {
169
- // this.emit("PropertyChanged", driver, val, priorVal, formattedValue);
170
-
171
- // this.scenes.forEach((element) => {
172
- // this.logger(`Recalulating ${element.deviceFriendlyName}`);
173
- // element.recalculateState();
174
- // });
175
- // }
176
- // } catch (error) {
177
- // this.logger(error, "error");
178
- // } finally {
179
- // return changed;
180
- // }
181
- // }
87
+ _parentDevice: ISYDevice<T, any, any, any>;
88
+ children: ISYNode<any, any, any, any>[];
89
+
90
+ public addChild<K extends ISYNode<any, any, any, any>>(childDevice: K) {
91
+ this.children.push(childDevice);
92
+ }
93
+
94
+ // override get parentNode() : ISYDevice<T, any, any, any> {
95
+ // super.parentNode()
96
+ // if (this._parentDevice === undefined) {
97
+ // if (this.parentAddress !== this.address && this.parentAddress !== null && this.parentAddress !== undefined) {
98
+ // this._parentDevice = this.isy.getDevice(this.parentAddress) as unknown as ISYDeviceNode<T, Driver.Literal, string>;
99
+ // if (this._parentDevice !== null) {
100
+ // this._parentDevice.addChild(this);
101
+ // }
102
+ // }
103
+ // this._parentDevice = null;
104
+ // }
105
+ // return this._parentDevice;
106
+ // }
107
+
108
+ // public async readProperty(propertyName: Driver.Literal): Promise<DriverState> {
109
+ // var result = await this.isy.sendRequest(`nodes/${this.address}/${propertyName}`);
110
+ // this.logger(JSON.stringify(result), "debug");
111
+ // return result.property;
112
+ // }
113
+
114
+ // public async readProperties(): Promise<DriverState[]> {
115
+ // var result = await this.isy.sendRequest(`nodes/${this.address}/status`);
116
+ // this.logger(JSON.stringify(result), "debug");
117
+ // return result.property;
118
+ // }
119
+
120
+ // public async updateProperty(propertyName: Driver.Literal, value: string): Promise<any> {
121
+ // const val = this.convertTo(Number(value), Number(this.uom[propertyName]));
122
+ // this.logger(`Updating property ${Controls[propertyName].label}. incoming value: ${value} outgoing value: ${val}`);
123
+ // this.pending[propertyName] = value;
124
+ // return this.isy.sendRequest(`nodes/${this.address}/set/${propertyName}/${val}`).then((p) => {
125
+ // this.local[propertyName] = value;
126
+ // this.pending[propertyName] = null;
127
+ // });
128
+ // }
129
+
130
+ // public override handlePropertyChange(driver: any, value: any, formattedValue: string) {
131
+ // let changed = false;
132
+ // const priorVal = this.local[driver];
133
+ // try {
134
+ // const val = this.convertFrom(value, this.uom[driver]);
135
+
136
+ // if (this.local[driver] !== val) {
137
+ // this.logger(`Property ${Controls[driver].label} (${driver}) updated to: ${val} (${formattedValue})`);
138
+ // this.local[driver] = val;
139
+ // this.formatted[driver] = formattedValue;
140
+ // this.lastChanged = new Date();
141
+ // changed = true;
142
+ // } else {
143
+ // this.logger(`Update event triggered, property ${Controls[driver].label} (${driver}) is unchanged.`);
144
+ // }
145
+ // if (changed) {
146
+ // this.emit("PropertyChanged", driver, val, priorVal, formattedValue);
147
+
148
+ // this.scenes.forEach((element) => {
149
+ // this.logger(`Recalulating ${element.deviceFriendlyName}`);
150
+ // element.recalculateState();
151
+ // });
152
+ // }
153
+ // } catch (error) {
154
+ // this.logger(error, "error");
155
+ // } finally {
156
+ // return changed;
157
+ // }
158
+ // }
182
159
  }
@@ -3,7 +3,7 @@
3
3
  import { UnitOfMeasure } from "../../../Definitions/Global/UOM.js";
4
4
  import { Family } from "../../../Definitions/Global/Families.js";
5
5
  import type { NodeInfo } from "../../../Model/NodeInfo.js";
6
- import type { ISY } from "../../../ISY.js";
6
+ import { ISY } from "../../../ISY.js";
7
7
  import type { ISYNode } from "../../../ISYNode.js";
8
8
  import { Base } from "../index.js";
9
9
  import { ISYDeviceNode } from "../../ISYDeviceNode.js";
@@ -12,41 +12,32 @@ import { Insteon } from "../../../Definitions/index.js";
12
12
  import type { DriverState } from "../../../Model/DriverState.js";
13
13
  import { NodeFactory } from "../../NodeFactory.js";
14
14
 
15
- export const nodeDefId = "AlertModuleArmed";
15
+ const nodeDefId = "AlertModuleArmed";
16
16
 
17
17
  type Commands = AlertModuleArmed.Commands;
18
18
  type Drivers = AlertModuleArmed.Drivers;
19
19
 
20
20
  export class AlertModuleArmedNode extends Base<Drivers, Commands> implements AlertModuleArmed.Interface {
21
- public readonly commands = {
21
+ public override readonly commands = {
22
22
  DON: this.on,
23
23
  DOF: this.off,
24
24
  QUERY: this.query,
25
25
  BEEP: this.beep,
26
26
  WDU: this.writeChanges
27
27
  };
28
- static nodeDefId = "AlertModuleArmed";
28
+ static override nodeDefId = "AlertModuleArmed";
29
+ static override implements = ["AlertModuleArmed", "SirenAlert", "SirenArm"];
29
30
  declare readonly nodeDefId: "AlertModuleArmed";
30
31
  constructor (isy: ISY, nodeInfo: NodeInfo) {
31
32
  super(isy, nodeInfo);
32
33
  this.drivers.ST = Driver.create("ST", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Percent, label: "Status", name: "status" });
33
34
  this.drivers.ERR = Driver.create("ERR", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Index, label: "Responding", name: "responding" });
34
35
  }
35
- async on() {
36
- return this.sendCommand("DON");
37
- }
38
- async off() {
39
- return this.sendCommand("DOF");
40
- }
41
- async query() {
42
- return this.sendCommand("QUERY");
43
- }
44
- async beep(value?: number) {
45
- return this.sendCommand("BEEP", { value: value });
46
- }
47
- async writeChanges() {
48
- return this.sendCommand("WDU");
49
- }
36
+ async on() { return this.sendCommand("DON"); }
37
+ async off() { return this.sendCommand("DOF"); }
38
+ async query() { return this.sendCommand("QUERY"); }
39
+ async beep(value?: number) { return this.sendCommand("BEEP", { value: value }); }
40
+ async writeChanges() { return this.sendCommand("WDU"); }
50
41
  public get status(): Insteon.OnLevelRelay {
51
42
  return this.drivers.ST?.value;
52
43
  }
@@ -61,8 +52,9 @@ export namespace AlertModuleArmed {
61
52
  export interface Interface extends Omit<InstanceType<typeof AlertModuleArmedNode>, keyof ISYDeviceNode<any, any, any, any>> {
62
53
  nodeDefId: "AlertModuleArmed";
63
54
  }
64
- export function is(node: ISYNode<any, any, any, any>): node is AlertModuleArmedNode {
65
- return node.nodeDefId === nodeDefId;
55
+ export function is(node: ISYNode<any, any, any, any>): node is AlertModuleArmedNode { return ["AlertModuleArmed"].includes(node.nodeDefId); }
56
+ export function isImplementedBy(node: ISYNode<any, any, any, any>): node is AlertModuleArmedNode {
57
+ return ["AlertModuleArmed", "BallastRelayLampSwitch", "BallastRelayLampSwitch_ADV", "RelayLampSwitch", "RelayLampSwitch_ADV", "RelayLampSwitchLED", "RelayLampSwitchLED_ADV", "RelayLampOnly", "RelayLampOnly_ADV", "KeypadRelay", "KeypadRelay_ADV", "FanLincMotor", "EZRAIN_Output", "AlertModuleSiren", "AlertModuleSiren_ADV"].includes(node.nodeDefId);
66
58
  }
67
59
  export function create(isy: ISY, nodeInfo: NodeInfo) {
68
60
  return new AlertModuleArmedNode(isy, nodeInfo);
@@ -3,7 +3,7 @@
3
3
  import { UnitOfMeasure } from "../../../Definitions/Global/UOM.js";
4
4
  import { Family } from "../../../Definitions/Global/Families.js";
5
5
  import type { NodeInfo } from "../../../Model/NodeInfo.js";
6
- import type { ISY } from "../../../ISY.js";
6
+ import { ISY } from "../../../ISY.js";
7
7
  import type { ISYNode } from "../../../ISYNode.js";
8
8
  import { Base } from "../index.js";
9
9
  import { ISYDeviceNode } from "../../ISYDeviceNode.js";
@@ -12,13 +12,13 @@ import { Insteon } from "../../../Definitions/index.js";
12
12
  import type { DriverState } from "../../../Model/DriverState.js";
13
13
  import { NodeFactory } from "../../NodeFactory.js";
14
14
 
15
- export const nodeDefId = "AlertModuleSiren";
15
+ const nodeDefId = "AlertModuleSiren";
16
16
 
17
17
  type Commands = AlertModuleSiren.Commands;
18
18
  type Drivers = AlertModuleSiren.Drivers;
19
19
 
20
20
  export class AlertModuleSirenNode extends Base<Drivers, Commands> implements AlertModuleSiren.Interface {
21
- public readonly commands = {
21
+ public override readonly commands = {
22
22
  DON: this.on,
23
23
  DOF: this.off,
24
24
  DFOF: this.fastOff,
@@ -27,34 +27,21 @@ export class AlertModuleSirenNode extends Base<Drivers, Commands> implements Ale
27
27
  BEEP: this.beep,
28
28
  WDU: this.writeChanges
29
29
  };
30
- static nodeDefId = "AlertModuleSiren";
31
- declare readonly nodeDefId: "AlertModuleSiren";
30
+ static override nodeDefId = "AlertModuleSiren";
31
+ static override implements = ["AlertModuleSiren", "AlertModuleArmed", "SirenAlert", "SirenArm"];
32
+ declare readonly nodeDefId: "AlertModuleSiren" | "AlertModuleSiren_ADV";
32
33
  constructor (isy: ISY, nodeInfo: NodeInfo) {
33
34
  super(isy, nodeInfo);
34
35
  this.drivers.ST = Driver.create("ST", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Percent, label: "Status", name: "status" });
35
36
  this.drivers.ERR = Driver.create("ERR", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Index, label: "Responding", name: "responding" });
36
37
  }
37
- async on(onLevel?: number) {
38
- return this.sendCommand("DON", { OL: onLevel });
39
- }
40
- async off() {
41
- return this.sendCommand("DOF");
42
- }
43
- async fastOff() {
44
- return this.sendCommand("DFOF");
45
- }
46
- async fastOn() {
47
- return this.sendCommand("DFON");
48
- }
49
- async query() {
50
- return this.sendCommand("QUERY");
51
- }
52
- async beep(value?: number) {
53
- return this.sendCommand("BEEP", { value: value });
54
- }
55
- async writeChanges() {
56
- return this.sendCommand("WDU");
57
- }
38
+ async on(onLevel?: number) { return this.sendCommand("DON", { OL: onLevel }); }
39
+ async off() { return this.sendCommand("DOF"); }
40
+ async fastOff() { return this.sendCommand("DFOF"); }
41
+ async fastOn() { return this.sendCommand("DFON"); }
42
+ async query() { return this.sendCommand("QUERY"); }
43
+ async beep(value?: number) { return this.sendCommand("BEEP", { value: value }); }
44
+ async writeChanges() { return this.sendCommand("WDU"); }
58
45
  public get status(): Insteon.OnLevelRelay {
59
46
  return this.drivers.ST?.value;
60
47
  }
@@ -64,13 +51,15 @@ export class AlertModuleSirenNode extends Base<Drivers, Commands> implements Ale
64
51
  }
65
52
 
66
53
  NodeFactory.register(AlertModuleSirenNode);
54
+ NodeFactory.register(AlertModuleSirenNode, "AlertModuleSiren_ADV");
67
55
 
68
56
  export namespace AlertModuleSiren {
69
57
  export interface Interface extends Omit<InstanceType<typeof AlertModuleSirenNode>, keyof ISYDeviceNode<any, any, any, any>> {
70
- nodeDefId: "AlertModuleSiren";
58
+ nodeDefId: "AlertModuleSiren" | "AlertModuleSiren_ADV";
71
59
  }
72
- export function is(node: ISYNode<any, any, any, any>): node is AlertModuleSirenNode {
73
- return node.nodeDefId === nodeDefId;
60
+ export function is(node: ISYNode<any, any, any, any>): node is AlertModuleSirenNode { return ["AlertModuleSiren", "AlertModuleSiren_ADV"].includes(node.nodeDefId); }
61
+ export function isImplementedBy(node: ISYNode<any, any, any, any>): node is AlertModuleSirenNode {
62
+ return ["AlertModuleSiren", "AlertModuleSiren_ADV"].includes(node.nodeDefId);
74
63
  }
75
64
  export function create(isy: ISY, nodeInfo: NodeInfo) {
76
65
  return new AlertModuleSirenNode(isy, nodeInfo);
@@ -3,7 +3,7 @@
3
3
  import { UnitOfMeasure } from "../../../Definitions/Global/UOM.js";
4
4
  import { Family } from "../../../Definitions/Global/Families.js";
5
5
  import type { NodeInfo } from "../../../Model/NodeInfo.js";
6
- import type { ISY } from "../../../ISY.js";
6
+ import { ISY } from "../../../ISY.js";
7
7
  import type { ISYNode } from "../../../ISYNode.js";
8
8
  import { Base } from "../index.js";
9
9
  import { ISYDeviceNode } from "../../ISYDeviceNode.js";
@@ -12,13 +12,13 @@ import { Insteon } from "../../../Definitions/index.js";
12
12
  import type { DriverState } from "../../../Model/DriverState.js";
13
13
  import { NodeFactory } from "../../NodeFactory.js";
14
14
 
15
- export const nodeDefId = "BallastRelayLampSwitch";
15
+ const nodeDefId = "BallastRelayLampSwitch";
16
16
 
17
17
  type Commands = BallastRelayLampSwitch.Commands;
18
18
  type Drivers = BallastRelayLampSwitch.Drivers;
19
19
 
20
20
  export class BallastRelayLampSwitchNode extends Base<Drivers, Commands> implements BallastRelayLampSwitch.Interface {
21
- public readonly commands = {
21
+ public override readonly commands = {
22
22
  DON: this.on,
23
23
  DOF: this.off,
24
24
  DFOF: this.fastOff,
@@ -27,34 +27,21 @@ export class BallastRelayLampSwitchNode extends Base<Drivers, Commands> implemen
27
27
  BEEP: this.beep,
28
28
  WDU: this.writeChanges
29
29
  };
30
- static nodeDefId = "BallastRelayLampSwitch";
31
- declare readonly nodeDefId: "BallastRelayLampSwitch";
30
+ static override nodeDefId = "BallastRelayLampSwitch";
31
+ static override implements = ["BallastRelayLampSwitch", "RelayLampOnly", "RelayLampOnly_ADV", "IRLincTx", "EZRAIN_Output", "EZIO2x4_Output", "EZIO2x4_Input", "EZIO2x4_Input_ADV", "BinaryAlarm", "BinaryAlarm_ADV", "BinaryControl", "BinaryControl_ADV", "AlertModuleArmed", "SirenAlert", "SirenArm"];
32
+ declare readonly nodeDefId: "BallastRelayLampSwitch" | "BallastRelayLampSwitch_ADV";
32
33
  constructor (isy: ISY, nodeInfo: NodeInfo) {
33
34
  super(isy, nodeInfo);
34
35
  this.drivers.ST = Driver.create("ST", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Percent, label: "Status", name: "status" });
35
36
  this.drivers.ERR = Driver.create("ERR", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Index, label: "Responding", name: "responding" });
36
37
  }
37
- async on(value?: (0 | 100)) {
38
- return this.sendCommand("DON", { value: value });
39
- }
40
- async off() {
41
- return this.sendCommand("DOF");
42
- }
43
- async fastOff() {
44
- return this.sendCommand("DFOF");
45
- }
46
- async fastOn() {
47
- return this.sendCommand("DFON");
48
- }
49
- async query() {
50
- return this.sendCommand("QUERY");
51
- }
52
- async beep(value?: number) {
53
- return this.sendCommand("BEEP", { value: value });
54
- }
55
- async writeChanges() {
56
- return this.sendCommand("WDU");
57
- }
38
+ async on(value?: (0 | 100)) { return this.sendCommand("DON", { value: value }); }
39
+ async off() { return this.sendCommand("DOF"); }
40
+ async fastOff() { return this.sendCommand("DFOF"); }
41
+ async fastOn() { return this.sendCommand("DFON"); }
42
+ async query() { return this.sendCommand("QUERY"); }
43
+ async beep(value?: number) { return this.sendCommand("BEEP", { value: value }); }
44
+ async writeChanges() { return this.sendCommand("WDU"); }
58
45
  public get status(): Insteon.Sml {
59
46
  return this.drivers.ST?.value;
60
47
  }
@@ -64,13 +51,15 @@ export class BallastRelayLampSwitchNode extends Base<Drivers, Commands> implemen
64
51
  }
65
52
 
66
53
  NodeFactory.register(BallastRelayLampSwitchNode);
54
+ NodeFactory.register(BallastRelayLampSwitchNode, "BallastRelayLampSwitch_ADV");
67
55
 
68
56
  export namespace BallastRelayLampSwitch {
69
57
  export interface Interface extends Omit<InstanceType<typeof BallastRelayLampSwitchNode>, keyof ISYDeviceNode<any, any, any, any>> {
70
- nodeDefId: "BallastRelayLampSwitch";
58
+ nodeDefId: "BallastRelayLampSwitch" | "BallastRelayLampSwitch_ADV";
71
59
  }
72
- export function is(node: ISYNode<any, any, any, any>): node is BallastRelayLampSwitchNode {
73
- return node.nodeDefId === nodeDefId;
60
+ export function is(node: ISYNode<any, any, any, any>): node is BallastRelayLampSwitchNode { return ["BallastRelayLampSwitch", "BallastRelayLampSwitch_ADV"].includes(node.nodeDefId); }
61
+ export function isImplementedBy(node: ISYNode<any, any, any, any>): node is BallastRelayLampSwitchNode {
62
+ return ["BallastRelayLampSwitch", "BallastRelayLampSwitch_ADV"].includes(node.nodeDefId);
74
63
  }
75
64
  export function create(isy: ISY, nodeInfo: NodeInfo) {
76
65
  return new BallastRelayLampSwitchNode(isy, nodeInfo);
@@ -3,7 +3,7 @@
3
3
  import { UnitOfMeasure } from "../../../Definitions/Global/UOM.js";
4
4
  import { Family } from "../../../Definitions/Global/Families.js";
5
5
  import type { NodeInfo } from "../../../Model/NodeInfo.js";
6
- import type { ISY } from "../../../ISY.js";
6
+ import { ISY } from "../../../ISY.js";
7
7
  import type { ISYNode } from "../../../ISYNode.js";
8
8
  import { Base } from "../index.js";
9
9
  import { ISYDeviceNode } from "../../ISYDeviceNode.js";
@@ -12,33 +12,28 @@ import { Insteon } from "../../../Definitions/index.js";
12
12
  import type { DriverState } from "../../../Model/DriverState.js";
13
13
  import { NodeFactory } from "../../NodeFactory.js";
14
14
 
15
- export const nodeDefId = "BinaryAlarm";
15
+ const nodeDefId = "BinaryAlarm";
16
16
 
17
17
  type Commands = BinaryAlarm.Commands;
18
18
  type Drivers = BinaryAlarm.Drivers;
19
19
 
20
20
  export class BinaryAlarmNode extends Base<Drivers, Commands> implements BinaryAlarm.Interface {
21
- public readonly commands = {
21
+ public override readonly commands = {
22
22
  QUERY: this.query,
23
23
  BEEP: this.beep,
24
24
  WDU: this.writeChanges
25
25
  };
26
- static nodeDefId = "BinaryAlarm";
27
- declare readonly nodeDefId: "BinaryAlarm";
26
+ static override nodeDefId = "BinaryAlarm";
27
+ static override implements = ["BinaryAlarm", "BinaryControl", "BinaryControl_ADV", "SirenAlert", "SirenArm"];
28
+ declare readonly nodeDefId: "BinaryAlarm" | "BinaryAlarm_ADV";
28
29
  constructor (isy: ISY, nodeInfo: NodeInfo) {
29
30
  super(isy, nodeInfo);
30
31
  this.drivers.ST = Driver.create("ST", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Percent, label: "Status", name: "status" });
31
32
  this.drivers.ERR = Driver.create("ERR", this, nodeInfo.property as DriverState, { uom: UnitOfMeasure.Index, label: "Responding", name: "responding" });
32
33
  }
33
- async query() {
34
- return this.sendCommand("QUERY");
35
- }
36
- async beep(value?: number) {
37
- return this.sendCommand("BEEP", { value: value });
38
- }
39
- async writeChanges() {
40
- return this.sendCommand("WDU");
41
- }
34
+ async query() { return this.sendCommand("QUERY"); }
35
+ async beep(value?: number) { return this.sendCommand("BEEP", { value: value }); }
36
+ async writeChanges() { return this.sendCommand("WDU"); }
42
37
  public get status(): Insteon.OnLevelRelay {
43
38
  return this.drivers.ST?.value;
44
39
  }
@@ -48,13 +43,15 @@ export class BinaryAlarmNode extends Base<Drivers, Commands> implements BinaryAl
48
43
  }
49
44
 
50
45
  NodeFactory.register(BinaryAlarmNode);
46
+ NodeFactory.register(BinaryAlarmNode, "BinaryAlarm_ADV");
51
47
 
52
48
  export namespace BinaryAlarm {
53
49
  export interface Interface extends Omit<InstanceType<typeof BinaryAlarmNode>, keyof ISYDeviceNode<any, any, any, any>> {
54
- nodeDefId: "BinaryAlarm";
50
+ nodeDefId: "BinaryAlarm" | "BinaryAlarm_ADV";
55
51
  }
56
- export function is(node: ISYNode<any, any, any, any>): node is BinaryAlarmNode {
57
- return node.nodeDefId === nodeDefId;
52
+ export function is(node: ISYNode<any, any, any, any>): node is BinaryAlarmNode { return ["BinaryAlarm", "BinaryAlarm_ADV"].includes(node.nodeDefId); }
53
+ export function isImplementedBy(node: ISYNode<any, any, any, any>): node is BinaryAlarmNode {
54
+ return ["BinaryAlarm", "BallastRelayLampSwitch", "BallastRelayLampSwitch_ADV", "RelayLampSwitch", "RelayLampSwitch_ADV", "RelayLampSwitchLED", "RelayLampSwitchLED_ADV", "KeypadRelay", "KeypadRelay_ADV", "BinaryAlarm_ADV"].includes(node.nodeDefId);
58
55
  }
59
56
  export function create(isy: ISY, nodeInfo: NodeInfo) {
60
57
  return new BinaryAlarmNode(isy, nodeInfo);