From 949db18d9a88245a5f353ac3e66c20138bc32168 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 12 Feb 2021 22:03:58 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 6c9f6c8..c6a020c 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8 public string PluginVersion { - get { return "7.6.1-alpha.105"; } + get { return "7.6.1-alpha.106"; } } public string About @@ -1681,7 +1681,16 @@ namespace AyaNova.PlugIn.V8 var ObjectTID = new TypeAndID(RootObjectTypes.Unit, c.ID); dynamic d = new JObject(); - d.Serial = c.Serial; + + string tempNumber = c.Serial; + if (string.IsNullOrWhiteSpace(tempNumber)) + tempNumber = "0";//was not required in v7, is required in v8 + + //UNIT SERIAL NUMBER and MODEL ID combo must be unique!! + //this ensures that by appending a extra number character that is unique then removing the vendorid from the start + //resulting in a unique name/vendorid combo + d.serial = GetUniqueName(c.UnitModelID.ToString() + tempNumber).Replace(c.UnitModelID.ToString(), ""); + if (IsDuplicatev7v8IdMapItem(c.ID, c.Serial, progress)) continue; progress.Op(ObjectTypeName + " " + d.serial); d.active = c.Active;