iobroker.iot 3.6.0 → 4.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 (254) hide show
  1. package/README.md +8 -4
  2. package/admin/assets/index-5zouxn2w.js +680 -0
  3. package/admin/index_m.html +1 -1
  4. package/admin/rules/assets/{index-BRdNnGcA.js → index-DwYdaT5M.js} +80 -81
  5. package/admin/rules/customRuleBlocks.js +2 -2
  6. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/AlexaResponse.js +101 -95
  7. package/build-backend/lib/AlexaSmartHomeV3/Alexa/AlexaResponse.js.map +1 -0
  8. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Capabilities/Base.js +22 -36
  9. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/Base.js.map +1 -0
  10. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js +19 -0
  11. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js.map +1 -0
  12. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js +14 -0
  13. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js.map +1 -0
  14. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js +19 -0
  15. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js.map +1 -0
  16. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js +16 -0
  17. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js.map +1 -0
  18. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js +14 -0
  19. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js.map +1 -0
  20. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.js +27 -28
  21. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.js.map +1 -0
  22. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js +14 -0
  23. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js.map +1 -0
  24. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js +14 -0
  25. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js.map +1 -0
  26. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js +19 -0
  27. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js.map +1 -0
  28. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js +25 -0
  29. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js.map +1 -0
  30. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js +14 -0
  31. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js.map +1 -0
  32. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js +37 -0
  33. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js.map +1 -0
  34. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/index.js +32 -0
  35. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/index.js.map +1 -0
  36. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/Base.js +29 -0
  37. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/Base.js.map +1 -0
  38. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Directives/ChangeReport.js +34 -27
  39. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/ChangeReport.js.map +1 -0
  40. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/Discovery.js +39 -0
  41. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/Discovery.js.map +1 -0
  42. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Directives/ReportState.js +19 -22
  43. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/ReportState.js.map +1 -0
  44. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/index.js +14 -0
  45. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Directives/index.js.map +1 -0
  46. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/Base.js +36 -0
  47. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/Base.js.map +1 -0
  48. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/Closed.js +57 -0
  49. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/Closed.js.map +1 -0
  50. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/Open.js +57 -0
  51. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/Open.js.map +1 -0
  52. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/index.js +12 -0
  53. package/build-backend/lib/AlexaSmartHomeV3/Alexa/ModeValues/index.js.map +1 -0
  54. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/AdjustableProperty.js +16 -0
  55. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/AdjustableProperty.js.map +1 -0
  56. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js +127 -0
  57. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js.map +1 -0
  58. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js +18 -0
  59. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js.map +1 -0
  60. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js +38 -0
  61. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js.map +1 -0
  62. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Properties/ColorTemperatureInKelvin.js +20 -29
  63. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/ColorTemperatureInKelvin.js.map +1 -0
  64. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js +23 -0
  65. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js.map +1 -0
  66. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Properties/LockState.js +9 -12
  67. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/LockState.js.map +1 -0
  68. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js +34 -0
  69. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js.map +1 -0
  70. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Muted.js +19 -0
  71. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Muted.js.map +1 -0
  72. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Percentage.js +18 -0
  73. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Percentage.js.map +1 -0
  74. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Alexa/Properties/PowerState.js +9 -9
  75. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/PowerState.js.map +1 -0
  76. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/TargetSetpoint.js +31 -0
  77. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/TargetSetpoint.js.map +1 -0
  78. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Temperature.js +22 -0
  79. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Temperature.js.map +1 -0
  80. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js +49 -0
  81. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js.map +1 -0
  82. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Volume.js +21 -0
  83. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Volume.js.map +1 -0
  84. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/index.js +38 -0
  85. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/index.js.map +1 -0
  86. package/build-backend/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js +20 -0
  87. package/build-backend/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js.map +1 -0
  88. package/build-backend/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js +26 -0
  89. package/build-backend/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js.map +1 -0
  90. package/build-backend/lib/AlexaSmartHomeV3/Controls/AirCondition.js +148 -0
  91. package/build-backend/lib/AlexaSmartHomeV3/Controls/AirCondition.js.map +1 -0
  92. package/build-backend/lib/AlexaSmartHomeV3/Controls/Blind.js +13 -0
  93. package/build-backend/lib/AlexaSmartHomeV3/Controls/Blind.js.map +1 -0
  94. package/build-backend/lib/AlexaSmartHomeV3/Controls/ContactSensor.js +17 -0
  95. package/build-backend/lib/AlexaSmartHomeV3/Controls/ContactSensor.js.map +1 -0
  96. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Controls/Control.js +73 -104
  97. package/build-backend/lib/AlexaSmartHomeV3/Controls/Control.js.map +1 -0
  98. package/build-backend/lib/AlexaSmartHomeV3/Controls/Ct.js +182 -0
  99. package/build-backend/lib/AlexaSmartHomeV3/Controls/Ct.js.map +1 -0
  100. package/build-backend/lib/AlexaSmartHomeV3/Controls/Dimmer.js +127 -0
  101. package/build-backend/lib/AlexaSmartHomeV3/Controls/Dimmer.js.map +1 -0
  102. package/build-backend/lib/AlexaSmartHomeV3/Controls/Door.js +10 -0
  103. package/build-backend/lib/AlexaSmartHomeV3/Controls/Door.js.map +1 -0
  104. package/build-backend/lib/AlexaSmartHomeV3/Controls/Gate.js +38 -0
  105. package/build-backend/lib/AlexaSmartHomeV3/Controls/Gate.js.map +1 -0
  106. package/build-backend/lib/AlexaSmartHomeV3/Controls/Hue.js +208 -0
  107. package/build-backend/lib/AlexaSmartHomeV3/Controls/Hue.js.map +1 -0
  108. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Controls/Light.js +15 -22
  109. package/build-backend/lib/AlexaSmartHomeV3/Controls/Light.js.map +1 -0
  110. package/build-backend/lib/AlexaSmartHomeV3/Controls/Lock.js +35 -0
  111. package/build-backend/lib/AlexaSmartHomeV3/Controls/Lock.js.map +1 -0
  112. package/build-backend/lib/AlexaSmartHomeV3/Controls/Motion.js +17 -0
  113. package/build-backend/lib/AlexaSmartHomeV3/Controls/Motion.js.map +1 -0
  114. package/build-backend/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js +26 -0
  115. package/build-backend/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js.map +1 -0
  116. package/build-backend/lib/AlexaSmartHomeV3/Controls/Slider.js +10 -0
  117. package/build-backend/lib/AlexaSmartHomeV3/Controls/Slider.js.map +1 -0
  118. package/build-backend/lib/AlexaSmartHomeV3/Controls/Socket.js +21 -0
  119. package/build-backend/lib/AlexaSmartHomeV3/Controls/Socket.js.map +1 -0
  120. package/build-backend/lib/AlexaSmartHomeV3/Controls/Temperature.js +21 -0
  121. package/build-backend/lib/AlexaSmartHomeV3/Controls/Temperature.js.map +1 -0
  122. package/build-backend/lib/AlexaSmartHomeV3/Controls/Thermostat.js +85 -0
  123. package/build-backend/lib/AlexaSmartHomeV3/Controls/Thermostat.js.map +1 -0
  124. package/build-backend/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js +27 -0
  125. package/build-backend/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js.map +1 -0
  126. package/build-backend/lib/AlexaSmartHomeV3/Controls/Volume.js +116 -0
  127. package/build-backend/lib/AlexaSmartHomeV3/Controls/Volume.js.map +1 -0
  128. package/build-backend/lib/AlexaSmartHomeV3/Controls/VolumeGroup.js +10 -0
  129. package/build-backend/lib/AlexaSmartHomeV3/Controls/VolumeGroup.js.map +1 -0
  130. package/build-backend/lib/AlexaSmartHomeV3/Controls/Window.js +10 -0
  131. package/build-backend/lib/AlexaSmartHomeV3/Controls/Window.js.map +1 -0
  132. package/build-backend/lib/AlexaSmartHomeV3/Controls/index.js +121 -0
  133. package/build-backend/lib/AlexaSmartHomeV3/Controls/index.js.map +1 -0
  134. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Device.js +29 -30
  135. package/build-backend/lib/AlexaSmartHomeV3/Device.js.map +1 -0
  136. package/build-backend/lib/AlexaSmartHomeV3/DeviceManager.js +392 -0
  137. package/build-backend/lib/AlexaSmartHomeV3/DeviceManager.js.map +1 -0
  138. package/build-backend/lib/AlexaSmartHomeV3/Exceptions/AlexaV3Exception.js +10 -0
  139. package/build-backend/lib/AlexaSmartHomeV3/Exceptions/AlexaV3Exception.js.map +1 -0
  140. package/build-backend/lib/AlexaSmartHomeV3/Exceptions/HourlyDeviceRateLimitExceeded.js +10 -0
  141. package/build-backend/lib/AlexaSmartHomeV3/Exceptions/HourlyDeviceRateLimitExceeded.js.map +1 -0
  142. package/build-backend/lib/AlexaSmartHomeV3/Exceptions/OverallDailyRateLimitExceeded.js +10 -0
  143. package/build-backend/lib/AlexaSmartHomeV3/Exceptions/OverallDailyRateLimitExceeded.js.map +1 -0
  144. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Helpers/AdapterProvider.js +12 -21
  145. package/build-backend/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js.map +1 -0
  146. package/build-backend/lib/AlexaSmartHomeV3/Helpers/FileHelper.js +53 -0
  147. package/build-backend/lib/AlexaSmartHomeV3/Helpers/FileHelper.js.map +1 -0
  148. package/{lib → build-backend/lib}/AlexaSmartHomeV3/Helpers/IotProxy.js +9 -26
  149. package/build-backend/lib/AlexaSmartHomeV3/Helpers/IotProxy.js.map +1 -0
  150. package/build-backend/lib/AlexaSmartHomeV3/Helpers/Logger.js +93 -0
  151. package/build-backend/lib/AlexaSmartHomeV3/Helpers/Logger.js.map +1 -0
  152. package/build-backend/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js +112 -0
  153. package/build-backend/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js.map +1 -0
  154. package/build-backend/lib/AlexaSmartHomeV3/Helpers/Utils.js +625 -0
  155. package/build-backend/lib/AlexaSmartHomeV3/Helpers/Utils.js.map +1 -0
  156. package/build-backend/lib/Utils.js +96 -0
  157. package/build-backend/lib/Utils.js.map +1 -0
  158. package/build-backend/lib/adminCommonSocket.js +715 -0
  159. package/build-backend/lib/adminCommonSocket.js.map +1 -0
  160. package/build-backend/lib/alexaCustom.js +542 -0
  161. package/build-backend/lib/alexaCustom.js.map +1 -0
  162. package/{lib → build-backend/lib}/alexaSmartHomeV2.js +4 -8
  163. package/{lib → build-backend/lib}/alexaSmartHomeV3.js +25 -45
  164. package/build-backend/lib/alexaSmartHomeV3.js.map +1 -0
  165. package/{lib → build-backend/lib}/alisa.js +41 -44
  166. package/{lib → build-backend/lib}/devices.js +11 -8
  167. package/build-backend/lib/devices.js.map +1 -0
  168. package/{lib → build-backend/lib}/functions.js +11 -8
  169. package/build-backend/lib/functions.js.map +1 -0
  170. package/{lib → build-backend/lib}/googleHome.js +25 -26
  171. package/{lib → build-backend/lib}/notifications.js +15 -22
  172. package/build-backend/lib/notifications.js.map +1 -0
  173. package/{lib → build-backend/lib}/remote.js +615 -636
  174. package/build-backend/lib/remote.js.map +1 -0
  175. package/{lib → build-backend/lib}/rooms.js +11 -8
  176. package/build-backend/lib/rooms.js.map +1 -0
  177. package/{lib → build-backend/lib}/texts.js +6 -4
  178. package/build-backend/lib/texts.js.map +1 -0
  179. package/build-backend/lib/translate.js +21 -0
  180. package/build-backend/lib/translate.js.map +1 -0
  181. package/{lib → build-backend/lib}/visuApp.js +45 -65
  182. package/build-backend/lib/visuApp.js.map +1 -0
  183. package/build-backend/main.js +1361 -0
  184. package/build-backend/main.js.map +1 -0
  185. package/io-package.json +14 -14
  186. package/package.json +18 -15
  187. package/admin/assets/index-DCbOB3g_.js +0 -681
  188. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js +0 -15
  189. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js +0 -10
  190. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js +0 -15
  191. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js +0 -10
  192. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js +0 -10
  193. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js +0 -10
  194. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js +0 -10
  195. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js +0 -15
  196. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js +0 -20
  197. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js +0 -10
  198. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js +0 -34
  199. package/lib/AlexaSmartHomeV3/Alexa/Capabilities/index.js +0 -14
  200. package/lib/AlexaSmartHomeV3/Alexa/Directives/Base.js +0 -27
  201. package/lib/AlexaSmartHomeV3/Alexa/Directives/Discovery.js +0 -39
  202. package/lib/AlexaSmartHomeV3/Alexa/Directives/index.js +0 -13
  203. package/lib/AlexaSmartHomeV3/Alexa/ModeValues/Base.js +0 -38
  204. package/lib/AlexaSmartHomeV3/Alexa/ModeValues/Closed.js +0 -55
  205. package/lib/AlexaSmartHomeV3/Alexa/ModeValues/Open.js +0 -56
  206. package/lib/AlexaSmartHomeV3/Alexa/ModeValues/index.js +0 -14
  207. package/lib/AlexaSmartHomeV3/Alexa/Properties/AdjustableProperty.js +0 -11
  208. package/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js +0 -108
  209. package/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js +0 -14
  210. package/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js +0 -40
  211. package/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js +0 -22
  212. package/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js +0 -32
  213. package/lib/AlexaSmartHomeV3/Alexa/Properties/Muted.js +0 -17
  214. package/lib/AlexaSmartHomeV3/Alexa/Properties/Percentage.js +0 -14
  215. package/lib/AlexaSmartHomeV3/Alexa/Properties/TargetSetpoint.js +0 -28
  216. package/lib/AlexaSmartHomeV3/Alexa/Properties/Temperature.js +0 -20
  217. package/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js +0 -52
  218. package/lib/AlexaSmartHomeV3/Alexa/Properties/Volume.js +0 -19
  219. package/lib/AlexaSmartHomeV3/Alexa/Properties/index.js +0 -14
  220. package/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js +0 -22
  221. package/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js +0 -28
  222. package/lib/AlexaSmartHomeV3/Controls/AirCondition.js +0 -144
  223. package/lib/AlexaSmartHomeV3/Controls/Blind.js +0 -12
  224. package/lib/AlexaSmartHomeV3/Controls/ContactSensor.js +0 -17
  225. package/lib/AlexaSmartHomeV3/Controls/Ct.js +0 -172
  226. package/lib/AlexaSmartHomeV3/Controls/Dimmer.js +0 -124
  227. package/lib/AlexaSmartHomeV3/Controls/Door.js +0 -9
  228. package/lib/AlexaSmartHomeV3/Controls/Gate.js +0 -42
  229. package/lib/AlexaSmartHomeV3/Controls/Hue.js +0 -207
  230. package/lib/AlexaSmartHomeV3/Controls/Lock.js +0 -36
  231. package/lib/AlexaSmartHomeV3/Controls/Motion.js +0 -17
  232. package/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js +0 -25
  233. package/lib/AlexaSmartHomeV3/Controls/Slider.js +0 -10
  234. package/lib/AlexaSmartHomeV3/Controls/Socket.js +0 -21
  235. package/lib/AlexaSmartHomeV3/Controls/Temperature.js +0 -22
  236. package/lib/AlexaSmartHomeV3/Controls/Thermostat.js +0 -86
  237. package/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js +0 -28
  238. package/lib/AlexaSmartHomeV3/Controls/Volume.js +0 -109
  239. package/lib/AlexaSmartHomeV3/Controls/VolumeGroup.js +0 -9
  240. package/lib/AlexaSmartHomeV3/Controls/Window.js +0 -9
  241. package/lib/AlexaSmartHomeV3/Controls/index.js +0 -14
  242. package/lib/AlexaSmartHomeV3/DeviceManager.js +0 -415
  243. package/lib/AlexaSmartHomeV3/Exceptions/AlexaV3Exception.js +0 -8
  244. package/lib/AlexaSmartHomeV3/Exceptions/HourlyDeviceRateLimitExceeded.js +0 -5
  245. package/lib/AlexaSmartHomeV3/Exceptions/OverallDailyRateLimitExceeded.js +0 -5
  246. package/lib/AlexaSmartHomeV3/Helpers/FileHelper.js +0 -70
  247. package/lib/AlexaSmartHomeV3/Helpers/Logger.js +0 -95
  248. package/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js +0 -82
  249. package/lib/AlexaSmartHomeV3/Helpers/Utils.js +0 -583
  250. package/lib/Utils.js +0 -608
  251. package/lib/adminCommonSocket.js +0 -781
  252. package/lib/alexaCustom.js +0 -622
  253. package/lib/translate.js +0 -19
  254. package/main.js +0 -1454
@@ -1,15 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class BrightnessController extends Base {
5
- initProperties() {
6
- this._brightness = new Properties.Brightness();
7
- return [this._brightness];
8
- }
9
-
10
- get brightness() {
11
- return this._brightness;
12
- }
13
- }
14
-
15
- module.exports = BrightnessController;
@@ -1,10 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class ColorController extends Base {
5
- initProperties() {
6
- return [new Properties.Color()];
7
- }
8
- }
9
-
10
- module.exports = ColorController;
@@ -1,15 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class ColorTemperatureController extends Base {
5
- initProperties() {
6
- this._colorTemperatureInKelvin = new Properties.ColorTemperatureInKelvin();
7
- return [this._colorTemperatureInKelvin];
8
- }
9
-
10
- get colorTemperatureInKelvin() {
11
- return this._colorTemperatureInKelvin;
12
- }
13
- }
14
-
15
- module.exports = ColorTemperatureController;
@@ -1,10 +0,0 @@
1
- const Base = require('./Base')
2
- const Properties = require('../Properties');
3
-
4
- class ContactSensor extends Base {
5
- initProperties() {
6
- return [new Properties.DetectionState()];
7
- }
8
- }
9
-
10
- module.exports = ContactSensor;
@@ -1,10 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class LockController extends Base {
5
- initProperties() {
6
- return [new Properties.LockState()];
7
- }
8
- }
9
-
10
- module.exports = LockController;
@@ -1,10 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class MotionSensor extends Base {
5
- initProperties() {
6
- return [new Properties.DetectionState()];
7
- }
8
- }
9
-
10
- module.exports = MotionSensor;
@@ -1,10 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class PercentageController extends Base {
5
- initProperties() {
6
- return [new Properties.Percentage()];
7
- }
8
- }
9
-
10
- module.exports = PercentageController;
@@ -1,15 +0,0 @@
1
- const Properties = require('./../Properties');
2
- const Base = require('./Base');
3
-
4
- class PowerController extends Base {
5
- initProperties() {
6
- this._powerState = new Properties.PowerState();
7
- return [this._powerState];
8
- }
9
-
10
- get powerState() {
11
- return this._powerState;
12
- }
13
- }
14
-
15
- module.exports = PowerController;
@@ -1,20 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class Speaker extends Base {
5
- initProperties() {
6
- this._volume = new Properties.Volume();
7
- this._muted = new Properties.Muted();
8
- return [this._volume, this._muted];
9
- }
10
-
11
- get volume() {
12
- return this._volume;
13
- }
14
-
15
- get muted() {
16
- return this._muted;
17
- }
18
- }
19
-
20
- module.exports = Speaker;
@@ -1,10 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class TemperatureSensor extends Base {
5
- initProperties() {
6
- return [new Properties.Temperature()];
7
- }
8
- }
9
-
10
- module.exports = TemperatureSensor;
@@ -1,34 +0,0 @@
1
- const Properties = require('../Properties');
2
- const Base = require('./Base');
3
-
4
- class ThermostatController extends Base {
5
- get version() {
6
- return '3.2';
7
- }
8
-
9
- initProperties() {
10
- this._thermostatMode = new Properties.ThermostatMode();
11
- return [new Properties.TargetSetpoint(), this._thermostatMode];
12
- }
13
-
14
- get thermostatMode() {
15
- return this._thermostatMode;
16
- }
17
-
18
- get alexaResponse() {
19
- return {
20
- interface: this.namespace,
21
- version: this.version,
22
- properties: this.discoverableProperties,
23
- configuration: this.configuration,
24
- };
25
- }
26
-
27
- get configuration() {
28
- return {
29
- supportedModes: this._thermostatMode.supportedModes,
30
- };
31
- }
32
- }
33
-
34
- module.exports = ThermostatController;
@@ -1,14 +0,0 @@
1
- const capabilities = {};
2
- const capabilitiesPath = require('path').join(__dirname);
3
- const excludedNames = ['index', 'Base'];
4
-
5
- require('fs')
6
- .readdirSync(capabilitiesPath)
7
- .forEach((file) => {
8
- const name = file.replace(/\.js$/, '');
9
- if (!excludedNames.includes(name)) {
10
- capabilities[name] = require(`./${file}`);
11
- }
12
- });
13
-
14
- module.exports = capabilities;
@@ -1,27 +0,0 @@
1
- const Logger = require('../../Helpers/Logger');
2
- const Utils = require('../../Helpers/Utils');
3
-
4
- class Base {
5
- constructor() {
6
- this.log = new Logger(this);
7
- }
8
-
9
- static get namespace() {
10
- return `Alexa.${Utils.className(this.toString())}`;
11
- }
12
-
13
- /**
14
- * Checks whether the directive matches, i.e., can handle the event Alexa sends to the skill
15
- * @param event Contains the Alexa event.
16
- * @returns {boolean}
17
- */
18
- static matches(event) {
19
- return event?.directive?.header?.namespace === this.namespace;
20
- }
21
-
22
- async handle(event, endpointManager) {
23
- return null;
24
- }
25
- }
26
-
27
- module.exports = Base;
@@ -1,39 +0,0 @@
1
- const AlexaResponse = require('../AlexaResponse');
2
- const Base = require('./Base');
3
-
4
- class Discovery extends Base {
5
- async handle(event, endpointManager) {
6
- this.log.debug(`handling Discovery`);
7
- this.log.silly(`${JSON.stringify(event)}`);
8
-
9
- const endpoints = endpointManager.endpoints;
10
-
11
- const response = new AlexaResponse({
12
- namespace: Discovery.namespace,
13
- name: 'Discover.Response',
14
- });
15
-
16
- let count = 0;
17
-
18
- endpoints.forEach(endpoint => {
19
- count++;
20
- if (count > 300) {
21
- this.log.warn(`Too many devices. Alexa supports up to 300 devices. ${endpoint.friendlyName} will not be discovered.`);
22
- return;
23
- }
24
- response.addPayloadEndpoint({
25
- endpointId: endpoint.id,
26
- description: endpoint.description,
27
- friendlyName: endpoint.friendlyName,
28
- displayCategories: endpoint.displayCategories,
29
- capabilities: endpoint.capabilities.map(capability => response.asEndpointCapability(capability.alexaResponse)),
30
- });
31
- });
32
-
33
- this.log.silly(`${JSON.stringify(response.get())}`);
34
-
35
- return response.get();
36
- }
37
- }
38
-
39
- module.exports = Discovery;
@@ -1,13 +0,0 @@
1
- const directives = {};
2
- const directivesPath = require('path').join(__dirname);
3
-
4
- require('fs')
5
- .readdirSync(directivesPath)
6
- .forEach((file) => {
7
- const name = file.replace(/\.js$/, '');
8
- if (name !== 'index' && name !== 'Base') {
9
- directives[name] = require(`./${file}`);
10
- }
11
- });
12
-
13
- module.exports = directives;
@@ -1,38 +0,0 @@
1
- const Utils = require("../../Helpers/Utils");
2
-
3
- class Base {
4
- constructor(mode) {
5
- this._mode = mode;
6
- }
7
-
8
- static get value() {
9
- return Utils.className(this.toString());
10
- }
11
-
12
- get value() {
13
- return `${this._mode}.${this.constructor.name}`
14
- }
15
-
16
- get friendlyNames() {
17
- return []
18
- }
19
-
20
- get discoveryResponse() {
21
- return {
22
- value: this.value,
23
- modeResources: {
24
- friendlyNames: this.friendlyNames
25
- }
26
- }
27
- }
28
-
29
- get actionMappings() {
30
- return []
31
- }
32
-
33
- get stateMappings() {
34
- return []
35
- }
36
- }
37
-
38
- module.exports = Base;
@@ -1,55 +0,0 @@
1
- const Base = require("./Base");
2
-
3
- class Closed extends Base {
4
- get friendlyNames() {
5
- return [
6
- {
7
- '@type': 'asset',
8
- 'value': {
9
- assetId: 'Alexa.Value.Close'
10
- }
11
- },
12
- {
13
- '@type': 'text',
14
- value: {
15
- text: 'Closed',
16
- locale: 'en-US'
17
- }
18
- },
19
- {
20
- '@type': 'text',
21
- value: {
22
- text: 'Geschloßen',
23
- locale: 'de-DE'
24
- }
25
- }
26
- ]
27
- }
28
-
29
- get actionMappings() {
30
- return [
31
- {
32
- '@type': 'ActionsToDirective',
33
- actions: ['Alexa.Actions.Close'],
34
- directive: {
35
- name: 'SetMode',
36
- payload: {
37
- mode: this.value
38
- }
39
- }
40
- }
41
- ]
42
- }
43
-
44
- get stateMappings() {
45
- return [
46
- {
47
- '@type': 'StatesToValue',
48
- states: ['Alexa.States.Closed'],
49
- value: this.value
50
- }
51
- ]
52
- }
53
- }
54
-
55
- module.exports = Closed;
@@ -1,56 +0,0 @@
1
- const Base = require("./Base");
2
-
3
- class Open extends Base {
4
- get friendlyNames() {
5
- return [
6
- {
7
- '@type': 'asset',
8
- value: {
9
- assetId: 'Alexa.Value.Open'
10
- }
11
- },
12
- {
13
- '@type': 'text',
14
- value: {
15
- text: 'Open',
16
- locale: 'en-US'
17
- }
18
- },
19
- {
20
- '@type': 'text',
21
- value: {
22
- text: 'Geöffnet',
23
- locale: 'de-DE'
24
- }
25
- }
26
-
27
- ]
28
- }
29
-
30
- get actionMappings() {
31
- return [
32
- {
33
- '@type': 'ActionsToDirective',
34
- actions: ['Alexa.Actions.Open'],
35
- directive: {
36
- name: 'SetMode',
37
- payload: {
38
- mode: this.value
39
- }
40
- }
41
- }
42
- ]
43
- }
44
-
45
- get stateMappings() {
46
- return [
47
- {
48
- '@type': 'StatesToValue',
49
- states: ['Alexa.States.Open'],
50
- value: this.value
51
- }
52
- ]
53
- }
54
- }
55
-
56
- module.exports = Open;
@@ -1,14 +0,0 @@
1
- const modes = {};
2
- const modesPath = require('path').join(__dirname);
3
- const excludedNames = ['index', 'Base'];
4
-
5
- require('fs')
6
- .readdirSync(modesPath)
7
- .forEach((file) => {
8
- const name = file.replace(/\.js$/, '');
9
- if (!excludedNames.includes(name)) {
10
- modes[name] = require(`./${file}`);
11
- }
12
- });
13
-
14
- module.exports = modes;
@@ -1,11 +0,0 @@
1
- const Utils = require('../../Helpers/Utils');
2
- const Base = require('./Base');
3
-
4
- class AdjustableProperty extends Base {
5
-
6
- static directive(event) {
7
- return event.directive.header.name === 'Adjust' + Utils.className(this.toString()) ? AdjustableProperty.ADJUST : AdjustableProperty.SET;
8
- }
9
- }
10
-
11
- module.exports = AdjustableProperty;
@@ -1,108 +0,0 @@
1
- const Utils = require('../../Helpers/Utils');
2
-
3
- class Base {
4
-
5
- /**
6
- * @param {Object} opts - The object to initialize the corresponding ioBroker state.
7
- * @param {Object} opts.setState - The iobroker state to write values to.
8
- * @param {Object} [opts.getState] - The iobroker state to read values from.
9
- * @param {function} [opts.alexaSetter] - The function to apply to an Alexa value to transform it to the iobroker's one
10
- * @param {function} [opts.alexaGetter] - The function to apply to an iobroker value to transform it to the Alexa's one
11
- */
12
- init(opts) {
13
- this._setState = opts.setState;
14
- this._setId = opts.setState.id;
15
- this._getId = opts.getState?.id || this._setId;
16
- this._valuesRange = Utils.configuredRangeOrDefault(this._setState);
17
-
18
- if (opts.alexaSetter) {
19
- this._alexaSetter = opts.alexaSetter;
20
- }
21
- if (opts.alexaGetter) {
22
- this._alexaGetter = opts.alexaGetter;
23
- }
24
- }
25
-
26
- get propertyName() {
27
- return Utils.firstLower(`${this.constructor.name}`);
28
- }
29
-
30
- static get propertyName() {
31
- return Utils.firstLower(Utils.className(this.toString()));
32
- }
33
-
34
- get valuesRangeMin() {
35
- return this._valuesRange.min
36
- }
37
-
38
- get valuesRangeMax() {
39
- return this._valuesRange.max;
40
- }
41
-
42
- get setId() {
43
- return this._setId;
44
- }
45
-
46
- get getId() {
47
- return this._getId;
48
- }
49
- /**
50
- * returns last known iobroker value
51
- */
52
- get currentValue() {
53
- return this._currentValue;
54
- }
55
-
56
- set currentValue(value) {
57
- this._currentValue = value;
58
- }
59
-
60
- /**
61
- * @param {any} alexaValue
62
- */
63
- value(alexaValue) {
64
- return this._alexaSetter ? this._alexaSetter(alexaValue) : alexaValue;
65
- }
66
-
67
- /**
68
- * @param {any} value
69
- */
70
- alexaValue(value) {
71
- return this._alexaGetter ? this._alexaGetter(value) : value;
72
- }
73
-
74
- /**
75
- * Checks whether a directive refers to the property
76
- * @param event Contains the Alexa event.
77
- * @returns {boolean}
78
- */
79
- static matches(event) {
80
- return event?.directive?.header?.namespace === `Alexa.${Utils.className(this.toString())}Controller`;
81
- // return event?.directive?.header?.name === this.propertyName;
82
- }
83
-
84
- matches(event) {
85
- return event?.directive?.header?.name === this.propertyName;
86
- }
87
-
88
- /**
89
- * Extracts value to be set on the smart device sent in an Alexa directive
90
- * @returns {object}
91
- */
92
- alexaDirectiveValue(event) {
93
- return event.directive.payload[this.propertyName];
94
- }
95
-
96
- reportValue(value) {
97
- return value;
98
- }
99
-
100
- static get ADJUST() { return 'ADJUST'; }
101
-
102
- static get SET() { return 'SET'; }
103
-
104
- static get CELSIUS_SCALE() { return 'CELSIUS'; }
105
-
106
- }
107
-
108
- module.exports = Base;
@@ -1,14 +0,0 @@
1
- const AdjustableProperty = require('./AdjustableProperty');
2
-
3
- class Brightness extends AdjustableProperty {
4
-
5
- matches(event) {
6
- return Brightness.matches(event);
7
- }
8
-
9
- alexaDirectiveValue(event) {
10
- return Brightness.directive(event) === Brightness.SET ? super.alexaDirectiveValue(event) : event.directive.payload['brightnessDelta'];
11
- }
12
- }
13
-
14
- module.exports = Brightness;
@@ -1,40 +0,0 @@
1
- const Base = require('./Base');
2
-
3
- class Color extends Base {
4
-
5
- constructor() {
6
- super();
7
- this.hal = {
8
- hue: 0,
9
- saturation: 0,
10
- brightness: 0,
11
- };
12
- }
13
-
14
- init(opts) {
15
- this.hal = opts.hal;
16
- this._setId = opts.hal.hue;
17
- this._getId = opts.hal.hue;
18
-
19
- if (opts.alexaSetter) {
20
- this._alexaSetter = opts.alexaSetter;
21
- }
22
- if (opts.alexaGetter) {
23
- this._alexaGetter = opts.alexaGetter;
24
- }
25
- }
26
-
27
- matches(event) {
28
- return Color.matches(event) && event?.directive?.header?.name === 'SetColor';
29
- }
30
-
31
- set hal(value) {
32
- this._hal = value;
33
- }
34
-
35
- get hal() {
36
- return this._hal;
37
- }
38
- }
39
-
40
- module.exports = Color;
@@ -1,22 +0,0 @@
1
- const Base = require('./Base');
2
-
3
- class DetectionState extends Base {
4
- static matches(event) {
5
- return event?.directive?.header?.namespace === 'Alexa.MotionSensor' ||
6
- event?.directive?.header?.namespace === 'Alexa.ContactSensor';
7
- }
8
-
9
- matches(event) {
10
- return DetectionState.matches(event);
11
- }
12
-
13
- static get DETECTED() {
14
- return 'DETECTED';
15
- }
16
-
17
- static get NOT_DETECTED() {
18
- return 'NOT_DETECTED';
19
- }
20
- }
21
-
22
- module.exports = DetectionState;
@@ -1,32 +0,0 @@
1
- const Base = require('./Base');
2
-
3
- class Mode extends Base {
4
-
5
- init(opts) {
6
- super.init(opts);
7
- this._supportedModes = opts.supportedModes;
8
- this._instance = opts.instance;
9
- }
10
-
11
- matches(event) {
12
- return Mode.matches(event)
13
- // non-adjustable mode controller
14
- && 'SetMode' === event?.directive?.header?.name
15
- && this.instance === event?.directive?.header?.instance
16
- && this.supportedModes.map(mode => mode.value).includes(event?.directive?.payload?.mode);
17
- }
18
-
19
- alexaDirectiveValue(event) {
20
- return event.directive.payload.mode;
21
- }
22
-
23
- get supportedModes() {
24
- return this._supportedModes;
25
- }
26
-
27
- get instance() {
28
- return this._instance;
29
- }
30
- }
31
-
32
- module.exports = Mode;