homebridge-myplace 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.eslintrc.json +40 -0
  2. package/.github/ISSUE_TEMPLATE/bug-report.md +44 -0
  3. package/.github/ISSUE_TEMPLATE/feature-request.md +27 -0
  4. package/.github/ISSUE_TEMPLATE/support-request.md +52 -0
  5. package/.github/pull_request_template.md +26 -0
  6. package/.husky/pre-commit +4 -0
  7. package/CheckConfig.js +605 -0
  8. package/CheckConfig.sh +373 -0
  9. package/Cmd5Accessory.js +2077 -0
  10. package/Cmd5Platform.js +720 -0
  11. package/Cmd5PriorityPollingQueue.js +1193 -0
  12. package/ConfigCreator.sh +1809 -0
  13. package/Extras/Cmd5Scripts/CheckYourScript.sh +135 -0
  14. package/Extras/Cmd5Scripts/Examples/AirPurifier.js +396 -0
  15. package/Extras/Cmd5Scripts/Examples/AnyDevice +451 -0
  16. package/Extras/Cmd5Scripts/Examples/DoorLock.sh +75 -0
  17. package/Extras/Cmd5Scripts/Examples/ExampleJavaScript_template.js +148 -0
  18. package/Extras/Cmd5Scripts/Examples/ExampleShellScript_template.sh +139 -0
  19. package/Extras/Cmd5Scripts/Examples/PS4.sh +128 -0
  20. package/Extras/Cmd5Scripts/Examples/PS5.sh +133 -0
  21. package/Extras/Cmd5Scripts/Examples/SecuritySystem.js +368 -0
  22. package/Extras/Cmd5Scripts/Examples/advanced_ping.sh +84 -0
  23. package/Extras/Cmd5Scripts/Examples/basic_ping.sh +79 -0
  24. package/Extras/Cmd5Scripts/Examples/middleWare.sh +5 -0
  25. package/Extras/Cmd5Scripts/Examples/wakeonlan.sh +128 -0
  26. package/Extras/Cmd5Scripts/State.js +3685 -0
  27. package/Extras/config.json +792 -0
  28. package/Extras/config.min.json +2160 -0
  29. package/Extras/jsmin.c +284 -0
  30. package/LICENSE +21 -0
  31. package/MyPlace.sh +1743 -0
  32. package/README.md +85 -0
  33. package/cmd5Constants.js +208 -0
  34. package/cmd5Settings.js +22 -0
  35. package/config.schema.json +92 -0
  36. package/homebridge-ui/public/css/style.css +18 -0
  37. package/homebridge-ui/public/images/MyPlace.png +0 -0
  38. package/homebridge-ui/public/index.html +198 -0
  39. package/homebridge-ui/public/js/main.js +83 -0
  40. package/homebridge-ui/server.js +948 -0
  41. package/index.js +95 -0
  42. package/lib/CMD5_ACC_TYPE_ENUM.js +4968 -0
  43. package/lib/CMD5_CHAR_TYPE_ENUMS.js +129 -0
  44. package/lib/CMD5_DEVICE_TYPE_ENUM.js +2343 -0
  45. package/package.json +105 -0
  46. package/utils/Cmd5Storage.js +132 -0
  47. package/utils/HV.js +76 -0
  48. package/utils/Logger.js +172 -0
  49. package/utils/VariableTimer.js +94 -0
  50. package/utils/createAccessorysInformationService.js +44 -0
  51. package/utils/extractKeyValue.js +16 -0
  52. package/utils/getAccessoryNameFunctions.js +35 -0
  53. package/utils/getAccessoryUUID.js +35 -0
  54. package/utils/indexOfEnum.js +29 -0
  55. package/utils/isAccDirective.js +54 -0
  56. package/utils/isCmd5Directive.js +56 -0
  57. package/utils/isDevDirective.js +58 -0
  58. package/utils/isJSON.js +45 -0
  59. package/utils/isNumeric.js +16 -0
  60. package/utils/lcFirst.js +31 -0
  61. package/utils/transposeCMD5Props.js +102 -0
  62. package/utils/trueTypeOf.js +44 -0
  63. package/utils/ucFirst.js +31 -0
  64. package/utils/versionChecker.js +86 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "env": {
3
+ "browser": false,
4
+ "commonjs": false,
5
+ "node": true,
6
+ "mocha": true,
7
+ "es2021": true
8
+ },
9
+ "globals": {
10
+ "assert" : "writeable",
11
+ "expect" : "writeable",
12
+ "sinon" : "writeable",
13
+ "window" : "writeable",
14
+ "ACC_EOL" : "readonly",
15
+ "DEVICE_EOL" : "readonly",
16
+ "FORMAT_EOL" : "readonly",
17
+ "UNITS_EOL" : "readonly",
18
+ "PERMS_EOL" : "readonly",
19
+ "CMD5_ACC_TYPE_ENUM" : "readonly",
20
+ "CMD5_DEVICE_TYPE_ENUM" : "readonly",
21
+ "cleanStatesDir" : "readonly",
22
+ "fs" : "writeable",
23
+ "HomebridgeAPI" : "writeable",
24
+ "Logger" : "writeable",
25
+ "platformAccessory_1" : "writeable",
26
+ "document": "readable"
27
+ },
28
+ "extends": "eslint:recommended",
29
+ "parserOptions": {
30
+ "ecmaVersion": 12
31
+ },
32
+ "rules": {
33
+ "no-fallthrough": ["error", { "commentPattern": "break[\\s\\w]*omitted"}],
34
+ "no-whitespace-before-property": ["error"],
35
+ "arrow-spacing": ["error"]
36
+ },
37
+ "ignorePatterns": [
38
+ "*.[0-9]*"
39
+ ]
40
+ }
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Raise a bug related report for homebridge-cmd4-AdvantageAir.
4
+ title: "[Bug]"
5
+ labels: enhancement
6
+ assignees: uswong
7
+
8
+ ---
9
+
10
+ <!-- If using hastebin/pastebin or other text sharing website please make the lifespan long-->
11
+ <!-- Remove any sensitive information, passwords, etc. -->
12
+
13
+ **Paste of Logs:**
14
+ ```
15
+
16
+ ```
17
+
18
+ **MyPlace Config:**
19
+ <!-- Paste relevant output between the two ``` lines below -->
20
+ <!-- Remove any sensitive information, passwords, etc. -->
21
+
22
+ ```json
23
+
24
+
25
+ ```
26
+
27
+ **Screenshots:**
28
+ <!-- If applicable, add screenshots to help explain your problem. -->
29
+
30
+ **Advantage Air System:**
31
+
32
+ * **Control Unit:** e-zone / MyAir / MyAir3 / MyAir4 / MyPlace / zone10e / zone10
33
+ * **Temperature Sensors**: Yes / No
34
+
35
+ **Homebridge Environment:**
36
+
37
+ * **Node.js Version**: <!-- node -v -->
38
+ * **NPM Version**: <!-- npm -v -->
39
+ * **Homebridge Version**: <!-- homebridge -V -->
40
+ * **homebridge-cmd4 Version**: <!-- Check on homebridge-config-ui-x -->
41
+ * **homebridge-cmd4-AdvantageAir Version**: <!-- Check on homebridge-config-ui-x -->
42
+ * **Operating System**: Raspbian / Ubuntu / Debian / Windows / macOS / Docker / other
43
+
44
+ <!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an idea or improvement for homebridge-cmd4-AdvantageAir.
4
+ title: "[Feature Request]"
5
+ labels: enhancement
6
+ assignees: mitch7391
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe:**
11
+ <!-- A clear and concise description of what the problem is. E.g. Mitch does not put enough time into this repo [...] -->
12
+
13
+ **Describe the solution you'd like:**
14
+ <!-- A clear and concise description of what you want to happen. -->
15
+
16
+ **Describe alternatives you've considered:**
17
+ <!-- A clear and concise description of any alternative solutions or features you've considered. -->
18
+
19
+ **Additional context:**
20
+ <!-- Add any other context or screenshots about the feature request here. -->
21
+
22
+ **Advantage Air System:**
23
+
24
+ * **Control Unit:** e-zone / MyAir / MyAir3 / MyAir4 / MyPlace / zone10e / zone10
25
+ * **Temperature Sensors**: Yes / No
26
+
27
+ <!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: Support Request
3
+ about: Stuck on one of the installation steps in the README?
4
+ title: "[Support]"
5
+ labels: help wanted
6
+ assignees: uswong
7
+
8
+ ---
9
+
10
+ <!-- Provide a general summary in the Title above -->
11
+
12
+ **Describe Your Problem:**
13
+ <!-- A clear and concise description of what problem you are experiencing or what installation step you are stuck on. -->
14
+
15
+ [**Link to Logs:**]()
16
+ <!-- If using a gist, hastebin or pastebin; paste the link between the two () above -->
17
+ <!-- If pasting log files directly, please instead do so between the ``` lines below -->
18
+ <!-- If using hastebin/pastebin or other text sharing website please make the lifespan long-->
19
+ <!-- Remove any sensitive information, passwords, etc. -->
20
+
21
+ **Paste of Logs:**
22
+ ```
23
+
24
+ ```
25
+
26
+ **MyPlace Config:**
27
+ <!-- Paste relevant output between the two ``` lines below -->
28
+ <!-- Remove any sensitive information, passwords, etc. -->
29
+
30
+ ```json
31
+
32
+
33
+ ```
34
+
35
+ **Screenshots:**
36
+ <!-- If applicable, add screenshots to help explain your problem. -->
37
+
38
+ **Advantage Air System:**
39
+
40
+ * **Control Unit:** e-zone / MyAir / MyAir3 / MyAir4 / MyPlace / zone10e / zone10
41
+ * **Temperature Sensors**: Yes / No
42
+
43
+ **Homebridge Environment:**
44
+
45
+ * **Node.js Version**: <!-- node -v -->
46
+ * **NPM Version**: <!-- npm -v -->
47
+ * **Homebridge Version**: <!-- homebridge -V -->
48
+ * **homebridge-cmd4 Version**: <!-- Check on homebridge-config-ui-x -->
49
+ * **homebridge-cmd4-AdvantageAir Version**: <!-- Check on homebridge-config-ui-x -->
50
+ * **Operating System**: Raspbian / Ubuntu / Debian / Windows / macOS / Docker / other
51
+
52
+ <!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: Pull Request
3
+ about: Resolve an issue or add an improvement to homebridge-cmd4-AdvantageAir.
4
+ title: "[Pull Request]"
5
+ labels: pull-request
6
+ assignees: mitch7391
7
+
8
+ ---
9
+
10
+ <!-- Provide a general summary in the Title above -->
11
+
12
+ **Is your pull request related to a problem or a new feature? Please describe:**
13
+ <!-- A clear and concise description of what the problem is. E.g. "Mitch, there needs to be a button to buy you a coffee!" -->
14
+
15
+ **Describe the solution you'd have implemented:**
16
+ <!-- A clear and concise description of what you your pull request is for. Explain the technical solution you have provided and how it addresses the issue. -->
17
+
18
+ **Do your changes pass local testing:**
19
+ - [x] Yes
20
+ - [ ] No
21
+ <!-- If unclear, I can update these afterwards. -->
22
+
23
+ **Additional context:**
24
+ <!-- Add any other context or screenshots about the pull request here. -->
25
+
26
+ <!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npm run pre-commit