Mesh模型——Lighting

Lighting
This section of the specification defines a set functionalities related to lighting control. This includes dimmable lights as well as tunable and color changing lights. It also includes a light control model that allows specific behaviors triggered by sensors, such as turning lights on based on occupancy or balancing a light level based on ambient light conditions, dimming lights after a period of inactivity and eventually turning lights off.
規範的這一節定義了與照明控制相關的一組功能。這包括可調光以及可調光和變色光。它還包括允許傳感器觸發特定行爲的光控制模型,例如,根據佔用情況打開燈光或根據環境光照條件平衡燈光級別,在一段時間不活動後調暗燈光並最終關閉燈光。
 
1、Lighting states
 
1.1、Introduction
There are different types of light sources with different capabilities. Accordingly, there are different ways to express a state of a light.
不同類型的光源具有不同的功能。因此,有不同的方式來表達光的狀態。
 
The simplest way of controlling a light is turning it on or off. This is done by controlling the Generic OnOff state (see Section 3.1.1).
控制燈光的最簡單方法是打開或關閉燈光。這是通過控制通用的開啓關閉狀態來實現的(見第3.1.1節)。
 
A more advanced method of controlling a light is changing the lightness. This is done by controlling the Light Lightness Actual state (see Section 6.1.2.1). For an informative discussion of lightness, see Section A.2.
一種更先進的控制燈光的方法是改變亮度。這是通過控制燈光亮度的實際狀態來實現的(見第6.1.2.1節)。有關亮度的詳細討論,請參見第A.2節。
 
If a light is a tunable white, meaning it is possible to control its color temperature, this is done by controlling the Light CTL state (see Section 6.1.3) along with the DUV (Delta UV). The color temperature corresponds to a particular locus (curve) on the color chart and is equivalent to black body radiation at different temperatures (expressed in Kelvin). Higher color temperatures are more bluish or cool and lower color temperatures are reddish or warm. Incandescent light is typically 2700K to 3000K, while daylight or fluorescent light is typically 5000K. DUV (Delta UV) is the distance from the Black Body curve. It is a range of -1.0 to 1.0 with a 16-bit resolution. The Color Temperatures all fall on the black body locus (curve) and some applications want to slightly deviate from the black body curve (e.g., to accentuate pinks/reds).
如果光是可調諧的白色,這意味着可以控制其色溫,這可以通過控制光CTL狀態(見第6.1.3節)和DUV(Delta UV)來實現。色溫對應色圖上的一個特定軌跡(曲線),相當於不同溫度下的黑體輻射(以開爾文表示)。色溫越高,顏色就越藍或冷,色溫越低,顏色就越紅或熱。白熾燈一般爲2700K至3000K,日光燈或熒光燈一般爲5000K。DUV(Delta UV)是與黑體曲線的距離。它的範圍是-1.0到1.0,分辨率爲16位。色溫都落在黑體軌跡(曲線)上,有些應用希望稍微偏離黑體曲線(例如,突出粉紅色/紅色)。
 
If a light is a color changing light, meaning it is possible to control all three dimensions (Hue, Saturation, and Lightness or HSL), this is done by controlling each state independently:
     Lightness is controlled by the Light Lightness Actual state (see Section 6.1.2.1).
     Hue is controlled by the Light HSL Hue state (see Section 6.1.4.1). 
     Saturation is controlled by the Light HSL Saturation state (see Section 6.1.4.2).
如果光是變色光,這意味着可以控制所有三個維度(色調、飽和度和亮度或HSL),這可以通過獨立控制每個狀態來完成:
     亮度由燈光亮度實際狀態控制(見第6.1.2.1節)。
     色調由燈光HSL色調狀態控制(見第6.1.4.1節)。
     飽和度由光HSL飽和狀態控制(見第6.1.4.2節)。
注:HSL是一種將RGB色彩模型中的點在圓柱座標系中的表示法。這兩種表示法試圖做到比基於笛卡爾座標系的幾何結構RGB更加直觀。HSL即色相飽和度亮度(英語:Hue, Saturation, Lightness)。

       色相(H)是色彩的基本屬性,就是平常所說的顏色名稱,如紅色黃色等。
       飽和度(S)是指色彩的純度,越高色彩越純,低則逐漸變灰,取0-100%的數值。
       明度(V),亮度(L),取0-100%。

The HSL model [4] is considered to be the default model for controlling color light in a mesh network. The RGB model used in computer monitors and printers has several flaws. For example, it depends on having a good source of primary colors. In today s light sources, different primary colors other than RGB are used and often more than three are used; and three variables are required to mix to result in a final color. On the other hand, the HSL model makes it easy to implement in a variety of controllers (smart phone apps and physical color light controllers using so-called color wheels for Hue / Saturation selection and a linear slider for Lightness). It also fits in nicely with the concept of models extending other models. The HS extends L, forming a combined HSL color light control model.
HSL模型[4]被認爲是用於控制網格網絡中的色光的默認模型。用於計算機顯示器和打印機的RGB模型有幾個缺陷。例如,它取決於有一個良好的原色來源。在當今的光源中,除了RGB外,還使用不同的原色,通常使用三種以上的原色;並且需要混合三個變量才能得到最終的顏色。另一方面,HSL模型使其易於在各種控制器中實現(智能手機應用程序和物理色光控制器使用所謂的色輪進行色調/飽和度選擇,並使用線性滑塊進行亮度選擇)。它也很好地符合模型擴展其他模型的概念。HS擴展L,形成組合HSL色光控制模型。
 
Note: The HSL color space can be converted to other color spaces. For example, the following code may be used when converting HSL to RGB
注意:HSL顏色空間可以轉換爲其他顏色空間。例如,將HSL轉換爲RGB時可以使用以下代碼
 
H = Light HSL Hue / 65535
S = Light HSL Saturation / 65535
L = Light Lightness / 65535
if ( S == 0 )
{
 R = L
 G = L
 B = L
}
else
{
 if ( L < 0.5 ) var_2 = L * ( 1 + S )
 else var_2 = ( L + S ) - ( S * L )
 var_1 = 2 * L - var_2
 R = Hue_2_RGB( var_1, var_2, H + ( 1/3 )) 
 G = Hue_2_RGB( var_1, var_2, H )
 B = Hue_2_RGB( var_1, var_2, H - ( 1/3 ))
}
Hue_2_RGB( v1, v2, vH ) //Function Hue_2_RGB
{
 if ( vH < 0 ) vH += 1
 if ( vH > 1 ) vH -= 1
 if (( 6 * vH ) < 1 ) return ( v1 + ( v2 - v1 ) * 6 * vH )
 if (( 2 * vH ) < 1 ) return ( v2 )
 if (( 3 * vH ) < 2 ) return ( v1 + ( v2 - v1 ) * ( ( 2/3 ) - vH ) * 6 )
 return ( v1 )
}

Professional color light control applications use a CIE1931 [4] color chart system, created by the Commission on Illumination in 1931. It is the first mathematically defined color chart and can be used as an alternative to the HSL model. It defines human perceptible colors with x, y, and Y coordinates, where x and y are coordinates of the color on the chart, and Y represents luminance.
專業色光控制應用使用CIE1931[4]色卡系統,由照明委員會於1931年創建。它是第一個數學定義的彩色圖表,可以作爲HSL模型的替代品。它用x、y和Y座標定義人類可感知的顏色,其中x和y是圖表上顏色的座標,Y表示亮度。

 
In a mesh network, the color light control model for professional applications is the xyL model, where x and y have the same meaning of chromaticity coordinates as in the xyY model. L is the perceived lightness, represented by the Light Lightness Actual state (see Section 6.1.2.1). The x and y are represented by the Light xyL x (see Section 6.1.5.1) and Light xyL y (see Section 6.1.5.2) states, extending the L by xy to form a combined Light xyL Server model.
在mesh網絡中,專業應用的色光控制模型是xyL模型,其中x和y具有與xyY模型中相同的色度座標意義。L是可感知的亮度,由燈光亮度實際狀態表示(見第6.1.2.1節)。x和y由Light xyL x(見第6.1.5.1節)和Light xyL y(見第6.1.5.2節)狀態表示,用xy擴展L以形成組合的Light xyL服務器模型。
 
It should be noted that the Light HSL Hue, Light HSL Saturation, and the Light xyL x and Light xyL y states are related. Changing one of them results in the others being changed.
應注意的是,光HSL色調、光HSL飽和度以及光xyL x和光xyL y狀態是相關的。改變其中一個會導致另一個被改變。
 
Since modern light sources and controllers allow for very precise light control, all the light control states have 16-bit precision.
由於現代光源和控制器允許非常精確的光控制,所有的光控制狀態都有16位精度。
 
 
1.2、Light Lightness state
 
The Light Lightness state is a composite state that includes the Light Lightness Linear, the Light Lightness Actual, the Light Lightness Last, and the Light Lightness Default states.
燈光亮度狀態是一種複合狀態,包括燈光亮度線性、燈光亮度實際、燈光亮度最後和燈光亮度默認狀態。
 
1.2.1、Light Lightness Linear
 
The Light Lightness Linear state represents the lightness of a light on a linear scale. The state is   bound to the Light Lightness Actual state. The values for the state are defined in the following table.
燈光亮度線性狀態表示燈光在線性比例上的亮度。狀態綁定到燈光亮度實際狀態。下表定義了狀態值。
 
Table 6.1: Light Lightness Linear states(光亮度線性狀態)
Value
Description
中文描述
0x0000
Light is not emitted by the element.
光不是由元素髮出的。
0x0001–0xFFFE
The lightness of a light emitted by the element.
元素髮出的光的亮度。
0xFFFF
The highest lightness of a light emitted by the element.
元素髮出的光的最高亮度。

 

 
 
 
 
 
 
 
 
 
The linear lightness of a light is equal to the measured light intensity (Y), from 0 to 65535.
光的線性亮度等於從0到65535的測量光強度(Y)。
 
1.2.1.1、Binding with the Light Lightness Actual state
 
The Light Lightness Linear state is bound to an instance of the Light Lightness Actual state (see Section 6.1.2.2), meaning that whenever the Light Lightness Linear state of an element changes as a result of an action other than the change of the bound Light Lightness Actual state (see Section 6.1.2.2.1), the following calculation shall be performed:
光亮度線性狀態被綁定到光亮度實際狀態的實例(見第6.1.2.2節),這意味着當一個元素的光亮度線性狀態由於除綁定光亮度實際狀態的變化之外的動作而改變時(見第6.1.2.2.1節),應進行以下計算:
 
 
1.2.2、Light Lightness Actual
 
The Light Lightness Actual state represents the lightness of a light on a perceptually uniform lightness scale [6]. The state is bound to the Generic Level state and the Generic OnOff state. The values for the state are defined in the following table.
燈光亮度實際狀態表示在感知一致的亮度刻度上的燈光亮度[6]。狀態綁定到泛型級別狀態和泛型打開關閉狀態。下表定義了狀態值。
 
Table 6.2: Light Lightness Actual states(燈光亮度實際狀態)
Value
Description
中文描述
0x0000
Light is not emitted by the element.
光不是由元素髮出的。
0x0001–0xFFFE
The perceived lightness of a light emitted by the element.
元素髮出的光的可感知的亮度。
0xFFFF
The highest perceived lightness of a light emitted by the element.
元素髮出的光所能感知到的最高亮度。

 

 
 
 
 
 
 
 
 
 
The perceived lightness of a light (L) is the square root of the measured light intensity (Y):
光的感知亮度(L)是測量光強度(Y)的平方根:
 
Where L is the perceived lightness and Y is the measured light intensity (from 0 to 65535).
其中,L是可感知的亮度,Y是測量的光強度(從0到65535)。
 
Note: The scientific community s understanding of the exact relationship between the L and Y variables has changed over time. Appendix A.2 summarizes these changes. For a detailed history, see The Basis of Physical Photometry [17] from the International Commmission of Illumination (CIE). The CIE works with the International Organization for Standardization (ISO) to define global standards for various types of illumination. The organization s published illumination standards and research publications are available on the CIE website.
注:科學界對L和Y變量之間確切關係的理解隨着時間的推移而改變。附錄A.2總結了這些變化。有關詳細歷史,請參見國際照明委員會(CIE)的《物理光度測定基礎》[17]。CIE與國際標準化組織(ISO)合作,爲各種類型的照明定義全球標準。該組織出版的照明標準和研究出版物可在CIE網站上查閱。
 
1.2.2.1、Binding with the Light Lightness Linear state
 
The Light Lightness Actual state is bound to an instance of the Light Lightness Linear state (see Section 6.1.2.1), meaning that whenever the Light Lightness Linear state of an element changes as a result of an action other that the change of the bound Light Lightness Linear state (see Section 6.1.2.1.1), the following calculation shall be performed:
光亮度實際狀態被綁定到光亮度線性狀態的實例(見第6.1.2.1節),這意味着當一個元素的光亮度線性狀態由於動作而改變時,而不是綁定光亮度線性狀態的改變(見第6.1.2.1.1節),應進行以下計算:
 
1.2.2.2、Binding with the Generic Level state
 
The Light Lightness Actual state is bound to an instance of the Generic Level state (see Section 3.1.2), meaning that whenever the Generic Level state of an element changes, the following calculation shall be performed:
燈光亮度實際狀態綁定到通用級別狀態的實例(見第3.1.2節),這意味着每當元素的通用級別狀態發生更改時,應執行以下計算:
A reverse binding is also defined, meaning that whenever the Light Lightness Actual state of an element changes, the following calculation shall be performed:
還定義了反向綁定,這意味着當元件的光亮度實際狀態發生變化時,應進行以下計算:
 
The Light Lightness Actual state shall not wrap around when reaching the maximum or minimum values.
當達到最大值或最小值時,光亮度實際狀態不應卷繞(環繞)。
 
1.2.2.3、Binding with the Generic OnOff state
 
The Light Lightness Actual state is bound to an instance of the Generic OnOff state (see Section  3.1.1), meaning that whenever the Generic OnOff state of an element is set, the following calculations shall be performed:
燈光亮度實際狀態綁定到通用開啓關閉狀態的實例(見第3.1.1節),這意味着無論何時設置了元素的通用開啓關閉狀態,都應執行以下計算:
 
A reverse binding is also defined, meaning that whenever the Light Lightness Actual state of an element changes, the following calculations shall be performed:
還定義了反向綁定,這意味着當元素的燈光亮度實際狀態發生變化時,應進行以下計算:
 
1.2.2.4、Binding with the Generic OnPowerUp state
 
The Light Lightness Actual state is bound to an instance of the Generic OnPowerUp state (see Section 3.1.4), meaning that during a power up sequence (when an element is physically powered up), the following calculations shall be performed:
燈光亮度實際狀態綁定到通用通電狀態的實例(見第3.1.4節),這意味着在通電順序期間(當元件物理通電時),應執行以下計算:
 
1.2.2.5、Binding with the Light Lightness Range state
 
The Light Lightness Actual state is bound to an instance of the Light Lightness Range state (see Section 6.1.2.5), meaning that whenever the Light Lightness Actual state of an element changes, the following calculations shall be performed:
燈光亮度實際狀態綁定到燈光亮度範圍狀態的實例(參見第6.1.2.5節),這意味着每當元素的燈光亮度實際狀態發生變化時,應執行以下計算:
 
 
1.2.3、Light Lightness Last
 
The Light Lightness Last state represents the lightness of a light on a perceptually uniform lightness scale [6].
“燈光亮度”最後一個狀態表示在可感知的均勻亮度比例上的燈光亮度[6]。
 
The purpose of the Light Lightness Last state is to store the last known non-zero value of the Light Lightness Actual state, which is a result of a completed transactional change of the state. This allows restoring the value of the Light Lightness Actual state to its previous non-zero value when the bound Generic OnOff state is set back to 1. Depending on the value of the Generic OnPowerUp state (see Section 3.1.4), It may also be used as a default value when an element is powered up.
Light Lightness Last state的目的是存儲Light Lightness實際狀態的最後一個已知的非零值,這是完成狀態事務性更改的結果。當綁定的泛型打開關閉狀態設置回1時,這允許將燈光亮度實際狀態的值還原爲其以前的非零值。根據通用OnPowerUp狀態的值(請參閱第3.1.4節),當元素通電時,它也可以用作默認值。
 
Whenever the Light Lightness Actual state is changed with a non-transactional message or a completed sequence of transactional messages to a non-zero value, the value of the Light Lightness Last shall be set to the value of the Light Lightness Actual.
當使用非事務性消息或已完成的事務性消息序列將燈光亮度實際狀態更改爲非零值時,最後的燈光亮度值應設置爲燈光亮度實際值。
 
The default value for the Light Lightness Last is 0xFFFF. The values for the state are defined in the following table.
最後燈光亮度的默認值是0xFFFF。下表定義了狀態值。
 
Table 6.3: Light Lightness Last states(光亮度最後狀態)
Value
Description
中文翻譯
0x0000
Prohibited
禁止
0x0001–0xFFFE
The perceived lightness of a light emitted by the element
元素髮出的光的可感知的亮度
0xFFFF
The highest perceived lightness of a light emitted by the element
元素髮出的光所能感知到的最高亮度

 

 
 
 
 
 
 
 
 
 
1.2.4、Light Lightness Default
 
The Light Lightness Default state is a value ranging from 0x0000 to 0xFFFF, representing a default lightness level for the Light Lightness Actual state. The purpose of the Light Lightness Default state is to determine the lightness level of an element when powered up and when the Generic OnPowerUp state (see Section 3.1.4) bound to the Light Lightness state is set to 0x01 (Default). The values for the state are defined in the following table.
燈光亮度默認狀態是一個從0x0000到0xFFFF的值,表示燈光亮度實際狀態的默認亮度級別。燈光亮度默認狀態的目的是確定元素在通電時以及綁定到燈光亮度狀態的通用通電狀態(見第3.1.4節)設置爲0x01(默認)時的亮度級別。下表定義了狀態值。
 
Table 6.4: Light Lightness Default states(燈光亮度默認狀態)
Value
Description
中文描述
0x0000
Use the Light Lightness Last value (see Section 6.1.2.3)
使用燈光亮度最後值(見第6.1.2.3節)
0x0001–0xFFFE
The perceived lightness of a light emitted by the element
元素髮出的光的可感知的亮度
0xFFFF
The highest perceived lightness of a light emitted by the element
元素髮出的光所能感知到的最高亮度

 

 
 
 
 
 
 
 
 
 
The default value for the Light Lightness Default state is 0x0000.
燈光亮度默認狀態的默認值爲0x0000。
 
1.2.5、Light Lightness Range
 
The Light Lightness Range state determines the minimum and maximum lightness of an element.
This is a pair of 16-bit unsigned integers: Light Lightness Range Min and Light Lightness Range Max.

光亮度範圍狀態決定了元素的最小和最大亮度。
這是一對16位無符號整數:最小亮度範圍和最大亮度範圍。

The Light Lightness Range Min state determines the minimum non-zero lightness an element is configured to emit. The Light Lightness Range Max state determines the maximum lightness an element is configured to emit. The values for the state are defined in the following table.
燈光亮度範圍最小狀態確定元素配置爲發射的最小非零亮度。光亮度範圍最大狀態決定了一個元素被配置爲發出的最大亮度。下表定義了狀態值。
 
Table 6.5: Light Lightness Min and Light Lightness Max states(最小亮度和最大亮度狀態)
Value
Description
中文描述
0x0000
Prohibited
禁用
0x0001–0xFFFF
The lightness of an element
元素的亮度等級

 

 
 
 
 
 
 
The default values for the Light Lightness Range Min and Light Lightness Range Max are product specific and are decided by a vendor. The value of the Light Lightness Range Max state shall be greater than or equal to the value of the Light Lightness Range Min state.
“燈光亮度範圍最小值”和“燈光亮度範圍最大值”的默認值是特定於產品的,由供應商決定。燈光亮度範圍最大狀態的值應大於或等於燈光亮度範圍最小狀態的值。
 
1.3、Light CTL state
 
The Light CTL state is a composite state that includes the Light CTL Temperature, the Light CTL   Temperature Range, the Light CTL Temperature Default, the Light CTL Delta UV, the Light CTL Delta UV Default, and the Light CTL Lightness states.
Light CTL state是一個複合狀態,它包括Light CTL Temperature、Light CTL Temperature Range、Light CTL Temperature Default、Light CTL Delta UV、Light CTL Delta UV Default和Light CTL Lightness狀態。
 
 
發佈了91 篇原創文章 · 獲贊 174 · 訪問量 14萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章