node-red-contrib-knx-ultimate 7.1.4 → 8.0.2

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 (657) hide show
  1. package/CHANGELOG.md +20 -10
  2. package/MIGRATION.md +40 -0
  3. package/README.md +32 -6
  4. package/docs/README.md +34 -0
  5. package/docs/assets/brand/made-in-italy.svg +12 -0
  6. package/examples/Alerter - Device Alert Aggregation.json +5 -2
  7. package/examples/Auto Responder - Read Request Defaults.json +5 -2
  8. package/examples/Garage - Door Controller.json +5 -2
  9. package/examples/Global Context - Expose KNX Values.json +5 -2
  10. package/examples/KNX DateTime - Set Date and Time to Bus.json +111 -89
  11. package/examples/Load Control - Manual Shedding Mode.json +5 -2
  12. package/examples/Logger ETS File and Telegram Count.json +10 -2
  13. package/examples/Scene Controller Recall and Save.json +33 -6
  14. package/examples/Staircase - Timer, Override and Block.json +5 -2
  15. package/examples/WatchDog Connect Disconnect.json +98 -70
  16. package/nodes/commonFunctions.js +0 -587
  17. package/nodes/knxUltimate-config.html +0 -14
  18. package/nodes/knxUltimate-config.js +1 -18
  19. package/nodes/knxUltimate.html +1 -6
  20. package/nodes/knxUltimateIoTBridge.html +0 -14
  21. package/nodes/knxUltimateLegacyMigration.js +75 -0
  22. package/nodes/knxUltimateMultiRouting.html +1 -7
  23. package/nodes/knxUltimateRouterFilter.html +1 -7
  24. package/nodes/knxUltimateUtility.html +0 -6
  25. package/nodes/knxUltimateViewer.html +0 -6
  26. package/nodes/locales/de/knxUltimate-config.html +0 -8
  27. package/nodes/locales/de/knxUltimate.html +0 -8
  28. package/nodes/locales/de/knxUltimateIoTBridge.html +0 -8
  29. package/nodes/locales/de/knxUltimateMultiRouting.html +0 -8
  30. package/nodes/locales/de/knxUltimateRouterFilter.html +0 -8
  31. package/nodes/locales/de/knxUltimateUtility.html +0 -8
  32. package/nodes/locales/de/knxUltimateUtility.json +16 -1
  33. package/nodes/locales/de/knxUltimateViewer.html +0 -8
  34. package/nodes/locales/en/knxUltimate-config.html +0 -8
  35. package/nodes/locales/en/knxUltimate.html +0 -8
  36. package/nodes/locales/en/knxUltimateIoTBridge.html +0 -8
  37. package/nodes/locales/en/knxUltimateMultiRouting.html +0 -8
  38. package/nodes/locales/en/knxUltimateRouterFilter.html +0 -8
  39. package/nodes/locales/en/knxUltimateUtility.html +0 -8
  40. package/nodes/locales/en/knxUltimateUtility.json +16 -1
  41. package/nodes/locales/en/knxUltimateViewer.html +0 -8
  42. package/nodes/locales/es/knxUltimate-config.html +0 -8
  43. package/nodes/locales/es/knxUltimate.html +0 -8
  44. package/nodes/locales/es/knxUltimateIoTBridge.html +0 -8
  45. package/nodes/locales/es/knxUltimateMultiRouting.html +0 -8
  46. package/nodes/locales/es/knxUltimateRouterFilter.html +0 -8
  47. package/nodes/locales/es/knxUltimateUtility.html +0 -8
  48. package/nodes/locales/es/knxUltimateUtility.json +17 -2
  49. package/nodes/locales/es/knxUltimateViewer.html +0 -8
  50. package/nodes/locales/fr/knxUltimate-config.html +0 -8
  51. package/nodes/locales/fr/knxUltimate.html +0 -8
  52. package/nodes/locales/fr/knxUltimateIoTBridge.html +0 -8
  53. package/nodes/locales/fr/knxUltimateMultiRouting.html +0 -8
  54. package/nodes/locales/fr/knxUltimateRouterFilter.html +0 -8
  55. package/nodes/locales/fr/knxUltimateUtility.html +0 -8
  56. package/nodes/locales/fr/knxUltimateUtility.json +16 -1
  57. package/nodes/locales/fr/knxUltimateViewer.html +0 -8
  58. package/nodes/locales/it/knxUltimate-config.html +0 -8
  59. package/nodes/locales/it/knxUltimate.html +0 -8
  60. package/nodes/locales/it/knxUltimateIoTBridge.html +0 -8
  61. package/nodes/locales/it/knxUltimateMultiRouting.html +0 -8
  62. package/nodes/locales/it/knxUltimateRouterFilter.html +0 -8
  63. package/nodes/locales/it/knxUltimateUtility.html +0 -8
  64. package/nodes/locales/it/knxUltimateUtility.json +16 -1
  65. package/nodes/locales/it/knxUltimateViewer.html +0 -8
  66. package/nodes/locales/zh-CN/knxUltimate-config.html +0 -8
  67. package/nodes/locales/zh-CN/knxUltimate.html +0 -8
  68. package/nodes/locales/zh-CN/knxUltimateIoTBridge.html +0 -8
  69. package/nodes/locales/zh-CN/knxUltimateMultiRouting.html +0 -8
  70. package/nodes/locales/zh-CN/knxUltimateRouterFilter.html +0 -8
  71. package/nodes/locales/zh-CN/knxUltimateUtility.html +0 -8
  72. package/nodes/locales/zh-CN/knxUltimateUtility.json +16 -1
  73. package/nodes/locales/zh-CN/knxUltimateViewer.html +0 -8
  74. package/nodes/plugins/knxUltimate-v8-migration-recovery-plugin.html +140 -0
  75. package/package.json +22 -69
  76. package/resources/11f26b4500.js +2 -2
  77. package/resources/KNXAIChatAdapterMappings.js +2 -416
  78. package/resources/configNodeEditorSelection.js +2 -32
  79. package/resources/hueControllerEditorSelection.js +2 -32
  80. package/resources/hueControllerMigrationDialog.js +2 -254
  81. package/resources/hueControllerProfiles.js +2 -9319
  82. package/resources/knxUtilityProfiles.js +2041 -2082
  83. package/resources/legacyMigrationNotice.js +23 -111
  84. package/resources/matterQrScanner.js +2 -98
  85. package/resources/upgradeToV8.js +94 -26
  86. package/scripts/check-legacy-flows.js +142 -0
  87. package/examples/Hue Area Motion - Zone Presence.json +0 -77
  88. package/examples/Hue Battery - Level Status.json +0 -77
  89. package/examples/Hue Button - Short and Dim Commands.json +0 -83
  90. package/examples/Hue Camera Motion - Presence.json +0 -77
  91. package/examples/Hue Config - Bridge Template.json +0 -27
  92. package/examples/Hue Contact Sensor - Open Closed.json +0 -75
  93. package/examples/Hue Device Software Update - Availability.json +0 -77
  94. package/examples/Hue Humidity Sensor - Relative Humidity.json +0 -77
  95. package/examples/Hue Light - Switch and Brightness.json +0 -67
  96. package/examples/Hue Light Sensor - Lux to KNX.json +0 -77
  97. package/examples/Hue Motion - Presence Sensor.json +0 -76
  98. package/examples/Hue Plug - Switch and State.json +0 -63
  99. package/examples/Hue Scene - Recall from KNX.json +0 -63
  100. package/examples/Hue Tap Dial - Relative Dimming.json +0 -76
  101. package/examples/Hue Temperature Sensor - Celsius to KNX.json +0 -77
  102. package/examples/Hue Zigbee Connectivity - Online Status.json +0 -77
  103. package/examples/Matter Controller - Semantic Flow Input.json +0 -248
  104. package/nodes/hue-config.html +0 -378
  105. package/nodes/hue-config.js +0 -846
  106. package/nodes/icons/node-alerter-icon.png +0 -0
  107. package/nodes/icons/node-homekit-icon.png +0 -0
  108. package/nodes/icons/node-homekit-icon.svg +0 -10
  109. package/nodes/icons/node-hue-icon.svg +0 -10
  110. package/nodes/icons/node-knx-icon.png +0 -0
  111. package/nodes/icons/node-logger-icon.png +0 -0
  112. package/nodes/icons/node-logger2-icon.png +0 -0
  113. package/nodes/icons/node-logger2-icon.svg +0 -32
  114. package/nodes/icons/node-matter-bridge-icon.svg +0 -6
  115. package/nodes/icons/node-matter-controller-icon.svg +0 -6
  116. package/nodes/icons/node-matter-icon.svg +0 -12
  117. package/nodes/icons/node-scene-icon.png +0 -0
  118. package/nodes/icons/node-watchdog-icon.png +0 -0
  119. package/nodes/knxUltimateAI.html +0 -1826
  120. package/nodes/knxUltimateAI.js +0 -16797
  121. package/nodes/knxUltimateAIHomeAssistant.html +0 -54
  122. package/nodes/knxUltimateAIHomeAssistant.js +0 -152
  123. package/nodes/knxUltimateAlerter.html +0 -267
  124. package/nodes/knxUltimateAlerter.js +0 -300
  125. package/nodes/knxUltimateAutoResponder.html +0 -128
  126. package/nodes/knxUltimateAutoResponder.js +0 -264
  127. package/nodes/knxUltimateDateTime.html +0 -579
  128. package/nodes/knxUltimateDateTime.js +0 -282
  129. package/nodes/knxUltimateGarage.html +0 -337
  130. package/nodes/knxUltimateGarage.js +0 -504
  131. package/nodes/knxUltimateGlobalContext.html +0 -145
  132. package/nodes/knxUltimateGlobalContext.js +0 -208
  133. package/nodes/knxUltimateHATranslator.html +0 -85
  134. package/nodes/knxUltimateHATranslator.js +0 -83
  135. package/nodes/knxUltimateHueAreaMotion.html +0 -670
  136. package/nodes/knxUltimateHueAreaMotion.js +0 -218
  137. package/nodes/knxUltimateHueBattery.html +0 -646
  138. package/nodes/knxUltimateHueBattery.js +0 -182
  139. package/nodes/knxUltimateHueButton.html +0 -804
  140. package/nodes/knxUltimateHueButton.js +0 -292
  141. package/nodes/knxUltimateHueCameraMotion.html +0 -671
  142. package/nodes/knxUltimateHueCameraMotion.js +0 -218
  143. package/nodes/knxUltimateHueContactSensor.html +0 -609
  144. package/nodes/knxUltimateHueContactSensor.js +0 -188
  145. package/nodes/knxUltimateHueController.html +0 -1765
  146. package/nodes/knxUltimateHueController.js +0 -28
  147. package/nodes/knxUltimateHueHumiditySensor.html +0 -641
  148. package/nodes/knxUltimateHueHumiditySensor.js +0 -201
  149. package/nodes/knxUltimateHueLight.html +0 -2516
  150. package/nodes/knxUltimateHueLight.js +0 -1582
  151. package/nodes/knxUltimateHueLightSensor.html +0 -636
  152. package/nodes/knxUltimateHueLightSensor.js +0 -177
  153. package/nodes/knxUltimateHueMotion.html +0 -634
  154. package/nodes/knxUltimateHueMotion.js +0 -182
  155. package/nodes/knxUltimateHuePlug.html +0 -576
  156. package/nodes/knxUltimateHuePlug.js +0 -341
  157. package/nodes/knxUltimateHueScene.html +0 -967
  158. package/nodes/knxUltimateHueScene.js +0 -349
  159. package/nodes/knxUltimateHueTapDial.html +0 -640
  160. package/nodes/knxUltimateHueTapDial.js +0 -268
  161. package/nodes/knxUltimateHueTemperatureSensor.html +0 -639
  162. package/nodes/knxUltimateHueTemperatureSensor.js +0 -184
  163. package/nodes/knxUltimateHueZigbeeConnectivity.html +0 -648
  164. package/nodes/knxUltimateHueZigbeeConnectivity.js +0 -182
  165. package/nodes/knxUltimateHuedevice_software_update.html +0 -650
  166. package/nodes/knxUltimateHuedevice_software_update.js +0 -182
  167. package/nodes/knxUltimateLoadControl.html +0 -425
  168. package/nodes/knxUltimateLoadControl.js +0 -443
  169. package/nodes/knxUltimateLogger.html +0 -197
  170. package/nodes/knxUltimateLogger.js +0 -224
  171. package/nodes/knxUltimateMatterBridge.html +0 -689
  172. package/nodes/knxUltimateMatterBridge.js +0 -464
  173. package/nodes/knxUltimateMatterControllerDevice.html +0 -2851
  174. package/nodes/knxUltimateMatterControllerDevice.js +0 -1747
  175. package/nodes/knxUltimateSceneController.html +0 -529
  176. package/nodes/knxUltimateSceneController.js +0 -437
  177. package/nodes/knxUltimateStaircase.html +0 -346
  178. package/nodes/knxUltimateStaircase.js +0 -463
  179. package/nodes/knxUltimateWatchDog.html +0 -241
  180. package/nodes/knxUltimateWatchDog.js +0 -230
  181. package/nodes/locales/de/hue-config.html +0 -33
  182. package/nodes/locales/de/hue-config.json +0 -21
  183. package/nodes/locales/de/knxUltimateAI.html +0 -13
  184. package/nodes/locales/de/knxUltimateAI.json +0 -231
  185. package/nodes/locales/de/knxUltimateAIHomeAssistant.html +0 -11
  186. package/nodes/locales/de/knxUltimateAlerter.html +0 -159
  187. package/nodes/locales/de/knxUltimateAlerter.json +0 -27
  188. package/nodes/locales/de/knxUltimateAutoResponder.html +0 -96
  189. package/nodes/locales/de/knxUltimateAutoResponder.json +0 -8
  190. package/nodes/locales/de/knxUltimateDateTime.html +0 -45
  191. package/nodes/locales/de/knxUltimateDateTime.json +0 -32
  192. package/nodes/locales/de/knxUltimateGarage.html +0 -79
  193. package/nodes/locales/de/knxUltimateGarage.json +0 -51
  194. package/nodes/locales/de/knxUltimateGlobalContext.html +0 -76
  195. package/nodes/locales/de/knxUltimateGlobalContext.json +0 -24
  196. package/nodes/locales/de/knxUltimateHATranslator.html +0 -25
  197. package/nodes/locales/de/knxUltimateHATranslator.json +0 -8
  198. package/nodes/locales/de/knxUltimateHueAreaMotion.html +0 -44
  199. package/nodes/locales/de/knxUltimateHueAreaMotion.json +0 -31
  200. package/nodes/locales/de/knxUltimateHueBattery.html +0 -37
  201. package/nodes/locales/de/knxUltimateHueBattery.json +0 -30
  202. package/nodes/locales/de/knxUltimateHueButton.html +0 -52
  203. package/nodes/locales/de/knxUltimateHueButton.json +0 -34
  204. package/nodes/locales/de/knxUltimateHueCameraMotion.html +0 -38
  205. package/nodes/locales/de/knxUltimateHueCameraMotion.json +0 -30
  206. package/nodes/locales/de/knxUltimateHueContactSensor.html +0 -35
  207. package/nodes/locales/de/knxUltimateHueContactSensor.json +0 -26
  208. package/nodes/locales/de/knxUltimateHueController.html +0 -690
  209. package/nodes/locales/de/knxUltimateHueController.json +0 -64
  210. package/nodes/locales/de/knxUltimateHueHumiditySensor.html +0 -38
  211. package/nodes/locales/de/knxUltimateHueHumiditySensor.json +0 -30
  212. package/nodes/locales/de/knxUltimateHueLight.html +0 -121
  213. package/nodes/locales/de/knxUltimateHueLight.json +0 -94
  214. package/nodes/locales/de/knxUltimateHueLightSensor.html +0 -38
  215. package/nodes/locales/de/knxUltimateHueLightSensor.json +0 -19
  216. package/nodes/locales/de/knxUltimateHueMotion.html +0 -41
  217. package/nodes/locales/de/knxUltimateHueMotion.json +0 -27
  218. package/nodes/locales/de/knxUltimateHuePlug.html +0 -50
  219. package/nodes/locales/de/knxUltimateHuePlug.json +0 -33
  220. package/nodes/locales/de/knxUltimateHueScene.html +0 -45
  221. package/nodes/locales/de/knxUltimateHueScene.json +0 -41
  222. package/nodes/locales/de/knxUltimateHueTapDial.html +0 -40
  223. package/nodes/locales/de/knxUltimateHueTapDial.json +0 -28
  224. package/nodes/locales/de/knxUltimateHueTemperatureSensor.html +0 -38
  225. package/nodes/locales/de/knxUltimateHueTemperatureSensor.json +0 -30
  226. package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.html +0 -39
  227. package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.json +0 -30
  228. package/nodes/locales/de/knxUltimateHuedevice_software_update.html +0 -36
  229. package/nodes/locales/de/knxUltimateHuedevice_software_update.json +0 -30
  230. package/nodes/locales/de/knxUltimateLoadControl.html +0 -69
  231. package/nodes/locales/de/knxUltimateLoadControl.json +0 -28
  232. package/nodes/locales/de/knxUltimateLogger.html +0 -126
  233. package/nodes/locales/de/knxUltimateLogger.json +0 -31
  234. package/nodes/locales/de/knxUltimateMatterBridge.html +0 -65
  235. package/nodes/locales/de/knxUltimateMatterBridge.json +0 -123
  236. package/nodes/locales/de/knxUltimateMatterControllerDevice.html +0 -57
  237. package/nodes/locales/de/knxUltimateMatterControllerDevice.json +0 -146
  238. package/nodes/locales/de/knxUltimateSceneController.html +0 -98
  239. package/nodes/locales/de/knxUltimateSceneController.json +0 -32
  240. package/nodes/locales/de/knxUltimateStaircase.html +0 -77
  241. package/nodes/locales/de/knxUltimateStaircase.json +0 -62
  242. package/nodes/locales/de/knxUltimateWatchDog.html +0 -178
  243. package/nodes/locales/de/knxUltimateWatchDog.json +0 -27
  244. package/nodes/locales/de/matter-config.html +0 -47
  245. package/nodes/locales/de/matter-config.json +0 -47
  246. package/nodes/locales/de/matterbridge-config.html +0 -45
  247. package/nodes/locales/de/matterbridge-config.json +0 -25
  248. package/nodes/locales/en/hue-config.html +0 -31
  249. package/nodes/locales/en/hue-config.json +0 -21
  250. package/nodes/locales/en/knxUltimateAI.html +0 -13
  251. package/nodes/locales/en/knxUltimateAI.json +0 -234
  252. package/nodes/locales/en/knxUltimateAIHomeAssistant.html +0 -11
  253. package/nodes/locales/en/knxUltimateAlerter.html +0 -164
  254. package/nodes/locales/en/knxUltimateAlerter.json +0 -27
  255. package/nodes/locales/en/knxUltimateAutoResponder.html +0 -94
  256. package/nodes/locales/en/knxUltimateAutoResponder.json +0 -8
  257. package/nodes/locales/en/knxUltimateDateTime.html +0 -67
  258. package/nodes/locales/en/knxUltimateDateTime.json +0 -32
  259. package/nodes/locales/en/knxUltimateGarage.html +0 -79
  260. package/nodes/locales/en/knxUltimateGarage.json +0 -51
  261. package/nodes/locales/en/knxUltimateGlobalContext.html +0 -124
  262. package/nodes/locales/en/knxUltimateGlobalContext.json +0 -24
  263. package/nodes/locales/en/knxUltimateHATranslator.html +0 -25
  264. package/nodes/locales/en/knxUltimateHATranslator.json +0 -8
  265. package/nodes/locales/en/knxUltimateHueAreaMotion.html +0 -44
  266. package/nodes/locales/en/knxUltimateHueAreaMotion.json +0 -31
  267. package/nodes/locales/en/knxUltimateHueBattery.html +0 -37
  268. package/nodes/locales/en/knxUltimateHueBattery.json +0 -30
  269. package/nodes/locales/en/knxUltimateHueButton.html +0 -52
  270. package/nodes/locales/en/knxUltimateHueButton.json +0 -34
  271. package/nodes/locales/en/knxUltimateHueCameraMotion.html +0 -38
  272. package/nodes/locales/en/knxUltimateHueCameraMotion.json +0 -30
  273. package/nodes/locales/en/knxUltimateHueContactSensor.html +0 -35
  274. package/nodes/locales/en/knxUltimateHueContactSensor.json +0 -26
  275. package/nodes/locales/en/knxUltimateHueController.html +0 -691
  276. package/nodes/locales/en/knxUltimateHueController.json +0 -64
  277. package/nodes/locales/en/knxUltimateHueHumiditySensor.html +0 -38
  278. package/nodes/locales/en/knxUltimateHueHumiditySensor.json +0 -30
  279. package/nodes/locales/en/knxUltimateHueLight.html +0 -124
  280. package/nodes/locales/en/knxUltimateHueLight.json +0 -94
  281. package/nodes/locales/en/knxUltimateHueLightSensor.html +0 -38
  282. package/nodes/locales/en/knxUltimateHueLightSensor.json +0 -19
  283. package/nodes/locales/en/knxUltimateHueMotion.html +0 -41
  284. package/nodes/locales/en/knxUltimateHueMotion.json +0 -27
  285. package/nodes/locales/en/knxUltimateHuePlug.html +0 -50
  286. package/nodes/locales/en/knxUltimateHuePlug.json +0 -33
  287. package/nodes/locales/en/knxUltimateHueScene.html +0 -45
  288. package/nodes/locales/en/knxUltimateHueScene.json +0 -41
  289. package/nodes/locales/en/knxUltimateHueTapDial.html +0 -40
  290. package/nodes/locales/en/knxUltimateHueTapDial.json +0 -28
  291. package/nodes/locales/en/knxUltimateHueTemperatureSensor.html +0 -38
  292. package/nodes/locales/en/knxUltimateHueTemperatureSensor.json +0 -30
  293. package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.html +0 -39
  294. package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.json +0 -30
  295. package/nodes/locales/en/knxUltimateHuedevice_software_update.html +0 -36
  296. package/nodes/locales/en/knxUltimateHuedevice_software_update.json +0 -30
  297. package/nodes/locales/en/knxUltimateLoadControl.html +0 -76
  298. package/nodes/locales/en/knxUltimateLoadControl.json +0 -28
  299. package/nodes/locales/en/knxUltimateLogger.html +0 -161
  300. package/nodes/locales/en/knxUltimateLogger.json +0 -31
  301. package/nodes/locales/en/knxUltimateMatterBridge.html +0 -65
  302. package/nodes/locales/en/knxUltimateMatterBridge.json +0 -123
  303. package/nodes/locales/en/knxUltimateMatterControllerDevice.html +0 -57
  304. package/nodes/locales/en/knxUltimateMatterControllerDevice.json +0 -146
  305. package/nodes/locales/en/knxUltimateSceneController.html +0 -117
  306. package/nodes/locales/en/knxUltimateSceneController.json +0 -32
  307. package/nodes/locales/en/knxUltimateStaircase.html +0 -77
  308. package/nodes/locales/en/knxUltimateStaircase.json +0 -62
  309. package/nodes/locales/en/knxUltimateWatchDog.html +0 -244
  310. package/nodes/locales/en/knxUltimateWatchDog.json +0 -27
  311. package/nodes/locales/en/matter-config.html +0 -47
  312. package/nodes/locales/en/matter-config.json +0 -48
  313. package/nodes/locales/en/matterbridge-config.html +0 -45
  314. package/nodes/locales/en/matterbridge-config.json +0 -25
  315. package/nodes/locales/es/hue-config.html +0 -31
  316. package/nodes/locales/es/hue-config.json +0 -21
  317. package/nodes/locales/es/knxUltimateAI.html +0 -13
  318. package/nodes/locales/es/knxUltimateAI.json +0 -231
  319. package/nodes/locales/es/knxUltimateAIHomeAssistant.html +0 -11
  320. package/nodes/locales/es/knxUltimateAlerter.html +0 -164
  321. package/nodes/locales/es/knxUltimateAlerter.json +0 -27
  322. package/nodes/locales/es/knxUltimateAutoResponder.html +0 -81
  323. package/nodes/locales/es/knxUltimateAutoResponder.json +0 -8
  324. package/nodes/locales/es/knxUltimateDateTime.html +0 -45
  325. package/nodes/locales/es/knxUltimateDateTime.json +0 -32
  326. package/nodes/locales/es/knxUltimateGarage.html +0 -79
  327. package/nodes/locales/es/knxUltimateGarage.json +0 -51
  328. package/nodes/locales/es/knxUltimateGlobalContext.html +0 -128
  329. package/nodes/locales/es/knxUltimateGlobalContext.json +0 -24
  330. package/nodes/locales/es/knxUltimateHATranslator.html +0 -25
  331. package/nodes/locales/es/knxUltimateHATranslator.json +0 -8
  332. package/nodes/locales/es/knxUltimateHueAreaMotion.html +0 -44
  333. package/nodes/locales/es/knxUltimateHueAreaMotion.json +0 -31
  334. package/nodes/locales/es/knxUltimateHueBattery.html +0 -37
  335. package/nodes/locales/es/knxUltimateHueBattery.json +0 -30
  336. package/nodes/locales/es/knxUltimateHueButton.html +0 -52
  337. package/nodes/locales/es/knxUltimateHueButton.json +0 -34
  338. package/nodes/locales/es/knxUltimateHueCameraMotion.html +0 -38
  339. package/nodes/locales/es/knxUltimateHueCameraMotion.json +0 -30
  340. package/nodes/locales/es/knxUltimateHueContactSensor.html +0 -35
  341. package/nodes/locales/es/knxUltimateHueContactSensor.json +0 -26
  342. package/nodes/locales/es/knxUltimateHueController.html +0 -691
  343. package/nodes/locales/es/knxUltimateHueController.json +0 -64
  344. package/nodes/locales/es/knxUltimateHueHumiditySensor.html +0 -38
  345. package/nodes/locales/es/knxUltimateHueHumiditySensor.json +0 -30
  346. package/nodes/locales/es/knxUltimateHueLight.html +0 -124
  347. package/nodes/locales/es/knxUltimateHueLight.json +0 -94
  348. package/nodes/locales/es/knxUltimateHueLightSensor.html +0 -38
  349. package/nodes/locales/es/knxUltimateHueLightSensor.json +0 -19
  350. package/nodes/locales/es/knxUltimateHueMotion.html +0 -41
  351. package/nodes/locales/es/knxUltimateHueMotion.json +0 -27
  352. package/nodes/locales/es/knxUltimateHuePlug.html +0 -50
  353. package/nodes/locales/es/knxUltimateHuePlug.json +0 -33
  354. package/nodes/locales/es/knxUltimateHueScene.html +0 -45
  355. package/nodes/locales/es/knxUltimateHueScene.json +0 -41
  356. package/nodes/locales/es/knxUltimateHueTapDial.html +0 -40
  357. package/nodes/locales/es/knxUltimateHueTapDial.json +0 -28
  358. package/nodes/locales/es/knxUltimateHueTemperatureSensor.html +0 -38
  359. package/nodes/locales/es/knxUltimateHueTemperatureSensor.json +0 -30
  360. package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.html +0 -39
  361. package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.json +0 -30
  362. package/nodes/locales/es/knxUltimateHuedevice_software_update.html +0 -36
  363. package/nodes/locales/es/knxUltimateHuedevice_software_update.json +0 -30
  364. package/nodes/locales/es/knxUltimateLoadControl.html +0 -76
  365. package/nodes/locales/es/knxUltimateLoadControl.json +0 -28
  366. package/nodes/locales/es/knxUltimateLogger.html +0 -162
  367. package/nodes/locales/es/knxUltimateLogger.json +0 -31
  368. package/nodes/locales/es/knxUltimateMatterBridge.html +0 -65
  369. package/nodes/locales/es/knxUltimateMatterBridge.json +0 -123
  370. package/nodes/locales/es/knxUltimateMatterControllerDevice.html +0 -57
  371. package/nodes/locales/es/knxUltimateMatterControllerDevice.json +0 -146
  372. package/nodes/locales/es/knxUltimateSceneController.html +0 -115
  373. package/nodes/locales/es/knxUltimateSceneController.json +0 -32
  374. package/nodes/locales/es/knxUltimateStaircase.html +0 -77
  375. package/nodes/locales/es/knxUltimateStaircase.json +0 -62
  376. package/nodes/locales/es/knxUltimateWatchDog.html +0 -230
  377. package/nodes/locales/es/knxUltimateWatchDog.json +0 -27
  378. package/nodes/locales/es/matter-config.html +0 -47
  379. package/nodes/locales/es/matter-config.json +0 -47
  380. package/nodes/locales/es/matterbridge-config.html +0 -45
  381. package/nodes/locales/es/matterbridge-config.json +0 -25
  382. package/nodes/locales/fr/hue-config.html +0 -31
  383. package/nodes/locales/fr/hue-config.json +0 -21
  384. package/nodes/locales/fr/knxUltimateAI.html +0 -13
  385. package/nodes/locales/fr/knxUltimateAI.json +0 -231
  386. package/nodes/locales/fr/knxUltimateAIHomeAssistant.html +0 -11
  387. package/nodes/locales/fr/knxUltimateAlerter.html +0 -164
  388. package/nodes/locales/fr/knxUltimateAlerter.json +0 -27
  389. package/nodes/locales/fr/knxUltimateAutoResponder.html +0 -92
  390. package/nodes/locales/fr/knxUltimateAutoResponder.json +0 -8
  391. package/nodes/locales/fr/knxUltimateDateTime.html +0 -45
  392. package/nodes/locales/fr/knxUltimateDateTime.json +0 -32
  393. package/nodes/locales/fr/knxUltimateGarage.html +0 -79
  394. package/nodes/locales/fr/knxUltimateGarage.json +0 -51
  395. package/nodes/locales/fr/knxUltimateGlobalContext.html +0 -122
  396. package/nodes/locales/fr/knxUltimateGlobalContext.json +0 -24
  397. package/nodes/locales/fr/knxUltimateHATranslator.html +0 -25
  398. package/nodes/locales/fr/knxUltimateHATranslator.json +0 -8
  399. package/nodes/locales/fr/knxUltimateHueAreaMotion.html +0 -44
  400. package/nodes/locales/fr/knxUltimateHueAreaMotion.json +0 -31
  401. package/nodes/locales/fr/knxUltimateHueBattery.html +0 -37
  402. package/nodes/locales/fr/knxUltimateHueBattery.json +0 -30
  403. package/nodes/locales/fr/knxUltimateHueButton.html +0 -52
  404. package/nodes/locales/fr/knxUltimateHueButton.json +0 -34
  405. package/nodes/locales/fr/knxUltimateHueCameraMotion.html +0 -38
  406. package/nodes/locales/fr/knxUltimateHueCameraMotion.json +0 -30
  407. package/nodes/locales/fr/knxUltimateHueContactSensor.html +0 -35
  408. package/nodes/locales/fr/knxUltimateHueContactSensor.json +0 -26
  409. package/nodes/locales/fr/knxUltimateHueController.html +0 -691
  410. package/nodes/locales/fr/knxUltimateHueController.json +0 -64
  411. package/nodes/locales/fr/knxUltimateHueHumiditySensor.html +0 -38
  412. package/nodes/locales/fr/knxUltimateHueHumiditySensor.json +0 -30
  413. package/nodes/locales/fr/knxUltimateHueLight.html +0 -124
  414. package/nodes/locales/fr/knxUltimateHueLight.json +0 -86
  415. package/nodes/locales/fr/knxUltimateHueLightSensor.html +0 -38
  416. package/nodes/locales/fr/knxUltimateHueLightSensor.json +0 -19
  417. package/nodes/locales/fr/knxUltimateHueMotion.html +0 -41
  418. package/nodes/locales/fr/knxUltimateHueMotion.json +0 -27
  419. package/nodes/locales/fr/knxUltimateHuePlug.html +0 -50
  420. package/nodes/locales/fr/knxUltimateHuePlug.json +0 -33
  421. package/nodes/locales/fr/knxUltimateHueScene.html +0 -45
  422. package/nodes/locales/fr/knxUltimateHueScene.json +0 -41
  423. package/nodes/locales/fr/knxUltimateHueTapDial.html +0 -40
  424. package/nodes/locales/fr/knxUltimateHueTapDial.json +0 -28
  425. package/nodes/locales/fr/knxUltimateHueTemperatureSensor.html +0 -38
  426. package/nodes/locales/fr/knxUltimateHueTemperatureSensor.json +0 -30
  427. package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.html +0 -39
  428. package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.json +0 -30
  429. package/nodes/locales/fr/knxUltimateHuedevice_software_update.html +0 -36
  430. package/nodes/locales/fr/knxUltimateHuedevice_software_update.json +0 -30
  431. package/nodes/locales/fr/knxUltimateLoadControl.html +0 -76
  432. package/nodes/locales/fr/knxUltimateLoadControl.json +0 -28
  433. package/nodes/locales/fr/knxUltimateLogger.html +0 -160
  434. package/nodes/locales/fr/knxUltimateLogger.json +0 -31
  435. package/nodes/locales/fr/knxUltimateMatterBridge.html +0 -65
  436. package/nodes/locales/fr/knxUltimateMatterBridge.json +0 -123
  437. package/nodes/locales/fr/knxUltimateMatterControllerDevice.html +0 -57
  438. package/nodes/locales/fr/knxUltimateMatterControllerDevice.json +0 -146
  439. package/nodes/locales/fr/knxUltimateSceneController.html +0 -117
  440. package/nodes/locales/fr/knxUltimateSceneController.json +0 -32
  441. package/nodes/locales/fr/knxUltimateStaircase.html +0 -77
  442. package/nodes/locales/fr/knxUltimateStaircase.json +0 -62
  443. package/nodes/locales/fr/knxUltimateWatchDog.html +0 -228
  444. package/nodes/locales/fr/knxUltimateWatchDog.json +0 -27
  445. package/nodes/locales/fr/matter-config.html +0 -47
  446. package/nodes/locales/fr/matter-config.json +0 -47
  447. package/nodes/locales/fr/matterbridge-config.html +0 -45
  448. package/nodes/locales/fr/matterbridge-config.json +0 -25
  449. package/nodes/locales/it/hue-config.html +0 -33
  450. package/nodes/locales/it/hue-config.json +0 -21
  451. package/nodes/locales/it/knxUltimateAI.html +0 -13
  452. package/nodes/locales/it/knxUltimateAI.json +0 -234
  453. package/nodes/locales/it/knxUltimateAIHomeAssistant.html +0 -11
  454. package/nodes/locales/it/knxUltimateAlerter.html +0 -159
  455. package/nodes/locales/it/knxUltimateAlerter.json +0 -27
  456. package/nodes/locales/it/knxUltimateAutoResponder.html +0 -96
  457. package/nodes/locales/it/knxUltimateAutoResponder.json +0 -8
  458. package/nodes/locales/it/knxUltimateDateTime.html +0 -67
  459. package/nodes/locales/it/knxUltimateDateTime.json +0 -32
  460. package/nodes/locales/it/knxUltimateGarage.html +0 -79
  461. package/nodes/locales/it/knxUltimateGarage.json +0 -51
  462. package/nodes/locales/it/knxUltimateGlobalContext.html +0 -81
  463. package/nodes/locales/it/knxUltimateGlobalContext.json +0 -24
  464. package/nodes/locales/it/knxUltimateHATranslator.html +0 -24
  465. package/nodes/locales/it/knxUltimateHATranslator.json +0 -8
  466. package/nodes/locales/it/knxUltimateHueAreaMotion.html +0 -44
  467. package/nodes/locales/it/knxUltimateHueAreaMotion.json +0 -31
  468. package/nodes/locales/it/knxUltimateHueBattery.html +0 -37
  469. package/nodes/locales/it/knxUltimateHueBattery.json +0 -30
  470. package/nodes/locales/it/knxUltimateHueButton.html +0 -52
  471. package/nodes/locales/it/knxUltimateHueButton.json +0 -34
  472. package/nodes/locales/it/knxUltimateHueCameraMotion.html +0 -38
  473. package/nodes/locales/it/knxUltimateHueCameraMotion.json +0 -30
  474. package/nodes/locales/it/knxUltimateHueContactSensor.html +0 -35
  475. package/nodes/locales/it/knxUltimateHueContactSensor.json +0 -26
  476. package/nodes/locales/it/knxUltimateHueController.html +0 -690
  477. package/nodes/locales/it/knxUltimateHueController.json +0 -64
  478. package/nodes/locales/it/knxUltimateHueHumiditySensor 2.html +0 -11
  479. package/nodes/locales/it/knxUltimateHueHumiditySensor.html +0 -38
  480. package/nodes/locales/it/knxUltimateHueHumiditySensor.json +0 -30
  481. package/nodes/locales/it/knxUltimateHueLight.html +0 -124
  482. package/nodes/locales/it/knxUltimateHueLight.json +0 -94
  483. package/nodes/locales/it/knxUltimateHueLightSensor.html +0 -38
  484. package/nodes/locales/it/knxUltimateHueLightSensor.json +0 -19
  485. package/nodes/locales/it/knxUltimateHueMotion.html +0 -41
  486. package/nodes/locales/it/knxUltimateHueMotion.json +0 -27
  487. package/nodes/locales/it/knxUltimateHuePlug.html +0 -50
  488. package/nodes/locales/it/knxUltimateHuePlug.json +0 -33
  489. package/nodes/locales/it/knxUltimateHueScene.html +0 -45
  490. package/nodes/locales/it/knxUltimateHueScene.json +0 -41
  491. package/nodes/locales/it/knxUltimateHueTapDial.html +0 -40
  492. package/nodes/locales/it/knxUltimateHueTapDial.json +0 -28
  493. package/nodes/locales/it/knxUltimateHueTemperatureSensor.html +0 -38
  494. package/nodes/locales/it/knxUltimateHueTemperatureSensor.json +0 -30
  495. package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.html +0 -39
  496. package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.json +0 -30
  497. package/nodes/locales/it/knxUltimateHuedevice_software_update.html +0 -35
  498. package/nodes/locales/it/knxUltimateHuedevice_software_update.json +0 -30
  499. package/nodes/locales/it/knxUltimateLoadControl.html +0 -76
  500. package/nodes/locales/it/knxUltimateLoadControl.json +0 -28
  501. package/nodes/locales/it/knxUltimateLogger.html +0 -132
  502. package/nodes/locales/it/knxUltimateLogger.json +0 -31
  503. package/nodes/locales/it/knxUltimateMatterBridge.html +0 -65
  504. package/nodes/locales/it/knxUltimateMatterBridge.json +0 -123
  505. package/nodes/locales/it/knxUltimateMatterControllerDevice.html +0 -57
  506. package/nodes/locales/it/knxUltimateMatterControllerDevice.json +0 -146
  507. package/nodes/locales/it/knxUltimateSceneController.html +0 -101
  508. package/nodes/locales/it/knxUltimateSceneController.json +0 -32
  509. package/nodes/locales/it/knxUltimateStaircase.html +0 -77
  510. package/nodes/locales/it/knxUltimateStaircase.json +0 -62
  511. package/nodes/locales/it/knxUltimateWatchDog.html +0 -194
  512. package/nodes/locales/it/knxUltimateWatchDog.json +0 -27
  513. package/nodes/locales/it/matter-config.html +0 -47
  514. package/nodes/locales/it/matter-config.json +0 -48
  515. package/nodes/locales/it/matterbridge-config.html +0 -45
  516. package/nodes/locales/it/matterbridge-config.json +0 -25
  517. package/nodes/locales/zh-CN/hue-config.html +0 -33
  518. package/nodes/locales/zh-CN/hue-config.json +0 -21
  519. package/nodes/locales/zh-CN/knxUltimateAI.html +0 -13
  520. package/nodes/locales/zh-CN/knxUltimateAI.json +0 -231
  521. package/nodes/locales/zh-CN/knxUltimateAIHomeAssistant.html +0 -11
  522. package/nodes/locales/zh-CN/knxUltimateAlerter.html +0 -159
  523. package/nodes/locales/zh-CN/knxUltimateAlerter.json +0 -27
  524. package/nodes/locales/zh-CN/knxUltimateAutoResponder.html +0 -94
  525. package/nodes/locales/zh-CN/knxUltimateAutoResponder.json +0 -8
  526. package/nodes/locales/zh-CN/knxUltimateDateTime.html +0 -45
  527. package/nodes/locales/zh-CN/knxUltimateDateTime.json +0 -32
  528. package/nodes/locales/zh-CN/knxUltimateGarage.html +0 -79
  529. package/nodes/locales/zh-CN/knxUltimateGarage.json +0 -51
  530. package/nodes/locales/zh-CN/knxUltimateGlobalContext.html +0 -77
  531. package/nodes/locales/zh-CN/knxUltimateGlobalContext.json +0 -24
  532. package/nodes/locales/zh-CN/knxUltimateHATranslator.html +0 -25
  533. package/nodes/locales/zh-CN/knxUltimateHATranslator.json +0 -8
  534. package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.html +0 -44
  535. package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.json +0 -31
  536. package/nodes/locales/zh-CN/knxUltimateHueBattery.html +0 -37
  537. package/nodes/locales/zh-CN/knxUltimateHueBattery.json +0 -30
  538. package/nodes/locales/zh-CN/knxUltimateHueButton.html +0 -52
  539. package/nodes/locales/zh-CN/knxUltimateHueButton.json +0 -34
  540. package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.html +0 -38
  541. package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.json +0 -30
  542. package/nodes/locales/zh-CN/knxUltimateHueContactSensor.html +0 -35
  543. package/nodes/locales/zh-CN/knxUltimateHueContactSensor.json +0 -26
  544. package/nodes/locales/zh-CN/knxUltimateHueController.html +0 -693
  545. package/nodes/locales/zh-CN/knxUltimateHueController.json +0 -64
  546. package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.html +0 -38
  547. package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.json +0 -30
  548. package/nodes/locales/zh-CN/knxUltimateHueLight.html +0 -126
  549. package/nodes/locales/zh-CN/knxUltimateHueLight.json +0 -86
  550. package/nodes/locales/zh-CN/knxUltimateHueLightSensor.html +0 -38
  551. package/nodes/locales/zh-CN/knxUltimateHueLightSensor.json +0 -9
  552. package/nodes/locales/zh-CN/knxUltimateHueMotion.html +0 -41
  553. package/nodes/locales/zh-CN/knxUltimateHueMotion.json +0 -27
  554. package/nodes/locales/zh-CN/knxUltimateHuePlug.html +0 -50
  555. package/nodes/locales/zh-CN/knxUltimateHuePlug.json +0 -33
  556. package/nodes/locales/zh-CN/knxUltimateHueScene.html +0 -45
  557. package/nodes/locales/zh-CN/knxUltimateHueScene.json +0 -41
  558. package/nodes/locales/zh-CN/knxUltimateHueTapDial.html +0 -40
  559. package/nodes/locales/zh-CN/knxUltimateHueTapDial.json +0 -28
  560. package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.html +0 -38
  561. package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.json +0 -30
  562. package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.html +0 -39
  563. package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.json +0 -30
  564. package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.html +0 -36
  565. package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.json +0 -30
  566. package/nodes/locales/zh-CN/knxUltimateLoadControl.html +0 -76
  567. package/nodes/locales/zh-CN/knxUltimateLoadControl.json +0 -28
  568. package/nodes/locales/zh-CN/knxUltimateLogger.html +0 -126
  569. package/nodes/locales/zh-CN/knxUltimateLogger.json +0 -31
  570. package/nodes/locales/zh-CN/knxUltimateMatterBridge.html +0 -65
  571. package/nodes/locales/zh-CN/knxUltimateMatterBridge.json +0 -123
  572. package/nodes/locales/zh-CN/knxUltimateMatterControllerDevice.html +0 -57
  573. package/nodes/locales/zh-CN/knxUltimateMatterControllerDevice.json +0 -146
  574. package/nodes/locales/zh-CN/knxUltimateSceneController.html +0 -98
  575. package/nodes/locales/zh-CN/knxUltimateSceneController.json +0 -32
  576. package/nodes/locales/zh-CN/knxUltimateStaircase.html +0 -77
  577. package/nodes/locales/zh-CN/knxUltimateStaircase.json +0 -62
  578. package/nodes/locales/zh-CN/knxUltimateWatchDog.html +0 -178
  579. package/nodes/locales/zh-CN/knxUltimateWatchDog.json +0 -27
  580. package/nodes/locales/zh-CN/matter-config.html +0 -47
  581. package/nodes/locales/zh-CN/matter-config.json +0 -47
  582. package/nodes/locales/zh-CN/matterbridge-config.html +0 -45
  583. package/nodes/locales/zh-CN/matterbridge-config.json +0 -25
  584. package/nodes/matter-config.html +0 -578
  585. package/nodes/matter-config.js +0 -387
  586. package/nodes/matterbridge-config.html +0 -198
  587. package/nodes/matterbridge-config.js +0 -261
  588. package/nodes/plugins/knxUltimate-cerebrum-runtime-plugin.js +0 -79
  589. package/nodes/plugins/knxUltimate-migration-notice-plugin.html +0 -44
  590. package/nodes/plugins/knxUltimateAI-vue/assets/app.css +0 -1
  591. package/nodes/plugins/knxUltimateAI-vue/assets/app.js +0 -13
  592. package/nodes/plugins/knxUltimateAI-vue/assets/chunk-html2canvas.esm.js +0 -5
  593. package/nodes/plugins/knxUltimateAI-vue/assets/chunk-index.es.js +0 -5
  594. package/nodes/plugins/knxUltimateAI-vue/assets/chunk-jspdf.es.min.js +0 -79
  595. package/nodes/plugins/knxUltimateAI-vue/assets/chunk-purify.es.js +0 -3
  596. package/nodes/plugins/knxUltimateAI-vue/index.html +0 -13
  597. package/nodes/utils/HueEventStream.mjs +0 -176
  598. package/nodes/utils/colorManipulators/XYFromRGB_Supergiovane.js +0 -113
  599. package/nodes/utils/colorManipulators/hueColorConverter.js +0 -521
  600. package/nodes/utils/http.js +0 -291
  601. package/nodes/utils/hueControllerProfileAdapter.js +0 -104
  602. package/nodes/utils/hueControllerProfiles/runtime/area_motion.js +0 -221
  603. package/nodes/utils/hueControllerProfiles/runtime/button.js +0 -295
  604. package/nodes/utils/hueControllerProfiles/runtime/camera_motion.js +0 -221
  605. package/nodes/utils/hueControllerProfiles/runtime/contact.js +0 -191
  606. package/nodes/utils/hueControllerProfiles/runtime/device_power.js +0 -185
  607. package/nodes/utils/hueControllerProfiles/runtime/device_software_update.js +0 -185
  608. package/nodes/utils/hueControllerProfiles/runtime/humidity.js +0 -204
  609. package/nodes/utils/hueControllerProfiles/runtime/light.js +0 -1585
  610. package/nodes/utils/hueControllerProfiles/runtime/light_level.js +0 -180
  611. package/nodes/utils/hueControllerProfiles/runtime/motion.js +0 -185
  612. package/nodes/utils/hueControllerProfiles/runtime/plug.js +0 -344
  613. package/nodes/utils/hueControllerProfiles/runtime/relative_rotary.js +0 -271
  614. package/nodes/utils/hueControllerProfiles/runtime/scene.js +0 -352
  615. package/nodes/utils/hueControllerProfiles/runtime/temperature.js +0 -187
  616. package/nodes/utils/hueControllerProfiles/runtime/zigbee_connectivity.js +0 -185
  617. package/nodes/utils/hueControllerResourceCatalog.js +0 -71
  618. package/nodes/utils/hueEngine.mjs +0 -469
  619. package/nodes/utils/knxAiCamera.js +0 -302
  620. package/nodes/utils/knxAiCatalogRetrieval.js +0 -349
  621. package/nodes/utils/knxAiCerebrum.js +0 -406
  622. package/nodes/utils/knxAiChatContext.js +0 -496
  623. package/nodes/utils/knxAiEventHistory.js +0 -521
  624. package/nodes/utils/knxAiHomeMemory.js +0 -1021
  625. package/nodes/utils/knxAiScheduler.js +0 -445
  626. package/nodes/utils/knxAiSemanticContext.js +0 -662
  627. package/nodes/utils/knxAiTelegramVoice.js +0 -545
  628. package/nodes/utils/knxAiWebAccess.js +0 -631
  629. package/nodes/utils/lightEngines/canonicalLight.js +0 -75
  630. package/nodes/utils/lightEngines/hueLightEngine.js +0 -51
  631. package/nodes/utils/lightEngines/index.js +0 -25
  632. package/nodes/utils/lightEngines/knxLightCommand.js +0 -79
  633. package/nodes/utils/lightEngines/lightEngine.js +0 -46
  634. package/nodes/utils/lightEngines/matterHueShim.js +0 -59
  635. package/nodes/utils/lightEngines/matterLightEngine.js +0 -117
  636. package/nodes/utils/matterBridgeDeviceFactory.mjs +0 -780
  637. package/nodes/utils/matterBridgeEngine.mjs +0 -297
  638. package/nodes/utils/matterControllerCommandGate.js +0 -47
  639. package/nodes/utils/matterControllerProfiles/doorLock.js +0 -258
  640. package/nodes/utils/matterControllerProfiles/fan.js +0 -19
  641. package/nodes/utils/matterControllerProfiles/index.js +0 -34
  642. package/nodes/utils/matterControllerProfiles/mappedEndpoint.js +0 -217
  643. package/nodes/utils/matterControllerProfiles/switch.js +0 -13
  644. package/nodes/utils/matterControllerProfiles/thermostat.js +0 -19
  645. package/nodes/utils/matterControllerProfiles/universal.js +0 -462
  646. package/nodes/utils/matterControllerProfiles/windowCovering.js +0 -19
  647. package/nodes/utils/matterControllerSemanticInput.js +0 -212
  648. package/nodes/utils/matterEngine.mjs +0 -894
  649. package/nodes/utils/matterEnvironmentLock.mjs +0 -32
  650. package/nodes/utils/matterKnxConverter.js +0 -204
  651. package/nodes/utils/matterStorageBackup.js +0 -100
  652. package/resources/HA-icon.png +0 -0
  653. package/resources/dim.png +0 -0
  654. package/resources/rgb.png +0 -0
  655. package/resources/tunablewhite.png +0 -0
  656. package/resources/zxing-browser-0.2.0.min.js +0 -1
  657. package/resources/zxing-browser-LICENSE.txt +0 -21
@@ -1,2516 +0,0 @@
1
- 'use strict'
2
-
3
- <script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
4
-
5
- <script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/htmlUtils.js"></script>
6
-
7
- <script type="text/javascript">
8
- (function () {
9
-
10
- RED.nodes.registerType("knxUltimateHueLight", {
11
- category: "deprecated",
12
- color: "#E7E9F6",
13
- defaults: {
14
- //buttonState: {value: true},
15
- server: { type: "knxUltimate-config", required: false },
16
- serverHue: { type: "hue-config", required: true },
17
- name: { value: "" },
18
-
19
- nameLightSwitch: { value: "" },
20
- GALightSwitch: { value: "" },
21
- dptLightSwitch: { value: "" },
22
-
23
- nameLightState: { value: "" },
24
- GALightState: { value: "" },
25
- dptLightState: { value: "" },
26
-
27
- nameLightDIM: { value: "" },
28
- GALightDIM: { value: "" },
29
- dptLightDIM: { value: "" },
30
-
31
- // TAB Color ---------------------------
32
- nameLightColor: { value: "" },
33
- GALightColor: { value: "" },
34
- dptLightColor: { value: "" },
35
-
36
- nameLightColorState: { value: "" },
37
- GALightColorState: { value: "" },
38
- dptLightColorState: { value: "" },
39
-
40
- // HSV H hue Color change
41
- nameLightHSV_H_DIM: { value: "" },
42
- GALightHSV_H_DIM: { value: "" },
43
- dptLightHSV_H_DIM: { value: "" },
44
-
45
- nameLightHSV_H_State: { value: "" },
46
- GALightHSV_H_State: { value: "" },
47
- dptLightHSV_H_State: { value: "" },
48
-
49
- // HSV S saturation change
50
- nameLightHSV_S_DIM: { value: "" },
51
- GALightHSV_S_DIM: { value: "" },
52
- dptLightHSV_S_DIM: { value: "" },
53
-
54
- nameLightHSV_S_State: { value: "" },
55
- GALightHSV_S_State: { value: "" },
56
- dptLightHSV_S_State: { value: "" },
57
- // -------------------------------------
58
-
59
- nameLightKelvinDIM: { value: "" },
60
- GALightKelvinDIM: { value: "" },
61
- dptLightKelvinDIM: { value: "" },
62
-
63
- nameLightKelvinPercentage: { value: "" },
64
- GALightKelvinPercentage: { value: "" },
65
- dptLightKelvinPercentage: { value: "" },
66
-
67
- nameLightKelvinPercentageState: { value: "" },
68
- GALightKelvinPercentageState: { value: "" },
69
- dptLightKelvinPercentageState: { value: "" },
70
-
71
- nameLightKelvin: { value: "" },
72
- GALightKelvin: { value: "" },
73
- dptLightKelvin: { value: "" },
74
-
75
- nameLightKelvinState: { value: "" },
76
- GALightKelvinState: { value: "" },
77
- dptLightKelvinState: { value: "" },
78
-
79
- nameLightBrightness: { value: "" },
80
- GALightBrightness: { value: "" },
81
- dptLightBrightness: { value: "" },
82
-
83
- nameLightBrightnessState: { value: "" },
84
- GALightBrightnessState: { value: "" },
85
- dptLightBrightnessState: { value: "" },
86
-
87
- nameLightBlink: { value: "" },
88
- GALightBlink: { value: "" },
89
- dptLightBlink: { value: "" },
90
-
91
- nameLightColorCycle: { value: "" },
92
- GALightColorCycle: { value: "" },
93
- dptLightColorCycle: { value: "" },
94
-
95
- nameLightEffect: { value: "" },
96
- GALightEffect: { value: "" },
97
- dptLightEffect: { value: "" },
98
-
99
- nameLightEffectStatus: { value: "" },
100
- GALightEffectStatus: { value: "" },
101
- dptLightEffectStatus: { value: "" },
102
-
103
- effectRules: { value: '[]' },
104
-
105
- nameDaylightSensor: { value: "" },
106
- GADaylightSensor: { value: "" },
107
- dptDaylightSensor: { value: "" },
108
-
109
- specifySwitchOnBrightness: { value: "temperature" },
110
- colorAtSwitchOnDayTime: { value: '{"kelvin":3000, "brightness":100 }' },
111
-
112
- enableDayNightLighting: { value: "no" },
113
- colorAtSwitchOnNightTime: { value: '{ "kelvin":2700, "brightness":20 }' },
114
-
115
- invertDayNight: { value: false },
116
- invertDimTunableWhiteDirection: { value: false },
117
-
118
- updateKNXBrightnessStatusOnHUEOnOff: { value: "no" },
119
- dimSpeed: { value: 5000, required: false },
120
- HSVDimSpeed: { value: 5000, required: false },
121
- minDimLevelLight: { value: 10, required: false },
122
- maxDimLevelLight: { value: 100, required: false },
123
- readStatusAtStartup: { value: "yes" },
124
- enableNodePINS: { value: "no" },
125
-
126
- outputs: { value: 0 },
127
- inputs: { value: 0 },
128
-
129
- hueDevice: { value: "" },
130
- hueDeviceObject: { value: {} },
131
-
132
- restoreDayMode: { value: "no" }, // Starting from v 4.1.31
133
- updateLocalStateFromKNXWrite: { value: true } // Starting from v 4.1.31
134
- },
135
- inputs: 0,
136
- outputs: 0,
137
- icon: "node-hue-icon.svg",
138
- label: function () {
139
- return `${this.name || "Hue Light/Outlet"} (deprecated)`;
140
- },
141
- paletteLabel: "Hue Light/Outlet (deprecated)",
142
- oneditprepare: function () {
143
- // Go to the help panel
144
- try {
145
- RED.sidebar.show("help");
146
- } catch (error) { }
147
-
148
-
149
- var node = this; // Starting from v 4.1.31
150
- $("#node-input-updateLocalStateFromKNXWrite").prop("checked", node.updateLocalStateFromKNXWrite === true || node.updateLocalStateFromKNXWrite === "true"); // Starting from v 4.1.31
151
- const ensureConfigSelection = (selector) => {
152
- if ($(selector).val() !== "_ADD_") return;
153
- try {
154
- $(selector).prop("selectedIndex", 0);
155
- } catch (error) {
156
- // Ignore UI quirks for legacy Node-RED versions
157
- }
158
- };
159
- ["#node-input-serverHue"].forEach(ensureConfigSelection);
160
-
161
- function ensureVerticalTabsStyle() {
162
- if ($('#knxUltimateHueLightVerticalTabs').length) return;
163
- const style = `
164
- <style id="knxUltimateHueLightVerticalTabs">
165
- .hue-vertical-tabs.ui-tabs.ui-widget.ui-widget-content.ui-corner-all {
166
- display: flex;
167
- border: none;
168
- padding: 0;
169
- }
170
- .hue-vertical-tabs > ul.ui-tabs-nav {
171
- flex: 0 0 180px;
172
- border-right: 1px solid #ccc;
173
- border-left: none;
174
- border-top: none;
175
- border-bottom: none;
176
- padding: 0.5em 0.3em;
177
- }
178
- .hue-vertical-tabs > ul.ui-tabs-nav li {
179
- float: none;
180
- width: 100%;
181
- margin: 0 0 2px 0;
182
- }
183
- .hue-vertical-tabs > ul.ui-tabs-nav li a {
184
- display: block;
185
- width: 100%;
186
- white-space: normal;
187
- position: relative;
188
- border-bottom: none !important;
189
- }
190
- .hue-vertical-tabs > ul.ui-tabs-nav li.ui-tabs-active {
191
- border-bottom: none !important;
192
- }
193
- .hue-vertical-tabs > ul.ui-tabs-nav li.ui-tabs-active a::after {
194
- content: "";
195
- position: absolute;
196
- left: 0;
197
- bottom: 0;
198
- width: 50%;
199
- height: 3px;
200
- background: currentColor;
201
- }
202
- .hue-vertical-tabs .ui-tabs-panel {
203
- flex: 1;
204
- padding: 0.8em 1em;
205
- box-sizing: border-box;
206
- border: none;
207
- background: transparent;
208
- }
209
- .hue-vertical-tabs .form-row > dt {
210
- flex: 1 1 auto;
211
- margin: 0;
212
- }
213
- .hue-vertical-tabs hr {
214
- width: 100%;
215
- border: 0;
216
- border-top: 1px solid #ccc;
217
- margin: 8px 0;
218
- }
219
- </style>`;
220
- $('head').append(style);
221
- }
222
-
223
- function onEditPrepare() {
224
- ensureVerticalTabsStyle();
225
- const $knxServerInput = $("#node-input-server");
226
- const KNX_EMPTY_VALUES = new Set(['', 'none', '_ADD_', '__NONE__']);
227
- const $hueServerInput = $("#node-input-serverHue");
228
- const $hueDeviceInput = $("#node-input-hueDevice");
229
- const $deviceNameInput = $("#node-input-name");
230
- const $refreshDevicesButton = $(".hue-refresh-devices");
231
- const $locateDeviceButton = $(".hue-locate-device");
232
- const $hueDevicesLoading = $(".hue-devices-loading");
233
- let cachedHueDevices = Array.isArray(node._cachedHueLightDevices) ? node._cachedHueLightDevices : [];
234
- node._cachedHueLightDevices = cachedHueDevices;
235
- const defaultHueDevicePlaceholder = $deviceNameInput.attr('placeholder') || '';
236
- let showingNoHueDevicesPlaceholder = false;
237
- const HUE_EMPTY_SERVER_VALUES = new Set(['', 'none', '_add_', '__none__', '__null__', 'null', 'undefined']);
238
- let locateSessionActive = false;
239
- let locateAutoResetTimer = null;
240
- let locatePendingRequest = null;
241
- node.__stopHueLocateSession = null;
242
- node.__cleanupNodeRemovalListener = null;
243
- if (!node.__locateSessionInfo) node.__locateSessionInfo = null;
244
- node.__hueLocateActive = false;
245
-
246
- const clearLocateAutoReset = () => {
247
- if (locateAutoResetTimer !== null) {
248
- clearTimeout(locateAutoResetTimer);
249
- locateAutoResetTimer = null;
250
- }
251
- };
252
-
253
- const scheduleLocateAutoReset = (durationMs) => {
254
- clearLocateAutoReset();
255
- const ms = Number(durationMs);
256
- if (!Number.isFinite(ms) || ms <= 0) return;
257
- locateAutoResetTimer = setTimeout(() => {
258
- updateLocateButtonState(false);
259
- }, ms);
260
- };
261
-
262
- const updateLocateButtonState = (isActive) => {
263
- locateSessionActive = !!isActive;
264
- node.__hueLocateActive = locateSessionActive;
265
- if (!locateSessionActive) {
266
- clearLocateAutoReset();
267
- node.__locateSessionInfo = null;
268
- }
269
- if (!$locateDeviceButton.length) return;
270
- const $icon = $locateDeviceButton.find('i').first();
271
- if ($icon.length) {
272
- $icon.removeClass('fa-stop fa-play').addClass(locateSessionActive ? 'fa fa-stop' : 'fa fa-play');
273
- }
274
- const title = locateSessionActive
275
- ? (node._('knxUltimateHueLight.locate_stop_title') || 'Stop Hue locate')
276
- : (node._('knxUltimateHueLight.locate_start_title') || 'Locate selected Hue device');
277
- $locateDeviceButton.attr('title', title);
278
- };
279
-
280
- const removeNodeRemovalListener = () => {
281
- if (typeof node.__cleanupNodeRemovalListener === 'function') {
282
- try {
283
- RED.events.removeListener('nodes:remove', node.__cleanupNodeRemovalListener);
284
- } catch (error) { /* empty */ }
285
- node.__cleanupNodeRemovalListener = null;
286
- }
287
- };
288
-
289
- const collectRemovedIds = (input, bucket = new Set()) => {
290
- if (!input) return bucket;
291
- if (Array.isArray(input)) {
292
- input.forEach((entry) => collectRemovedIds(entry, bucket));
293
- return bucket;
294
- }
295
- if (typeof input === 'string') {
296
- bucket.add(input);
297
- return bucket;
298
- }
299
- if (typeof input === 'object') {
300
- if (input.id) bucket.add(input.id);
301
- if (input.nodes) collectRemovedIds(input.nodes, bucket);
302
- }
303
- return bucket;
304
- };
305
-
306
- const handleNodeRemoved = (payload) => {
307
- const ids = collectRemovedIds(payload);
308
- if (ids.has(node.id) && typeof node.__stopHueLocateSession === 'function') {
309
- node.__stopHueLocateSession();
310
- removeNodeRemovalListener();
311
- }
312
- };
313
- RED.events.on('nodes:remove', handleNodeRemoved);
314
- node.__cleanupNodeRemovalListener = handleNodeRemoved;
315
-
316
- const buildLocateContext = ({ allowStored = false } = {}) => {
317
- const hueServerId = resolveHueServerValue({ allowStored });
318
- const rawDevice = getHueDeviceValue({ allowStored });
319
- if (!hueServerId || !rawDevice) return null;
320
- const parts = String(rawDevice).split('#');
321
- const deviceId = (parts[0] || '').trim();
322
- if (deviceId === '') return null;
323
- const deviceType = (parts[1] || 'light').trim() || 'light';
324
- return { serverId: hueServerId, deviceId, deviceType };
325
- };
326
-
327
- const performLocateRequest = ({ silent = false, allowStoredContext = false, action } = {}) => {
328
- const context = buildLocateContext({ allowStored: allowStoredContext });
329
- if (!context) {
330
- if (!silent) {
331
- const message = !resolveHueServerValue({ allowStored: true })
332
- ? (node._('knxUltimateHueLight.locate_no_bridge') || 'Select a Hue bridge first')
333
- : (node._('knxUltimateHueLight.locate_no_device') || 'Select a Hue device first');
334
- RED.notify(message, 'warning');
335
- }
336
- updateLocateButtonState(false);
337
- return null;
338
- }
339
- if ($locateDeviceButton.length) {
340
- $locateDeviceButton.prop('disabled', true);
341
- }
342
- const effectiveAction = action || (locateSessionActive ? 'stop' : 'start');
343
- const request = $.ajax({
344
- type: 'POST',
345
- url: 'KNXUltimateLocateHueDevice',
346
- data: {
347
- serverId: context.serverId,
348
- deviceId: context.deviceId,
349
- deviceType: context.deviceType,
350
- action: effectiveAction
351
- }
352
- });
353
- locatePendingRequest = request;
354
- if (!allowStoredContext && effectiveAction === 'start') {
355
- node.__locateSessionInfo = {
356
- serverId: context.serverId,
357
- deviceId: context.deviceId,
358
- deviceType: context.deviceType
359
- };
360
- } else if (!node.__locateSessionInfo && effectiveAction !== 'stop') {
361
- node.__locateSessionInfo = {
362
- serverId: context.serverId,
363
- deviceId: context.deviceId,
364
- deviceType: context.deviceType
365
- };
366
- }
367
- request.done((response) => {
368
- const statusValue = (response && typeof response.status === 'string') ? response.status.toLowerCase() : 'started';
369
- let messageKey;
370
- if (effectiveAction === 'stop' || statusValue === 'stopped') {
371
- messageKey = 'knxUltimateHueLight.locate_stopped';
372
- node.__locateSessionInfo = null;
373
- updateLocateButtonState(false);
374
- clearLocateAutoReset();
375
- } else if (effectiveAction === 'start' || statusValue === 'started') {
376
- messageKey = 'knxUltimateHueLight.locate_started';
377
- node.__locateSessionInfo = {
378
- serverId: context.serverId,
379
- deviceId: context.deviceId,
380
- deviceType: context.deviceType
381
- };
382
- updateLocateButtonState(true);
383
- scheduleLocateAutoReset(response && typeof response.expiresInMs === 'number' ? response.expiresInMs : 600000);
384
- } else {
385
- messageKey = 'knxUltimateHueLight.locate_success';
386
- node.__locateSessionInfo = null;
387
- updateLocateButtonState(false);
388
- clearLocateAutoReset();
389
- }
390
- if (!silent) {
391
- const message = node._(messageKey) || (statusValue === 'stopped' ? 'Locate stopped' : 'Locate command sent');
392
- RED.notify(message, 'success');
393
- }
394
- }).fail((xhr) => {
395
- let message;
396
- if (xhr && xhr.responseJSON && xhr.responseJSON.error) {
397
- message = xhr.responseJSON.error;
398
- }
399
- updateLocateButtonState(false);
400
- clearLocateAutoReset();
401
- if (!silent) {
402
- RED.notify(message || (node._('knxUltimateHueLight.locate_error') || 'Unable to locate Hue device'), 'error');
403
- }
404
- }).always(() => {
405
- locatePendingRequest = null;
406
- if ($locateDeviceButton.length) {
407
- $locateDeviceButton.prop('disabled', false);
408
- }
409
- });
410
- return request;
411
- };
412
-
413
- const resolveKnxServerValue = () => {
414
- const domValue = $knxServerInput.val();
415
- if (domValue !== undefined && domValue !== null && domValue !== '') {
416
- return domValue;
417
- }
418
- if (node.server !== undefined && node.server !== null) {
419
- return node.server;
420
- }
421
- return '';
422
- };
423
-
424
- const hasKnxServerSelected = () => {
425
- const val = resolveKnxServerValue();
426
- if (val === undefined || val === null) return false;
427
- return !KNX_EMPTY_VALUES.has(val);
428
- };
429
-
430
- const resolveHueServerValue = ({ allowStored = false } = {}) => {
431
- if ($hueServerInput.length) {
432
- const domValue = $hueServerInput.val();
433
- if (domValue !== undefined && domValue !== null) {
434
- const trimmed = String(domValue).trim();
435
- if (trimmed !== '' && !HUE_EMPTY_SERVER_VALUES.has(trimmed.toLowerCase())) return trimmed;
436
- }
437
- }
438
- if (node.serverHue !== undefined && node.serverHue !== null) {
439
- const stored = String(node.serverHue).trim();
440
- if (stored !== '' && !HUE_EMPTY_SERVER_VALUES.has(stored.toLowerCase())) return stored;
441
- }
442
- if (allowStored && node.__locateSessionInfo && node.__locateSessionInfo.serverId) {
443
- return node.__locateSessionInfo.serverId;
444
- }
445
- return '';
446
- };
447
-
448
- const getHueServerConfig = () => {
449
- const id = resolveHueServerValue();
450
- if (id === '') return null;
451
- try {
452
- return RED.nodes.node(id) || null;
453
- } catch (error) {
454
- return null;
455
- }
456
- };
457
-
458
- const resolveDeviceTypeSuffix = (deviceType) => {
459
- const normalized = (deviceType || '').toLowerCase();
460
- return normalized === 'grouped_light' ? '#grouped_light' : '#light';
461
- };
462
-
463
- const applyHueDevicesPlaceholder = (hasDevices) => {
464
- if (!$deviceNameInput.length) return;
465
- if (hasDevices) {
466
- if (showingNoHueDevicesPlaceholder) {
467
- showingNoHueDevicesPlaceholder = false;
468
- $deviceNameInput.attr('placeholder', defaultHueDevicePlaceholder);
469
- }
470
- return;
471
- }
472
- const message = node._('knxUltimateHueLight.no_devices') || defaultHueDevicePlaceholder;
473
- showingNoHueDevicesPlaceholder = true;
474
- $deviceNameInput.attr('placeholder', message);
475
- if (($deviceNameInput.val() || '').trim() === '') {
476
- $deviceNameInput.val('');
477
- }
478
- };
479
-
480
- const filterHueDevices = (devices, term) => {
481
- const cleaned = (term || '').replace(/exactmatch/gi, '').trim();
482
- return $.map(devices, (value) => {
483
- if (!value || !value.id) return null;
484
- const deviceName = value.name || value.id;
485
- if (cleaned !== '' && !htmlUtilsfullCSVSearch(deviceName, cleaned)) {
486
- return null;
487
- }
488
- const suffix = resolveDeviceTypeSuffix(value.deviceType);
489
- return {
490
- hueDevice: `${value.id}${suffix}`,
491
- value: deviceName,
492
- deviceObject: value.deviceObject || value,
493
- deviceType: value.deviceType || 'light'
494
- };
495
- });
496
- };
497
-
498
- const fetchHueDevices = (term, respond, { forceRefresh = false } = {}) => {
499
- const hueServer = getHueServerConfig();
500
- if (!hueServer) {
501
- applyHueDevicesPlaceholder(true);
502
- if (typeof respond === 'function') respond([]);
503
- node.__locateSessionInfo = null;
504
- updateLocateButtonState(false);
505
- return;
506
- }
507
- if (!forceRefresh && Array.isArray(cachedHueDevices) && cachedHueDevices.length > 0) {
508
- applyHueDevicesPlaceholder(cachedHueDevices.length > 0);
509
- if (typeof respond === 'function') respond(filterHueDevices(cachedHueDevices, term));
510
- return;
511
- }
512
- if ($hueDevicesLoading.length) {
513
- $hueDevicesLoading.show();
514
- }
515
- const refreshQuery = forceRefresh ? '&forceRefresh=1' : '';
516
- $.getJSON(`KNXUltimateGetResourcesHUE?rtype=light&serverId=${encodeURIComponent(hueServer.id)}${refreshQuery}&_=${Date.now()}`, (data) => {
517
- const listCandidates = Array.isArray(data) ? data : (Array.isArray(data?.devices) ? data.devices : []);
518
- cachedHueDevices = listCandidates.map((value) => {
519
- const deviceObject = value.deviceObject || value;
520
- const rawId = deviceObject?.id || value.id || value.rid || '';
521
- const trimmedId = typeof rawId === 'string' ? rawId.trim() : rawId;
522
- if (trimmedId === undefined || trimmedId === null || String(trimmedId).trim() === '') return null;
523
- return {
524
- id: String(trimmedId).trim(),
525
- name: value.name || value.metadata?.name || deviceObject?.metadata?.name || '',
526
- deviceType: deviceObject?.type || value.type || '',
527
- deviceObject
528
- };
529
- }).filter(Boolean);
530
- node._cachedHueLightDevices = cachedHueDevices;
531
- applyHueDevicesPlaceholder(cachedHueDevices.length > 0);
532
- if (typeof respond === 'function') respond(filterHueDevices(cachedHueDevices, term));
533
- }).always(() => {
534
- if ($hueDevicesLoading.length) {
535
- $hueDevicesLoading.hide();
536
- }
537
- }).fail(() => {
538
- cachedHueDevices = [];
539
- node._cachedHueLightDevices = cachedHueDevices;
540
- applyHueDevicesPlaceholder(false);
541
- if ($hueDevicesLoading.length) {
542
- $hueDevicesLoading.hide();
543
- }
544
- if (typeof respond === 'function') respond([]);
545
- node.__locateSessionInfo = null;
546
- updateLocateButtonState(false);
547
- });
548
- };
549
-
550
- // TIMER BLINK ####################################################
551
- let blinkStatus = 2;
552
- let timerBlinkBackground;
553
- function blinkBackground(_elementIDwithHashAtTheBeginning) {
554
- if (timerBlinkBackground !== undefined) clearInterval(timerBlinkBackground);
555
- timerBlinkBackground = setInterval(() => {
556
- if (isEven(blinkStatus)) $(_elementIDwithHashAtTheBeginning).css("background-color", "lightgreen");
557
- if (!isEven(blinkStatus)) $(_elementIDwithHashAtTheBeginning).css("background-color", "");
558
- blinkStatus += 1;
559
- if (blinkStatus >= 14) {
560
- clearInterval(timerBlinkBackground);
561
- blinkStatus = 2;
562
- $(_elementIDwithHashAtTheBeginning).css("background-color", "");
563
- }
564
- }, 100);
565
- }
566
- function isEven(n) {
567
- return (n % 2 == 0);
568
- }
569
- // ################################################################
570
-
571
- const $effectStorage = $("#node-input-effectRules");
572
- let parsedEffectRules = [];
573
- if (Array.isArray(node.effectRules)) {
574
- parsedEffectRules = JSON.parse(JSON.stringify(node.effectRules));
575
- } else {
576
- try {
577
- parsedEffectRules = JSON.parse(node.effectRules || '[]');
578
- } catch (error) {
579
- parsedEffectRules = [];
580
- }
581
- }
582
- if (!Array.isArray(parsedEffectRules)) parsedEffectRules = [];
583
- node.effectRules = parsedEffectRules;
584
- const $effectList = $("#node-input-effect-rule-container");
585
- const syncEffectRulesStorage = () => {
586
- try {
587
- $effectStorage.val(JSON.stringify(node.effectRules || []));
588
- } catch (error) {
589
- $effectStorage.val('[]');
590
- }
591
- };
592
- const rebuildEffectRulesFromUI = () => {
593
- const collected = [];
594
- try {
595
- const items = $effectList.editableList('items');
596
- items.each(function () {
597
- const $row = $(this);
598
- const knxValue = $row.find('.rowEffectKNXValue').val();
599
- const hueEffect = $row.find('.rowEffectHueEffect').val();
600
- if (hueEffect && hueEffect !== '') {
601
- collected.push({
602
- knxValue: knxValue !== undefined && knxValue !== null ? knxValue : '',
603
- hueEffect
604
- });
605
- }
606
- });
607
- } catch (error) { }
608
- node.effectRules = collected;
609
- syncEffectRulesStorage();
610
- };
611
- const bindEffectRowEvents = ($row) => {
612
- $row.find('.rowEffectKNXValue').on('input change', rebuildEffectRulesFromUI);
613
- $row.find('.rowEffectHueEffect').on('change', rebuildEffectRulesFromUI);
614
- };
615
- syncEffectRulesStorage();
616
- const $effectContainer = $("#divHueEffectsContainer");
617
- const $effectContent = $("#divHueEffectsContent");
618
- const $effectNoSupport = $("#divHueEffectsNoSupport");
619
- let effectOptions = [];
620
-
621
- const normalizeEffectEntry = (effect, { fallbackLabel } = {}) => {
622
- if (effect === undefined || effect === null) return null;
623
- if (typeof effect === 'string') {
624
- const trimmed = effect.trim();
625
- return trimmed === '' ? null : { value: trimmed, label: trimmed };
626
- }
627
- if (typeof effect === 'object') {
628
- const nested = (candidate) => {
629
- if (!candidate || typeof candidate !== 'object') return undefined;
630
- return candidate.value ?? candidate.effect ?? candidate.id ?? candidate.code ?? candidate.type ?? candidate.name ?? candidate.title;
631
- };
632
- const statusCandidate = typeof effect.status === 'object' ? nested(effect.status) : undefined;
633
- const rawValue = effect.value ?? effect.effect ?? statusCandidate ?? effect.status ?? effect.id ?? effect.type ?? effect.code;
634
- const rawLabel = effect.label ?? effect.name ?? effect.title ?? effect.display ?? effect.display_name ?? effect.text ?? effect.description ?? (typeof effect.status === 'object' ? (effect.status.name ?? effect.status.title ?? effect.status.label) : undefined);
635
- const value = rawValue !== undefined && rawValue !== null ? String(rawValue).trim() : '';
636
- const labelSource = rawLabel !== undefined && rawLabel !== null ? rawLabel : (fallbackLabel !== undefined ? fallbackLabel : rawValue);
637
- const label = labelSource !== undefined && labelSource !== null ? String(labelSource).trim() : '';
638
- if (value === '') return null;
639
- return { value, label: label === '' ? value : label };
640
- }
641
- const stringified = String(effect).trim();
642
- return stringified === '' ? null : { value: stringified, label: stringified };
643
- };
644
-
645
- const collectEffectFallbacks = () => {
646
- const fallback = [];
647
- if (Array.isArray(node.effectRules)) {
648
- node.effectRules.forEach((rule) => {
649
- const entry = normalizeEffectEntry(rule ? rule.hueEffect : null);
650
- if (entry) fallback.push(entry);
651
- });
652
- }
653
- return fallback;
654
- };
655
-
656
- const collectHueDeviceObjectEffects = () => {
657
- const fallback = [];
658
- if (node.hueDeviceObject && node.hueDeviceObject.effects && Array.isArray(node.hueDeviceObject.effects.status_values)) {
659
- node.hueDeviceObject.effects.status_values.forEach((raw) => {
660
- const entry = normalizeEffectEntry(raw);
661
- if (entry) fallback.push(entry);
662
- });
663
- }
664
- return fallback;
665
- };
666
-
667
- const getAllEffectOptions = () => {
668
- const combined = [];
669
- const pushUnique = (entry, { forceFront = false } = {}) => {
670
- if (!entry || !entry.value) return;
671
- const existingIndex = combined.findIndex((candidate) => candidate.value === entry.value);
672
- if (existingIndex !== -1) {
673
- if (forceFront && existingIndex > 0) {
674
- const [existing] = combined.splice(existingIndex, 1);
675
- combined.unshift(existing);
676
- }
677
- return;
678
- }
679
- if (forceFront) {
680
- combined.unshift(entry);
681
- } else {
682
- combined.push(entry);
683
- }
684
- };
685
-
686
- pushUnique({ value: 'no_effect', label: 'no_effect' }, { forceFront: true });
687
-
688
- effectOptions.forEach((option) => pushUnique(option));
689
- collectHueDeviceObjectEffects().forEach((option) => pushUnique(option));
690
- collectEffectFallbacks().forEach((option) => pushUnique(option));
691
-
692
- return combined;
693
- };
694
-
695
- function populateEffectSelect($select, selectedValue) {
696
- const targetValue = selectedValue !== undefined && selectedValue !== null
697
- ? String(selectedValue).trim()
698
- : '';
699
- const entries = getAllEffectOptions();
700
- $select.empty();
701
- entries.forEach((entry) => {
702
- $select.append($("<option></option>").attr("value", entry.value).text(entry.label));
703
- });
704
- if (targetValue && entries.some((entry) => entry.value === targetValue)) {
705
- $select.val(targetValue);
706
- } else if (!targetValue && entries.length > 0) {
707
- $select.val(entries[0].value);
708
- }
709
- return entries.map((entry) => entry.value);
710
- }
711
-
712
- function decorateEffectValueInput() { }
713
-
714
- function refreshEffectRows() {
715
- if (!$effectList.data('effectListInitialized')) return;
716
- const items = $effectList.editableList('items');
717
- items.each(function () {
718
- const $row = $(this);
719
- const $select = $row.find('select.rowEffectHueEffect');
720
- const currentValue = $select.val();
721
- populateEffectSelect($select, currentValue);
722
- decorateEffectValueInput($row.find('.rowEffectKNXValue'));
723
- });
724
- }
725
-
726
- function setAvailableEffects(effects) {
727
- const sanitized = [];
728
- if (Array.isArray(effects)) {
729
- effects.forEach((raw) => {
730
- const entry = normalizeEffectEntry(raw);
731
- if (entry) sanitized.push(entry);
732
- });
733
- }
734
- effectOptions = sanitized;
735
- const hasMappings = Array.isArray(node.effectRules) && node.effectRules.length > 0;
736
- const hasOptions = effectOptions.length > 0;
737
-
738
- if (!hasOptions && !hasMappings) {
739
- $effectContainer.show();
740
- $effectContent.hide();
741
- $effectNoSupport.show();
742
- } else {
743
- $effectContainer.show();
744
- $effectContent.show();
745
- $effectNoSupport.toggle(!hasOptions);
746
- }
747
-
748
- $("#node-input-effect-autofill").prop('disabled', !hasOptions);
749
- refreshEffectRows();
750
- }
751
-
752
- function decorateEffectValueInput() { }
753
-
754
- function ensureEffectEditableList() {
755
- if ($effectList.data('effectListInitialized')) return;
756
- $effectList.editableList({
757
- addItem: function (container, i, opt) {
758
- const data = opt && opt.rule ? opt.rule : (opt || {});
759
- const row = $('<div/>', { class: 'form-row effect-rule-row' }).appendTo(container);
760
- const $valueInput = $('<input/>', {
761
- class: 'rowEffectKNXValue',
762
- type: 'text',
763
- placeholder: node._('knxUltimateHueLight.effect_knx_value_placeholder') || 'Value',
764
- style: 'width:40%; margin-left:0; text-align:left;'
765
- }).appendTo(row);
766
- $valueInput.val(data.knxValue || '');
767
- decorateEffectValueInput($valueInput);
768
- $('<span/>', { html: '&nbsp;&rarr;&nbsp;', style: 'display:inline-block; margin:0 8px;' }).appendTo(row);
769
- const $select = $('<select/>', {
770
- class: 'rowEffectHueEffect',
771
- style: 'width:45%;'
772
- }).appendTo(row);
773
- const availableOptions = populateEffectSelect($select, data.hueEffect);
774
- if ((!data || !data.hueEffect) && availableOptions.length > 0) {
775
- $select.val(availableOptions[0]);
776
- }
777
- bindEffectRowEvents(row);
778
- },
779
- removable: true,
780
- sortable: false,
781
- removeItem: function () {
782
- rebuildEffectRulesFromUI();
783
- }
784
- });
785
- $effectList.data('effectListInitialized', true);
786
- }
787
-
788
- ensureEffectEditableList();
789
- const initialEffects = (node.hueDeviceObject && node.hueDeviceObject.effects && Array.isArray(node.hueDeviceObject.effects.status_values))
790
- ? node.hueDeviceObject.effects.status_values
791
- : [];
792
- setAvailableEffects(initialEffects);
793
- if (Array.isArray(node.effectRules) && node.effectRules.length > 0) {
794
- const items = $effectList.editableList('items');
795
- items.each(function () { $(this).remove(); });
796
- node.effectRules.forEach((rule) => {
797
- $effectList.editableList('addItem', { rule });
798
- });
799
- refreshEffectRows();
800
- rebuildEffectRulesFromUI();
801
- }
802
-
803
- $("#node-input-effect-autofill").off('click').on('click', function () {
804
- if (effectOptions.length === 0) return;
805
- const items = $effectList.editableList('items');
806
- items.each(function () { $(this).remove(); });
807
- effectOptions.forEach((effect) => {
808
- if (!effect || !effect.value) return;
809
- $effectList.editableList('addItem', { rule: { knxValue: effect.value, hueEffect: effect.value } });
810
- });
811
- refreshEffectRows();
812
- rebuildEffectRulesFromUI();
813
- });
814
-
815
- $('#node-input-dptLightEffect').on('change', () => {
816
- const items = $effectList.editableList('items');
817
- items.each(function () {
818
- decorateEffectValueInput($(this).find('.rowEffectKNXValue'));
819
- });
820
- });
821
-
822
- const $tabs = $("#tabs");
823
- const $pinSectionRow = $("#node-input-enableNodePINS").closest('.form-row');
824
- const $pinSelect = $("#node-input-enableNodePINS");
825
- const $pinInfoRow = $pinSectionRow.next('.form-tips');
826
- $tabs.addClass('hue-vertical-tabs');
827
- $tabs.tabs(); // Tabs gestione KNX
828
- $tabs.find('ul').addClass('ui-tabs-nav');
829
- $tabs.find('li').removeClass('ui-corner-top').addClass('ui-corner-left');
830
-
831
- function getDPT(_dpt, _destinationWidget) {
832
- // DPT Switch command
833
- // ########################
834
- const prefixes = Array.isArray(_dpt) ? _dpt : [_dpt];
835
- $(_destinationWidget).empty();
836
- if (!hasKnxServerSelected()) {
837
- return;
838
- }
839
- const serverId = resolveKnxServerValue();
840
- $.getJSON(`knxUltimateDpts?serverId=${serverId}&_=${Date.now()}`, (data) => {
841
- data.forEach((dpt) => {
842
- if (prefixes.some((prefix) => prefix === "" || dpt.value.startsWith(prefix))) {
843
- // Adjustment for HUE Temperature
844
- if (dpt.value.startsWith("7.600")) {
845
- $(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - KNX Kelvin range 2000-6535k (Homeassistant color_temperature_mode: absolute)"));
846
- } else if (dpt.value.startsWith("9.002")) {
847
- $(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - HUE Kelvin range 2000-6535k (Homeassistant color_temperature_mode: absolute_float)"));
848
- } else if (dpt.value.startsWith("5.001")) {
849
- $(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - Homeassistant color_temperature_mode: relative"));
850
- } else {
851
- $(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text));
852
- }
853
- }
854
- });
855
- // Eval
856
- const format = "node." + _destinationWidget.replace("#node-input-", "");
857
- try {
858
- if (format !== undefined) $(_destinationWidget).val(eval(format).toString());
859
- } catch (error) { }
860
- if (_destinationWidget === '#node-input-dptLightEffect') {
861
- $(_destinationWidget).trigger('change');
862
- }
863
- });
864
- }
865
-
866
- function getGroupAddress(_sourceWidgetAutocomplete, _destinationWidgetName, _destinationWidgetDPT, _additionalSearchTerm) {
867
- $(_sourceWidgetAutocomplete).autocomplete({
868
- minLength: 0,
869
- source: function (request, response) {
870
- if (!hasKnxServerSelected()) {
871
- response([]);
872
- return;
873
- }
874
- const serverId = resolveKnxServerValue();
875
- $.getJSON(`knxUltimatecsv?nodeID=${serverId}&_=${Date.now()}`, (data) => {
876
- response(
877
- $.map(data, function (value, key) {
878
- var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
879
- for (let index = 0; index < _additionalSearchTerm.length; index++) {
880
- const sDPT = _additionalSearchTerm[index];
881
- if (htmlUtilsfullCSVSearch(sSearch, request.term + " " + sDPT)) {
882
- return {
883
- label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
884
- value: value.ga, // Value
885
- };
886
- }
887
- };
888
- })
889
- );
890
- });
891
- },
892
- select: function (event, ui) {
893
- // Sets Datapoint and device name automatically
894
- var sDevName = ui.item.label.split("#")[1].trim();
895
- try {
896
- sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
897
- } catch (error) { }
898
- $(_destinationWidgetName).val(sDevName);
899
- var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
900
- const $dptSelect = $(_destinationWidgetDPT);
901
- if (optVal !== undefined && optVal !== null) {
902
- $dptSelect.val(optVal).trigger('change');
903
- } else {
904
- // Ensure downstream widgets refresh even when the DPT is missing
905
- $dptSelect.trigger('change');
906
- }
907
- },
908
- }).focus(function () {
909
- $(this).autocomplete('search', $(this).val() + 'exactmatch');
910
- });
911
- try {
912
- if (hasKnxServerSelected()) {
913
- const srv = RED.nodes.node(resolveKnxServerValue());
914
- if (srv && srv.id) KNX_enableSecureFormatting($(_sourceWidgetAutocomplete), srv.id);
915
- }
916
- } catch (e) { }
917
- }
918
-
919
- const effectDptPrefixes = ["1.", "2.", "5.", "6.", "7.", "8.", "9.", "16.", "20."];
920
-
921
- const refreshKnxBindings = () => {
922
- getDPT("1.", "#node-input-dptLightSwitch");
923
- getGroupAddress("#node-input-GALightSwitch", "#node-input-nameLightSwitch", "#node-input-dptLightSwitch", ["1."]);
924
-
925
- getDPT("1.", "#node-input-dptLightState");
926
- getGroupAddress("#node-input-GALightState", "#node-input-nameLightState", "#node-input-dptLightState", ["1."]);
927
-
928
- getDPT("3.007", "#node-input-dptLightDIM");
929
- getGroupAddress("#node-input-GALightDIM", "#node-input-nameLightDIM", "#node-input-dptLightDIM", ["3.007"]);
930
-
931
- getDPT("5.001", "#node-input-dptLightBrightness");
932
- getGroupAddress("#node-input-GALightBrightness", "#node-input-nameLightBrightness", "#node-input-dptLightBrightness", ["5.001"]);
933
-
934
- getDPT("5.001", "#node-input-dptLightBrightnessState");
935
- getGroupAddress("#node-input-GALightBrightnessState", "#node-input-nameLightBrightnessState", "#node-input-dptLightBrightnessState", ["5.001"]);
936
-
937
- getDPT("232.600", "#node-input-dptLightColor");
938
- getGroupAddress("#node-input-GALightColor", "#node-input-nameLightColor", "#node-input-dptLightColor", ["232.600"]);
939
-
940
- getDPT("232.600", "#node-input-dptLightColorState");
941
- getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", ["232.600"]);
942
-
943
- getDPT("3.007", "#node-input-dptLightKelvinDIM");
944
- getGroupAddress("#node-input-GALightKelvinDIM", "#node-input-nameLightKelvinDIM", "#node-input-dptLightKelvinDIM", ["3.007"]);
945
-
946
- getDPT("5.001", "#node-input-dptLightKelvinPercentage");
947
- getGroupAddress("#node-input-GALightKelvinPercentage", "#node-input-nameLightKelvinPercentage", "#node-input-dptLightKelvinPercentage", ["5.001"]);
948
-
949
- getDPT("5.001", "#node-input-dptLightKelvinPercentageState");
950
- getGroupAddress("#node-input-GALightKelvinPercentageState", "#node-input-nameLightKelvinPercentageState", "#node-input-dptLightKelvinPercentageState", ["5.001"]);
951
-
952
- getDPT("1.", "#node-input-dptLightBlink");
953
- getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", ["1."]);
954
-
955
- getDPT("1.", "#node-input-dptLightColorCycle");
956
- getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", ["1."]);
957
-
958
- getDPT(effectDptPrefixes, "#node-input-dptLightEffect");
959
- getGroupAddress("#node-input-GALightEffect", "#node-input-nameLightEffect", "#node-input-dptLightEffect", effectDptPrefixes);
960
-
961
- getDPT(effectDptPrefixes, "#node-input-dptLightEffectStatus");
962
- getGroupAddress("#node-input-GALightEffectStatus", "#node-input-nameLightEffectStatus", "#node-input-dptLightEffectStatus", effectDptPrefixes);
963
-
964
- getDPT("1.", "#node-input-dptDaylightSensor");
965
- getGroupAddress("#node-input-GADaylightSensor", "#node-input-nameDaylightSensor", "#node-input-dptDaylightSensor", ["1."]);
966
-
967
- getDPT("7.600", "#node-input-dptLightKelvin");
968
- getDPT("9.002", "#node-input-dptLightKelvin");
969
- getDPT("9.002", "#node-input-dptLightKelvinState");
970
- getDPT("7.600", "#node-input-dptLightKelvinState");
971
- getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", ["7.600", "9.002"]);
972
- getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", ["7.600", "9.002"]);
973
-
974
- // HSV ----------------------
975
- // H
976
- getDPT("3.007", "#node-input-dptLightHSV_H_DIM");
977
- getGroupAddress("#node-input-GALightHSV_H_DIM", "#node-input-nameLightHSV_H_DIM", "#node-input-dptLightHSV_H_DIM", ["3.007"]);
978
-
979
- getDPT("5.001", "#node-input-dptLightHSV_H_State");
980
- getGroupAddress("#node-input-GALightHSV_H_State", "#node-input-nameLightHSV_H_State", "#node-input-dptLightHSV_H_State", ["5.001"]);
981
-
982
- // S
983
- getDPT("3.007", "#node-input-dptLightHSV_S_DIM");
984
- getGroupAddress("#node-input-GALightHSV_S_DIM", "#node-input-nameLightHSV_S_DIM", "#node-input-dptLightHSV_S_DIM", ["3.007"]);
985
-
986
- getDPT("5.001", "#node-input-dptLightHSV_S_State");
987
- getGroupAddress("#node-input-GALightHSV_S_State", "#node-input-nameLightHSV_S_State", "#node-input-dptLightHSV_S_State", ["5.001"]);
988
-
989
- // V
990
- getDPT("3.007", "#node-input-dptLightHSV_V_DIM");
991
- getGroupAddress("#node-input-GALightHSV_V_DIM", "#node-input-nameLightHSV_V_DIM", "#node-input-dptLightHSV_V_DIM", ["3.007"]);
992
-
993
- getDPT("5.001", "#node-input-dptLightHSV_V_State");
994
- getGroupAddress("#node-input-GALightHSV_V_State", "#node-input-nameLightHSV_V_State", "#node-input-dptLightHSV_V_State", ["5.001"]);
995
- // END HSV ----------------------
996
- };
997
-
998
- refreshKnxBindings();
999
-
1000
- const getHueDeviceValue = ({ allowStored = false } = {}) => {
1001
- if ($hueDeviceInput.length) {
1002
- const domValue = $hueDeviceInput.val();
1003
- if (domValue !== undefined && domValue !== null && domValue !== '') {
1004
- return domValue;
1005
- }
1006
- }
1007
- if (node.hueDevice !== undefined && node.hueDevice !== null && node.hueDevice !== '') {
1008
- return node.hueDevice;
1009
- }
1010
- if (allowStored && node.__locateSessionInfo && node.__locateSessionInfo.deviceId) {
1011
- const suffix = node.__locateSessionInfo.deviceType || 'light';
1012
- return `${node.__locateSessionInfo.deviceId}#${suffix}`;
1013
- }
1014
- return '';
1015
- };
1016
-
1017
- const updateTabsVisibility = () => {
1018
- const knxSelected = hasKnxServerSelected();
1019
- const hueDeviceSelected = getHueDeviceValue() !== '';
1020
- const shouldShowTabs = knxSelected && hueDeviceSelected;
1021
-
1022
- if (shouldShowTabs) {
1023
- $tabs.show();
1024
- try { $tabs.tabs('refresh'); } catch (error) { /* empty */ }
1025
- } else {
1026
- $tabs.hide();
1027
- }
1028
-
1029
- if ($pinSelect.length) {
1030
- const desiredPins = knxSelected ? 'no' : 'yes';
1031
- if ($pinSelect.val() !== desiredPins) {
1032
- $pinSelect.val(desiredPins).trigger('change');
1033
- }
1034
- }
1035
-
1036
- if ($pinSectionRow.length) {
1037
- $pinSectionRow.show();
1038
- }
1039
- if ($pinInfoRow.length) {
1040
- $pinInfoRow.show();
1041
- }
1042
- };
1043
- updateTabsVisibility();
1044
-
1045
- $knxServerInput.on('change.knxUltimateHueLight', () => {
1046
- refreshKnxBindings();
1047
- updateTabsVisibility();
1048
- });
1049
-
1050
- $hueDeviceInput.on('change.knxUltimateHueLight input.knxUltimateHueLight', updateTabsVisibility);
1051
-
1052
- if (($deviceNameInput.val() || '').trim() !== '') {
1053
- applyHueDevicesPlaceholder(true);
1054
- } else {
1055
- applyHueDevicesPlaceholder(cachedHueDevices.length > 0);
1056
- }
1057
-
1058
- if ($deviceNameInput.length) {
1059
- if ($deviceNameInput.data('ui-autocomplete')) {
1060
- try { $deviceNameInput.autocomplete('destroy'); } catch (error) { /* empty */ }
1061
- }
1062
- $deviceNameInput.autocomplete({
1063
- minLength: 0,
1064
- source(request, response) {
1065
- fetchHueDevices(request.term, response);
1066
- },
1067
- select(event, ui) {
1068
- if (!ui.item || !ui.item.hueDevice || ui.item.hueDevice === 'error') {
1069
- event.preventDefault();
1070
- return;
1071
- }
1072
- $deviceNameInput.val(ui.item.value || '');
1073
- node.name = ui.item.value || node.name;
1074
- $hueDeviceInput.val(ui.item.hueDevice);
1075
- node.hueDevice = ui.item.hueDevice;
1076
- node.hueDeviceObject = ui.item.deviceObject || { type: ui.item.deviceType };
1077
- node.__locateSessionInfo = null;
1078
- updateTabsVisibility();
1079
- setTimeout(() => {
1080
- try { $deviceNameInput.autocomplete('close'); } catch (error) { /* empty */ }
1081
- Go();
1082
- }, 0);
1083
- },
1084
- focus(event, ui) {
1085
- event.preventDefault();
1086
- $deviceNameInput.val(ui.item && ui.item.value ? ui.item.value : '');
1087
- }
1088
- }).focus(function () {
1089
- $(this).autocomplete('search', `${$(this).val()}exactmatch`);
1090
- }).on('input.knxUltimateHueLight', function () {
1091
- if ($(this).val().trim() === '') {
1092
- $hueDeviceInput.val('');
1093
- node.hueDevice = '';
1094
- node.__locateSessionInfo = null;
1095
- updateTabsVisibility();
1096
- updateLocateButtonState(false);
1097
- }
1098
- });
1099
- }
1100
-
1101
- if ($refreshDevicesButton.length) {
1102
- $refreshDevicesButton.off('.knxUltimateHueLight').on('click.knxUltimateHueLight', () => {
1103
- cachedHueDevices = [];
1104
- node._cachedHueLightDevices = cachedHueDevices;
1105
- fetchHueDevices('', () => {
1106
- if ($deviceNameInput.length) {
1107
- $deviceNameInput.autocomplete('search', `${$deviceNameInput.val()}exactmatch`);
1108
- }
1109
- }, { forceRefresh: true });
1110
- });
1111
- }
1112
-
1113
- if ($locateDeviceButton.length) {
1114
- $locateDeviceButton.off('.knxUltimateHueLight').on('click.knxUltimateHueLight', () => {
1115
- const desiredAction = locateSessionActive ? 'stop' : 'start';
1116
- performLocateRequest({ silent: false, action: desiredAction });
1117
- });
1118
- updateLocateButtonState(false);
1119
- }
1120
-
1121
- if ($hueServerInput.length) {
1122
- $hueServerInput.off('.knxUltimateHueLightDevices').on('change.knxUltimateHueLightDevices', () => {
1123
- cachedHueDevices = [];
1124
- node._cachedHueLightDevices = cachedHueDevices;
1125
- showingNoHueDevicesPlaceholder = false;
1126
- applyHueDevicesPlaceholder(true);
1127
- node.__locateSessionInfo = null;
1128
- updateLocateButtonState(false);
1129
- if ($hueDevicesLoading.length) {
1130
- $hueDevicesLoading.hide();
1131
- }
1132
- });
1133
- }
1134
-
1135
- node.__stopHueLocateSession = () => {
1136
- clearLocateAutoReset();
1137
- removeNodeRemovalListener();
1138
- const pending = locatePendingRequest;
1139
- if (pending && typeof pending.always === 'function') {
1140
- pending.always(() => {
1141
- if (node.__locateSessionInfo || locateSessionActive) {
1142
- const followUp = performLocateRequest({ silent: true, allowStoredContext: true, action: 'stop' });
1143
- if (!followUp || typeof followUp.then !== 'function') {
1144
- updateLocateButtonState(false);
1145
- }
1146
- } else {
1147
- updateLocateButtonState(false);
1148
- }
1149
- });
1150
- return;
1151
- }
1152
- if (locateSessionActive || (node.__locateSessionInfo && node.__locateSessionInfo.deviceId)) {
1153
- const request = performLocateRequest({ silent: true, allowStoredContext: true, action: 'stop' });
1154
- if (!request || typeof request.then !== 'function') {
1155
- updateLocateButtonState(false);
1156
- }
1157
- } else {
1158
- updateLocateButtonState(false);
1159
- }
1160
- };
1161
-
1162
- // Get the HUE capabilities to enable/disable UI parts
1163
- var getJsonPromise;
1164
- const initialHueDeviceRaw = getHueDeviceValue();
1165
- if (initialHueDeviceRaw === '') {
1166
- updateTabsVisibility();
1167
- return;
1168
- } else {
1169
- $hueDeviceInput.val(initialHueDeviceRaw);
1170
- updateTabsVisibility();
1171
- if (getJsonPromise !== undefined) getJsonPromise.abort();
1172
- getJsonPromise = $.getJSON("knxUltimateGetLightObject?id=" + initialHueDeviceRaw.split("#")[0] + "&serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
1173
- let oLight = data;
1174
- const effects = (oLight && oLight.effects && Array.isArray(oLight.effects.status_values))
1175
- ? oLight.effects.status_values
1176
- : [];
1177
- setAvailableEffects(effects);
1178
- // Check if grouped, to hide/show the "Get current" buttons
1179
- if (oLight.type === "grouped_light") {
1180
- $("#tabs").tabs("enable", "#tabs-4");
1181
- $("#tabs").tabs("enable", "#tabs-3");
1182
- $("#tabs").tabs("enable", "#tabs-2");
1183
- $("#getColorAtSwitchOnDayTimeButton").show();
1184
- $("#getColorAtSwitchOnNightTimeButton").show();
1185
- $("#node-input-specifySwitchOnBrightness").empty().append(
1186
- $("<option>")
1187
- .val("no")
1188
- .text(node._("knxUltimateHueLight.none"))
1189
- ).append(
1190
- $("<option>")
1191
- .val("yes")
1192
- .text(node._("knxUltimateHueLight.select_color"))
1193
- ).append(
1194
- $("<option>")
1195
- .val("temperature")
1196
- .text(node._("knxUltimateHueLight.select_temperature_brightness"))
1197
- );
1198
- $("#node-input-enableDayNightLighting").empty().append(
1199
- $("<option>")
1200
- .val("no")
1201
- .text(node._("knxUltimateHueLight.opt_no"))
1202
- ).append(
1203
- $("<option>")
1204
- .val("yes")
1205
- .text(node._("knxUltimateHueLight.select_color"))
1206
- ).append(
1207
- $("<option>")
1208
- .val("temperature")
1209
- .text(node._("knxUltimateHueLight.select_temperature_brightness"))
1210
- );
1211
- $("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
1212
- $("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
1213
- return;
1214
- } else {
1215
-
1216
- $("#getColorAtSwitchOnDayTimeButton").show();
1217
- $("#getColorAtSwitchOnNightTimeButton").show();
1218
- $("#node-input-specifySwitchOnBrightness").empty().append(
1219
- $("<option>")
1220
- .val("no")
1221
- .text(node._("knxUltimateHueLight.none"))
1222
- );
1223
- $("#node-input-enableDayNightLighting").empty().append(
1224
- $("<option>")
1225
- .val("no")
1226
- .text(node._("knxUltimateHueLight.opt_no"))
1227
- );
1228
- }
1229
-
1230
- $("#tabs").tabs("disable", "#tabs-4");
1231
- $("#tabs").tabs("disable", "#tabs-3");
1232
- $("#tabs").tabs("disable", "#tabs-2");
1233
- $("#divColorsAtSwitchOn").hide();
1234
- $("#divColorsAtSwitchOnNightTime").hide();
1235
- $("#divTemperatureAtSwitchOn").hide();
1236
- $("#divTemperatureAtSwitchOnNightTime").hide();
1237
- $("#divColorCycle").hide();
1238
- $("#divUpdateKNXBrightnessStatusOnHUEOnOff").hide();
1239
- $("#divBehaviourBrightness").hide();
1240
- $("#comboTemperatureAtSwitchOn").hide();
1241
- $("#comboTemperatureAtSwitchOnNightTime").hide();
1242
-
1243
- // Enable options/tabs one by one
1244
- if (oLight.dimming !== undefined) {
1245
- $("#tabs").tabs("enable", "#tabs-2");
1246
- $("#divBehaviourBrightness").show();
1247
- }
1248
- if (oLight.color !== undefined) {
1249
- $("#tabs").tabs("enable", "#tabs-4");
1250
- $("#divColorsAtSwitchOn").show();
1251
- $("#divColorsAtSwitchOnNightTime").show();
1252
- $("#divColorCycle").show();
1253
- $("#node-input-specifySwitchOnBrightness").append(
1254
- $("<option>")
1255
- .val("yes")
1256
- .text(node._("knxUltimateHueLight.select_color"))
1257
- );
1258
- $("#node-input-enableDayNightLighting").append(
1259
- $("<option>")
1260
- .val("yes")
1261
- .text(node._("knxUltimateHueLight.select_color"))
1262
- );
1263
- }
1264
- // Check temperature (if the light supports temperature, it support dimming as well)
1265
- if (oLight.color_temperature !== undefined) {
1266
- $("#tabs").tabs("enable", "#tabs-3");
1267
- //$("#tabs").tabs("enable", "#tabs-2");
1268
- $("#node-input-specifySwitchOnBrightness").append(
1269
- $("<option>")
1270
- .val("temperature")
1271
- .text(node._("knxUltimateHueLight.select_temperature_brightness"))
1272
- );
1273
- $("#node-input-enableDayNightLighting").append(
1274
- $("<option>")
1275
- .val("temperature")
1276
- .text(node._("knxUltimateHueLight.select_temperature_brightness"))
1277
- );
1278
- $("#divTemperatureAtSwitchOn").show();
1279
- $("#divTemperatureAtSwitchOnNightTime").show();
1280
- $("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
1281
- $("#divBehaviourBrightness").show();
1282
- $("#comboTemperatureAtSwitchOn").show();
1283
- $("#comboTemperatureAtSwitchOnNightTime").show();
1284
- } else {
1285
- //$("#tabs").tabs("enable", "#tabs-2");
1286
- $("#node-input-specifySwitchOnBrightness").append(
1287
- $("<option>")
1288
- .val("temperature")
1289
- .text(node._("knxUltimateHueLight.select_brightness"))
1290
- );
1291
- $("#node-input-enableDayNightLighting").append(
1292
- $("<option>")
1293
- .val("temperature")
1294
- .text(node._("knxUltimateHueLight.select_brightness"))
1295
- );
1296
- $("#comboTemperatureAtSwitchOn").val(0);
1297
- $("#comboTemperatureAtSwitchOnNightTime").val(0);
1298
- $("#divTemperatureAtSwitchOn").show();
1299
- $("#divTemperatureAtSwitchOnNightTime").show();
1300
- $("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
1301
- //$("#divBehaviourBrightness").show();
1302
- }
1303
- $("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
1304
- $("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
1305
- });
1306
- setTimeout(function () { if (getJsonPromise !== undefined) getJsonPromise.abort(); }, 10000);
1307
- }
1308
- // Show/Hide the div of the color at swich on
1309
- if (node.specifySwitchOnBrightness === "yes") {
1310
- $("#divColorsAtSwitchOn").show();
1311
- $("#divTemperatureAtSwitchOn").hide();
1312
- } else if (node.specifySwitchOnBrightness === "temperature") {
1313
- $("#divColorsAtSwitchOn").hide();
1314
- $("#divTemperatureAtSwitchOn").show();
1315
- } else {
1316
- $("#divColorsAtSwitchOn").hide();
1317
- $("#divTemperatureAtSwitchOn").hide();
1318
- }
1319
-
1320
- $("#node-input-specifySwitchOnBrightness").on("change", function () {
1321
- if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
1322
- $("#divColorsAtSwitchOn").show();
1323
- $("#divTemperatureAtSwitchOn").hide();
1324
- blinkBackground("#colorPickerDay");
1325
- } else if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") {
1326
- $("#divColorsAtSwitchOn").hide();
1327
- $("#divTemperatureAtSwitchOn").show();
1328
- } else {
1329
- $("#divColorsAtSwitchOn").hide();
1330
- $("#divTemperatureAtSwitchOn").hide();
1331
- }
1332
- });
1333
-
1334
- // Show/Hide and enable/disable day/night Lighting behaviour
1335
- if (node.enableDayNightLighting === "yes") {
1336
- $("#divEnableDayNightLighting").show();
1337
- $("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
1338
- $("#divColorsAtSwitchOnNightTime").show();
1339
- $("#divTemperatureAtSwitchOnNightTime").hide();
1340
- } else if (node.enableDayNightLighting === "temperature") {
1341
- $("#divEnableDayNightLighting").show();
1342
- $("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
1343
- $("#divColorsAtSwitchOnNightTime").hide();
1344
- $("#divTemperatureAtSwitchOnNightTime").show();
1345
- } else {
1346
- $("#divEnableDayNightLighting").hide();
1347
- $("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
1348
- }
1349
-
1350
- $("#node-input-enableDayNightLighting").on("change", function () {
1351
- if ($("#node-input-enableDayNightLighting").val() === "yes") {
1352
- $("#divEnableDayNightLighting").show();
1353
- $("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
1354
- $("#divColorsAtSwitchOnNightTime").show();
1355
- $("#divTemperatureAtSwitchOnNightTime").hide();
1356
- blinkBackground("#colorPickerNight")
1357
- $("#getColorAtSwitchOnDayTimeButton").text(node._("knxUltimateHueLight.get_current"));
1358
- } else if ($("#node-input-enableDayNightLighting").val() === "temperature") {
1359
- $("#divEnableDayNightLighting").show();
1360
- $("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
1361
- $("#divColorsAtSwitchOnNightTime").hide();
1362
- $("#divTemperatureAtSwitchOnNightTime").show();
1363
- } else {
1364
- $("#divEnableDayNightLighting").hide();
1365
- $("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
1366
- }
1367
- });
1368
-
1369
- $("#getColorAtSwitchOnDayTimeButton").on("click", function () {
1370
- $("#getColorAtSwitchOnDayTimeButton").text(node._("knxUltimateHueLight.wait"));
1371
- let jRet;
1372
- let sQuery;
1373
- if ($("#node-input-specifySwitchOnBrightness").val() === "yes") sQuery = "knxUltimateGetHueColor";
1374
- if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
1375
- $.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
1376
- $("#node-input-colorAtSwitchOnDayTime").val(data);
1377
- $("#colorPickerDay").val(data);
1378
- blinkBackground("#colorPickerDay")
1379
- $("#getColorAtSwitchOnDayTimeButton").text(node._("knxUltimateHueLight.get_again"));
1380
- });
1381
- });
1382
-
1383
- $("#getColorAtSwitchOnNightTimeButton").on("click", function () {
1384
- $("#getColorAtSwitchOnNightTimeButton").text(node._("knxUltimateHueLight.wait"));
1385
- let jRet;
1386
- let sQuery;
1387
- if ($("#node-input-enableDayNightLighting").val() === "yes") sQuery = "knxUltimateGetHueColor";
1388
- if ($("#node-input-enableDayNightLighting").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
1389
- $.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&" + { _: new Date().getTime() }, (data) => {
1390
- $("#node-input-colorAtSwitchOnNightTime").val(data);
1391
- $("#colorPickerNight").val(data);
1392
- blinkBackground("#colorPickerNight")
1393
- $("#getColorAtSwitchOnNightTimeButton").text(node._("knxUltimateHueLight.get_again"));
1394
- });
1395
- });
1396
-
1397
- // Fill options for minDimLevel and maxDimLevel and comboBrightnessAtSwitchOn (for color brightness at switch on, with temperature toghedher)
1398
- for (let index = 100; index >= 0; index -= 5) {
1399
- if (index === 0) {
1400
- $("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "% " + node._("knxUltimateHueLight.switch_off")));
1401
- $("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "% " + node._("knxUltimateHueLight.switch_off")));
1402
- $("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "% " + node._("knxUltimateHueLight.switch_off")));
1403
- } else {
1404
- $("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "%"));
1405
- $("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "%"));
1406
- $("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "%"));
1407
- }
1408
- }
1409
- // Temperatures, from 2000 to 6535K (circa)
1410
- for (let index = 2000; index <= 6500; index += 100) {
1411
- if (index === 2200) {
1412
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_2200")));
1413
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_2200")));
1414
- } else if (index === 2700) {
1415
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_2700")));
1416
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_2700")));
1417
- } else if (index === 3000) {
1418
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_3000")));
1419
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_3000")));
1420
- } else if (index === 3500) {
1421
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_3500_day")));
1422
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_3500_night")));
1423
- } else if (index === 4100) {
1424
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_4100_day")));
1425
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_4100_night")));
1426
- } else if (index === 5000) {
1427
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_5000_day")));
1428
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_5000_night")));
1429
- } else if (index === 6500) {
1430
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_6500_day")));
1431
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix") + " " + node._("knxUltimateHueLight.temp_desc_6500_night")));
1432
- } else {
1433
- $("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix")));
1434
- $("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + node._("knxUltimateHueLight.k_suffix")));
1435
- }
1436
- }
1437
-
1438
-
1439
- // Calculate kelvin/color
1440
- let json;
1441
- node.colorAtSwitchOnDayTime = node.colorAtSwitchOnDayTime.replace("geen", "green"); // Old bug in "geen" property
1442
- node.colorAtSwitchOnNightTime = node.colorAtSwitchOnNightTime.replace("geen", "green"); // Old bug in "geen" property
1443
- try {
1444
- json = JSON.parse(node.colorAtSwitchOnDayTime);
1445
- } catch (error) {
1446
- console.log("json = JSON.parse(node.colorAtSwitchOnDayTime) in HTML: " + error.message)
1447
- }
1448
- if (json !== undefined && json.kelvin !== undefined) {
1449
- // Kelvin
1450
- $("#comboTemperatureAtSwitchOn").val(json.kelvin);
1451
- $("#comboBrightnessAtSwitchOn").val(json.brightness);
1452
- if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('temperature'); // Adjust in case of mismatch (from old geen bug)
1453
- } else if (json !== undefined && json.red !== undefined) {
1454
- // Must transform RGB into HTML HEX color
1455
- try {
1456
- $("#node-input-colorAtSwitchOnDayTime").val("#" + rgbHex(json.red, json.green, json.blue));
1457
- } catch (error) {
1458
- }
1459
- $("#colorPickerDay").val($("#node-input-colorAtSwitchOnDayTime").val());
1460
- if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
1461
- } else {
1462
- // It's already an HEX color
1463
- $("#colorPickerDay").val(node.colorAtSwitchOnDayTime);
1464
- if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
1465
- }
1466
- //Night
1467
- json = undefined;
1468
- try {
1469
- json = JSON.parse(node.colorAtSwitchOnNightTime);
1470
- } catch (error) { }
1471
- if (json !== undefined && json.kelvin !== undefined) {
1472
- // Kelvin
1473
- $("#comboTemperatureAtSwitchOnNightTime").val(json.kelvin);
1474
- $("#comboBrightnessAtSwitchOnNightTime").val(json.brightness);
1475
- if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('temperature'); // Adjust in case of mismatch (from old geen bug)
1476
- } else if (json !== undefined && json.red !== undefined) {
1477
- // Must transform RGB into HTML HEX color
1478
- try {
1479
- $("#node-input-colorAtSwitchOnNightTime").val("#" + rgbHex(json.red, json.green, json.blue));
1480
- } catch (error) {
1481
- }
1482
- $("#colorPickerNight").val($("#node-input-colorAtSwitchOnNightTime").val());
1483
- if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
1484
- } else {
1485
- // It's already an HEX color
1486
- $("#colorPickerNight").val(node.colorAtSwitchOnNightTime);
1487
- if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
1488
- }
1489
-
1490
-
1491
- $("#comboTemperatureAtSwitchOn, #comboBrightnessAtSwitchOn").on("change", function () {
1492
- $("#node-input-colorAtSwitchOnDayTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOn").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOn").val() + ' }');
1493
- });
1494
- $("#comboTemperatureAtSwitchOnNightTime, #comboBrightnessAtSwitchOnNightTime").on("change", function () {
1495
- $("#node-input-colorAtSwitchOnNightTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOnNightTime").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOnNightTime").val() + ' }');
1496
- });
1497
-
1498
- // Create and put the JSON to node-input-colorAtSwitchOnDayTime
1499
- $("#colorPickerDay").on("change", function () {
1500
- $("#node-input-colorAtSwitchOnDayTime").val(this.value);
1501
- });
1502
- $("#colorPickerNight").on("change", function () {
1503
- $("#node-input-colorAtSwitchOnNightTime").val(this.value);
1504
- });
1505
-
1506
-
1507
- $("#node-input-minDimLevelLight").val(node.minDimLevelLight);
1508
- for (let index = 100; index >= 10; index--) {
1509
- $("#node-input-maxDimLevelLight").append(
1510
- $("<option>")
1511
- .val(index)
1512
- .text(index.toString() + "%")
1513
- );
1514
- }
1515
- $("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
1516
-
1517
- }
1518
-
1519
- function Go() {
1520
- $("#waitWindow").hide();
1521
- $("#mainWindow").show();
1522
- // $.post("banana", { func: "getNameAndTime" }, function (data) {
1523
- // //alert(data.body); // John
1524
- // }, "json");
1525
- try {
1526
- RED.sidebar.show("help");
1527
- } catch (error) { }
1528
- onEditPrepare();
1529
- }
1530
-
1531
-
1532
- // 19/02/2020 Used to get the server sooner als deploy.
1533
- $("#node-input-serverHue").change(function () {
1534
- try {
1535
- if ($("#node-input-serverHue").val() !== "_ADD_") {
1536
- $("#waitWindow").show();
1537
- $("#mainWindow").hide();
1538
- checkConnection();
1539
- } else {
1540
- Go();
1541
- }
1542
- } catch (error) { }
1543
- });
1544
-
1545
- // Timer connection to backend ####################################################
1546
- let timerWaitBackEndCounter = 0;
1547
- function checkConnection() {
1548
- if (this.timerWaitBackEnd !== undefined) clearTimeout(this.timerWaitBackEnd);
1549
- if ($("#node-input-serverHue").val() === undefined) {
1550
- // Someone has FULL deployed node-red, exit.
1551
- return;
1552
- }
1553
- this.timerWaitBackEnd = setTimeout(() => {
1554
- timerWaitBackEndCounter++;
1555
- if (timerWaitBackEndCounter > 20) {
1556
- timerWaitBackEndCounter = 0;
1557
- const myNotification = RED.notify("Something went wrong. Please make sure the HUE bridge connection is properly configured. For further info, see the node-red log. IF YOU ARE CREATING A NEW HUE CONFIGURATION NODE, PLEASE DEPLOY AND RETRY.",
1558
- {
1559
- modal: false,
1560
- fixed: true,
1561
- type: 'error',
1562
- buttons: [
1563
- {
1564
- text: "OK",
1565
- click: function (e) {
1566
- myNotification.close();
1567
- }
1568
- }]
1569
- })
1570
- $("#waitWindow").hide();
1571
- $("#mainWindow").show();
1572
- $("#tabs").hide();
1573
- return;
1574
- }
1575
- // Check wether the HUE node has is connected and the devices have already been read.
1576
- // ##########################################################
1577
- $.getJSON("knxultimateCheckHueConnected?serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
1578
- if (data.ready === true) {
1579
- Go();
1580
- } else {
1581
- checkConnection();
1582
- }
1583
- });
1584
- // ##########################################################
1585
- }, 500);
1586
- }
1587
- if ($("#node-input-serverHue").val() === "_ADD_") {
1588
- Go();
1589
- } else {
1590
- checkConnection();
1591
- }
1592
- // ################################################################
1593
-
1594
- },
1595
-
1596
- oneditsave: function () {
1597
- // Return to the info tab
1598
- try {
1599
- RED.sidebar.show("info");
1600
- } catch (error) { }
1601
-
1602
- //RED.sidebar.removeTab("tabNRColor");
1603
- if ($("#node-input-enableNodePINS").val() === "yes") {
1604
- this.outputs = 1;
1605
- this.inputs = 1;
1606
- } else {
1607
- this.outputs = 0;
1608
- this.inputs = 0;
1609
- }
1610
-
1611
- const nodeRef = this;
1612
- let collectedEffectRules = [];
1613
- try {
1614
- const effectItems = $("#node-input-effect-rule-container").editableList('items');
1615
- effectItems.each(function () {
1616
- const $row = $(this);
1617
- const knxValue = $row.find('.rowEffectKNXValue').val();
1618
- const hueEffect = $row.find('.rowEffectHueEffect').val();
1619
- if (hueEffect && hueEffect !== '') {
1620
- collectedEffectRules.push({
1621
- knxValue: knxValue !== undefined && knxValue !== null ? knxValue : '',
1622
- hueEffect
1623
- });
1624
- }
1625
- });
1626
- } catch (error) {
1627
- collectedEffectRules = [];
1628
- }
1629
- nodeRef.effectRules = collectedEffectRules;
1630
- const serialized = JSON.stringify(collectedEffectRules);
1631
- $("#node-input-effectRules").val(serialized);
1632
- this.effectRules = serialized;
1633
- this.updateLocalStateFromKNXWrite = $("#node-input-updateLocalStateFromKNXWrite").is(":checked"); // Starting from v 4.1.31
1634
- this._cachedHueLightDevices = [];
1635
- if (typeof this.__stopHueLocateSession === 'function') {
1636
- try { this.__stopHueLocateSession(); } catch (error) { /* empty */ }
1637
- this.__stopHueLocateSession = null;
1638
- }
1639
- if (typeof this.__cleanupNodeRemovalListener === 'function') {
1640
- try { RED.events.removeListener('nodes:remove', this.__cleanupNodeRemovalListener); } catch (error) { /* empty */ }
1641
- this.__cleanupNodeRemovalListener = null;
1642
- }
1643
- this.__locateSessionInfo = null;
1644
- },
1645
- oneditcancel: function () {
1646
- // Return to the info tab
1647
- try {
1648
- RED.sidebar.show("info");
1649
- } catch (error) { }
1650
- //RED.sidebar.removeTab("tabNRColor");
1651
- //RED.sidebar.show("help");
1652
-
1653
- this._cachedHueLightDevices = [];
1654
- if (typeof this.__stopHueLocateSession === 'function') {
1655
- try { this.__stopHueLocateSession(); } catch (error) { /* empty */ }
1656
- this.__stopHueLocateSession = null;
1657
- }
1658
- if (typeof this.__cleanupNodeRemovalListener === 'function') {
1659
- try { RED.events.removeListener('nodes:remove', this.__cleanupNodeRemovalListener); } catch (error) { /* empty */ }
1660
- this.__cleanupNodeRemovalListener = null;
1661
- }
1662
- this.__locateSessionInfo = null;
1663
- },
1664
- oneditdelete: function () {
1665
- if (typeof this.oneditclose === 'function') {
1666
- try { this.oneditclose(); } catch (error) { /* empty */ }
1667
- }
1668
- },
1669
- oneditclose: function () {
1670
- if (typeof this.__stopHueLocateSession === 'function') {
1671
- try { this.__stopHueLocateSession(); } catch (error) { /* empty */ }
1672
- }
1673
- if (typeof this.__cleanupNodeRemovalListener === 'function') {
1674
- try { RED.events.removeListener('nodes:remove', this.__cleanupNodeRemovalListener); } catch (error) { /* empty */ }
1675
- this.__cleanupNodeRemovalListener = null;
1676
- }
1677
- this.__stopHueLocateSession = null;
1678
- this.__hueLocateActive = false;
1679
- this.__locateSessionInfo = null;
1680
- },
1681
- oneditresize: function (size) {
1682
- //var height = size.height;
1683
- //$('.editor-tray-content').css({ "width": "2700px" });
1684
- }
1685
- });
1686
-
1687
- function rgbHex(red, green, blue, alpha) {
1688
- const toHex = (red, green, blue, alpha) => ((blue | green << 8 | red << 16) | 1 << 24).toString(16).slice(1) + alpha;
1689
- const parseCssRgbString = (input) => {
1690
- const parts = input.replace(/rgba?\(([^)]+)\)/, '$1').split(/[,\s/]+/).filter(Boolean);
1691
- if (parts.length < 3) {
1692
- return;
1693
- }
1694
-
1695
- const parseValue = (value, max) => {
1696
- value = value.trim();
1697
-
1698
- if (value.endsWith('%')) {
1699
- return Math.min(Number.parseFloat(value) * max / 100, max);
1700
- }
1701
-
1702
- return Math.min(Number.parseFloat(value), max);
1703
- };
1704
-
1705
- const red = parseValue(parts[0], 255);
1706
- const green = parseValue(parts[1], 255);
1707
- const blue = parseValue(parts[2], 255);
1708
- let alpha;
1709
-
1710
- if (parts.length === 4) {
1711
- alpha = parseValue(parts[3], 1);
1712
- }
1713
-
1714
- return [red, green, blue, alpha];
1715
- };
1716
-
1717
- let isPercent = (red + (alpha || '')).toString().includes('%');
1718
-
1719
- if (typeof red === 'string' && !green) { // Single string parameter.
1720
- const parsed = parseCssRgbString(red);
1721
- if (!parsed) {
1722
- throw new TypeError('Invalid or unsupported color format.');
1723
- }
1724
-
1725
- isPercent = false;
1726
- [red, green, blue, alpha] = parsed;
1727
- } else if (alpha !== undefined) {
1728
- alpha = Number.parseFloat(alpha);
1729
- }
1730
-
1731
- if (typeof red !== 'number'
1732
- || typeof green !== 'number'
1733
- || typeof blue !== 'number'
1734
- || red > 255
1735
- || green > 255
1736
- || blue > 255
1737
- ) {
1738
- throw new TypeError('Expected three numbers below 256');
1739
- }
1740
-
1741
- if (typeof alpha === 'number') {
1742
- if (!isPercent && alpha >= 0 && alpha <= 1) {
1743
- alpha = Math.round(255 * alpha);
1744
- } else if (isPercent && alpha >= 0 && alpha <= 100) {
1745
- alpha = Math.round(255 * alpha / 100);
1746
- } else {
1747
- throw new TypeError(`Expected alpha value (${alpha}) as a fraction or percentage`);
1748
- }
1749
-
1750
- alpha = (alpha | 1 << 8).toString(16).slice(1); // eslint-disable-line no-mixed-operators
1751
- } else {
1752
- alpha = '';
1753
- }
1754
-
1755
- return toHex(red, green, blue, alpha);
1756
- }
1757
- }())
1758
-
1759
- </script>
1760
-
1761
-
1762
-
1763
- <script type="text/html" data-template-name="knxUltimateHueLight">
1764
- <div class="form-row knx-ultimate-v8-upgrade-row">
1765
- <button type="button" class="red-ui-button knx-ultimate-v8-upgrade-button" data-i18n="[title]node-red-contrib-knx-ultimate/knxUltimateUtility:knxUltimateUtility.v8_upgrade.button_title">
1766
- <i class="fa fa-arrow-circle-up" aria-hidden="true"></i>
1767
- <span data-i18n="node-red-contrib-knx-ultimate/knxUltimateUtility:knxUltimateUtility.v8_upgrade.button"></span>
1768
- </button>
1769
- </div>
1770
- <div class="form-row hue-legacy-controller-notice" role="note" style="box-sizing:border-box; padding:10px 12px; margin-bottom:14px; border-left:4px solid #d79b00; background:#fff8df; color:#4d3a00;">
1771
- <i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#a15c00; margin-right:6px;"></i>
1772
- <span data-i18n="node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.legacy_node_notice"></span>
1773
- </div>
1774
- <div class="form-row hue-legacy-migration-action" style="margin-top:-6px; margin-bottom:14px;">
1775
- <a class="hue-legacy-migration-video" href="https://youtu.be/f0Evf2QFI7c" target="_blank" rel="noopener noreferrer" style="display:inline-flex; align-items:center; gap:5px; margin-right:10px;" data-i18n="[title]node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.migration_video_title">
1776
- <i class="fa fa-youtube-play" aria-hidden="true" style="color:#ff0000;"></i>
1777
- <span data-i18n="node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.migration_video"></span>
1778
- </a>
1779
- <button type="button" class="red-ui-button hue-legacy-migrate-flow" style="background:#d97706; border-color:#b45309; color:#fff !important; font-weight:700;" data-i18n="[title]node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.migration_button_title">
1780
- <i class="fa fa-exchange"></i> <span data-i18n="node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.migration_button"></span>
1781
- </button>
1782
- <div class="form-tips hue-controller-migration-disclaimer" style="margin-top:8px;" data-i18n="node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.migration_disclaimer"></div>
1783
- </div>
1784
- <div class="form-row" style="margin-bottom:10px;">
1785
- <span style="color:#ff0000"><i class="fa fa-youtube"></i></span>&nbsp;<a target="_blank" href="https://www.youtube.com/playlist?list=PL9Yh1bjbLAYrU8PsVhW4xzEug2WtVFv3E"><b>KNX-Ultimate video tutorials (YouTube playlist)</b></a>
1786
- </div>
1787
- <div id="waitWindow">
1788
- <br/><br/>
1789
- <p align="center">
1790
- <i class="fa-solid fa-hourglass-start fa-spin-pulse fa-2x"></i><br/><br/>
1791
- <span data-i18n="hue-config.properties.wait_message"></span>
1792
- </p>
1793
- </div>
1794
- <div id="mainWindow" hidden>
1795
- <div class="form-row">
1796
- <b><span data-i18n="knxUltimateHueLight.title"></span></b>&nbsp&nbsp<span style="color:red" &nbsp &nbsp<i class="fa fa-youtube"></i></span>&nbsp<a
1797
- target="_blank" href="https://youtu.be/jjEUI1J8bkA"><u><span data-i18n="common.youtube_sample"></span></u></a>
1798
- <br />
1799
- <br />
1800
- <label for="node-input-server">
1801
- <img
1802
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAKnRFWHRDcmVhdGlvbiBUaW1lAEZyIDYgQXVnIDIwMTAgMjE6NTI6MTkgKzAxMDD84aS8AAAAB3RJTUUH3gYYCicNV+4WIQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAARnQU1BAACxjwv8YQUAAACUSURBVHjaY2CgFZg5c+Z/ZEyWAZ8+f/6/ZsWs/xoamqMGkGrA6Wla/1+fVARjEBuGsSoGmY4eZSCNL59d/g8DIDbIAHR14OgFGQByKjIGKX5+6/T///8gGMQGiV1+/B0Fg70GIkD+RMYgxf/O5/7//2MSmAZhkBi6OrgB6Bg5DGB4ajr3f2xqsYYLSDE2THJUDg0AAAqyDVd4tp4YAAAAAElFTkSuQmCC"></img>
1803
- <span data-i18n="common.knx_gw"></span>
1804
- </label>
1805
- <input type="text" id="node-input-server" />
1806
- </div>
1807
-
1808
- <div class="form-row">
1809
- <label for="node-input-serverHue">
1810
- <img
1811
- src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAEKADAAQAAAABAAAAEAAAAAA0VXHyAAABFUlEQVQ4EZWSsWoCQRCG1yiENEFEi6QSkjqWWoqFoBYJ+Br6JHkMn8Iibd4ihQpaJIhWNkry/ZtdGZY78Qa+m39nZ+dm9s4550awglNBluS/gVtAX6KgDclf68w2OThgfR9iT/jnoEv4TtByDThWTCDKW4SSZTf/zj9/eZbN+izTDuKGimu0vPF8B/YN8aC8LmcOj/AAn9CFTEs70Js/oGqy79C69bqJ5XbQI2kGO5N8QL9D08S8zBtBF5ZaVsznpCMoqJnVdjTpb1Db0fwIWmQV6BLXzFOYgA6/gDVfQN9bBWp2J2hdWDPoBV5FrKnAJutHikk/CHHR8i7x4iG7qQ720IYvu3GFbpHjx3pFrOFYkA354z/5bkK826phyAAAAABJRU5ErkJggg==" />
1812
- <span data-i18n="common.hue_bridge"></span>
1813
- </label>
1814
- <input type="text" id="node-input-serverHue" />
1815
- </div>
1816
-
1817
- <br />
1818
- <p>
1819
- <b><span data-i18n="common.philips_hue"></span></b>
1820
- </p>
1821
-
1822
- <div class="form-row">
1823
- <label for="node-input-name">
1824
- <i class="fa fa-play-circle"></i> <span data-i18n="common.name"></span>
1825
- </label>
1826
- <input type="text" id="node-input-name" placeholder="Enter your hue device name"
1827
- style="flex:1 1 240px; min-width:240px; max-width:240px;" />
1828
- <button type="button" class="red-ui-button hue-refresh-devices"
1829
- style="margin-left:6px; color:#1b7d33; border-color:#1b7d33;" title="Refresh Hue devices">
1830
- <i class="fa fa-sync"></i>
1831
- </button>
1832
- <button type="button" class="red-ui-button hue-locate-device"
1833
- style="margin-left:6px; color:#ff9800; border-color:#ff9800;" title="Locate selected Hue device">
1834
- <i class="fa fa-play"></i>
1835
- </button>
1836
- <span class="hue-devices-loading" style="margin-left:6px; display:none; color:#1b7d33;">
1837
- <i class="fa fa-circle-notch fa-spin"></i>
1838
- </span>
1839
- <input type="hidden" id="node-input-hueDevice" />
1840
- </div>
1841
-
1842
- <br />
1843
-
1844
- <div id="tabs" style="display:none; width: 900px;">
1845
- <ul>
1846
- <li><a href="#tabs-1"><i class="fa-solid fa-toggle-on"></i> <span data-i18n="knxUltimateHueLight.tabs.switch"></span></a></li>
1847
- <li><a href="#tabs-2"><i class="fa-solid fa-arrow-up-wide-short"></i> <span data-i18n="knxUltimateHueLight.tabs.dim"></span></a></li>
1848
- <li><a href="#tabs-3"><i class="fa-solid fa-temperature-quarter"></i> <span data-i18n="knxUltimateHueLight.tabs.tunable_white"></span></a></li>
1849
- <li><a href="#tabs-4"><i class="fa-solid fa-palette"></i> <span data-i18n="knxUltimateHueLight.tabs.rgb_hsv"></span></a></li>
1850
- <li><a href="#tabs-5"><i class="fa-solid fa-heart-circle-check"></i> <span data-i18n="knxUltimateHueLight.tabs.effects"></span></a></li>
1851
- <li><a href="#tabs-6"><i class="fa-solid fa-code-merge"></i> <span data-i18n="knxUltimateHueLight.tabs.behaviour"></span></a></li>
1852
- </ul>
1853
- <div id="tabs-1">
1854
- <p>
1855
- <div class="form-row">
1856
- <label for="node-input-nameLightSwitch" style="width:110px;"><i class="fa fa-play-circle-o"></i> <span data-i18n="knxUltimateHueLight.control"></span></label>
1857
-
1858
- <label for="node-input-GALightSwitch" style="width:20px;"><span data-i18n="common.ga"></span></label>
1859
- <input type="text" id="node-input-GALightSwitch" placeholder="Ex: 1/1/1"
1860
- style="width:70px;margin-left: 5px; text-align: left;">
1861
-
1862
- <label for="node-input-dptLightSwitch" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1863
- <select id="node-input-dptLightSwitch" style="width:140px;"></select>
1864
-
1865
- <label for="node-input-nameLightSwitch" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="common.name"></span></label>
1866
- <input type="text" id="node-input-nameLightSwitch" style="width:190px;margin-left: 5px; text-align: left;">
1867
- </div>
1868
- <div class="form-row">
1869
- <label for="node-input-nameLightState" style="width:110px;"><i class="fa fa-question-circle"></i> <span data-i18n="knxUltimateHueLight.status"></span></label>
1870
-
1871
- <label for="node-input-GALightState" style="width:20px;"><span data-i18n="common.ga"></span></label>
1872
- <input type="text" id="node-input-GALightState" placeholder="Ex: 1/1/1"
1873
- style="width:70px;margin-left: 5px; text-align: left;">
1874
-
1875
- <label for="node-input-dptLightState" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1876
- <select id="node-input-dptLightState" style="width:140px;"></select>
1877
-
1878
- <label for="node-input-nameLightState" style="width:50px; margin-left: 0px; text-align: right;"><span
1879
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
1880
- <input type="text" id="node-input-nameLightState" style="width:190px;margin-left: 5px; text-align: left;">
1881
- </div>
1882
- </p>
1883
- </div>
1884
- <div id="tabs-2">
1885
- <p>
1886
- <img src="resources/node-red-contrib-knx-ultimate/dim.png" style="width: 900px;">
1887
- <div class="form-row">
1888
- <label for="node-input-nameLightDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control dim</label>
1889
-
1890
- <label for="node-input-GALightDIM" style="width:20px;"><span data-i18n="common.ga"></span></label>
1891
- <input type="text" id="node-input-GALightDIM" placeholder="Ex: 1/1/1"
1892
- style="width:70px;margin-left: 5px; text-align: left;">
1893
-
1894
- <label for="node-input-dptLightDIM" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1895
- <select id="node-input-dptLightDIM" style="width:140px;"></select>
1896
-
1897
- <label for="node-input-nameLightDIM" style="width:50px; margin-left: 0px; text-align: right;"><span
1898
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
1899
- <input type="text" id="node-input-nameLightDIM" style="width:190px;margin-left: 5px; text-align: left;">
1900
- </div>
1901
- <div class="form-row">
1902
- <label for="node-input-nameLightBrightness" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
1903
- %</label>
1904
-
1905
- <label for="node-input-GALightBrightness" style="width:20px;"><span data-i18n="common.ga"></span></label>
1906
- <input type="text" id="node-input-GALightBrightness" placeholder="Ex: 1/1/1"
1907
- style="width:70px;margin-left: 5px; text-align: left;">
1908
-
1909
- <label for="node-input-dptLightBrightness" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1910
- <select id="node-input-dptLightBrightness" style="width:140px;"></select>
1911
-
1912
- <label for="node-input-nameLightBrightness" style="width:50px; margin-left: 0px; text-align: right;"><span
1913
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
1914
- <input type="text" id="node-input-nameLightBrightness" style="width:190px;margin-left: 5px; text-align: left;">
1915
- </div>
1916
-
1917
- <div class="form-row">
1918
- <label for="node-input-nameLightBrightnessState" style="width:110px;"><i class="fa fa-question-circle"></i> Status %</label>
1919
-
1920
- <label for="node-input-GALightBrightnessState" style="width:20px;"><span
1921
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
1922
- <input type="text" id="node-input-GALightBrightnessState" placeholder="Ex: 1/1/1"
1923
- style="width:70px;margin-left: 5px; text-align: left;">
1924
-
1925
- <label for="node-input-dptLightBrightnessState"
1926
- style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
1927
- <select id="node-input-dptLightBrightnessState" style="width:140px;"></select>
1928
-
1929
- <label for="node-input-nameLightBrightnessState" style="width:50px; margin-left: 0px; text-align: right;"><span
1930
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
1931
- <input type="text" id="node-input-nameLightBrightnessState"
1932
- style="width:190px;margin-left: 5px; text-align: left;">
1933
- </div>
1934
- <div class="form-row">
1935
- <label for="node-input-dimSpeed" style="width:260px">
1936
- <i class="fa fa-bolt"></i> Dim Speed (ms)
1937
- </label>
1938
- <input type="text" id="node-input-dimSpeed" placeholder='Default is 5000' style="width:210px">
1939
- </div>
1940
- <div class="form-row">
1941
- <label for="node-input-minDimLevelLight" style="width:260px;">
1942
- <i class="fa fa-clone"></i> Min Dim Brightness
1943
- </label>
1944
- <select id="node-input-minDimLevelLight">
1945
- <option value="useHueLightLevel" data-i18n="knxUltimateHueLight.use_min_brightness"></option>
1946
- </select>
1947
- </div>
1948
- <div class="form-row">
1949
- <label for="node-input-maxDimLevelLight" style="width:260px;">
1950
- <i class="fa fa-clone"></i> Max Dim Brightness
1951
- </label>
1952
- <select id="node-input-maxDimLevelLight"></select>
1953
- </div>
1954
- </p>
1955
- </div>
1956
- <div id="tabs-3">
1957
- <p>
1958
- <img src="resources/node-red-contrib-knx-ultimate/tunablewhite.png" style="width: 900px;">
1959
- <div class="form-row">
1960
- <label for="node-input-nameLightKelvinDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control dim</label>
1961
-
1962
- <label for="node-input-GALightKelvinDIM" style="width:20px;"><span data-i18n="common.ga"></span></label>
1963
- <input type="text" id="node-input-GALightKelvinDIM" placeholder="Ex: 1/1/1"
1964
- style="width:70px;margin-left: 5px; text-align: left;">
1965
-
1966
- <label for="node-input-dptLightKelvinDIM" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1967
- <select id="node-input-dptLightKelvinDIM" style="width:140px;"></select>
1968
-
1969
- <label for="node-input-nameLightKelvinDIM" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="common.name"></span></label>
1970
- <input type="text" id="node-input-nameLightKelvinDIM" style="width:190px;margin-left: 5px; text-align: left;">
1971
- </div>
1972
- <div class="form-row">
1973
- <label for="node-input-nameLightKelvinPercentage" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
1974
- %</label>
1975
-
1976
- <label for="node-input-GALightKelvinPercentage" style="width:20px;"><span data-i18n="common.ga"></span></label>
1977
- <input type="text" id="node-input-GALightKelvinPercentage" placeholder="Ex: 1/1/1"
1978
- style="width:70px;margin-left: 5px; text-align: left;">
1979
-
1980
- <label for="node-input-dptLightKelvinPercentage" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1981
- <select id="node-input-dptLightKelvinPercentage" style="width:140px;"></select>
1982
-
1983
- <label for="node-input-nameLightKelvinPercentage"
1984
- style="width:50px; margin-left: 0px; text-align: right;">Name</label>
1985
- <input type="text" id="node-input-nameLightKelvinPercentage" style="width:190px;margin-left: 5px; text-align: left;">
1986
- </div>
1987
- <div class="form-row">
1988
- <label for="node-input-nameLightKelvinPercentageState" style="width:110px;"><i class="fa fa-question-circle"></i> Status
1989
- %</label>
1990
-
1991
- <label for="node-input-GALightKelvinPercentageState" style="width:20px;"><span data-i18n="common.ga"></span></label>
1992
- <input type="text" id="node-input-GALightKelvinPercentageState" placeholder="Ex: 1/1/1"
1993
- style="width:70px;margin-left: 5px; text-align: left;">
1994
-
1995
- <label for="node-input-dptLightKelvinPercentageState" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
1996
- <select id="node-input-dptLightKelvinPercentageState" style="width:140px;"></select>
1997
-
1998
- <label for="node-input-nameLightKelvinPercentageState" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="common.name"></span></label>
1999
- <input type="text" id="node-input-nameLightKelvinPercentageState" style="width:190px;margin-left: 5px; text-align: left;">
2000
- </div>
2001
- <div class="form-row">
2002
- <label for="node-input-nameLightKelvin" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
2003
- Kelvin</label>
2004
-
2005
- <label for="node-input-GALightKelvin" style="width:20px;"><span data-i18n="common.ga"></span></label>
2006
- <input type="text" id="node-input-GALightKelvin" placeholder="Ex: 1/1/1"
2007
- style="width:70px;margin-left: 5px; text-align: left;">
2008
-
2009
- <label for="node-input-dptLightKelvin" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2010
- <select id="node-input-dptLightKelvin" style="width:140px;"></select>
2011
-
2012
- <label for="node-input-nameLightKelvin" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="common.name"></span></label>
2013
- <input type="text" id="node-input-nameLightKelvin" style="width:190px;margin-left: 5px; text-align: left;">
2014
- </div>
2015
- <div class="form-row">
2016
- <label for="node-input-nameLightKelvinState" style="width:110px;"><i class="fa fa-question-circle"></i> Status
2017
- Kelvin</label>
2018
- <label for="node-input-GALightKelvinState" style="width:20px;"><span data-i18n="common.ga"></span></label>
2019
- <input type="text" id="node-input-GALightKelvinState" placeholder="Ex: 1/1/1"
2020
- style="width:70px;margin-left: 5px; text-align: left;">
2021
-
2022
- <label for="node-input-dptLightKelvinState" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2023
- <select id="node-input-dptLightKelvinState" style="width:140px;"></select>
2024
-
2025
- <label for="node-input-nameLightKelvinState" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="common.name"></span></label>
2026
- <input type="text" id="node-input-nameLightKelvinState" style="width:190px;margin-left: 5px; text-align: left;">
2027
- </div>
2028
- <div class="form-row">
2029
- <label style="width:170px" for="node-input-invertDimTunableWhiteDirection">
2030
- <i class="fa fa-shuffle"></i> Invert dim direction
2031
- </label>
2032
- <input type="checkbox" id="node-input-invertDimTunableWhiteDirection"
2033
- style="display:inline-block; width:auto; vertical-align:top;" />
2034
- </div>
2035
- </p>
2036
- </div>
2037
- <div id="tabs-4">
2038
- <p>
2039
- <img src="resources/node-red-contrib-knx-ultimate/rgb.png" style="width: 900px;">
2040
- <p><b> RGB section</b></p>
2041
- <div class="form-row">
2042
- <label for="node-input-nameLightColor" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control rgb</label>
2043
-
2044
- <label for="node-input-GALightColor" style="width:20px;"><span
2045
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2046
- <input type="text" id="node-input-GALightColor" placeholder="Ex: 1/1/1"
2047
- style="width:70px;margin-left: 5px; text-align: left;">
2048
-
2049
- <label for="node-input-dptLightColor" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2050
- <select id="node-input-dptLightColor" style="width:140px;"></select>
2051
-
2052
- <label for="node-input-nameLightColor" style="width:50px; margin-left: 0px; text-align: right;"><span
2053
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2054
- <input type="text" id="node-input-nameLightColor" style="width:190px;margin-left: 5px; text-align: left;">
2055
- </div>
2056
- <div class="form-row">
2057
- <label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-question-circle"></i> Status rgb</label>
2058
-
2059
- <label for="node-input-GALightColorState" style="width:20px;"><span
2060
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2061
- <input type="text" id="node-input-GALightColorState" placeholder="Ex: 1/1/1"
2062
- style="width:70px;margin-left: 5px; text-align: left;">
2063
-
2064
- <label for="node-input-dptLightColorState" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2065
- <select id="node-input-dptLightColorState" style="width:140px;"></select>
2066
-
2067
- <label for="node-input-nameLightColorState" style="width:50px; margin-left: 0px; text-align: right;"><span
2068
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2069
- <input type="text" id="node-input-nameLightColorState" style="width:190px;margin-left: 5px; text-align: left;">
2070
- </div>
2071
-
2072
- <p><b> HSV section</b></p>
2073
- <!-- // HSV Color change
2074
- // nameLightHSV_H_DIM: { value: "" },
2075
- // GALightHSV_H_DIM: { value: "" },
2076
- // dptLightHSV_H_DIM: { value: "" }, -->
2077
- <div class="form-row">
2078
- <label for="node-input-nameLightHSV_H_DIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control H dim</label>
2079
-
2080
- <label for="node-input-GALightHSV_H_DIM" style="width:20px;"><span
2081
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2082
- <input type="text" id="node-input-GALightHSV_H_DIM" placeholder="Ex: 1/1/1"
2083
- style="width:70px;margin-left: 5px; text-align: left;">
2084
-
2085
- <label for="node-input-dptLightHSV_H_DIM" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2086
- <select id="node-input-dptLightHSV_H_DIM" style="width:140px;"></select>
2087
-
2088
- <label for="node-input-nameLightHSV_H_DIM" style="width:50px; margin-left: 0px; text-align: right;"><span
2089
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2090
- <input type="text" id="node-input-nameLightHSV_H_DIM" style="width:190px;margin-left: 5px; text-align: left;">
2091
- </div>
2092
- <div class="form-row">
2093
- <label for="node-input-nameLightHSV_H_State" style="width:110px;"><i class="fa fa-question-circle"></i> Status H %</label>
2094
-
2095
- <label for="node-input-GALightHSV_H_State" style="width:20px;"><span
2096
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2097
- <input type="text" id="node-input-GALightHSV_H_State" placeholder="Ex: 1/1/1"
2098
- style="width:70px;margin-left: 5px; text-align: left;">
2099
-
2100
- <label for="node-input-dptLightHSV_H_State" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2101
- <select id="node-input-dptLightHSV_H_State" style="width:140px;"></select>
2102
-
2103
- <label for="node-input-nameLightHSV_H_State" style="width:50px; margin-left: 0px; text-align: right;"><span
2104
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2105
- <input type="text" id="node-input-nameLightHSV_H_State" style="width:190px;margin-left: 5px; text-align: left;">
2106
- </div>
2107
-
2108
- <!-- // HSV Saturation change
2109
- nameLightHSV_S_DIM: { value: "" },
2110
- GALightHSV_S_DIM: { value: "" },
2111
- dptLightHSV_S_DIM: { value: "" },
2112
- nameLightHSV_S_State: { value: "" },
2113
- GALightHSV_S_State: { value: "" },
2114
- dptLightHSV_S_State: { value: "" }, -->
2115
- <div class="form-row">
2116
- <label for="node-input-nameLightHSV_S_DIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control S dim</label>
2117
-
2118
- <label for="node-input-GALightHSV_S_DIM" style="width:20px;"><span
2119
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2120
- <input type="text" id="node-input-GALightHSV_S_DIM" placeholder="Ex: 1/1/1"
2121
- style="width:70px;margin-left: 5px; text-align: left;">
2122
-
2123
- <label for="node-input-dptLightHSV_S_DIM" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2124
- <select id="node-input-dptLightHSV_S_DIM" style="width:140px;"></select>
2125
-
2126
- <label for="node-input-nameLightHSV_S_DIM" style="width:50px; margin-left: 0px; text-align: right;"><span
2127
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2128
- <input type="text" id="node-input-nameLightHSV_S_DIM" style="width:190px;margin-left: 5px; text-align: left;">
2129
- </div>
2130
- <div class="form-row">
2131
- <label for="node-input-nameLightHSV_S_State" style="width:110px;"><i class="fa fa-question-circle"></i> Status S %</label>
2132
-
2133
- <label for="node-input-GALightHSV_S_State" style="width:20px;"><span
2134
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2135
- <input type="text" id="node-input-GALightHSV_S_State" placeholder="Ex: 1/1/1"
2136
- style="width:70px;margin-left: 5px; text-align: left;">
2137
-
2138
- <label for="node-input-dptLightHSV_S_State" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2139
- <select id="node-input-dptLightHSV_S_State" style="width:140px;"></select>
2140
-
2141
- <label for="node-input-nameLightHSV_S_State" style="width:50px; margin-left: 0px; text-align: right;"><span
2142
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2143
- <input type="text" id="node-input-nameLightHSV_S_State" style="width:190px;margin-left: 5px; text-align: left;">
2144
- </div>
2145
-
2146
- <!-- // HSV V Brightness change
2147
- nameLightHSV_V_DIM: { value: "" },
2148
- GALightHSV_V_DIM: { value: "" },
2149
- dptLightHSV_V_DIM: { value: "" },
2150
- nameLightHSV_V_State: { value: "" },
2151
- GALightHSV_V_State: { value: "" },
2152
- dptLightHSV_V_State: { value: "" }, -->
2153
- <div class="form-row">
2154
- <label for="node-input-HSVDimSpeed" style="width:260px">
2155
- <i class="fa fa-bolt"></i> Dim Speed (ms)
2156
- </label>
2157
- <input type="text" id="node-input-HSVDimSpeed" placeholder='Default is 5000' style="width:210px">
2158
- </div>
2159
-
2160
- </p>
2161
- </div>
2162
- <div id="tabs-5">
2163
- <p>
2164
- <div class="form-tips" style="margin-bottom:6px;">
2165
- <i class="fa fa-circle-info" style="color:forestgreen; margin-right:4px;"></i>
2166
- <span data-i18n="knxUltimateHueLight.effect_base_label"></span>
2167
- </div>
2168
- <div class="form-row">
2169
- <label for="node-input-nameLightBlink" style="width:110px;"><i class="fa fa-play-circle-o"></i> Blink</label>
2170
-
2171
- <label for="node-input-GALightBlink" style="width:20px;"><span
2172
- data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
2173
- <input type="text" id="node-input-GALightBlink" placeholder="Ex: 1/1/1"
2174
- style="width:70px;margin-left: 5px; text-align: left;">
2175
-
2176
- <label for="node-input-dptLightBlink" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2177
- <select id="node-input-dptLightBlink" style="width:140px;"></select>
2178
-
2179
- <label for="node-input-nameLightBlink" style="width:50px; margin-left: 0px; text-align: right;"><span
2180
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2181
- <input type="text" id="node-input-nameLightBlink" style="width:190px;margin-left: 5px; text-align: left;">
2182
- </div>
2183
-
2184
- <div id="divColorCycle">
2185
- <div class="form-row">
2186
- <label for="node-input-nameLightColorCycle" style="width:110px;"><i class="fa fa-play-circle-o"></i> Color
2187
- Cycle</label>
2188
-
2189
- <label for="node-input-GALightColorCycle" style="width:20px;"><span data-i18n="common.ga"></span></label>
2190
- <input type="text" id="node-input-GALightColorCycle" placeholder="Ex: 1/1/1"
2191
- style="width:70px;margin-left: 5px; text-align: left;">
2192
-
2193
- <label for="node-input-dptLightColorCycle" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2194
- <select id="node-input-dptLightColorCycle" style="width:140px;"></select>
2195
-
2196
- <label for="node-input-nameLightColorCycle" style="width:50px; margin-left: 0px; text-align: right;"><span
2197
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2198
- <input type="text" id="node-input-nameLightColorCycle" style="width:190px;margin-left: 5px; text-align: left;">
2199
- </div>
2200
- </div>
2201
-
2202
- <hr style="margin:12px 0;">
2203
-
2204
- <div id="divHueEffectsContainer">
2205
- <div class="form-tips" style="margin-bottom:6px;">
2206
- <i class="fa fa-circle-info" style="color:forestgreen; margin-right:4px;"></i>
2207
- <span data-i18n="knxUltimateHueLight.effect_native_label"></span>
2208
- </div>
2209
- <div id="divHueEffectsNoSupport" class="form-tips" data-i18n="knxUltimateHueLight.effect_not_supported" style="display:none;"></div>
2210
- <div id="divHueEffectsContent" style="display:none;">
2211
- <div class="form-row">
2212
- <label for="node-input-nameLightEffect" style="width:110px;"><i class="fa fa-wand-magic-sparkles"></i> <span data-i18n="knxUltimateHueLight.effect_command"></span></label>
2213
-
2214
- <label for="node-input-GALightEffect" style="width:20px;"><span data-i18n="common.ga"></span></label>
2215
- <input type="text" id="node-input-GALightEffect" placeholder="Ex: 1/1/1"
2216
- style="width:70px;margin-left: 5px; text-align: left;">
2217
-
2218
- <label for="node-input-dptLightEffect" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2219
- <select id="node-input-dptLightEffect" style="width:140px;"></select>
2220
-
2221
- <label for="node-input-nameLightEffect" style="width:50px; margin-left: 0px; text-align: right;"><span
2222
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2223
- <input type="text" id="node-input-nameLightEffect" style="width:190px;margin-left: 5px; text-align: left;">
2224
- </div>
2225
-
2226
- <div class="form-row">
2227
- <label for="node-input-nameLightEffectStatus" style="width:110px;"><i class="fa fa-circle-info"></i> <span data-i18n="knxUltimateHueLight.effect_status"></span></label>
2228
-
2229
- <label for="node-input-GALightEffectStatus" style="width:20px;"><span data-i18n="common.ga"></span></label>
2230
- <input type="text" id="node-input-GALightEffectStatus" placeholder="Ex: 1/1/1"
2231
- style="width:70px;margin-left: 5px; text-align: left;">
2232
-
2233
- <label for="node-input-dptLightEffectStatus" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2234
- <select id="node-input-dptLightEffectStatus" style="width:140px;"></select>
2235
-
2236
- <label for="node-input-nameLightEffectStatus" style="width:50px; margin-left: 0px; text-align: right;"><span
2237
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2238
- <input type="text" id="node-input-nameLightEffectStatus" style="width:190px;margin-left: 5px; text-align: left;">
2239
- </div>
2240
-
2241
- <div class="form-row" id="divEffectMappings">
2242
- <label style="width:110px;"><i class="fa fa-list-check"></i> <span data-i18n="knxUltimateHueLight.effect_mapping"></span></label>
2243
- <div style="margin-left:5px; width: calc(100% - 120px);">
2244
- <input type="hidden" id="node-input-effectRules">
2245
- <ol id="node-input-effect-rule-container" style="margin:0; padding:0;"></ol>
2246
- <div style="margin-top:5px;">
2247
- <button type="button" id="node-input-effect-autofill" class="red-ui-button"><span data-i18n="knxUltimateHueLight.effect_autofill"></span></button>
2248
- </div>
2249
- <div class="form-tips">
2250
- <i class="fa fa-circle-info" style="color:forestgreen; margin-right:4px;"></i>
2251
- <span data-i18n="knxUltimateHueLight.effect_tip"></span>
2252
- </div>
2253
- <div class="form-tips">
2254
- <i class="fa fa-circle-info" style="color:forestgreen; margin-right:4px;"></i>
2255
- <span data-i18n="knxUltimateHueLight.effect_tip_status"></span>
2256
- </div>
2257
- </div>
2258
- </div>
2259
- </div>
2260
- </div>
2261
- </p>
2262
- </div>
2263
- <div id="tabs-6">
2264
- <p>
2265
- <div class="form-row">
2266
- <label style="width:260px;" for="node-input-readStatusAtStartup"><i class="fa fa-question-circle"></i> <span data-i18n="knxUltimateHueLight.read_status_startup"></span></label>
2267
- <select id="node-input-readStatusAtStartup">
2268
- <option value="no" data-i18n="knxUltimateHueLight.opt_no"></option>
2269
- <option value="yes" data-i18n="knxUltimateHueLight.opt_yes_emit"></option>
2270
- </select>
2271
- </div>
2272
- <div class="form-row" id="divUpdateKNXBrightnessStatusOnHUEOnOff">
2273
- <label style="width:260px;" for="node-input-updateKNXBrightnessStatusOnHUEOnOff">
2274
- <i class="fa fa-tag"></i> <span data-i18n="knxUltimateHueLight.knx_brightness_status"></span>
2275
- </label>
2276
- <select id="node-input-updateKNXBrightnessStatusOnHUEOnOff">
2277
- <option value="onhueoff" data-i18n="knxUltimateHueLight.knx_brightness_onhueoff"></option>
2278
- <option value="no" data-i18n="knxUltimateHueLight.knx_brightness_no"></option>
2279
- </select>
2280
- </div>
2281
- <div class="form-row">
2282
- <label style="width:260px;" for="node-input-updateLocalStateFromKNXWrite">
2283
- <i class="fa fa-database"></i> <span data-i18n="knxUltimateHueLight.update_local_state_from_knx_write"></span>
2284
- </label>
2285
- <input type="checkbox" id="node-input-updateLocalStateFromKNXWrite" style="display:inline-block; width:auto; vertical-align:top;" />
2286
- </div>
2287
- <div class="form-tips" style="margin-left:260px;" data-i18n="knxUltimateHueLight.update_local_state_from_knx_write_hint"></div><br/>
2288
- <div id ="divBehaviourBrightness">
2289
- <div class="form-row">
2290
- <label for="node-input-specifySwitchOnBrightness" style="width:260px;">
2291
- <i class="fa fa-tag"></i> <span data-i18n="knxUltimateHueLight.switch_on_behaviour"></span>
2292
- </label>
2293
- <select id="node-input-specifySwitchOnBrightness">
2294
- <option value="no" data-i18n="knxUltimateHueLight.none"></option>
2295
- <option value="temperature" data-i18n="knxUltimateHueLight.select_temperature_brightness"></option>
2296
- <option value="yes" data-i18n="knxUltimateHueLight.select_color"></option>
2297
- </select>
2298
- </div>
2299
-
2300
- <div class="form-row" id="divColorsAtSwitchOn">
2301
- <label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
2302
- </label>
2303
- <input type="hidden" id="node-input-colorAtSwitchOnDayTime">
2304
- <input type="color" id="colorPickerDay" style="width:260px">
2305
- <button id="getColorAtSwitchOnDayTimeButton" type="button" class="red-ui-button"><span data-i18n="knxUltimateHueLight.get_current"></span></button>
2306
- </div>
2307
- <div class="form-row" id="divTemperatureAtSwitchOn" hidden>
2308
- <label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
2309
- </label>
2310
- <select style="width:12%;" id="comboTemperatureAtSwitchOn"></select>
2311
- <select style="width:25%;" id="comboBrightnessAtSwitchOn"></select>
2312
- </div>
2313
-
2314
- <div id="divCCSBoxAtNightLighting">
2315
- <div class="form-row">
2316
- <label for="node-input-enableDayNightLighting" style="width:260px;">
2317
- <i class="fa fa-clone"></i> <span data-i18n="knxUltimateHueLight.night_lighting"></span>
2318
- </label>
2319
- <select id="node-input-enableDayNightLighting">
2320
- <option value="no" data-i18n="knxUltimateHueLight.no_night_lighting"></option>
2321
- <!-- <option value="temperature">Select temperature and brightness</option>
2322
- <option value="yes">Select color</option> -->
2323
- </select>
2324
- </div>
2325
-
2326
- <div id="divEnableDayNightLighting">
2327
-
2328
- <div class="form-row" id="divColorsAtSwitchOnNightTime">
2329
- <label for="node-input-colorAtSwitchOnNightTime" style="width:260px"></label>
2330
- <input type="hidden" id="node-input-colorAtSwitchOnNightTime">
2331
- <input type="color" id="colorPickerNight" style="width:260px">
2332
- <button id="getColorAtSwitchOnNightTimeButton" type="button" class="red-ui-button"><span data-i18n="knxUltimateHueLight.get_current"></span></button>
2333
- </div>
2334
- <div class="form-row" id="divTemperatureAtSwitchOnNightTime" hidden>
2335
- <label for="node-input-colorAtSwitchOnNightTime" style="width:260px"></label>
2336
- <select style="width:25%;" id="comboTemperatureAtSwitchOnNightTime"></select>
2337
- <select style="width:25%;" id="comboBrightnessAtSwitchOnNightTime"></select>
2338
- </div>
2339
-
2340
- <div class="form-row">
2341
- <label for="node-input-nameDaylightSensor" style="width:110px;"><i class="fa fa-clock-o"></i>
2342
- <span data-i18n="knxUltimateHueLight.day_night"></span></label>
2343
- <label for="node-input-GADaylightSensor" style="width:20px;"><span data-i18n="common.ga"></span></label>
2344
- <input type="text" id="node-input-GADaylightSensor" placeholder="Ex: 1/1/1"
2345
- style="width:70px;margin-left: 5px; text-align: left;">
2346
-
2347
- <label for="node-input-dptDaylightSensor" style="width:40px; margin-left: 0px; text-align: right;"><span data-i18n="common.dpt"></span></label>
2348
- <select id="node-input-dptDaylightSensor" style="width:140px;"></select>
2349
-
2350
- <label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span
2351
- data-i18n="knxUltimateHueLight.node-input-name"></span></label>
2352
- <input type="text" id="node-input-nameDaylightSensor" style="width:190px;margin-left: 5px; text-align: left;">
2353
- </div>
2354
- <div class="form-row">
2355
- <label style="width:170px" for="node-input-invertDayNight">
2356
- <i class="fa fa-shuffle"></i> <span data-i18n="knxUltimateHueLight.invert_day_night"></span>
2357
- </label>
2358
- <input type="checkbox" id="node-input-invertDayNight"
2359
- style="display:inline-block; width:auto; vertical-align:top;" />
2360
- </div>
2361
- <div class="form-row">
2362
- <label for="node-input-restoreDayMode" style="width:260px;">
2363
- <i class="fa fa-circle"></i> <span data-i18n="knxUltimateHueLight.override_night_mode"></span>
2364
- </label>
2365
- <select id="node-input-restoreDayMode">
2366
- <option value="no" data-i18n="knxUltimateHueLight.override_no"></option>
2367
- <option value="setDayByFastSwitchLightSingle" data-i18n="knxUltimateHueLight.override_set_day_fast_this"></option>
2368
- <option value="setDayByFastSwitchLightALL" data-i18n="knxUltimateHueLight.override_set_day_fast_all"></option>
2369
- </select>
2370
- </div>
2371
- </div>
2372
- </div>
2373
- <br/>
2374
- </div>
2375
- <div class="form-row">
2376
- <label for="node-input-enableNodePINS" style="width:260px;">
2377
- <i class="fa fa-circle"></i> <span data-i18n="knxUltimateHueLight.node_pins"></span>
2378
- </label>
2379
- <select id="node-input-enableNodePINS">
2380
- <option value="no" data-i18n="knxUltimateHueLight.node_pins_hide"></option>
2381
- <option value="yes" data-i18n="knxUltimateHueLight.node_pins_show"></option>
2382
- </select>
2383
- </div>
2384
- </p>
2385
- </div>
2386
- </div>
2387
- </div>
2388
- <br />
2389
- </script>
2390
-
2391
-
2392
- <script type="text/markdown" data-help-name="knxUltimateHueLight">
2393
- ### Upgrade to KNX Ultimate 8
2394
-
2395
- Version 7 shows a compact **Upgrade to v8** button at the top of this editor. It downloads a flow backup, installs the required HUE/Matter packages, converts compatible nodes, performs a full Deploy, verifies the saved flows and installs version 8. Restart the Node-RED service when prompted; reloading only the browser is not enough. Legacy KNX AI nodes stop the automatic operation.
2396
-
2397
- [Full upgrade guide](https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/Upgrade-to-v8)
2398
-
2399
- <br/>
2400
-
2401
- > **Deprecated:** This dedicated HUE node remains available for existing flows. Use **HUE Controller** for new work. The legacy node is marked `(deprecated)` in the palette and on the canvas, uses a lighter color than HUE Controller, and its editor opens with a migration notice.
2402
-
2403
- <p>This node controls Philips Hue lights (single or grouped) and maps their commands/states to KNX.</p>
2404
-
2405
- **General**
2406
-
2407
- |Property|Description|
2408
- |--|--|
2409
- | KNX GW | Select the KNX gateway to be used |
2410
- | Hue Bridge | Select the Hue Bridge to be used |
2411
- | Name | Hue light or grouped light to use (autocomplete while typing).|
2412
-
2413
- <br/>
2414
-
2415
- **Locate device**
2416
-
2417
- Use the `Locate` button (play icon) to start a Hue identify session for the selected resource. While the session is active the button switches to a stop icon and the bridge makes the light - or every light in the grouped resource - blink once per second. Press the button again to stop immediately; otherwise the session ends automatically after 10 minutes.
2418
-
2419
- <br/>
2420
-
2421
- **OPTIONS**
2422
-
2423
- Here you can link KNX Group Addresses to the available Hue commands/states.<br/>
2424
- Start typing in the GA field (name or Group Address); suggestions appear while you type.
2425
-
2426
- **Switch**
2427
-
2428
- |Property|Description|
2429
- |--|--|
2430
- | Control | This GA is used to turn on/off the Hue light via a boolean KNX value true/false|
2431
- | Status | Link this to the light's switch status group address|
2432
-
2433
- <br/>
2434
-
2435
- **Dim**
2436
-
2437
- |Property|Description|
2438
- |--|--|
2439
- | Control dim | Relative DIM of the Hue light. You can set the dimming speed in the **Behaviour** tab. |
2440
- | Control % | Changes the absolute Hue light's brightness (0-100%)|
2441
- | Status % | Link this to the light's brightness status KNX group address |
2442
- | Dim Speed (ms) | Dimming speed in milliseconds. Applies to both the light brightness and the tunable-white datapoints. Calculated over the 0%→100% range. |
2443
- | Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
2444
- | Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
2445
-
2446
- <br/>
2447
-
2448
- **Tunable White**
2449
-
2450
- |Property|Description|
2451
- |--|--|
2452
- | Control dim | Change white temperature using DPT 3.007 dimming. Speed is set in the **Behaviour** tab.|
2453
- | Control % | Change white temperature using DPT 5.001. 0 = full warm, 100 = full cold.|
2454
- | Status %| Temperature status GA. DPT 5.001 absolute value: 0 = full warm, 100 = full cold.|
2455
- | Control kelvin | **DPT 7.600: ** set temperature in Kelvin using the KNX range 2000-6535 (converted to Hue mirek).<br/>**DPT 9.002:** set temperature using Hue range 2000-6535 K (Ambiance starts at 2200 K). Conversions may introduce small deviations.|
2456
- | Status kelvin | **DPT 7.600: ** read temperature in Kelvin using KNX range 2000-6535 (converted from Hue).<br/>**DPT 9.002:** read temperature using Hue range 2000-6535 K (Ambiance starts at 2200 K). Conversions may introduce small deviations. |
2457
- | Invert dim direction | Inverts the DIM direction. |
2458
- <br/>
2459
-
2460
- **RGB/HSV**
2461
-
2462
- |Property|Description|
2463
- |--|--|
2464
- | **RGB section** ||
2465
- | Control rgb| Change color using RGB triplet (r,g,b). Gamut correction is handled. Sending a color turns the light on and sets color/brightness (perceptual). Sending r,g,b = 0 turns the light off. |
2466
- | Status rgb | The light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
2467
- | **HSV section** ||
2468
- | Color H dim | Cycle through HSV hue using DPT 3.007 dimming. Speed is set in the **Behaviour** tab.|
2469
- | Status H %| Status of the HSV chromatic circle.|
2470
- | Control S dim | Changes the light's color saturation, using DPT 3.007 dimming. You can set the dimming speed in the **_Behaviour_** tab.|
2471
- | Status S %| The light color saturation status group address.|
2472
- | Dim Speed (ms) | The dimming speed, in Milliseconds, from bottom to top scale. |
2473
-
2474
- For controlling the HSV "V" (brightness), use the standard controls under the **Dim** tab.
2475
-
2476
- <br/>
2477
-
2478
- **Effects**
2479
-
2480
- _Non-Hue basic effects_
2481
-
2482
- |Property|Description|
2483
- |--|--|
2484
- | Blink | _true_ Blink the light, _false_ Stop blinking. Blinks the light on and off. Useful for signalling. Works with all Hue lights. |
2485
- | Color Cycle | _true_ start cycle, _false_ Stop cycle. Randomly changes the Hue light's color at regular interval. Works with all Hue lights having color capabilities. The color effect will start 10 seconds after set. |
2486
-
2487
- _Hue native effects_
2488
-
2489
- Use the **Hue native effects** table to map your KNX values to the effects supported by the selected light (for example `candle`, `fireplace`, `prism`). Each row links a KNX value (boolean, numeric or textual, depending on the datapoint you pick) with a Hue effect. On the KNX side you can:
2490
-
2491
- - send the mapped value to activate that effect;
2492
- - optionally provide a status Group Address: the node emits the mapped value whenever the Hue bridge reports an effect change; if no mapping exists the raw effect name is sent (requires a textual DPT such as 16.xxx).
2493
-
2494
- <br/>
2495
-
2496
- **Behaviour**
2497
-
2498
- | Property | Description |
2499
- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2500
- | Read status at startup | Read the Hue light status at node-red's startup or node-red's full deploy, and send that status to the KNX BUS |
2501
- | KNX Brightness Status | Updates the KNX brightness group address status, whenever the Hue lamp is switched ON/OFF. The options are **When Hue light is Off send 0%. When Hue On, restore previous value (Default KNX behaviour) ** and**Leave as is (default Hue behaviour) ** . If you have KNX dimmer with brightness status, like MDT, the suggested option is _**When Hue light is Off send 0%. When Hue On, restore previous value (Default KNX behaviour)** _ |
2502
- | Update local cached Hue state from KNX bus writes | Advanced option, enabled by default. When enabled, writes arriving from the KNX bus also update the node's local cached Hue state immediately, without waiting for feedback/events from the Hue bridge. This gives faster local reactions and more consistent immediate KNX read responses, especially while the light or grouped light is OFF. Disable it if you prefer the cache to follow only real feedback/events from the Hue bridge. |
2503
- | Switch on behaviour | It sets the behaviour of your lights when switched on. You can choose from differents behaviours.<br/> **Select color: ** the light will be switched on with the color of your choice. To change color, just CLICK on the color selector (under the _Select color_ control).<br/>**Select temperature and brightness: ** the light will be switched on with the temperature (Kelvin) and brightness (0-100) of your choice.<br/>**None:** the light will retain its last status. In case you've enable the night lighting, after the night time ends, the lamp will resume the color/temperature/brightness state set at day time. |
2504
- | Night Lighting | It allows to set a particular light color/brightness at nighttime. The options are the same as the daytime. You could select either a temperature/brightness or color. A cozy temperature of 2700 Kelvin, with a brightness of 10% or 20%, is a good choice for bathroom's night light.|
2505
- | Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
2506
- | Invert day/night value | Invert the values of _Day/Night_ group address. Default value is **unchecked** . |
2507
- | Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no")|
2508
- | Force day mode | You can force the day mode by manually switching the light as described here: **Switch to DAY mode by rapid switching the ligth off then on (This light only) ** does what described and acts only on this light.**Switch to DAY mode by rapid switching the ligth off then on (apply yo ALL light nodes)** acts to ALL Light nodes, by setting the Day/Night group address to Day mode. |
2509
- | Node Input/Output PINs | Hide or show the input/output PINs. Input/output PINS allow the node to accept msg input from the flow and send msg output to the flow. Input msg must follow the Hue API v.2 Standards. This is an example msg, that turns on the light: <code>msg.on = {"on":true}</code>. Please refer to the [official Hue Api page](https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light__id__put) |
2510
-
2511
- ### Note
2512
-
2513
- The Dimming function works in **KNX mode `start` and`stop` ** . To start dimming, send only one "start" KNX telegram. To stop dimming, send a "stop" KNX telegram. Please**remember that** , when you set your wall swiches properties.
2514
-
2515
- <br/>
2516
- </script>