Allow empty Thingsplex credentials (#3)

This commit is contained in:
Adrian Jagielak
2025-09-24 21:15:54 +02:00
parent a8e5b00275
commit 351274f56e
29 changed files with 83 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ import { pollVinculum } from './fimp/vinculum';
const localApiPassword = process.env.FH_PASSWORD || '';
const thingsplexUsername = process.env.TP_USERNAME || '';
const thingsplexPassword = process.env.TP_PASSWORD || '';
const thingsplexAllowEmpty = (process.env.TP_ALLOW_EMPTY || '').toLowerCase().includes('true');
const demoMode = (process.env.DEMO_MODE || '').toLowerCase().includes('true');
const showDebugLog = (process.env.SHOW_DEBUG_LOG || '')
.toLowerCase()
@@ -166,6 +167,7 @@ import { pollVinculum } from './fimp/vinculum';
deviceInclusionReport,
thingsplexUsername,
thingsplexPassword,
thingsplexAllowEmpty,
});
await delay(50);
@@ -189,7 +191,7 @@ import { pollVinculum } from './fimp/vinculum';
log.error('Failed publishing device', device, e);
}
}
if (demoMode || (thingsplexUsername && thingsplexPassword)) {
if (demoMode || thingsplexAllowEmpty || (thingsplexUsername && thingsplexPassword)) {
Object.assign(
commandHandlers,
exposeSmarthubTools({