diff --git a/README.md b/README.md
index b9ba9f3..aee2f3d 100644
--- a/README.md
+++ b/README.md
@@ -87,10 +87,14 @@ Examples:
 ### list-reading-types
 > Lists the different types of readings that can be specified.
 
-_No parameters are currently supported by this action._
+Parameter			| Type		| Meaning
+--------------------|-----------|---------------------
+`device-id`         | int		| Optional. If specified, this filters the list of measurement types to list only those reported by the device with the specified id.
 
 ```
 https://example.com/path/to/api.php?action=list-reading-types
+https://example.com/path/to/api.php?action=list-reading-types&device-id=22
+https://example.com/path/to/api.php?action=list-reading-types&device-id=54
 ```
 
 
diff --git a/logic/Actions/ListReadingTypes.php b/logic/Actions/ListReadingTypes.php
index 4f0761b..62444c5 100644
--- a/logic/Actions/ListReadingTypes.php
+++ b/logic/Actions/ListReadingTypes.php
@@ -32,9 +32,14 @@ class ListReadingTypes implements IAction {
 		$start_handle = microtime(true);
 		
 		// 1: Parse & validate parameters
+		$device_id = !empty($_GET["device-id"]) ? intval($_GET["device-id"]) : null;
 		
 		// 1: Pull data from database
-		$data = $this->types_repo->get_all_types();
+		$data = null;
+		if(!is_int($device_id))
+			$data = $this->types_repo->get_all_types();
+		else
+			$data = $this->types_repo->get_types_by_device($device_id);
 		
 		// 1.5: Validate data from database
 		if(empty($data)) {
diff --git a/logic/Database.php b/logic/Database.php
index 3eb8bea..0d3a00a 100644
--- a/logic/Database.php
+++ b/logic/Database.php
@@ -42,7 +42,7 @@ class Database
 	}
 	
 	public function query($sql, $variables = []) {
-		//error_log("[Database/SQL] $sql");
+		error_log("[Database/SQL] $sql");
 		// FUTURE: Optionally cache prepared statements?
 		$statement = $this->connection->prepare($sql);
 		$statement->execute($variables);
diff --git a/logic/Repositories/IMeasurementTypeRepository.php b/logic/Repositories/IMeasurementTypeRepository.php
index e255204..8be3abe 100644
--- a/logic/Repositories/IMeasurementTypeRepository.php
+++ b/logic/Repositories/IMeasurementTypeRepository.php
@@ -22,4 +22,10 @@ interface IMeasurementTypeRepository {
 	 * @return	array	All the measurement types currently known.
 	 */
     public function get_all_types();
+	
+	/**
+	 * Gets the all the measurement types ever reported by a given device id.
+	 * @return	string[]	A list of device ids.
+	 */
+	public function get_types_by_device(int $device_id);
 }
diff --git a/logic/Repositories/MariaDBMeasurementTypeRepository.php b/logic/Repositories/MariaDBMeasurementTypeRepository.php
index 8fa4617..66162b2 100644
--- a/logic/Repositories/MariaDBMeasurementTypeRepository.php
+++ b/logic/Repositories/MariaDBMeasurementTypeRepository.php
@@ -19,12 +19,16 @@ class MariaDBMeasurementTypeRepository implements IMeasurementTypeRepository {
 	 */
 	private $database;
 	
-	/** Function that gets a static variable by it's name. Useful in preparing SQL queries. */
+	/** Functions that get a static variable by it's name. Useful in preparing SQL queries. */
 	private $get_static;
+	private $get_static_extra;
 	
 	function __construct(\AirQuality\Database $in_database) {
 		$this->database = $in_database;
 		$this->get_static = function($name) { return self::$$name; };
+		$this->get_static_extra = function($class_name, $name) {
+			return $class_name::$$name;
+		};
 	}
 	
 	public function is_valid_type(string $type_name) : bool {
@@ -50,4 +54,23 @@ class MariaDBMeasurementTypeRepository implements IMeasurementTypeRepository {
 			"SELECT * FROM {$s("table_name")}"
 		)->fetchAll();
 	}
+	
+	public function get_types_by_device($device_id) {
+		$s = $this->get_static;
+		$o = $this->get_static_extra;
+		return $this->database->query(
+			"SELECT
+				{$s("table_name")}.*,
+				COUNT({$s("table_name")}.{$s("column_id")}) AS count
+			FROM {$o(MariaDBMeasurementDataRepository::class, "table_name_values")}
+			JOIN {$o(MariaDBMeasurementDataRepository::class, "table_name_metadata")} ON
+				{$o(MariaDBMeasurementDataRepository::class, "table_name_metadata")}.{$o(MariaDBMeasurementDataRepository::class, "column_metadata_id")} = {$o(MariaDBMeasurementDataRepository::class, "table_name_values")}.{$o(MariaDBMeasurementDataRepository::class, "column_values_reading_id")}
+			JOIN {$s("table_name")} ON
+				{$s("table_name")}.{$s("column_id")} = {$o(MariaDBMeasurementDataRepository::class, "table_name_values")}.{$o(MariaDBMeasurementDataRepository::class, "column_values_reading_type")}
+			WHERE {$o(MariaDBMeasurementDataRepository::class, "table_name_metadata")}.{$o(MariaDBMeasurementDataRepository::class, "column_metadata_device_id")} = :device_id
+			GROUP BY {$s("table_name")}.{$s("column_id")};", [
+				"device_id" => $device_id
+			]
+		)->fetchAll();
+	}
 }
