2 Replies Latest reply on Nov 3, 2017 9:29 AM by pjoly RSS
    pjoly Apprentice

    One property (type "location") not recorded into the value stream with others



    i am recording location of devices into a value stream

    all other data are well recorded and I'm able to retriev except one , the GPS position , type "Location"


    the real time location (last one) is well displayed but not the history despite I have activated the "logged" option :


    real time :


    history :


    Any reason not to have the Location recorded with other properties ?



        • Re: One property (type "location") not recorded into the value stream with others
          pjoly Apprentice

          I tried the method to update all properties in one time but the location is still not recorded with the other properties


                  var mylocation = new Object();
                  mylocation.latitude = parseFloat(position.latitude);
                  mylocation.longitude= parseFloat(position.longitude);
                  mylocation.elevation= parseFloat(position.altitude);       
                  logger.debug( logprefix + JSON.stringify(mylocation));
                  var newField = new Object();
                  newField.name = 'LastPosition';
                  newField.baseType = 'LOCATION';
                 var params = { 
                      values: myUpdate /* INFOTABLE */ 
                  // Finally, update my thing with the properties in the table 


          the log for the new location :



          the new location is not recorded (updated)  :


          If I use

                  Things[mything].LastPosition = mylocation;


          it works but I got a separate record in the value stream.