homebridge-tasmota-control 0.3.49 → 0.4.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.
- package/CHANGELOG.md +6 -0
- package/README.md +0 -2
- package/config.schema.json +0 -58
- package/index.js +5 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
## [0.4.0] - (25.02.2022)
|
|
7
|
+
## Added
|
|
8
|
+
- automatically check channels count
|
|
9
|
+
## Changes
|
|
10
|
+
- removed channelsCount properties from config.json
|
|
11
|
+
|
|
6
12
|
## [0.3.47] - (18.01.2022)
|
|
7
13
|
## Changes
|
|
8
14
|
- update dependencies
|
package/README.md
CHANGED
|
@@ -46,7 +46,6 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
|
|
|
46
46
|
| `auth` | If enabled, authorizatins credentials will be used for login. |
|
|
47
47
|
| `user` | Here set the authorization *Username*. |
|
|
48
48
|
| `passwd` | Here set the authorization *Password*. |
|
|
49
|
-
| `channelsCount` | Here select the channels count. |
|
|
50
49
|
| `enableDebugMode` | This enable deep log in homebridge console. |
|
|
51
50
|
| `disableLogInfo` | This disable log info, all values and state will not be displayed in Homebridge log console. |
|
|
52
51
|
|
|
@@ -60,7 +59,6 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
|
|
|
60
59
|
"auth": false,
|
|
61
60
|
"user": "user",
|
|
62
61
|
"passwd": "password",
|
|
63
|
-
"channelsCount": 1,
|
|
64
62
|
"refreshInterval": 5,
|
|
65
63
|
"disableLogInfo": false,
|
|
66
64
|
"enableDebugMode": false,
|
package/config.schema.json
CHANGED
|
@@ -52,63 +52,6 @@
|
|
|
52
52
|
"maximum": 60,
|
|
53
53
|
"required": true
|
|
54
54
|
},
|
|
55
|
-
"channelsCount": {
|
|
56
|
-
"title": "Channels count",
|
|
57
|
-
"type": "integer",
|
|
58
|
-
"minimum": 1,
|
|
59
|
-
"maximum": 8,
|
|
60
|
-
"description": "Here select the channels count.",
|
|
61
|
-
"oneOf": [{
|
|
62
|
-
"title": "1CH",
|
|
63
|
-
"enum": [
|
|
64
|
-
1
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"title": "2CH",
|
|
69
|
-
"enum": [
|
|
70
|
-
2
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"title": "3CH",
|
|
75
|
-
"enum": [
|
|
76
|
-
3
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"title": "4CH",
|
|
81
|
-
"enum": [
|
|
82
|
-
4
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"title": "5CH",
|
|
87
|
-
"enum": [
|
|
88
|
-
5
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"title": "6CH",
|
|
93
|
-
"enum": [
|
|
94
|
-
6
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"title": "7CH",
|
|
99
|
-
"enum": [
|
|
100
|
-
7
|
|
101
|
-
]
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"title": "8CH",
|
|
105
|
-
"enum": [
|
|
106
|
-
8
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"required": true
|
|
111
|
-
},
|
|
112
55
|
"enableDebugMode": {
|
|
113
56
|
"title": "Enable Debug Mode",
|
|
114
57
|
"type": "boolean",
|
|
@@ -157,7 +100,6 @@
|
|
|
157
100
|
"expandable": true,
|
|
158
101
|
"expanded": false,
|
|
159
102
|
"items": [
|
|
160
|
-
"devices[].channelsCount",
|
|
161
103
|
"devices[].enableDebugMode",
|
|
162
104
|
"devices[].disableLogInfo",
|
|
163
105
|
"devices[].refreshInterval"
|
package/index.js
CHANGED
|
@@ -77,7 +77,6 @@ class tasmotaDevice {
|
|
|
77
77
|
this.passwd = config.passwd;
|
|
78
78
|
this.auth = config.auth;
|
|
79
79
|
this.refreshInterval = config.refreshInterval || 5;
|
|
80
|
-
this.channelsCount = config.channelsCount || 1;
|
|
81
80
|
this.enableDebugMode = config.enableDebugMode || false;
|
|
82
81
|
this.disableLogInfo = config.disableLogInfo || false;
|
|
83
82
|
|
|
@@ -88,6 +87,7 @@ class tasmotaDevice {
|
|
|
88
87
|
this.firmwareRevision = 'Firmware Revision';
|
|
89
88
|
|
|
90
89
|
//setup variables
|
|
90
|
+
this.channelsCount = 0;
|
|
91
91
|
this.checkDeviceInfo = true;
|
|
92
92
|
this.checkDeviceState = false;
|
|
93
93
|
this.startPrepareAccessory = true;
|
|
@@ -126,8 +126,9 @@ class tasmotaDevice {
|
|
|
126
126
|
const modelName = response.data.StatusFWR.Hardware;
|
|
127
127
|
const addressMac = response.data.StatusNET.Mac;
|
|
128
128
|
const firmwareRevision = response.data.StatusFWR.Version;
|
|
129
|
+
const channelsCount = response.data.Status.FriendlyName.length;
|
|
129
130
|
|
|
130
|
-
this.log(
|
|
131
|
+
this.log(`----- ${deviceName} ${channelsCount}CH -----`);
|
|
131
132
|
this.log('Manufacturer: %s', this.manufacturer);
|
|
132
133
|
this.log('Hardware: %s', modelName);
|
|
133
134
|
this.log('Serialnr: %s', addressMac);
|
|
@@ -137,8 +138,9 @@ class tasmotaDevice {
|
|
|
137
138
|
this.modelName = modelName;
|
|
138
139
|
this.serialNumber = addressMac;
|
|
139
140
|
this.firmwareRevision = firmwareRevision;
|
|
141
|
+
this.channelsCount = channelsCount;
|
|
140
142
|
|
|
141
|
-
this.checkDeviceInfo =
|
|
143
|
+
this.checkDeviceInfo = (channelsCount == 0);
|
|
142
144
|
} catch (error) {
|
|
143
145
|
this.log.error('Device: %s %s, Device Info eror: %s, state: Offline, trying to reconnect', this.host, this.name, error);
|
|
144
146
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Tasmota Control",
|
|
3
3
|
"name": "homebridge-tasmota-control",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Tasmota flashed devices.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|