SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hi all!
I have created a SmartConnector which requires you to create some "Mappings" of Building Operation points. In order to do this, I have added a List<IotDeviceMap> (see below for C# code) to my processor which should then be able to be populated via the SmartConnector UI.
However, When I click on the "Plus" sign at the side to add a new Mapping, SmartConnector hangs and just continuously shows the "Working" popup as below:
The "Mappings" class is as follows:
[Required]
public IotDevice DeviceSettings { get; set; }
public EnterpriseServerIoTProcessor()
{
DeviceSettings = new IotDevice
{
Config = new IotDeviceConfig(),
Mappings = new List<IotDeviceMap>
{
new IotDeviceMap()
}
};
}
Has anyone experienced anything similar? I am running the latest version of SC, 2.3.108.
Thanks in advance!
Mark
Link copied. Please paste this link to share this article on your social media post.
The workaround for 2.3.108 is as described above (using List<string> instead of string[]). However, this is actually a bug in SmartConnector as both string[] and List<string> should be valid for a configuration. A bug has been written internally and a fix will be worked on!
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Mark,
Can you also post the code for the IotDevice, IotDeviceConfig, and IotDeviceMap class itself (Feel free to send them to me privately as well).
One thing to check is that these classes implement 'ITraversable'.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Please see below...
using System.Collections.Generic;
namespace ISC.Iot.Common.Models
{
public class IotDevice
{
private List<IotDeviceMap> mappingsField;
public IotDeviceConfig Config { get; set; }
public List<IotDeviceMap> Mappings
{
get => new List<IotDeviceMap>(mappingsField);
set => mappingsField = value;
}
}
public class IotDeviceConfig
{
public string DeviceId { get; set; }
public string ESAddress { get; set; }
public string ESUsername { get; set; }
public string ESPassword { get; set; }
public int ESPort { get; set; }
}
public class IotDeviceMap
{
public string FullPointPath { get; set; }
public string PointType { get; set; }
public string[] TriggerValues { get; set; }
}
}
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Just tried adding ITraversable to IotDeviceMap and get the same results...
Thanks
Mark
Link copied. Please paste this link to share this article on your social media post.
Hi Mark,
Another thing I am not sure about is the use of string[] TriggerValues. Can you try changing this to List<string>?
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
For anyone else having a similar issue, Jeff Bowman has managed to find a root cause for this.
In the Class "IotDeviceMap" a string Array is used for "TriggerValues". If you change this for a List<string>, everything will start working!
Thanks Jeff Bowman
Mark
Link copied. Please paste this link to share this article on your social media post.
The workaround for 2.3.108 is as described above (using List<string> instead of string[]). However, this is actually a bug in SmartConnector as both string[] and List<string> should be valid for a configuration. A bug has been written internally and a fix will be worked on!
Regards,
-Jeff
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.