Skip to content

Commit

Permalink
fix for awtrix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
petersem committed Feb 14, 2024
1 parent 2ac2edf commit f5e91ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ async function loadNowScreening() {
}
catch(ex){
let now = new Date();
console.log(now.toLocaleString() + ex + " - Failed to communicate with Awtrix. Check Awtrix settings/device, then restart poster");
console.log(now.toLocaleString() + " Failed to communicate with Awtrix. Check Awtrix settings/device, then restart poster - " + ex);
isAwtrixEnabled = false;
}
});
Expand All @@ -554,7 +554,8 @@ async function loadNowScreening() {
}
catch(ex){
let now = new Date();
console.log(now.toLocaleString() + " - Failed to communicate with Awtrix. Check Awtrix settings/device, then restart poster. " + ex);
console.log(now.toLocaleString() + " Failed to communicate with Awtrix. Check Awtrix settings/device, then restart poster. " + ex);
isAwtrixEnabled = false;
}
oldAwtrixApps.push(md);
let now = new Date();
Expand All @@ -580,6 +581,7 @@ async function loadNowScreening() {
catch(ex){
let now = new Date();
console.log(now.toLocaleString() + " - Failed to communicate with Awtrix. Check Awtrix settings/device, then restart poster. " + ex);
isAwtrixEnabled = false;
}
let now = new Date();
//console.log(now.toLocaleString() + " Awtrix update: " + md.text + " - " + result.progress + "% --> " + md.progress +"%");
Expand Down Expand Up @@ -1242,7 +1244,10 @@ async function startup(clearCache) {
}
catch(ex){
let now = new Date();
throw " Awtrix failed connectivity test - " + ex;
//console.log(now.toLocaleString() + " Awtrix failed connectivity test");
console.log(now.toLocaleString() + " Disabling Awtrix. Check Awtrix settings/device, then restart poster - " + ex);

isAwtrixEnabled = false;
}
try{
// clear any old awtrix apps
Expand All @@ -1255,7 +1260,8 @@ async function startup(clearCache) {
}
catch(ex){
let now = new Date();
console.log(now.toLocaleString() + ex + " - Disabling Awtrix. Check Awtrix settings/device, then restart poster");
//console.log(now.toLocaleString() + " Awtrix failed clear operation");
console.log(now.toLocaleString() + " Disabling Awtrix. Check Awtrix settings/device, then restart poster - " + ex);
isAwtrixEnabled = false;
}
}
Expand Down Expand Up @@ -1875,6 +1881,7 @@ app.post(
catch(ex){
let now = new Date();
console.log(now.toLocaleString() + " *Unable to reset Awtrix, you 'may' need to do so manually. " + ex);
isAwtrixEnabled = false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posterr",
"version": "1.17.6",
"version": "1.17.7",
"description": "A digital display for your media",
"main": "index.js",
"bin": "index.js",
Expand Down

0 comments on commit f5e91ec

Please sign in to comment.