Retrieve Data from External Sensor Connected to Player

555

# Retrieve Data from External Sensor Connected to Player

Path:

/api/csensor.json

Method: GET

API Description: This can be used to retrieve the data from the external sensor connected to the player via RJ11 connector.

Response Example
(1) Retrieve the data from all external sensors, http://192.168.42.129/api/csensor.json

{
	"temperature": 26.7,
	"humidity": 30,
	"pm10": 10.3,
	"pm25": 14.6
}

Sensor types include PM2.5, PM10, brightness, humidity, smoke, noise, and temperature.

Note: The following methods are supported by 1.70.4 or later version only, with responsive interface.
(2) Retrieve the data from a single sensor, http://192.168.42.129/api/csensor.json?type=noise

{"noise": 38.7}

Sensor types include noise, smoke, brightness, humidity, temperature, and air quality; when the sensor is not connected, the returned data is empty; return all sensor data when the type field is another value.