I was sending data to the thingworx by Arduino Yun. When I plugged the USB power, it worked well. However, after a while I couldn't see any new data on the Thing/Properties. And the QueryPropertyHistory services told me the data hadn't been updated. When I re-plugged the USB power, it still worked well. Why? Could you help me?
The core codes are:
String setData("curl "
"\"http://"+TWServer+":"+TWPort+"/Thingworx/Things/DHT21Thing/Properties/*?appKey="+appKey+"\""
" -X PUT "
"-i -H \"Content-Type:application/json\" "
"-H \"Accept:application/json\" "
"-d '{\"Temperature\" :" + tempAsString + ", \"Humidity\" :" + humidityAsString + "}' "
);
Serial.println("Set Data: "+ setData);
// run the curl command with the REST call that was build in the setTemperature String variable
p.runShellCommand(setData);
Solved! Go to Solution.
Hi Vladimir,
Thanks for your help.
1. "a while" means "sometimes a half hour, sometimes five minutes". I am not sure.
2. The 1Amper charger still displays the same behavior.
3. I've found the problem. In the Thing's Properties, There is a attributes which called "Data Change Info". Set the "Data Change type" to "Always". Because my data always the same as before, and the default of the "Data Change type" is "Values 0", so the same data change event can't be fired.
Best regards
Hi Albot,
1. What exactly "a while means"?
2. Can you please power up your Yun by a 1Amper charger? See if it still displays the same behavior.
Best regards
Hi Vladimir,
Thanks for your help.
1. "a while" means "sometimes a half hour, sometimes five minutes". I am not sure.
2. The 1Amper charger still displays the same behavior.
3. I've found the problem. In the Thing's Properties, There is a attributes which called "Data Change Info". Set the "Data Change type" to "Always". Because my data always the same as before, and the default of the "Data Change type" is "Values 0", so the same data change event can't be fired.
Best regards
Albot, hi,
Now I understand, I thought when you said you couldn't see any new data on the platform, new data meant any variation, not just the same value.
Glad to see you figured out!
BR,
Vladi