|
@@ -8,7 +8,10 @@ define('HOST', 'r-bp1eebab79320044pd.redis.rds.aliyuncs.com');
|
|
|
define('PORT', '6379');
|
|
|
define('PASSWORD', '7e2b5c91e438be3c!');
|
|
|
define('DATABASE', 4);
|
|
|
-
|
|
|
+// define('HOST', '127.0.0.1');
|
|
|
+// define('PORT', '6379');
|
|
|
+// define('PASSWORD', '123456');
|
|
|
+// define('DATABASE', 2);
|
|
|
|
|
|
function app_redis()
|
|
|
{
|
|
@@ -292,14 +295,5 @@ while (1) {
|
|
|
}
|
|
|
sleep(3);
|
|
|
}
|
|
|
-// $text='{
|
|
|
-// "idESim": "460087239103991",
|
|
|
-// "stepCount": 52,
|
|
|
-// "EnvironmentTemperature": "0.0",
|
|
|
-// "latitude": 30.191937,
|
|
|
-// "longitude": 120.201123,
|
|
|
-// "charging": 1,
|
|
|
-// "lastCharge": 1696900306,
|
|
|
-// "measurementTimestamp": 1696900333
|
|
|
-// }';
|
|
|
+// $text='{"idESim":"460087239103989","stepCount":52,"EnvironmentTemperature":"0.0","earTemperature":"0.0","latitude":30.191936999999999,"longitude":120.201123,"charging":0,"lastCharge":1693497600,"measurementTimestamp":1698633903,"deviceId":"869154043496145-999202300000099","data_type":"reportData"}';
|
|
|
// app_redis()->lpush("mqtt_data_livestock",$text);
|