2 Replies Latest reply on Oct 12, 2016 7:26 AM by aalbot RSS
    aalbot Explorer

    Service did not execute complitely

    Hi,

         I want to send a json data from Node MCU, and decode the data by thingworx service. Unfortunately, the service did not execute complitely.

    Here are my service and the test data:

    Service:

         No input and output.

    var obj = me.data;
    
    
    var temperatureString = obj.T;
    if(temperatureString != null){
        me.Temperature = Number(temperatureString);
    }
    
    
    var humidityString = obj.H;
    if(humidityString != null){
       me.Humidity = Number(humidityString);
    }
    
    
    var airString = obj.A;
    if(airString != null){
        me.Air = Number(airString);
    }
    var pressureString = obj.P;
    if(pressureString != null){
        me.Pressure = Number(pressureString);
    }
    var windDirectionString = obj.D;
    if(windDirectionString != null){
        me.WindDirection = Number(windDirectionString);
    }
    var windSpeedString = obj.S;
    if(windSpeedString != null){
        me.WindSpeed = Number(windSpeedString);
    }
    var rainFallString = obj.R;
    if(rainFallString != null){
        me.RainFall = Number(rainFallString);
    }
    
    
    
    
    
    
    

     

    Test data:

    {"T":"233","H":"233","P":"233","A":"233","S":"233","D":"233","R":"233"}
    

     

    I save the json data in "data" propertity and I wrote a subscription to listen the "DataChange" event ------ execute the service.

     

    Unfortunately, only temperature change to "233", others still looked like zero.


    Here are the propertities and the permissions.


    J97M)~D]}{{PS%]9R10}]`4.png

    R`03H5]6CBVM]GTA{]TQU}N.png