Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.84 KB | None | 0 0
  1. [
  2. {
  3. "id": "ab5272b7.abafc",
  4. "type": "tab",
  5. "label": "AIS GPS Position",
  6. "disabled": false,
  7. "info": ""
  8. },
  9. {
  10. "id": "9fe8cd5c.4b97d",
  11. "type": "api-call-service",
  12. "z": "ab5272b7.abafc",
  13. "name": "Sofia Tracker",
  14. "server": "dabe5919.ea01a8",
  15. "version": 1,
  16. "service_domain": "device_tracker",
  17. "service": "see",
  18. "entityId": "",
  19. "data": "msg.payload",
  20. "dataType": "jsonata",
  21. "mergecontext": "",
  22. "output_location": "",
  23. "output_location_type": "none",
  24. "mustacheAltTags": false,
  25. "x": 977,
  26. "y": 200,
  27. "wires": [
  28. []
  29. ]
  30. },
  31. {
  32. "id": "760edd35.4ac9f4",
  33. "type": "signalk-subscribe",
  34. "z": "ab5272b7.abafc",
  35. "name": "navigation.position",
  36. "mode": "sendAll",
  37. "flatten": true,
  38. "context": "vessels.self",
  39. "path": "navigation.position",
  40. "source": "",
  41. "period": "10000",
  42. "x": 190,
  43. "y": 140,
  44. "wires": [
  45. [
  46. "ca8ae0c7.a4b0c"
  47. ]
  48. ]
  49. },
  50. {
  51. "id": "dfc0e458.eedc88",
  52. "type": "debug",
  53. "z": "ab5272b7.abafc",
  54. "name": "",
  55. "active": false,
  56. "tosidebar": true,
  57. "console": false,
  58. "tostatus": false,
  59. "complete": "false",
  60. "x": 710,
  61. "y": 160,
  62. "wires": []
  63. },
  64. {
  65. "id": "ca8ae0c7.a4b0c",
  66. "type": "join",
  67. "z": "ab5272b7.abafc",
  68. "name": "",
  69. "mode": "custom",
  70. "build": "array",
  71. "property": "payload",
  72. "propertyType": "msg",
  73. "key": "topic",
  74. "joiner": "\\n",
  75. "joinerType": "str",
  76. "accumulate": false,
  77. "timeout": "2",
  78. "count": "3",
  79. "reduceRight": false,
  80. "reduceExp": "",
  81. "reduceInit": "",
  82. "reduceInitType": "",
  83. "reduceFixup": "",
  84. "x": 510,
  85. "y": 200,
  86. "wires": [
  87. [
  88. "dfc0e458.eedc88",
  89. "77a3a8a9.73d5d8"
  90. ]
  91. ]
  92. },
  93. {
  94. "id": "f5dba1cf.2787f",
  95. "type": "signalk-subscribe",
  96. "z": "ab5272b7.abafc",
  97. "name": "navigation.speed",
  98. "mode": "sendAll",
  99. "flatten": true,
  100. "context": "vessels.self",
  101. "path": "navigation.speedOverGround",
  102. "source": "",
  103. "period": "10000",
  104. "x": 180,
  105. "y": 200,
  106. "wires": [
  107. [
  108. "ca8ae0c7.a4b0c",
  109. "206810f8.8ebc7"
  110. ]
  111. ]
  112. },
  113. {
  114. "id": "77a3a8a9.73d5d8",
  115. "type": "function",
  116. "z": "ab5272b7.abafc",
  117. "name": "Track and Notify",
  118. "func": "var home = true\nvar speed = msg.payload[1]\nvar lon = msg.payload[0].longitude\nvar lat = msg.payload[0].latitude\nvar alarm = msg.payload[2]\n\n\nif (alarm = \"armed_away\") {\n if (speed > 0.1) {\n var home = false \n }\n}\n\nmsg.payload = {\n \"dev_id\":\"Sofia\",\n \"gps\": [lat, lon],\n \"consider_home\": home\n}\n\nif (home === true) {\n // Use output 1 only, not sounding alarm\n return [msg, null];\n} else {\n // Use output 1 and 2, also activating the alarm\n return [msg, msg]; \n}\n\n",
  119. "outputs": 2,
  120. "noerr": 0,
  121. "x": 720,
  122. "y": 200,
  123. "wires": [
  124. [
  125. "2da72064.6f649",
  126. "9fe8cd5c.4b97d"
  127. ],
  128. [
  129. "7e2416f4.ba0fb8",
  130. "fed9a83c.3181a8"
  131. ]
  132. ]
  133. },
  134. {
  135. "id": "2da72064.6f649",
  136. "type": "debug",
  137. "z": "ab5272b7.abafc",
  138. "name": "",
  139. "active": false,
  140. "tosidebar": true,
  141. "console": false,
  142. "tostatus": false,
  143. "complete": "false",
  144. "x": 977,
  145. "y": 160,
  146. "wires": []
  147. },
  148. {
  149. "id": "206810f8.8ebc7",
  150. "type": "api-current-state",
  151. "z": "ab5272b7.abafc",
  152. "name": "Alarm",
  153. "server": "dabe5919.ea01a8",
  154. "version": 1,
  155. "outputs": 1,
  156. "halt_if": "",
  157. "halt_if_type": "str",
  158. "halt_if_compare": "is",
  159. "override_topic": false,
  160. "entity_id": "alarm_control_panel.sofia_alarm",
  161. "state_type": "str",
  162. "state_location": "payload",
  163. "override_payload": "msg",
  164. "entity_location": "data",
  165. "override_data": "msg",
  166. "blockInputOverrides": false,
  167. "x": 350,
  168. "y": 240,
  169. "wires": [
  170. [
  171. "ca8ae0c7.a4b0c"
  172. ]
  173. ]
  174. },
  175. {
  176. "id": "7e2416f4.ba0fb8",
  177. "type": "function",
  178. "z": "ab5272b7.abafc",
  179. "name": "Message",
  180. "func": "msg.payload =\n{\n \"data\": {\n \"message\": \"Båten beveger seg og alarmen er på!\",\n \"title\": \"ALARM\"\n }\n}\nreturn msg;",
  181. "outputs": 1,
  182. "noerr": 0,
  183. "x": 700,
  184. "y": 280,
  185. "wires": [
  186. [
  187. "46760dd9.05e5d4"
  188. ]
  189. ]
  190. },
  191. {
  192. "id": "46760dd9.05e5d4",
  193. "type": "api-call-service",
  194. "z": "ab5272b7.abafc",
  195. "name": "Alarm!",
  196. "server": "dabe5919.ea01a8",
  197. "version": 1,
  198. "service_domain": "notify",
  199. "service": "notify",
  200. "entityId": "",
  201. "data": "{}",
  202. "dataType": "json",
  203. "mergecontext": "",
  204. "output_location": "payload",
  205. "output_location_type": "msg",
  206. "mustacheAltTags": false,
  207. "x": 957,
  208. "y": 289,
  209. "wires": [
  210. []
  211. ]
  212. },
  213. {
  214. "id": "fed9a83c.3181a8",
  215. "type": "debug",
  216. "z": "ab5272b7.abafc",
  217. "name": "",
  218. "active": false,
  219. "tosidebar": true,
  220. "console": false,
  221. "tostatus": false,
  222. "complete": "false",
  223. "x": 977,
  224. "y": 249,
  225. "wires": []
  226. },
  227. {
  228. "id": "cfb2c7b5.a50208",
  229. "type": "inject",
  230. "z": "ab5272b7.abafc",
  231. "name": "Alarm Test",
  232. "topic": "",
  233. "payload": "",
  234. "payloadType": "date",
  235. "repeat": "",
  236. "crontab": "",
  237. "once": false,
  238. "onceDelay": 0.1,
  239. "x": 520,
  240. "y": 280,
  241. "wires": [
  242. [
  243. "7e2416f4.ba0fb8"
  244. ]
  245. ]
  246. },
  247. {
  248. "id": "dabe5919.ea01a8",
  249. "type": "server",
  250. "z": "",
  251. "name": "Home Assistant",
  252. "legacy": false,
  253. "hassio": false,
  254. "rejectUnauthorizedCerts": false,
  255. "ha_boolean": "y|yes|true|on|home|open",
  256. "connectionDelay": true
  257. }
  258. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement