Start switching over to simple-mqtt-client, but it's not finished yet
This commit is contained in:
parent
e3a667cb69
commit
1a39c5902e
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
import { data as ttn_data } from 'ttn';
|
import MqttClient from 'simple-mqtt-client';
|
||||||
|
|
||||||
class TTNAppServer {
|
class TTNAppServer {
|
||||||
// Destructure the awilix container
|
// Destructure the awilix container
|
||||||
|
@ -17,7 +17,9 @@ class TTNAppServer {
|
||||||
console.error(`${this.a.fred}${this.a.hicol}Error: No TTN app id specified. Try filling in the required values in settings.toml. If they don't exist yet, try using server/settings.default.toml as a reference.${this.a.reset}`);
|
console.error(`${this.a.fred}${this.a.hicol}Error: No TTN app id specified. Try filling in the required values in settings.toml. If they don't exist yet, try using server/settings.default.toml as a reference.${this.a.reset}`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.ttn_client = await ttn_data(
|
|
||||||
|
|
||||||
|
this.ttn_client = MqttClient.new().init()(
|
||||||
this.settings.ttn.app_id,
|
this.settings.ttn.app_id,
|
||||||
this.settings.ttn.access_key
|
this.settings.ttn.access_key
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue