iobroker.parcel 0.0.5 → 0.0.6
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/README.md +12 -2
- package/admin/index_m.html +1 -1
- package/io-package.json +2 -2
- package/main.js +9 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,12 +18,22 @@ Parcel tracking
|
|
|
18
18
|
|
|
19
19
|
## Loginablauf
|
|
20
20
|
|
|
21
|
-
DHL
|
|
22
|
-
|
|
21
|
+
**DHL:**
|
|
23
22
|
* DHL App Login eingeben
|
|
24
23
|
* SMS/EMail Code erhalten
|
|
25
24
|
* In die Instanzeinstellungen eingeben und speichern
|
|
26
25
|
|
|
26
|
+
**Amazon:**
|
|
27
|
+
* Login eingeben
|
|
28
|
+
* Wenn nötig vorab ein OTP token aus der 2FA App vor dem ersten Login eingeben.
|
|
29
|
+
|
|
30
|
+
**DPD, GLS, UPS, 17Track User:**
|
|
31
|
+
|
|
32
|
+
Login und Passwort eingeben
|
|
33
|
+
|
|
34
|
+
**Telegram Benachrichtigun für Sendungen und Briefe**
|
|
35
|
+
|
|
36
|
+
In den Instanz Einstellung aktivieren und z.B. telegram.0 eingeben
|
|
27
37
|
|
|
28
38
|
|
|
29
39
|
### DHL Briefverfolgung in der Vis anzeigen.
|
package/admin/index_m.html
CHANGED
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
<div class="row">
|
|
127
127
|
<div class="col s6 input-field">
|
|
128
128
|
<input type="text" class="value" id="amzotp" />
|
|
129
|
-
<label for="amzotp" class="translate">Amazon OTP Token falls 2FA aktiviert ist</label>
|
|
129
|
+
<label for="amzotp" class="translate">Amazon OTP Token vor dem Login eingeben, falls 2FA aktiviert ist</label>
|
|
130
130
|
</div>
|
|
131
131
|
</div>
|
|
132
132
|
<div class="row">
|
package/io-package.json
CHANGED
package/main.js
CHANGED
|
@@ -588,7 +588,7 @@ class Parcel extends utils.Adapter {
|
|
|
588
588
|
})
|
|
589
589
|
.then(async (res) => {
|
|
590
590
|
this.log.debug(JSON.stringify(res.data));
|
|
591
|
-
if (res.data.LoginSubmitUserIdResponse) {
|
|
591
|
+
if (res.data.LoginSubmitUserIdResponse && res.data.LoginSubmitUserIdResponse.LoginResponse && res.data.LoginSubmitUserIdResponse.LoginResponse.AuthenticationToken) {
|
|
592
592
|
this.upsAuthToken = res.data.LoginSubmitUserIdResponse.LoginResponse.AuthenticationToken;
|
|
593
593
|
|
|
594
594
|
this.sessions["ups"] = res.data;
|
|
@@ -613,6 +613,9 @@ class Parcel extends utils.Adapter {
|
|
|
613
613
|
});
|
|
614
614
|
this.setState("info.connection", true, true);
|
|
615
615
|
this.setState("auth.cookie", JSON.stringify(this.cookieJar.toJSON()), true);
|
|
616
|
+
} else {
|
|
617
|
+
this.log.warn("Login to UPS failed");
|
|
618
|
+
this.log.info(JSON.stringify(res.data));
|
|
616
619
|
}
|
|
617
620
|
|
|
618
621
|
return;
|
|
@@ -760,7 +763,7 @@ class Parcel extends utils.Adapter {
|
|
|
760
763
|
this.log.error("T17User: " + res.data.Message);
|
|
761
764
|
return;
|
|
762
765
|
}
|
|
763
|
-
this.log.info("Login to
|
|
766
|
+
this.log.info("Login to T17 User successful");
|
|
764
767
|
this.sessions["17tuser"] = true;
|
|
765
768
|
await this.setObjectNotExistsAsync("17tuser", {
|
|
766
769
|
type: "device",
|
|
@@ -997,7 +1000,7 @@ class Parcel extends utils.Adapter {
|
|
|
997
1000
|
await this.cleanupProvider(id, data);
|
|
998
1001
|
this.mergeProviderJson(id, data);
|
|
999
1002
|
this.json2iob.parse(element.path, data, { forceIndex: forceIndex, preferedArrayName: preferedArrayName });
|
|
1000
|
-
this.setState(element.path + ".json", JSON.stringify(data), true);
|
|
1003
|
+
data && this.setState(element.path + ".json", JSON.stringify(data), true);
|
|
1001
1004
|
})
|
|
1002
1005
|
.catch((error) => {
|
|
1003
1006
|
if (error.response) {
|
|
@@ -1138,9 +1141,9 @@ class Parcel extends utils.Adapter {
|
|
|
1138
1141
|
const ids = Object.keys(sendungen);
|
|
1139
1142
|
for (const id of ids) {
|
|
1140
1143
|
if (this.alreadySentMessages[id] === sendungen[id].status) {
|
|
1141
|
-
|
|
1144
|
+
continue;
|
|
1142
1145
|
}
|
|
1143
|
-
this.sendTo(this.config.sendToInstance, sendungen[id].name + "\n" + sendungen[id].status);
|
|
1146
|
+
this.sendTo(this.config.sendToInstance, "📦 " + sendungen[id].name + "\n" + sendungen[id].status);
|
|
1144
1147
|
this.alreadySentMessages[id] = sendungen[id].status;
|
|
1145
1148
|
}
|
|
1146
1149
|
}
|
|
@@ -1558,7 +1561,7 @@ class Parcel extends utils.Adapter {
|
|
|
1558
1561
|
if (err) {
|
|
1559
1562
|
this.log.error(err);
|
|
1560
1563
|
} else {
|
|
1561
|
-
this.sendTo(this.config.sendToInstance, "Briefankündigung");
|
|
1564
|
+
this.sendTo(this.config.sendToInstance, "✉️Briefankündigung");
|
|
1562
1565
|
this.sendTo(this.config.sendToInstance, "/tmp/snapshot.jpg");
|
|
1563
1566
|
}
|
|
1564
1567
|
});
|