Advertisement
NittyGritty

Tuya.JSON

Jan 5th, 2022
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.40 KB | None | 0 0
  1. [
  2. {
  3. "id": "d8ca6a95.62ea88",
  4. "type": "tab",
  5. "label": "Tuya-Switch",
  6. "disabled": false,
  7. "info": ""
  8. },
  9. {
  10. "id": "9cda053e.84d278",
  11. "type": "mqtt in",
  12. "z": "d8ca6a95.62ea88",
  13. "name": "Tuya 4 Button Switch",
  14. "topic": "/home/zigbee/Tuya-01",
  15. "qos": "2",
  16. "datatype": "auto",
  17. "broker": "595dfa51.2c1224",
  18. "inputs": 0,
  19. "x": 140,
  20. "y": 320,
  21. "wires": [
  22. [
  23. "275d149a.6ea5cc"
  24. ]
  25. ]
  26. },
  27. {
  28. "id": "ec412fe9.d84c2",
  29. "type": "debug",
  30. "z": "d8ca6a95.62ea88",
  31. "name": "",
  32. "active": true,
  33. "tosidebar": true,
  34. "console": false,
  35. "tostatus": false,
  36. "complete": "false",
  37. "x": 710,
  38. "y": 820,
  39. "wires": []
  40. },
  41. {
  42. "id": "87d70fef.10638",
  43. "type": "function",
  44. "z": "d8ca6a95.62ea88",
  45. "name": "",
  46. "func": "var Knoten = \"Tuya-01\"\nvar click = msg.payload.action\nvar volt = msg.payload.voltage/1000\nvar qual = msg.payload.linkquality\nvar bat = msg.payload.battery\n\nmsg.payload = [{\n Room: Knoten,\n Click: click,\n Volt: volt,\n Qual: qual,\n Bat: bat\n}]\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Click: \" + click + \", Qual: \" + qual + \"%, Volt: \" + volt + \"V\" });\nreturn msg;",
  47. "outputs": 1,
  48. "noerr": 0,
  49. "x": 520,
  50. "y": 820,
  51. "wires": [
  52. [
  53. "ec412fe9.d84c2"
  54. ]
  55. ]
  56. },
  57. {
  58. "id": "275d149a.6ea5cc",
  59. "type": "json",
  60. "z": "d8ca6a95.62ea88",
  61. "name": "",
  62. "property": "payload",
  63. "action": "",
  64. "pretty": false,
  65. "x": 330,
  66. "y": 320,
  67. "wires": [
  68. [
  69. "87d70fef.10638",
  70. "e74c2959.a23368",
  71. "4f569ab0.6ba124",
  72. "8bd8f0e3.063ce",
  73. "a2834171.8e11"
  74. ]
  75. ]
  76. },
  77. {
  78. "id": "1699bb6d.1146e5",
  79. "type": "debug",
  80. "z": "d8ca6a95.62ea88",
  81. "name": "Button 1 Single",
  82. "active": true,
  83. "tosidebar": false,
  84. "console": false,
  85. "tostatus": true,
  86. "complete": "payload",
  87. "targetType": "msg",
  88. "statusVal": "payload",
  89. "statusType": "auto",
  90. "x": 720,
  91. "y": 20,
  92. "wires": []
  93. },
  94. {
  95. "id": "d65735cf.50ae78",
  96. "type": "debug",
  97. "z": "d8ca6a95.62ea88",
  98. "name": "Button 1 Double",
  99. "active": true,
  100. "tosidebar": false,
  101. "console": false,
  102. "tostatus": true,
  103. "complete": "payload",
  104. "targetType": "msg",
  105. "statusVal": "payload",
  106. "statusType": "auto",
  107. "x": 720,
  108. "y": 80,
  109. "wires": []
  110. },
  111. {
  112. "id": "e74c2959.a23368",
  113. "type": "switch",
  114. "z": "d8ca6a95.62ea88",
  115. "name": "Button 1",
  116. "property": "payload.action",
  117. "propertyType": "msg",
  118. "rules": [
  119. {
  120. "t": "eq",
  121. "v": "1_single",
  122. "vt": "str"
  123. },
  124. {
  125. "t": "eq",
  126. "v": "1_double",
  127. "vt": "str"
  128. },
  129. {
  130. "t": "eq",
  131. "v": "1_hold",
  132. "vt": "str"
  133. }
  134. ],
  135. "checkall": "true",
  136. "repair": false,
  137. "outputs": 3,
  138. "x": 520,
  139. "y": 80,
  140. "wires": [
  141. [
  142. "1699bb6d.1146e5"
  143. ],
  144. [
  145. "d65735cf.50ae78"
  146. ],
  147. [
  148. "21b63b51.539944"
  149. ]
  150. ]
  151. },
  152. {
  153. "id": "21b63b51.539944",
  154. "type": "debug",
  155. "z": "d8ca6a95.62ea88",
  156. "name": "Button 1 Hold",
  157. "active": true,
  158. "tosidebar": false,
  159. "console": false,
  160. "tostatus": true,
  161. "complete": "payload",
  162. "targetType": "msg",
  163. "statusVal": "payload",
  164. "statusType": "auto",
  165. "x": 720,
  166. "y": 140,
  167. "wires": []
  168. },
  169. {
  170. "id": "79ba8b44.39cb34",
  171. "type": "debug",
  172. "z": "d8ca6a95.62ea88",
  173. "name": "Button 2 Single",
  174. "active": true,
  175. "tosidebar": false,
  176. "console": false,
  177. "tostatus": true,
  178. "complete": "payload",
  179. "targetType": "msg",
  180. "statusVal": "payload",
  181. "statusType": "auto",
  182. "x": 720,
  183. "y": 220,
  184. "wires": []
  185. },
  186. {
  187. "id": "61316655.5edd88",
  188. "type": "debug",
  189. "z": "d8ca6a95.62ea88",
  190. "name": "Button 2 Double",
  191. "active": true,
  192. "tosidebar": false,
  193. "console": false,
  194. "tostatus": true,
  195. "complete": "payload",
  196. "targetType": "msg",
  197. "statusVal": "payload",
  198. "statusType": "auto",
  199. "x": 720,
  200. "y": 280,
  201. "wires": []
  202. },
  203. {
  204. "id": "4f569ab0.6ba124",
  205. "type": "switch",
  206. "z": "d8ca6a95.62ea88",
  207. "name": "Button 2",
  208. "property": "payload.action",
  209. "propertyType": "msg",
  210. "rules": [
  211. {
  212. "t": "eq",
  213. "v": "2_single",
  214. "vt": "str"
  215. },
  216. {
  217. "t": "eq",
  218. "v": "2_double",
  219. "vt": "str"
  220. },
  221. {
  222. "t": "eq",
  223. "v": "2_hold",
  224. "vt": "str"
  225. }
  226. ],
  227. "checkall": "true",
  228. "repair": false,
  229. "outputs": 3,
  230. "x": 520,
  231. "y": 280,
  232. "wires": [
  233. [
  234. "79ba8b44.39cb34"
  235. ],
  236. [
  237. "61316655.5edd88"
  238. ],
  239. [
  240. "4c6d72c4.c8c4bc"
  241. ]
  242. ]
  243. },
  244. {
  245. "id": "4c6d72c4.c8c4bc",
  246. "type": "debug",
  247. "z": "d8ca6a95.62ea88",
  248. "name": "Button 2 Hold",
  249. "active": true,
  250. "tosidebar": false,
  251. "console": false,
  252. "tostatus": true,
  253. "complete": "payload",
  254. "targetType": "msg",
  255. "statusVal": "payload",
  256. "statusType": "auto",
  257. "x": 720,
  258. "y": 340,
  259. "wires": []
  260. },
  261. {
  262. "id": "8cadc18.d9a104",
  263. "type": "debug",
  264. "z": "d8ca6a95.62ea88",
  265. "name": "Button 3 Single",
  266. "active": true,
  267. "tosidebar": false,
  268. "console": false,
  269. "tostatus": true,
  270. "complete": "payload",
  271. "targetType": "msg",
  272. "statusVal": "payload",
  273. "statusType": "auto",
  274. "x": 720,
  275. "y": 420,
  276. "wires": []
  277. },
  278. {
  279. "id": "f25b5b6e.075478",
  280. "type": "debug",
  281. "z": "d8ca6a95.62ea88",
  282. "name": "Button 3 Double",
  283. "active": true,
  284. "tosidebar": false,
  285. "console": false,
  286. "tostatus": true,
  287. "complete": "payload",
  288. "targetType": "msg",
  289. "statusVal": "payload",
  290. "statusType": "auto",
  291. "x": 720,
  292. "y": 480,
  293. "wires": []
  294. },
  295. {
  296. "id": "8bd8f0e3.063ce",
  297. "type": "switch",
  298. "z": "d8ca6a95.62ea88",
  299. "name": "Button 3",
  300. "property": "payload.action",
  301. "propertyType": "msg",
  302. "rules": [
  303. {
  304. "t": "eq",
  305. "v": "3_single",
  306. "vt": "str"
  307. },
  308. {
  309. "t": "eq",
  310. "v": "3_double",
  311. "vt": "str"
  312. },
  313. {
  314. "t": "eq",
  315. "v": "3_hold",
  316. "vt": "str"
  317. }
  318. ],
  319. "checkall": "true",
  320. "repair": false,
  321. "outputs": 3,
  322. "x": 520,
  323. "y": 480,
  324. "wires": [
  325. [
  326. "8cadc18.d9a104"
  327. ],
  328. [
  329. "f25b5b6e.075478"
  330. ],
  331. [
  332. "cacb8f66.c5648"
  333. ]
  334. ]
  335. },
  336. {
  337. "id": "cacb8f66.c5648",
  338. "type": "debug",
  339. "z": "d8ca6a95.62ea88",
  340. "name": "Button 3 Hold",
  341. "active": true,
  342. "tosidebar": false,
  343. "console": false,
  344. "tostatus": true,
  345. "complete": "payload",
  346. "targetType": "msg",
  347. "statusVal": "payload",
  348. "statusType": "auto",
  349. "x": 720,
  350. "y": 540,
  351. "wires": []
  352. },
  353. {
  354. "id": "e347d923.1df218",
  355. "type": "debug",
  356. "z": "d8ca6a95.62ea88",
  357. "name": "Button 4 Single",
  358. "active": true,
  359. "tosidebar": false,
  360. "console": false,
  361. "tostatus": true,
  362. "complete": "payload",
  363. "targetType": "msg",
  364. "statusVal": "payload",
  365. "statusType": "auto",
  366. "x": 720,
  367. "y": 620,
  368. "wires": []
  369. },
  370. {
  371. "id": "f95cdf44.36533",
  372. "type": "debug",
  373. "z": "d8ca6a95.62ea88",
  374. "name": "Button 4 Double",
  375. "active": true,
  376. "tosidebar": false,
  377. "console": false,
  378. "tostatus": true,
  379. "complete": "payload",
  380. "targetType": "msg",
  381. "statusVal": "payload",
  382. "statusType": "auto",
  383. "x": 720,
  384. "y": 680,
  385. "wires": []
  386. },
  387. {
  388. "id": "a2834171.8e11",
  389. "type": "switch",
  390. "z": "d8ca6a95.62ea88",
  391. "name": "Button 4",
  392. "property": "payload.action",
  393. "propertyType": "msg",
  394. "rules": [
  395. {
  396. "t": "eq",
  397. "v": "4_single",
  398. "vt": "str"
  399. },
  400. {
  401. "t": "eq",
  402. "v": "4_double",
  403. "vt": "str"
  404. },
  405. {
  406. "t": "eq",
  407. "v": "4_hold",
  408. "vt": "str"
  409. }
  410. ],
  411. "checkall": "true",
  412. "repair": false,
  413. "outputs": 3,
  414. "x": 520,
  415. "y": 680,
  416. "wires": [
  417. [
  418. "e347d923.1df218"
  419. ],
  420. [
  421. "f95cdf44.36533"
  422. ],
  423. [
  424. "eff9b568.5c1378"
  425. ]
  426. ]
  427. },
  428. {
  429. "id": "eff9b568.5c1378",
  430. "type": "debug",
  431. "z": "d8ca6a95.62ea88",
  432. "name": "Button 4 Hold",
  433. "active": true,
  434. "tosidebar": false,
  435. "console": false,
  436. "tostatus": true,
  437. "complete": "payload",
  438. "targetType": "msg",
  439. "statusVal": "payload",
  440. "statusType": "auto",
  441. "x": 720,
  442. "y": 740,
  443. "wires": []
  444. },
  445. {
  446. "id": "595dfa51.2c1224",
  447. "type": "mqtt-broker",
  448. "name": "",
  449. "broker": "192.168.123.16",
  450. "port": "1883",
  451. "clientid": "",
  452. "usetls": false,
  453. "compatmode": true,
  454. "keepalive": "60",
  455. "cleansession": true,
  456. "birthTopic": "",
  457. "birthQos": "0",
  458. "birthPayload": "",
  459. "closeTopic": "",
  460. "closePayload": "",
  461. "willTopic": "",
  462. "willQos": "0",
  463. "willPayload": ""
  464. }
  465. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement