berijan

Add using join

Oct 25th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. [
  2. {
  3. "id": "8223cd267ed3d677",
  4. "type": "inject",
  5. "z": "5c6912249ebb28e5",
  6. "name": "power-meter 5A",
  7. "props": [
  8. {
  9. "p": "payload.power_meter_current",
  10. "v": "5.0",
  11. "vt": "num"
  12. },
  13. {
  14. "p": "topic",
  15. "vt": "str"
  16. }
  17. ],
  18. "repeat": "",
  19. "crontab": "",
  20. "once": false,
  21. "onceDelay": 0.1,
  22. "topic": "power-meter",
  23. "x": 180,
  24. "y": 1020,
  25. "wires": [
  26. [
  27. "b1ceb258b65a4f51"
  28. ]
  29. ]
  30. },
  31. {
  32. "id": "48b69b30cf747fd2",
  33. "type": "inject",
  34. "z": "5c6912249ebb28e5",
  35. "name": "inverter 3.5A",
  36. "props": [
  37. {
  38. "p": "payload.inverter_current",
  39. "v": "3.5",
  40. "vt": "num"
  41. },
  42. {
  43. "p": "topic",
  44. "vt": "str"
  45. }
  46. ],
  47. "repeat": "",
  48. "crontab": "",
  49. "once": false,
  50. "onceDelay": 0.1,
  51. "topic": "inverter",
  52. "x": 170,
  53. "y": 1160,
  54. "wires": [
  55. [
  56. "b1ceb258b65a4f51"
  57. ]
  58. ]
  59. },
  60. {
  61. "id": "b1ceb258b65a4f51",
  62. "type": "join",
  63. "z": "5c6912249ebb28e5",
  64. "name": "",
  65. "mode": "custom",
  66. "build": "merged",
  67. "property": "payload",
  68. "propertyType": "msg",
  69. "key": "topic",
  70. "joiner": "\\n",
  71. "joinerType": "str",
  72. "accumulate": true,
  73. "timeout": "",
  74. "count": "2",
  75. "reduceRight": false,
  76. "reduceExp": "",
  77. "reduceInit": "",
  78. "reduceInitType": "",
  79. "reduceFixup": "",
  80. "x": 490,
  81. "y": 1120,
  82. "wires": [
  83. [
  84. "a67ade2e6367507d",
  85. "fbde6e0b5dde3eb5"
  86. ]
  87. ]
  88. },
  89. {
  90. "id": "893f088db85ef46d",
  91. "type": "debug",
  92. "z": "5c6912249ebb28e5",
  93. "name": "debug 21",
  94. "active": true,
  95. "tosidebar": true,
  96. "console": false,
  97. "tostatus": false,
  98. "complete": "false",
  99. "statusVal": "",
  100. "statusType": "auto",
  101. "x": 860,
  102. "y": 1120,
  103. "wires": []
  104. },
  105. {
  106. "id": "a67ade2e6367507d",
  107. "type": "function",
  108. "z": "5c6912249ebb28e5",
  109. "name": "function 1",
  110. "func": "msg.payload.total = msg.payload.power_meter_current + msg.payload.inverter_current;\nreturn msg;",
  111. "outputs": 1,
  112. "noerr": 0,
  113. "initialize": "",
  114. "finalize": "",
  115. "libs": [],
  116. "x": 640,
  117. "y": 1120,
  118. "wires": [
  119. [
  120. "893f088db85ef46d"
  121. ]
  122. ]
  123. },
  124. {
  125. "id": "8f5feff7cca56a63",
  126. "type": "inject",
  127. "z": "5c6912249ebb28e5",
  128. "name": "power-meter 13A",
  129. "props": [
  130. {
  131. "p": "payload.power_meter_current",
  132. "v": "13.0",
  133. "vt": "num"
  134. },
  135. {
  136. "p": "topic",
  137. "vt": "str"
  138. }
  139. ],
  140. "repeat": "",
  141. "crontab": "",
  142. "once": false,
  143. "onceDelay": 0.1,
  144. "topic": "power-meter",
  145. "x": 180,
  146. "y": 1060,
  147. "wires": [
  148. [
  149. "b1ceb258b65a4f51"
  150. ]
  151. ]
  152. },
  153. {
  154. "id": "c8ebf6249146feec",
  155. "type": "inject",
  156. "z": "5c6912249ebb28e5",
  157. "name": "inverter 8A",
  158. "props": [
  159. {
  160. "p": "payload.inverter_current",
  161. "v": "8.0",
  162. "vt": "num"
  163. },
  164. {
  165. "p": "topic",
  166. "vt": "str"
  167. }
  168. ],
  169. "repeat": "",
  170. "crontab": "",
  171. "once": false,
  172. "onceDelay": 0.1,
  173. "topic": "inverter",
  174. "x": 160,
  175. "y": 1200,
  176. "wires": [
  177. [
  178. "b1ceb258b65a4f51"
  179. ]
  180. ]
  181. },
  182. {
  183. "id": "fbde6e0b5dde3eb5",
  184. "type": "debug",
  185. "z": "5c6912249ebb28e5",
  186. "name": "debug 22",
  187. "active": false,
  188. "tosidebar": true,
  189. "console": false,
  190. "tostatus": false,
  191. "complete": "false",
  192. "statusVal": "",
  193. "statusType": "auto",
  194. "x": 640,
  195. "y": 1180,
  196. "wires": []
  197. },
  198. {
  199. "id": "379ebd1c47e87078",
  200. "type": "comment",
  201. "z": "5c6912249ebb28e5",
  202. "name": "Simulate Power meter topic",
  203. "info": "",
  204. "x": 200,
  205. "y": 980,
  206. "wires": []
  207. },
  208. {
  209. "id": "f042deab96497ff5",
  210. "type": "comment",
  211. "z": "5c6912249ebb28e5",
  212. "name": "Simulate Inverter topic",
  213. "info": "",
  214. "x": 180,
  215. "y": 1120,
  216. "wires": []
  217. }
  218. ]
Advertisement
Add Comment
Please, Sign In to add comment