From 11fcbc0bc9ea604c269bd56c2d474d32a1de568c Mon Sep 17 00:00:00 2001 From: remco janse Date: Wed, 21 Dec 2016 22:00:48 +0100 Subject: [PATCH 1/4] Added Lct010 Model --- library/Phue/LightModel/Lct010Model.php | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 library/Phue/LightModel/Lct010Model.php diff --git a/library/Phue/LightModel/Lct010Model.php b/library/Phue/LightModel/Lct010Model.php new file mode 100644 index 0000000..2032c99 --- /dev/null +++ b/library/Phue/LightModel/Lct010Model.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) 2012 Michael K. Squires + * @license http://github.com/sqmk/Phue/wiki/License + */ +namespace Phue\LightModel; + +/** + * Hue Bulb V3 + */ +class Lct010Model extends AbstractLightModel +{ + + /** + * Model id + */ + const MODEL_ID = 'LCT010'; + + /** + * Model name + */ + const MODEL_NAME = 'Hue Bulb V3'; +} From d66b95207b7fc03ad9d1d5ba28a3eec9eaf67926 Mon Sep 17 00:00:00 2001 From: Johnny Mast Date: Wed, 25 Jan 2017 08:26:19 +0100 Subject: [PATCH 2/4] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index d29b095..df7f6ea 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Software License Agreement (The BSD 3-Clause License) -Copyright (c) 2012, Michael K. Squires +Copyright (c) 2017, Michael K. Squires All rights reserved. Redistribution and use in source and binary forms, with or without modification, From 013e43ee1abd78a63345a80caa5d451c95e831b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Mejenborg=20S=C3=B8rensen?= Date: Thu, 30 Nov 2017 14:10:30 +0100 Subject: [PATCH 3/4] Support charset definition in Content-Type header --- library/Phue/Transport/Http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Phue/Transport/Http.php b/library/Phue/Transport/Http.php index 2693cee..13a7a2e 100644 --- a/library/Phue/Transport/Http.php +++ b/library/Phue/Transport/Http.php @@ -227,7 +227,7 @@ protected function getJsonResponse($address, $method = self::METHOD_GET, \stdCla $contentType = $this->getAdapter()->getContentType(); // Throw connection exception if status code isn't 200 or wrong content type - if ($status != 200 || $contentType != 'application/json') { + if ($status != 200 || substr($contentType, 0, strpos($contentType, ';')) != 'application/json') { throw new ConnectionException('Connection failure'); } From cf198e9149ec9453fcd04cc7e6b6b612dc503617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Mejenborg=20S=C3=B8rensen?= Date: Fri, 1 Dec 2017 08:20:58 +0100 Subject: [PATCH 4/4] Explode contentType instead of substr to isolate content type --- library/Phue/Transport/Http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Phue/Transport/Http.php b/library/Phue/Transport/Http.php index 13a7a2e..a27f0f7 100644 --- a/library/Phue/Transport/Http.php +++ b/library/Phue/Transport/Http.php @@ -227,7 +227,7 @@ protected function getJsonResponse($address, $method = self::METHOD_GET, \stdCla $contentType = $this->getAdapter()->getContentType(); // Throw connection exception if status code isn't 200 or wrong content type - if ($status != 200 || substr($contentType, 0, strpos($contentType, ';')) != 'application/json') { + if ($status != 200 || explode(';', $contentType)[0] != 'application/json') { throw new ConnectionException('Connection failure'); }