diff --git a/gradle.properties b/gradle.properties index 38f2dc8..8b8868f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ projectName = custom-project projectVersion = 1.0-SNAPSHOT +typescriptGeneratorVersion = 3.2.1263 \ No newline at end of file diff --git a/manager/src/main/java/org/openremote/manager/custom/telematics/processors/teltonika/TeltonikaMQTTHandler.java b/manager/src/main/java/org/openremote/manager/custom/telematics/processors/teltonika/TeltonikaMQTTHandler.java index 0667bf2..9aa03eb 100644 --- a/manager/src/main/java/org/openremote/manager/custom/telematics/processors/teltonika/TeltonikaMQTTHandler.java +++ b/manager/src/main/java/org/openremote/manager/custom/telematics/processors/teltonika/TeltonikaMQTTHandler.java @@ -164,12 +164,12 @@ private void handleAssetConfigurationChange(AttributeEvent attributeEvent) { if(eventFilter.apply(attributeEvent) == null) return; - Asset asset = assetStorageService.find(attributeEvent.getAttributeRef().getId()); + Asset asset = assetStorageService.find(attributeEvent.getRef().getId()); // if (asset.getType() == ) - if(Objects.equals(attributeEvent.getAttributeName(), TeltonikaModelConfigurationAsset.PARAMETER_MAP.getName())) return; + if(Objects.equals(attributeEvent.getName(), TeltonikaModelConfigurationAsset.PARAMETER_MAP.getName())) return; - if (Objects.equals(attributeEvent.getAttributeName(), TeltonikaModelConfigurationAsset.PARAMETER_DATA.getName())){ + if (Objects.equals(attributeEvent.getName(), TeltonikaModelConfigurationAsset.PARAMETER_DATA.getName())){ TeltonikaParameter[] newParamList = (TeltonikaParameter[]) attributeEvent.getValue().orElseThrow(); if(newParamList.length == 0) return; getLogger().info("Model map configuration event: " + Arrays.toString(newParamList)); @@ -243,13 +243,13 @@ private void handleAttributeMessage(AttributeEvent event) { TeltonikaConfiguration config = getConfig(); // If this is not an AttributeEvent that updates a config.config.getCommandAttribute().getValue().orElse("sendToDevice") field, ignore - if (!Objects.equals(event.getAttributeName(), config.getCommandAttribute().getValue().orElse("sendToDevice"))) return; + if (!Objects.equals(event.getName(), config.getCommandAttribute().getValue().orElse("sendToDevice"))) return; //Find the asset in question - CarAsset asset = assetStorageService.find(event.getAssetId(), CarAsset.class); + CarAsset asset = assetStorageService.find(event.getId(), CarAsset.class); // Double check, remove later, sanity checks if(asset.hasAttribute(config.getCommandAttribute().getValue().orElse("sendToDevice"))){ - if(Objects.equals(event.getAssetId(), asset.getId())){ + if(Objects.equals(event.getId(), asset.getId())){ //Get the IMEI of the device Optional> imei; diff --git a/settings.gradle b/settings.gradle index fef6c42..86e2afd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,13 +1,7 @@ -pluginManagement { - plugins { - id "com.cherryperry.gradle-file-encrypt" version "2.0.0" - id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.3" - } -} - plugins { - id "com.cherryperry.gradle-file-encrypt" apply false - id "org.jetbrains.gradle.plugin.idea-ext" apply false + id "com.cherryperry.gradle-file-encrypt" version "2.0.3" apply false + id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.3" apply false + id 'cz.habarta.typescript-generator' version "$typescriptGeneratorVersion" apply false } rootProject.name = "$projectName" @@ -17,5 +11,5 @@ fileTree(dir: rootDir, include: "**/build.gradle", excludes: ["**/node_modules/* .filter { it.parent != rootDir } .filter { !file("${it.parent}/.buildignore").exists() } .each { - include it.parent.replace(rootDir.canonicalPath, "").replace("\\", ":").replace("/", ":") -} + include it.parent.replace(rootDir.canonicalPath, "").replace("\\", ":").replace("/", ":") + } \ No newline at end of file