nrf52832.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {
  2. "version": "1.0",
  3. "profile": {
  4. "ProductId": "DHZX03IQAZ",
  5. "CategoryId": "3"
  6. },
  7. "properties": [
  8. {
  9. "id": "power_switch",
  10. "name": "电灯开关",
  11. "desc": "控制电灯开灭",
  12. "required": true,
  13. "mode": "rw",
  14. "define": {
  15. "type": "bool",
  16. "mapping": {
  17. "0": "关",
  18. "1": "开"
  19. }
  20. }
  21. },
  22. {
  23. "id": "color",
  24. "name": "颜色",
  25. "desc": "灯光颜色",
  26. "mode": "rw",
  27. "define": {
  28. "type": "enum",
  29. "mapping": {
  30. "0": "Red",
  31. "1": "Green",
  32. "2": "Blue"
  33. }
  34. }
  35. },
  36. {
  37. "id": "brightness",
  38. "name": "亮度",
  39. "desc": "灯光亮度",
  40. "mode": "rw",
  41. "define": {
  42. "type": "int",
  43. "unit": "%",
  44. "step": "1",
  45. "min": "0",
  46. "max": "100",
  47. "start": "1"
  48. }
  49. },
  50. {
  51. "id": "name",
  52. "name": "灯位置名称",
  53. "desc": "灯位置名称:书房、客厅等",
  54. "mode": "rw",
  55. "define": {
  56. "type": "string",
  57. "min": "0",
  58. "max": "640"
  59. },
  60. "required": false
  61. }
  62. ],
  63. "events": [
  64. {
  65. "id": "status_report",
  66. "name": "DeviceStatus",
  67. "desc": "Report the device status",
  68. "type": "info",
  69. "required": false,
  70. "params": [
  71. {
  72. "id": "status",
  73. "name": "running_state",
  74. "desc": "Report current device running state",
  75. "define": {
  76. "type": "bool",
  77. "mapping": {
  78. "0": "normal",
  79. "1": "fault"
  80. }
  81. }
  82. },
  83. {
  84. "id": "message",
  85. "name": "Message",
  86. "desc": "Some extra message",
  87. "define": {
  88. "type": "string",
  89. "min": "0",
  90. "max": "64"
  91. }
  92. }
  93. ]
  94. },
  95. {
  96. "id": "low_voltage",
  97. "name": "LowVoltage",
  98. "desc": "Alert for device voltage is low",
  99. "type": "alert",
  100. "required": false,
  101. "params": [
  102. {
  103. "id": "voltage",
  104. "name": "Voltage",
  105. "desc": "Current voltage",
  106. "define": {
  107. "type": "float",
  108. "unit": "V",
  109. "step": "1",
  110. "min": "0.0",
  111. "max": "24.0",
  112. "start": "1"
  113. }
  114. }
  115. ]
  116. },
  117. {
  118. "id": "hardware_fault",
  119. "name": "Hardware_fault",
  120. "desc": "Report hardware fault",
  121. "type": "fault",
  122. "required": false,
  123. "params": [
  124. {
  125. "id": "name",
  126. "name": "Name",
  127. "desc": "Name like: memory,tf card, censors ...",
  128. "define": {
  129. "type": "string",
  130. "min": "0",
  131. "max": "64"
  132. }
  133. },
  134. {
  135. "id": "error_code",
  136. "name": "Error_Code",
  137. "desc": "Error code for fault",
  138. "define": {
  139. "type": "int",
  140. "unit": "",
  141. "step": "1",
  142. "min": "0",
  143. "max": "2000",
  144. "start": "1"
  145. }
  146. }
  147. ]
  148. }
  149. ],
  150. "actions": [
  151. {
  152. "id": "loop",
  153. "name": "loop",
  154. "desc": "",
  155. "input": [
  156. {
  157. "id": "interval",
  158. "name": "interval",
  159. "define": {
  160. "type": "int",
  161. "min": "0",
  162. "max": "100",
  163. "start": "0",
  164. "step": "1",
  165. "unit": ""
  166. }
  167. }
  168. ],
  169. "output": [
  170. {
  171. "id": "result",
  172. "name": "result",
  173. "define": {
  174. "type": "string",
  175. "min": "0",
  176. "max": "320"
  177. }
  178. }
  179. ],
  180. "required": false
  181. }
  182. ]
  183. }