// posljemo podatke na spletno stran
        private void Poslji(object sender, RoutedEventArgs e)
        {
            ConnectTheDotsSensor sensor = ctdHelper.sensors.Find(item => item.measurename == "Temperature");

            sensor.value     = temperatura;
            sensor.alerttype = opozorilo;
            sensor.message   = sporocilo;
            ctdHelper.SendSensorData(sensor);
        }
Ejemplo n.º 2
0
 public void SendSensorData(ConnectTheDotsSensor sensor)
 {
     sensor.timecreated = DateTime.UtcNow.ToString("o");
     sendMessage(sensor.ToJson());
 }