I installed your app from scratch, tried to add different sensors. Everytime I try to create a new sensor (no matter which one) it will fail : DateTime values that are greater than DateTime.MaxValue or smaller than DateTime.MinValue when converted to UTC cannot be serialized to JSON.
see attached picture
public static string Serialize(T entity)
{
var stream1 = new MemoryStream();
var ser = new DataContractJsonSerializer(typeof(T),new DataContractJsonSerializerSettings
{
UseSimpleDictionaryFormat = true
});
ser.WriteObject(stream1, entity);
stream1.Position = 0;
using (var sr = new StreamReader(stream1))
{
return sr.ReadToEnd();
}
}
