diff --git a/server/ttn-app-server/TTNAppServer.mjs b/server/ttn-app-server/TTNAppServer.mjs index 534e3f5..f72a9e9 100644 --- a/server/ttn-app-server/TTNAppServer.mjs +++ b/server/ttn-app-server/TTNAppServer.mjs @@ -1,6 +1,6 @@ "use strict"; -import { data as ttn_data } from 'ttn'; +import MqttClient from 'simple-mqtt-client'; class TTNAppServer { // 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}`); return false; } - this.ttn_client = await ttn_data( + + + this.ttn_client = MqttClient.new().init()( this.settings.ttn.app_id, this.settings.ttn.access_key );