From c39fc6de48839a93157251f5dbf92c215273be70 Mon Sep 17 00:00:00 2001 From: Andrew Neisch Date: Sat, 6 Apr 2024 17:19:49 -0500 Subject: [PATCH] Changes --- README.md | 10 ++-- automations.yaml | 8 ++-- extras/Node-RED/flows.json | 2 +- .../docker-compose/other/docker-compose.yml | 11 ++++- .../docker-compose/unified/docker-compose.yml | 11 ++++- github_action_secrets.yaml | 1 + images/nodered_1.png | Bin 33020 -> 33020 bytes images/nodered_2.png | Bin 35258 -> 35258 bytes input_boolean.yaml | 3 -- packages/frigate.yaml | 43 +++++++++--------- packages/garage_door.yaml | 2 +- 11 files changed, 51 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index d6107a63..f93b51a9 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC Description | value -- | -- Lines of ESPHome YAML | 2801 -Lines of Home Assistant YAML | 8977 -[Integrations](https://www.home-assistant.io/integrations/) in use | 58 +Lines of Home Assistant YAML | 8974 +[Integrations](https://www.home-assistant.io/integrations/) in use | 59 Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26 Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37 @@ -67,7 +67,7 @@ Description | value Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 121 Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 145 Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 17 -Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 13 +Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 14 Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1 Entities in the [`counter`](https://www.home-assistant.io/components/counter) domain | 1 Entities in the [`cover`](https://www.home-assistant.io/components/cover) domain | 13 @@ -77,7 +77,7 @@ Entities in the [`fan`](https://www.home-assistant.io/components/fan) domain | 3 Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 17 Entities in the [`image`](https://www.home-assistant.io/components/image) domain | 8 Entities in the [`input_boolean`](https://www.home-assistant.io/components/input_boolean) domain | 29 -Entities in the [`input_datetime`](https://www.home-assistant.io/components/input_datetime) domain | 34 +Entities in the [`input_datetime`](https://www.home-assistant.io/components/input_datetime) domain | 32 Entities in the [`input_number`](https://www.home-assistant.io/components/input_number) domain | 6 Entities in the [`input_select`](https://www.home-assistant.io/components/input_select) domain | 19 Entities in the [`input_text`](https://www.home-assistant.io/components/input_text) domain | 15 @@ -90,7 +90,7 @@ Entities in the [`plant`](https://www.home-assistant.io/components/plant) domain Entities in the [`remote`](https://www.home-assistant.io/components/remote) domain | 1 Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 56 Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 3 -Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 442 +Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 443 Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1 Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1 Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 166 diff --git a/automations.yaml b/automations.yaml index 2849902e..16e8ecb6 100644 --- a/automations.yaml +++ b/automations.yaml @@ -166,8 +166,8 @@ hours: /12 action: - service: alexa_media.clear_history -- alias: Update 'Last' Datetimes - id: update_last_datetimes +- id: update_last_datetimes + alias: Update 'Last' Datetimes trigger: - platform: state entity_id: @@ -176,14 +176,14 @@ - binary_sensor.garage_exterior_door - binary_sensor.garage_interior_door - binary_sensor.master_bedroom_exterior_door - - binary_sensor.garage_motion - input_boolean.kitchen_motion - binary_sensor.living_room_motion - binary_sensor.hallway_motion + - binary_sensor.garage_person_occupancy from: 'off' to: 'on' action: - service: input_datetime.set_datetime + - service: input_datetime.set_datetime data: entity_id: input_datetime.{{trigger.entity_id | regex_replace(find='binary_sensor.', replace='') | regex_replace(find='input_boolean.', replace='') | regex_replace(find='sensor.', diff --git a/extras/Node-RED/flows.json b/extras/Node-RED/flows.json index 6a1e6b88..3292d71d 100644 --- a/extras/Node-RED/flows.json +++ b/extras/Node-RED/flows.json @@ -1 +1 @@ -[{"id":"9584418c.dafc2","type":"tab","label":"Automations","disabled":false,"info":""},{"id":"f602e6ba.609d28","type":"tab","label":"Irrigation","disabled":false,"info":""},{"id":"9cfe6331fbc680d5","type":"group","z":"9584418c.dafc2","name":"Delivery Logo Object Detection","style":{"label":true},"nodes":["ed80a3f.522526","f3a3e80f.3e8e38","6469ec7efdb06d81","6f08d11c854dfb00","9b7c5535c74a94a3","d8a16fd91366d112","bcaf3569e7816922","d58f6ef71c326040","7347dd9c5cdf8a37","935c3eb83c353f53","42be35f83b764861","b2a5543693ac851e","c13f0f20a56d6af5","7151828122e3b80c","bace446bfa7b343d","5acbb2cbdbdea368","c061be05c01527e0","e263410e9a3af7d8","df028b4014ad3c15"],"x":54,"y":2099,"w":1492,"h":322},{"id":"3c4349a7eea9bd3b","type":"group","z":"9584418c.dafc2","name":"Set Cameras Online","style":{"label":true},"nodes":["bd19a17005513c2f","24d1a94e275e5e44","58d0c98797e19829","7a8e43b6f7c84bac","ab66afa5b576de3f","ccf5998fdf8ee50d"],"x":54,"y":1839,"w":492,"h":242},{"id":"35da177d9e2fd258","type":"group","z":"9584418c.dafc2","name":"Virtual Radar Server","style":{"label":true},"nodes":["a9a323de66b6f772","ee139512bcad0966","7da69a7e8ecadc7c","26e32b1d7824356a","3a82b835.c57d48","91afebbf8b9edf05","5684b08aacd6d225","4ca1a5ad47ce7a18","ba68e03143ba4af8","5f1d1b471a1c7cbb","2cd08c8da06afaf6","ea911291f04c7d18","43e5fa289c7550ff","97761f13f8e5c31b","ea239028eda07991"],"x":54,"y":1499,"w":1272,"h":322},{"id":"bd2acc7efb5be5fd","type":"group","z":"9584418c.dafc2","name":"Front Porch Light Occupancy Brightness","style":{"label":true},"nodes":["3f2a2e4d99057b69","3e399d83e4e7f4c3","59f5bc2571b0f12f","c68c969a6b8c2833","b1a99d9698d831b2","17b35d69307a8455","d11c183fff8d848d","fae7fa701710e258","1ef176bec8ed5da0","254a48eabb9cf476"],"x":54,"y":1279,"w":1092,"h":202},{"id":"11e25fc28c23144c","type":"group","z":"9584418c.dafc2","name":"Front House Lights","style":{"label":true},"nodes":["86bc310cbc0562af","2fb6a7afb6502a32","8c55985bffebd56a"],"x":54,"y":1119,"w":472,"h":142},{"id":"b808f2d7ae539c87","type":"group","z":"9584418c.dafc2","name":"Indoor Lights Dim Evening","style":{"label":true},"nodes":["e93027cb.6a6308","fc81cfda.29ff5","8ee35d65.a7569","41b918d5.7ce018","5420f9c0.5356c8","77184c93.8790d4","39a5ce57.78e3d2","ea19fe14.80749","ea2604f9.4cdf98","8a82f465.846018","d8ad0651.bf7a18","d9cc182cc3eb2a93","cde7b3c9ca39891b","1457bf6605a50448","fa90c550.d6c948"],"x":54,"y":659,"w":1073,"h":444},{"id":"9df353d4c0fc9a54","type":"group","z":"9584418c.dafc2","name":"Server Rack Temperature","style":{"label":true},"nodes":["73550501.be7fbc","7dff3ae1.e36a04","88822bfe.2cc598","96b5207d.407dd","b259f0eb.3e83","c7ff978f.ff0728","29b17ed7.fab972"],"x":54,"y":459,"w":932,"h":182},{"id":"18fe74aea06a1180","type":"group","z":"9584418c.dafc2","name":"AC Stale Air","style":{"label":true},"nodes":["ebe84a6f70b4bc2f","cf1c689e51b98aec","6af7abba85612dd9","8b6280c5c448720c","9ce46ce21d8cc964","2b6721107586ceae","830c3ddd08ef396c"],"x":54,"y":299,"w":1132,"h":142},{"id":"cf3a0410bcf837ae","type":"group","z":"9584418c.dafc2","name":"Door Alerts","style":{"label":true},"nodes":["2022689a.938918","8ec438b6.4eb2e8","28fa66cd.af058a","9c1d9c7c.ed9c7","896f5b34.7b4328","c5124616.c9bd48","f9d93af6.184028","3314ec9f.ca8994","5c24f744.30fcb8","6aa388d0.707768","cf758271.d4fd6","5a740c2d.009864","c5c85c0aa2d8c8ca"],"x":54,"y":19,"w":1012,"h":262},{"id":"3cf0491ac33aecfa","type":"group","z":"f602e6ba.609d28","name":"Max Time and Master Valve Control","style":{"label":true},"nodes":["54bad548.7e9fcc","5a10cd93.8e94b4","a77808ff.3f1288","54ae6ec3.1bc63","bcbf413e.7b188","3b848bce.76aea4","43dedcca.ac7734","c42e6d62.7a24c","cdd3b7ef.04a618","63f07877e73b952a","5e9007a27732bba9","061b74f643477dd9","749afd72791a5127","656ad2cd6fb99f57"],"x":54,"y":19,"w":1532,"h":222},{"id":"43a30fe5a5052c22","type":"group","z":"f602e6ba.609d28","name":"Custom Water","style":{"label":true},"nodes":["d269f175.c9dc6","3367e45f.cc981c","116d5bb3.ee92a4","80df47d5.602888","fb46876c.845298","98eeafa7.bd2b9","565ee5c1.561bfc","22a20603.86a06a","a8d96e.1f00969","808e6a81.92e2e8","883f2c00.1d94e8","e42ff3d9.593dc","76160bc4.8cd644","e2c37b65c5582c2b","860a4c61d7557dc9"],"x":54,"y":259,"w":1452,"h":262},{"id":"a9182c2cc04d2d9a","type":"group","z":"f602e6ba.609d28","name":"Irrigation Delays","style":{"label":true},"nodes":["dd9855ca4017c8c0","c3a696a117416327","27f2580e35031830","9cb8187c669c6485","47f1a8018e58e032","427f7fa58d86cc59","1d9a4d0bb4645f32","d9ebbaa37f5911a9","eeecfc1e8864e39f","89487a4efedec1db","1e4b3bc7c25b294f","2c45af5b3ee5cf0a","d7e50e7a2810667d","28936ec687ee4eb0","974833b6a2eca853","478a5a84d38ba181","c01fd0612615e927","93965a61d2c4f5de"],"x":54,"y":539,"w":752,"h":502},{"id":"0f07749a4e1672ad","type":"group","z":"f602e6ba.609d28","name":"Supply Voltage Control","style":{"label":true},"nodes":["1ae21386.a831bc","117145a7.67e99a","882aff35f788008b"],"x":54,"y":1059,"w":472,"h":142},{"id":"a08dae6118c91c19","type":"group","z":"f602e6ba.609d28","name":"Run Lawn","style":{"label":true},"nodes":["f2c9c3a5b8b11a64","38affe5cc680d076","9896327569c234da","e95ac52f03478921","174186fb5d054240","287dd3b1af5dc2d0","74cd40702021e86d","bf015af2161c5ec2","151eb6ba5b2d39cd","45ee74d06e9cac2c","95a54981805b22f2","a4b3eba196a504dc","02d1e639f7ac6596","8d3c8370996be2da","863b8fa63f210ebe","7d8374976c01e3dc","b0debe46542c4c67","de509d99b9d965b3","b1c9631973c2f4b1","6ea0448df1383ec2","224d30a98f52c287","5a27d31bfb4a6990","197853479ad9eeda","7b985932412db47d","acdcc72fea065aac"],"x":54,"y":2019,"w":1272,"h":522},{"id":"79694877249c9902","type":"group","z":"f602e6ba.609d28","name":"Attempt Lawn","style":{"label":true},"nodes":["3b656b89.1ac154","493b435f.c9851c","7b12e66f.57d068","8c060f00.cf577","4422f61c.847d88","dcdeabc7.780578","722d03d6.2ff77c","af4788fe.215ba8","c90fd5e6.c5c678","862ad27a.d347d","83edf648.3f9ed8","8d4bfe8e.ee805","815fddc0.6604c","06d6255efdc31c47","5420d0eed32223fb","3ff9ce03ef7b554b","576b66fa1bd202a3","a3d75225807b70eb","219b37105a8304f1","e7430e17f0b24ed8","b6e7d5b8891bba6d","339ee0ada21856e0","d01fbafafbb34692","f5684be88477322f","336585d4eee0ca73","b3c4a3638c17629e","2fc67b25514de5a5","08e3098cf183e086"],"x":54,"y":1219,"w":672,"h":782},{"id":"68ec980b932fdba7","type":"group","z":"f602e6ba.609d28","name":"Attempt Front Beds","style":{"label":true},"nodes":["583f46a3.fc4c38","d9147878.b61cf8","c7e5552e.7f8a08","6bcf06fb.9ca748","f587589f.d739e8","d9d17e8f.590e6","d9f893eb.834f3","9d851699.6a8458","4fae5b92.a9cd44","418058c4.af3158","7350c911a0b1a86d","fdcfa1521191fa40","4f2902edc77f2d3b","f6881b4bf93c27c5","ed6e3d4225582e20","593bee0e8c958df8","67916c3a5554a794","f7ac7a90f3da2298","45c5dbbbd8ce50a1","abb8777dd08aa743","d8637d8d96b68fca","b403eec7866aea22"],"x":54,"y":2559,"w":672,"h":582},{"id":"55a2162532da4e14","type":"group","z":"f602e6ba.609d28","name":"Run Front Beds","style":{"label":true},"nodes":["a2ab7368.923fb","a31e3daf.17207","21ced698.708b5a","c661d489.9c9bc8","accc6697.196268","487ff788.8c5c98","2238b09b.1b5b5","84258ddd.41da4","9129b06e.d8925","5ce1803b.06628","62b5545bc6d6e627","aa53225140781dd7","8113d83074ff7701","d83b5ff7a2212931","f78cdb84200eb171"],"x":54,"y":3159,"w":1332,"h":262},{"id":"59ea88a27ef998e7","type":"group","z":"9584418c.dafc2","name":"Drone Delivery Logo Object Detection","style":{"label":true},"nodes":["4e2d750742dc8890","cdc9c2c982e3fe5f","300267d7c89b0955","1ae58f8afe36e04c","5c59c5c412e759ce","aa523c5cbfe26949","b4392caec775b305","81d6e9a99eb61c67","8bec0433aa6e51fa","1aa9e39b6be88864","ec51454057c055e2","765c7c5a61100728","1bda1e8b7f76e5f3","14855ff357d5fbad","a95b4fa60f1238d7","081d788e92e34986","9799e777bb06f63f","6d56b297fcfe0016","2f18405339079200","b4d7bb6e129bacea","b442c20392c7ce60","ec6b4698123ebc34"],"x":54,"y":2439,"w":1412,"h":282},{"id":"cb7e3560a0078392","type":"group","z":"9584418c.dafc2","name":"Global Entry Schedule","style":{"label":true},"nodes":["5123f652827fa902","970920516fa379e8","51f2291060d07336","91d3d26774f9468e","7415468104c18108","b8a4a1ee4e15f778","79c00f8c61888f52","a61d605915dc23ff","c44a5c4d6d17ee9f","fa9f2ef8fecf1de2","7d01abce7bc68291","b7c50947c4507d03","1480d9470754a6a3","ca8d58af48d7b7c5","414a38bf0735b27c","c0546e86d17e99e9","d5ab0aa6d198ba81","88d3b091fc333998"],"x":54,"y":2739,"w":1012,"h":282},{"id":"26b2ac79d4c32bda","type":"group","z":"9584418c.dafc2","name":"Timelapse","style":{"label":true},"nodes":["83e2179938d08d58","59e4459459f077c9","089b07fa48286f29","7ff9bf1a917cbf50","a826a8c498d6d1e3"],"x":54,"y":3059,"w":612,"h":262},{"id":"6f393a92ae952332","type":"group","z":"9584418c.dafc2","name":"Faucet Auto Drip","style":{"label":true},"nodes":["08b26d8311cd9187","716e8fabff85ffb9","7b988b93a658f526","7fe1e564efbd46af","16e1a3e2f53e6bdf","d85faf19968afde1"],"x":54,"y":3359,"w":1032,"h":202},{"id":"e28fc796ce042622","type":"group","z":"9584418c.dafc2","name":"Generic Listener to Push Notifications from SMTP Inbox","style":{"label":true},"nodes":["7eb1a3d60fccbc76","cb1f141562c8fd2b","1cd709e001bf5e89","7f48460e08988c9e","24fc1882c8436738"],"x":54,"y":3599,"w":892,"h":142},{"id":"e1dc0b88.463bb8","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"546e31ed.0db1c","type":"mqtt-broker","name":"Mosquitto","broker":"10.0.1.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9f81fd881d01a666","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"4f8f8feffed26998","type":"sqlitedb","db":"/data/amazon.db","mode":"RWC"},{"id":"96b8babe5c0a6107","type":"deepstack-server","proto":"http","host":"codeproject","port":"32168","version":"v1","rejectUnauthorized":true},{"id":"2022689a.938918","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 1 Minute","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 1 minute\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":120,"wires":[[]]},{"id":"8ec438b6.4eb2e8","type":"api-current-state","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Notify On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.door_notify","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":360,"y":60,"wires":[["c5124616.c9bd48"],[]]},{"id":"28fa66cd.af058a","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 1m","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":120,"wires":[["2022689a.938918"]]},{"id":"9c1d9c7c.ed9c7","type":"change","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Reset If Closed","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":220,"wires":[["28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"]]},{"id":"896f5b34.7b4328","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":60,"wires":[[]]},{"id":"c5124616.c9bd48","type":"template","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Opened","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{ data.new_state.attributes.friendly_name }} opened","output":"str","x":740,"y":60,"wires":[["896f5b34.7b4328"]]},{"id":"f9d93af6.184028","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.*_door$","entityIdType":"regex","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":100,"wires":[["8ec438b6.4eb2e8","28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"],["9c1d9c7c.ed9c7"]]},{"id":"73550501.be7fbc","type":"trigger-state","z":"9584418c.dafc2","d":true,"g":"9df353d4c0fc9a54","name":"Rack Temperature","server":"e1dc0b88.463bb8","version":4,"inputs":1,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.rack_exhaust_temperature","entityIdType":"exact","debugEnabled":false,"constraints":[],"customOutputs":[],"outputInitially":false,"stateType":"num","enableInput":true,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":170,"y":560,"wires":[["7dff3ae1.e36a04"],[]]},{"id":"7dff3ae1.e36a04","type":"switch","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Above 90?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"95","vt":"num"},{"t":"lte","v":"90","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":560,"wires":[["29b17ed7.fab972"],["96b5207d.407dd"]]},{"id":"88822bfe.2cc598","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn on Fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":710,"y":500,"wires":[[]]},{"id":"96b5207d.407dd","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":580,"wires":[["c7ff978f.ff0728"],[]]},{"id":"b259f0eb.3e83","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn off fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":890,"y":540,"wires":[[]]},{"id":"e93027cb.6a6308","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Master Bedroom Lamps On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.master_bedroom_lamps","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":702,"wires":[["fc81cfda.29ff5"],[]]},{"id":"fc81cfda.29ff5","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 128","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"128\",\"transition\":5, \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1001,"y":700,"wires":[[]]},{"id":"c7ff978f.ff0728","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack fan auto off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.rack_fan_auto_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":730,"y":600,"wires":[["b259f0eb.3e83"],[]]},{"id":"29b17ed7.fab972","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":520,"wires":[[],["88822bfe.2cc598"]]},{"id":"3314ec9f.ca8994","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Garage Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"cover.garage_door","entityIdType":"regex","outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":160,"wires":[["8ec438b6.4eb2e8"],[]]},{"id":"8ee35d65.a7569","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":942,"wires":[["5420f9c0.5356c8"],[]]},{"id":"41b918d5.7ce018","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Table On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_table_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":1062,"wires":[["d8ad0651.bf7a18"],[]]},{"id":"5420f9c0.5356c8","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"40\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":842,"wires":[[]]},{"id":"77184c93.8790d4","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Sink On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_sink_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":882,"wires":[["5420f9c0.5356c8"],[]]},{"id":"39a5ce57.78e3d2","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":822,"wires":[["5420f9c0.5356c8"],[]]},{"id":"5c24f744.30fcb8","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 5m","op1":"","op2":"5","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":160,"wires":[["6aa388d0.707768","2022689a.938918"]]},{"id":"6aa388d0.707768","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Alexa Announce Opened","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"alexa_media","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"The\" & $lowercase(msg.data.new_state.attributes.friendly_name) & \"has been opened for\" & msg.payload & \" minutes.\",\"data\":{\"method\":\"all\",\"type\":\"announce\"},\"target\":[\"Office\",\"Kitchen\",\"Master\",\"Living Room\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":180,"wires":[[]]},{"id":"cf758271.d4fd6","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 10m","op1":"","op2":"10","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":200,"wires":[["6aa388d0.707768","2022689a.938918"]]},{"id":"5a740c2d.009864","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 15m","op1":"","op2":"15","op1type":"nul","op2type":"str","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":240,"wires":[["6aa388d0.707768","2022689a.938918"]]},{"id":"ea19fe14.80749","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Entryway On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.entryway_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":1002,"wires":[["5420f9c0.5356c8"],[]]},{"id":"ea2604f9.4cdf98","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Sconces On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":762,"wires":[["fc81cfda.29ff5"],[]]},{"id":"8a82f465.846018","type":"comment","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"100% = 255","info":"","x":970,"y":773,"wires":[]},{"id":"d8ad0651.bf7a18","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 80","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"80\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":922,"wires":[[]]},{"id":"86bc310cbc0562af","type":"inject","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"At 10:30PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 22 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":1200,"wires":[["2fb6a7afb6502a32","8c55985bffebd56a"]]},{"id":"2fb6a7afb6502a32","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":1220,"wires":[[]]},{"id":"3f2a2e4d99057b69","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Motion","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door_all_occupancy","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1380,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"3e399d83e4e7f4c3","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights to 254","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"254\",\"transition\":2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1360,"wires":[["1ef176bec8ed5da0","59f5bc2571b0f12f"]]},{"id":"59f5bc2571b0f12f","type":"delay","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":560,"y":1440,"wires":[["c68c969a6b8c2833"]]},{"id":"c68c969a6b8c2833","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":1440,"wires":[["254a48eabb9cf476"]]},{"id":"d9cc182cc3eb2a93","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * 3","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":742,"wires":[["1457bf6605a50448"]]},{"id":"b1a99d9698d831b2","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Open","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":1440,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"17b35d69307a8455","type":"within-time-switch","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"22:30","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseStart","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":400,"y":1380,"wires":[["3e399d83e4e7f4c3"],[]]},{"id":"d11c183fff8d848d","type":"change","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1440,"wires":[["59f5bc2571b0f12f"]]},{"id":"a9a323de66b6f772","type":"http request","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Get Aircraft","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://vrs:8080/VirtualRadar/AircraftList.json","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"x":610,"y":1660,"wires":[["7da69a7e8ecadc7c","91afebbf8b9edf05","4ca1a5ad47ce7a18","2cd08c8da06afaf6","43e5fa289c7550ff"]]},{"id":"ee139512bcad0966","type":"inject","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Every 20 Seconds","props":[],"repeat":"20","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1660,"wires":[["ea239028eda07991"]]},{"id":"7da69a7e8ecadc7c","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon","func":"var alert = {}\nvar message = \"Airborne:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1660,"wires":[["5684b08aacd6d225"]]},{"id":"26e32b1d7824356a","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_adsb","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":1660,"wires":[[]]},{"id":"3a82b835.c57d48","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1600,"wires":[["26e32b1d7824356a"]]},{"id":"91afebbf8b9edf05","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Interesting Tail #","func":"var alert = {}\nvar message = \"Interesting:\\n\"\n// N518GS George Strait\n// N628TS Elon\n// N898TS Taylor Swift\n// N621MM Taylor Swift\n// 82-8000 AF1\n// 92-9000 AF1\n// N5DA Don Adams Prop\n// N4DA Don Adams Lear\n// N68885 Zuckerberg\n// N681JK JB\n// N635PA\n// N628PA\n// N636PA\nvar interesting = [\"N68885\", \"N518GS\", \"N628TS\", \"82-8000\", \"92-9000\", \"N621MM\", \"N898TS\", \"N681JK\", \"N635PA\", \"N628PA\", \"N636PA\"]\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (interesting.includes(msg.payload.acList[i].Reg)) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":1600,"wires":[["3a82b835.c57d48"]]},{"id":"5684b08aacd6d225","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1660,"wires":[["26e32b1d7824356a"]]},{"id":"4ca1a5ad47ce7a18","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon Landing","func":"var alert = {}\nvar message = \"Landing:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1720,"wires":[["ba68e03143ba4af8"]]},{"id":"ba68e03143ba4af8","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1720,"wires":[["26e32b1d7824356a"]]},{"id":"5f1d1b471a1c7cbb","type":"sqlite","z":"9584418c.dafc2","g":"35da177d9e2fd258","mydb":"4f8f8feffed26998","sqlquery":"msg.topic","sql":"","name":"Amazon","x":1000,"y":1780,"wires":[["ea911291f04c7d18"]]},{"id":"2cd08c8da06afaf6","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Write Amazon Landing","func":"var sql = \"\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n var latlong = \"0,0\"\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Lat !== \"undefined\" && typeof msg.payload.acList[i].Long !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n latlong = msg.payload.acList[i].Lat + \",\" + msg.payload.acList[i].Long.toString()\n sql += `INSERT INTO deliveries (timestamp, registration, latlong, altitude) VALUES (\"${Date.now()}\", \"${msg.payload.acList[i].Reg}\", \"${latlong}\", \"${msg.payload.acList[i].Alt}\"); `\n }\n }\n }\n}\n\nif (sql.length > 0){\n msg.topic = sql\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1780,"wires":[["5f1d1b471a1c7cbb"]]},{"id":"ea911291f04c7d18","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Generate Heatmap","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"shell_command","service":"generate_heatmap","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1780,"wires":[[]]},{"id":"cde7b3c9ca39891b","type":"link in","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["1457bf6605a50448"],"x":325,"y":722,"wires":[["e93027cb.6a6308","ea2604f9.4cdf98","39a5ce57.78e3d2","77184c93.8790d4","8ee35d65.a7569","ea19fe14.80749","41b918d5.7ce018"]]},{"id":"1457bf6605a50448","type":"link out","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["cde7b3c9ca39891b"],"x":295,"y":722,"wires":[]},{"id":"8c55985bffebd56a","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Sconces Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_sconces"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1160,"wires":[[]]},{"id":"fae7fa701710e258","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Unlock","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"lock.front_door","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"unlocked","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1320,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"ebe84a6f70b4bc2f","type":"inject","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Every 30 Minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["830c3ddd08ef396c"]]},{"id":"cf1c689e51b98aec","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Thermostat Idle","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"Idle","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.thermostat_state","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":440,"y":340,"wires":[["6af7abba85612dd9"],[]]},{"id":"6af7abba85612dd9","type":"function","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Idle > 2 hours","func":"// If last changed > 3 hours\nif (parseInt(msg.payload.timeSinceChangedMs) > 3600000*2) {\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":400,"wires":[["8b6280c5c448720c"]]},{"id":"8b6280c5c448720c","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Low","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"low\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":340,"wires":[["9ce46ce21d8cc964"]]},{"id":"9ce46ce21d8cc964","type":"delay","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":900,"y":400,"wires":[["2b6721107586ceae"]]},{"id":"2b6721107586ceae","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Auto","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"auto\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"830c3ddd08ef396c","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Attic > 100","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"attic","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":400,"wires":[["cf1c689e51b98aec"],[]]},{"id":"43e5fa289c7550ff","type":"function","z":"9584418c.dafc2","d":true,"g":"35da177d9e2fd258","name":"Speedy","func":"var alert = {}\nvar message = \"Speedy:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (typeof msg.payload.acList[i].Spd == \"number\") {\n if (msg.payload.acList[i].Spd > 600) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1540,"wires":[["97761f13f8e5c31b"]]},{"id":"97761f13f8e5c31b","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1540,"wires":[["26e32b1d7824356a"]]},{"id":"ed80a3f.522526","type":"server-state-changed","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Vehicle Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.street_car_count","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":2200,"wires":[["bcaf3569e7816922","7347dd9c5cdf8a37"],[]]},{"id":"f3a3e80f.3e8e38","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n event_id: msg.event_id,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":2200,"wires":[["e263410e9a3af7d8"]]},{"id":"6469ec7efdb06d81","type":"api-call-service","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.detection_result,\t \"data\": { \"attachments\": [\"/config/images/logo.jpg\"]}\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1440,"y":2320,"wires":[[]]},{"id":"6f08d11c854dfb00","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":760,"y":2260,"wires":[["b2a5543693ac851e","df028b4014ad3c15"]]},{"id":"9b7c5535c74a94a3","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Output msg","func":"var oldmsg = msg;\n\nmsg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n event_id: msg.event_id\n};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":2260,"wires":[["6f08d11c854dfb00"]]},{"id":"d8a16fd91366d112","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":450,"y":2260,"wires":[["9b7c5535c74a94a3"]]},{"id":"bcaf3569e7816922","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Events","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events?cameras=driveway&labels=car&has_snapshot=1&zones=street&in_progress=1&limit=1","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":350,"y":2200,"wires":[["d58f6ef71c326040","7347dd9c5cdf8a37"]]},{"id":"d58f6ef71c326040","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Extract Event ID","func":"if (JSON.parse(msg.payload).length > 0) {\n msg = {\n event_id: JSON.parse(msg.payload)[0].id,\n };\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":2200,"wires":[["7347dd9c5cdf8a37","c13f0f20a56d6af5"]]},{"id":"7347dd9c5cdf8a37","type":"debug","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"Event Debug","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":2140,"wires":[]},{"id":"bd19a17005513c2f","type":"inject","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Every 15 Minutes","props":[],"repeat":"900","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1940,"wires":[["24d1a94e275e5e44","ab66afa5b576de3f","7a8e43b6f7c84bac","58d0c98797e19829","ccf5998fdf8ee50d"]]},{"id":"24d1a94e275e5e44","type":"http request","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Set Doorbell Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.34/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":410,"y":2000,"wires":[[]]},{"id":"935c3eb83c353f53","type":"function","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"Rate Limiter","func":"// 1s\nvar interval = (1000*1); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":2260,"wires":[["6469ec7efdb06d81"]]},{"id":"42be35f83b764861","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Add SubLabel","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/{{{event_id}}}/sub_label","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1180,"y":2260,"wires":[["935c3eb83c353f53","6469ec7efdb06d81","df028b4014ad3c15"]]},{"id":"b2a5543693ac851e","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":2260,"wires":[["42be35f83b764861","df028b4014ad3c15"]]},{"id":"c13f0f20a56d6af5","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:5000/api/driveway/latest.jpg?quality=100","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":730,"y":2200,"wires":[["f3a3e80f.3e8e38"]]},{"id":"7151828122e3b80c","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"60","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2260,"wires":[["bace446bfa7b343d","5acbb2cbdbdea368","df028b4014ad3c15"]]},{"id":"ea239028eda07991","type":"within-time-switch","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":410,"y":1660,"wires":[["a9a323de66b6f772"],[]]},{"id":"58d0c98797e19829","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 1 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1880,"wires":[[]]},{"id":"7a8e43b6f7c84bac","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 2 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.33/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1920,"wires":[[]]},{"id":"ab66afa5b576de3f","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 3 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.35/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1960,"wires":[[]]},{"id":"ccf5998fdf8ee50d","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set PTZ Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.36/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":400,"y":2040,"wires":[[]]},{"id":"1ef176bec8ed5da0","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1340,"wires":[[]]},{"id":"254a48eabb9cf476","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1440,"wires":[[]]},{"id":"4e2d750742dc8890","type":"server-state-changed","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Drone Motion Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.drone_detect_motion","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":2480,"wires":[["9799e777bb06f63f"],[]]},{"id":"cdc9c2c982e3fe5f","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2480,"wires":[["b4392caec775b305"]]},{"id":"300267d7c89b0955","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Deepstack Output","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":2620,"wires":[]},{"id":"1ae58f8afe36e04c","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:5000/api/drone_detect/latest.jpg?quality=100","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":670,"y":2480,"wires":[["cdc9c2c982e3fe5f"]]},{"id":"5c59c5c412e759ce","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"40","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2540,"wires":[["300267d7c89b0955","aa523c5cbfe26949","2f18405339079200"]]},{"id":"aa523c5cbfe26949","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2680,"wires":[[]]},{"id":"b4392caec775b305","type":"jimp-image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"230","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"170","parameter3Type":"num","parameter4":"170","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1050,"y":2480,"wires":[["5c59c5c412e759ce","081d788e92e34986"]]},{"id":"81d6e9a99eb61c67","type":"switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":2540,"wires":[["8bec0433aa6e51fa"]]},{"id":"8bec0433aa6e51fa","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Output msg","func":"var oldmsg = msg;\n\nmsg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2540,"wires":[["1aa9e39b6be88864","b4d7bb6e129bacea"]]},{"id":"1aa9e39b6be88864","type":"file","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1060,"y":2540,"wires":[["ec51454057c055e2"]]},{"id":"ec51454057c055e2","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":2540,"wires":[["6d56b297fcfe0016"]]},{"id":"765c7c5a61100728","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/drone_detect/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2600,"wires":[[]]},{"id":"1bda1e8b7f76e5f3","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/back_porch/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2640,"wires":[[]]},{"id":"14855ff357d5fbad","type":"mqtt out","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","topic":"frigate/events","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"546e31ed.0db1c","x":1360,"y":2680,"wires":[]},{"id":"a95b4fa60f1238d7","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Build MQTT","func":"msg.payload = {'type':'update', 'after':{'label':'PrimeAir'}}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1190,"y":2680,"wires":[["14855ff357d5fbad"]]},{"id":"081d788e92e34986","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1000,"y":2680,"wires":[[]]},{"id":"9799e777bb06f63f","type":"within-time-switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:30:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"15:30:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":430,"y":2480,"wires":[["1ae58f8afe36e04c"],[]]},{"id":"6d56b297fcfe0016","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Rate Limiter","func":"var interval = (1000*30); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":2600,"wires":[["a95b4fa60f1238d7","1bda1e8b7f76e5f3","765c7c5a61100728","b442c20392c7ce60"]]},{"id":"2f18405339079200","type":"while-loop","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Loop \"payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"10","time":"loops","timeType":"msg","x":460,"y":2540,"wires":[["81d6e9a99eb61c67"],["1ae58f8afe36e04c"]]},{"id":"a42b21223ce98e3e","type":"inject","z":"9584418c.dafc2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":480,"y":2420,"wires":[["1ae58f8afe36e04c"]]},{"id":"bace446bfa7b343d","type":"while-loop","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Loop \"msg.payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"5","time":"loops","timeType":"msg","x":240,"y":2340,"wires":[["d8a16fd91366d112"],["c13f0f20a56d6af5"]]},{"id":"b4d7bb6e129bacea","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write Match Image","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":740,"y":2600,"wires":[]},{"id":"b442c20392c7ce60","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Call Frigate API","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":750,"y":2680,"wires":[]},{"id":"5acbb2cbdbdea368","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2380,"wires":[[]]},{"id":"c061be05c01527e0","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1060,"y":2380,"wires":[[]]},{"id":"ec6b4698123ebc34","type":"inject","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Manually Create Event","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1280,"y":2480,"wires":[["6d56b297fcfe0016"]]},{"id":"e263410e9a3af7d8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"250","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"270","parameter3Type":"num","parameter4":"68","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1110,"y":2200,"wires":[["7151828122e3b80c","c061be05c01527e0"]]},{"id":"5123f652827fa902","type":"inject","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"*/1 8-23 * * *","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":2860,"wires":[["970920516fa379e8","88d3b091fc333998"]]},{"id":"970920516fa379e8","type":"http request","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"PHX","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=7160","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2860,"wires":[["51f2291060d07336"]]},{"id":"51f2291060d07336","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/07","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-07')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"PHX: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2860,"wires":[["7415468104c18108","a61d605915dc23ff"]]},{"id":"91d3d26774f9468e","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"HOU","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2820,"wires":[]},{"id":"7415468104c18108","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"PHX","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2900,"wires":[]},{"id":"b8a4a1ee4e15f778","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2860,"wires":[[]]},{"id":"79c00f8c61888f52","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2780,"wires":[["c44a5c4d6d17ee9f"]]},{"id":"a61d605915dc23ff","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2860,"wires":[["fa9f2ef8fecf1de2"]]},{"id":"c44a5c4d6d17ee9f","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2780,"wires":[["d5ab0aa6d198ba81"]]},{"id":"fa9f2ef8fecf1de2","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2860,"wires":[["b8a4a1ee4e15f778"]]},{"id":"7d01abce7bc68291","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"All","func":"var oldmsg = msg;\nvar slots = msg.payload.availableSlots\n\n// for (var i = 0; i < msg.payload.availableSlots.length; i++) {\n// if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-07')){\n// console.log(msg.payload.availableSlots[i].startTimestamp)\n// match = true\n// }\n// }\n\nmsg = {\n payload: slots,\n 'location': \"DAL\"\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2940,"wires":[["1480d9470754a6a3","b7c50947c4507d03"]]},{"id":"b7c50947c4507d03","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2940,"wires":[["ca8d58af48d7b7c5"]]},{"id":"1480d9470754a6a3","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2980,"wires":[]},{"id":"ca8d58af48d7b7c5","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2940,"wires":[["414a38bf0735b27c"]]},{"id":"414a38bf0735b27c","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Dallas https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2940,"wires":[[]]},{"id":"c0546e86d17e99e9","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/03","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-03')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"HOU: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2780,"wires":[["91d3d26774f9468e","79c00f8c61888f52"]]},{"id":"d5ab0aa6d198ba81","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2780,"wires":[[]]},{"id":"83e2179938d08d58","type":"api-call-service","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Timelapse Snapshots","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":[],"entityId":["camera.back_porch","camera.bullet","camera.driveway","camera.front_door"],"data":"{\"filename\":\"/config/media/images/{{ entity_id.entity_id }}/{{ now().strftime('%Y%m%d-%H%M%S') }}.jpg\"}","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":540,"y":3180,"wires":[[]]},{"id":"59e4459459f077c9","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End","nameInt":"⏲ golden hour dawn end = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3100,"wires":[["83e2179938d08d58"]]},{"id":"089b07fa48286f29","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start","nameInt":"⏲ golden hour dusk start = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3280,"wires":[["83e2179938d08d58"]]},{"id":"7ff9bf1a917cbf50","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start - 3h","nameInt":"⏲ golden hour dusk start↶ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":"-3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3220,"wires":[["83e2179938d08d58"]]},{"id":"a826a8c498d6d1e3","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End + 3h","nameInt":"⏲ golden hour dawn end↷ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":"3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3160,"wires":[["83e2179938d08d58"]]},{"id":"c5c85c0aa2d8c8ca","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Safe Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.large_safe","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":80,"wires":[["c5124616.c9bd48"],[]]},{"id":"fa90c550.d6c948","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 8 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 20 * * 1,2,4,5,6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":700,"wires":[["1457bf6605a50448"]]},{"id":"08b26d8311cd9187","type":"inject","z":"9584418c.dafc2","d":true,"g":"6f393a92ae952332","name":"Every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":3460,"wires":[["716e8fabff85ffb9","7b988b93a658f526","d85faf19968afde1"]]},{"id":"716e8fabff85ffb9","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Attic Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":3400,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7b988b93a658f526","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Thermostat Outdoor Temperature <= 35","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"35","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.thermostat_outdoor_ambient_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":480,"y":3460,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7fe1e564efbd46af","type":"api-call-service","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Turn on Faucet Drip","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.bhyve_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":3460,"wires":[[]]},{"id":"16e1a3e2f53e6bdf","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Faucet Drip Off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.bhyve_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":780,"y":3460,"wires":[["7fe1e564efbd46af"],[]]},{"id":"d85faf19968afde1","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Compost External Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.compost_external_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":3520,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"504a90c2bb116cda","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":1920,"wires":[["f7c82af0e299c914"]]},{"id":"f7c82af0e299c914","type":"http request","z":"9584418c.dafc2","name":"Enable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":1920,"wires":[[]]},{"id":"aa9d132ce4c33794","type":"http request","z":"9584418c.dafc2","name":"Set Overlay Text","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text={{{payload}}}°F","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":1140,"y":1980,"wires":[[]]},{"id":"8f9a073f4ebb3133","type":"inject","z":"9584418c.dafc2","name":"On Demand */5","props":[],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":700,"y":1980,"wires":[["446f812e8b1f4307"]]},{"id":"acd933c5c0eddc8b","type":"http request","z":"9584418c.dafc2","name":"Disable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=false","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":2040,"wires":[[]]},{"id":"6d26bb1db9ea5e67","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":2040,"wires":[["acd933c5c0eddc8b"]]},{"id":"446f812e8b1f4307","type":"api-current-state","z":"9584418c.dafc2","name":"Outdoor Temperature","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.433_weather_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":920,"y":1980,"wires":[["aa9d132ce4c33794"]]},{"id":"df028b4014ad3c15","type":"debug","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"debug 2","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":2360,"wires":[]},{"id":"7eb1a3d60fccbc76","type":"Mailin SMTP","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Recieve Mail","port":25,"x":150,"y":3660,"wires":[["1cd709e001bf5e89"]]},{"id":"cb1f141562c8fd2b","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 1","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3640,"wires":[[]]},{"id":"88d3b091fc333998","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=5300","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2940,"wires":[["7d01abce7bc68291"]]},{"id":"1cd709e001bf5e89","type":"within-time-switch","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"09:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"22:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":370,"y":3660,"wires":[["24fc1882c8436738"],["7f48460e08988c9e"]]},{"id":"7f48460e08988c9e","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 0","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 0} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3700,"wires":[[]]},{"id":"24fc1882c8436738","type":"api-current-state","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Andrew Home?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.andrew","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":580,"y":3640,"wires":[["cb1f141562c8fd2b"],["7f48460e08988c9e"]]},{"id":"d269f175.c9dc6","type":"server-events","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Custom Water Event Fired","server":"e1dc0b88.463bb8","version":3,"exposeAsEntityConfig":"","eventType":"irrigation_custom_water","eventData":"","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":190,"y":340,"wires":[["883f2c00.1d94e8"]]},{"id":"3367e45f.cc981c","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":400,"wires":[["116d5bb3.ee92a4"]]},{"id":"116d5bb3.ee92a4","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":340,"wires":[["565ee5c1.561bfc","80df47d5.602888","e2c37b65c5582c2b"]]},{"id":"80df47d5.602888","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"fb46876c.845298","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1320,"y":400,"wires":[["98eeafa7.bd2b9","860a4c61d7557dc9"]]},{"id":"98eeafa7.bd2b9","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":980,"y":480,"wires":[["3367e45f.cc981c"]]},{"id":"565ee5c1.561bfc","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":400,"wires":[["22a20603.86a06a"]]},{"id":"22a20603.86a06a","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"x":1090,"y":400,"wires":[["fb46876c.845298"],[],["a8d96e.1f00969"]]},{"id":"a8d96e.1f00969","type":"mqtt out","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1350,"y":340,"wires":[]},{"id":"3b656b89.1ac154","type":"inject","z":"f602e6ba.609d28","g":"79694877249c9902","name":"3:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 03 * * 2,5","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":1280,"wires":[["493b435f.c9851c"]]},{"id":"493b435f.c9851c","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":1280,"wires":[["8c060f00.cf577"],["7b12e66f.57d068"]]},{"id":"7b12e66f.57d068","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1300,"wires":[[]]},{"id":"8c060f00.cf577","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","576b66fa1bd202a3"],"x":595,"y":1260,"wires":[]},{"id":"4422f61c.847d88","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["3ff9ce03ef7b554b"],"x":135,"y":1480,"wires":[["219b37105a8304f1"]]},{"id":"dcdeabc7.780578","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["1eaa857e.b6b8db","c90fd5e6.c5c678","b8fe96458628f202"],"x":595,"y":1460,"wires":[]},{"id":"722d03d6.2ff77c","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8d4bfe8e.ee805","d67106b42368e630"],"x":135,"y":1900,"wires":[["b3c4a3638c17629e"]]},{"id":"af4788fe.215ba8","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["405789f7.0727a8","eb1a5268c1aec843","9896327569c234da"],"x":595,"y":1900,"wires":[]},{"id":"c90fd5e6.c5c678","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["dcdeabc7.780578","89d715ddf12d2195"],"x":135,"y":1600,"wires":[["e7430e17f0b24ed8"]]},{"id":"862ad27a.d347d","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["83edf648.3f9ed8"],"x":595,"y":1580,"wires":[]},{"id":"808e6a81.92e2e8","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":400,"wires":[["e42ff3d9.593dc"]]},{"id":"883f2c00.1d94e8","type":"api-current-state","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"24v Power","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_24v_power","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":400,"wires":[["808e6a81.92e2e8"],[]]},{"id":"e42ff3d9.593dc","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":480,"y":340,"wires":[["76160bc4.8cd644"]]},{"id":"76160bc4.8cd644","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"","rules":[{"t":"set","p":"zones","pt":"msg","to":"payload.event.zones","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":340,"wires":[["116d5bb3.ee92a4"]]},{"id":"83edf648.3f9ed8","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["862ad27a.d347d","1bb3825011174363"],"x":135,"y":1700,"wires":[["b6e7d5b8891bba6d"]]},{"id":"8d4bfe8e.ee805","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["722d03d6.2ff77c"],"x":595,"y":1720,"wires":[]},{"id":"583f46a3.fc4c38","type":"inject","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"5:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * 1,3,5","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":2620,"wires":[["d9147878.b61cf8"]]},{"id":"d9147878.b61cf8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.front_bed_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":2620,"wires":[["c7e5552e.7f8a08"],["45c5dbbbd8ce50a1"]]},{"id":"c7e5552e.7f8a08","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","f6881b4bf93c27c5"],"x":595,"y":2600,"wires":[]},{"id":"6bcf06fb.9ca748","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4f2902edc77f2d3b"],"x":135,"y":2820,"wires":[["ed6e3d4225582e20"]]},{"id":"f587589f.d739e8","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["1eaa857e.b6b8db","9d851699.6a8458"],"x":595,"y":2800,"wires":[]},{"id":"d9d17e8f.590e6","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4fae5b92.a9cd44"],"x":135,"y":3040,"wires":[["d8637d8d96b68fca"]]},{"id":"d9f893eb.834f3","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["5ce1803b.06628"],"x":595,"y":3040,"wires":[]},{"id":"9d851699.6a8458","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f587589f.d739e8"],"x":135,"y":2940,"wires":[["593bee0e8c958df8"]]},{"id":"4fae5b92.a9cd44","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["d9d17e8f.590e6"],"x":595,"y":2920,"wires":[]},{"id":"a2ab7368.923fb","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Zone Settings Front Beds","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"zone\": \"switch.irrigation_front_beds\",\n \"time\": 20,\n \"name\": \"Front beds\"\n}","output":"json","x":250,"y":3200,"wires":[["62b5545bc6d6e627"]]},{"id":"a31e3daf.17207","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":3200,"wires":[["21ced698.708b5a"]]},{"id":"21ced698.708b5a","type":"delay","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":3200,"wires":[["c661d489.9c9bc8"]]},{"id":"c661d489.9c9bc8","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":3200,"wires":[["accc6697.196268"]]},{"id":"accc6697.196268","type":"change","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.zones.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":3200,"wires":[["487ff788.8c5c98"]]},{"id":"487ff788.8c5c98","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"55a2162532da4e14","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":850,"y":3260,"wires":[["2238b09b.1b5b5","9129b06e.d8925"],[],["84258ddd.41da4"]]},{"id":"2238b09b.1b5b5","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":3340,"wires":[[]]},{"id":"84258ddd.41da4","type":"mqtt out","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1130,"y":3320,"wires":[]},{"id":"9129b06e.d8925","type":"function","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.zones.name + \" ran for \" + msg.zones.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":3260,"wires":[["d83b5ff7a2212931"]]},{"id":"5ce1803b.06628","type":"link in","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"","links":["db46e0c1.f9ab5","d9f893eb.834f3"],"x":95,"y":3200,"wires":[["a2ab7368.923fb"]]},{"id":"815fddc0.6604c","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":1900,"wires":[["af4788fe.215ba8"]]},{"id":"418058c4.af3158","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":3040,"wires":[["d9f893eb.834f3"]]},{"id":"1ae21386.a831bc","type":"inject","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"06:00 24v Off","props":[],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","x":180,"y":1140,"wires":[["117145a7.67e99a","882aff35f788008b"]]},{"id":"117145a7.67e99a","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1100,"wires":[[]]},{"id":"06d6255efdc31c47","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1380,"wires":[["2fc67b25514de5a5"],["3ff9ce03ef7b554b"]]},{"id":"5420d0eed32223fb","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","08e3098cf183e086"],"x":595,"y":1360,"wires":[]},{"id":"3ff9ce03ef7b554b","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","4422f61c.847d88","8524a273a6a8ffd0"],"x":595,"y":1400,"wires":[]},{"id":"576b66fa1bd202a3","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8c060f00.cf577"],"x":135,"y":1380,"wires":[["06d6255efdc31c47"]]},{"id":"7350c911a0b1a86d","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":2720,"wires":[["abb8777dd08aa743"],["4f2902edc77f2d3b"]]},{"id":"fdcfa1521191fa40","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","b403eec7866aea22"],"x":595,"y":2700,"wires":[]},{"id":"4f2902edc77f2d3b","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","6bcf06fb.9ca748"],"x":595,"y":2740,"wires":[]},{"id":"f6881b4bf93c27c5","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["c7e5552e.7f8a08"],"x":135,"y":2720,"wires":[["7350c911a0b1a86d"]]},{"id":"882aff35f788008b","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off Force Run","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_force_run"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1160,"wires":[[]]},{"id":"a3d75225807b70eb","type":"delay","z":"f602e6ba.609d28","g":"79694877249c9902","name":"30 Minute Delay","pauseType":"delay","timeout":"30","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":280,"y":1760,"wires":[["339ee0ada21856e0"]]},{"id":"e2c37b65c5582c2b","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":300,"wires":[[]]},{"id":"860a4c61d7557dc9","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":460,"wires":[[]]},{"id":"62b5545bc6d6e627","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Template: Zone Last Ran >= 23 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ zones.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 23*3600 %}1{% else %}0{% endif %}","output":"str","x":310,"y":3260,"wires":[["aa53225140781dd7"]]},{"id":"aa53225140781dd7","type":"api-render-template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":250,"y":3320,"wires":[["8113d83074ff7701"]]},{"id":"8113d83074ff7701","type":"switch","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":3320,"wires":[["a31e3daf.17207"],["f78cdb84200eb171"]]},{"id":"d83b5ff7a2212931","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":3260,"wires":[[]]},{"id":"dd9855ca4017c8c0","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":580,"wires":[[]]},{"id":"c3a696a117416327","type":"function","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.25) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":680,"wires":[["47f1a8018e58e032"],["dd9855ca4017c8c0"]]},{"id":"27f2580e35031830","type":"api-get-history","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Rainfall 120h","server":"e1dc0b88.463bb8","version":1,"startDate":"","endDate":"","entityId":"sensor.netatmo_home_rain_sum_rain_today_inches","entityIdType":"equals","useRelativeTime":true,"relativeTime":"120h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":310,"y":680,"wires":[["c3a696a117416327"]]},{"id":"9cb8187c669c6485","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rainfall","info":"","x":150,"y":600,"wires":[]},{"id":"47f1a8018e58e032","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":660,"wires":[[]]},{"id":"427f7fa58d86cc59","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":640,"wires":[["27f2580e35031830","93965a61d2c4f5de"]]},{"id":"1d9a4d0bb4645f32","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":840,"wires":[[]]},{"id":"d9ebbaa37f5911a9","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Forecast","info":"","x":170,"y":760,"wires":[]},{"id":"eeecfc1e8864e39f","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":760,"wires":[[]]},{"id":"89487a4efedec1db","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":800,"wires":[["2c45af5b3ee5cf0a"]]},{"id":"1e4b3bc7c25b294f","type":"function","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n \nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) >= 60) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":800,"wires":[["eeecfc1e8864e39f"],["1d9a4d0bb4645f32"]]},{"id":"2c45af5b3ee5cf0a","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":300,"y":800,"wires":[["1e4b3bc7c25b294f"]]},{"id":"d7e50e7a2810667d","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":1000,"wires":[[]]},{"id":"28936ec687ee4eb0","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind","info":"","x":150,"y":920,"wires":[]},{"id":"974833b6a2eca853","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":920,"wires":[[]]},{"id":"478a5a84d38ba181","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":960,"wires":[["c01fd0612615e927"]]},{"id":"c01fd0612615e927","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.neighbor_5in1_wind","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":330,"y":960,"wires":[["974833b6a2eca853"],["d7e50e7a2810667d"]]},{"id":"219b37105a8304f1","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":1480,"wires":[["dcdeabc7.780578"],["d01fbafafbb34692"]]},{"id":"e7430e17f0b24ed8","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":1600,"wires":[["862ad27a.d347d"],["f5684be88477322f"]]},{"id":"b6e7d5b8891bba6d","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1700,"wires":[["8d4bfe8e.ee805"],["a3d75225807b70eb"]]},{"id":"339ee0ada21856e0","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1820,"wires":[["8d4bfe8e.ee805"],["336585d4eee0ca73"]]},{"id":"ed6e3d4225582e20","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":2820,"wires":[["f587589f.d739e8"],["f7ac7a90f3da2298"]]},{"id":"593bee0e8c958df8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":2940,"wires":[["4fae5b92.a9cd44"],["67916c3a5554a794"]]},{"id":"d01fbafafbb34692","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1500,"wires":[[]]},{"id":"f5684be88477322f","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1620,"wires":[[]]},{"id":"336585d4eee0ca73","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Wind\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1820,"wires":[[]]},{"id":"b3c4a3638c17629e","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":1900,"wires":[["815fddc0.6604c"]]},{"id":"67916c3a5554a794","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2960,"wires":[[]]},{"id":"f7ac7a90f3da2298","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2840,"wires":[[]]},{"id":"45c5dbbbd8ce50a1","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2640,"wires":[[]]},{"id":"2fc67b25514de5a5","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":1360,"wires":[["5420d0eed32223fb"]]},{"id":"08e3098cf183e086","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["5420d0eed32223fb"],"x":325,"y":1960,"wires":[["815fddc0.6604c"]]},{"id":"abb8777dd08aa743","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":2700,"wires":[["fdcfa1521191fa40"]]},{"id":"d8637d8d96b68fca","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":3040,"wires":[["418058c4.af3158"]]},{"id":"b403eec7866aea22","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["fdcfa1521191fa40"],"x":325,"y":3100,"wires":[["418058c4.af3158"]]},{"id":"f2c9c3a5b8b11a64","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Continue?","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":1230,"y":2060,"wires":[["287dd3b1af5dc2d0"],["bf015af2161c5ec2"]]},{"id":"38affe5cc680d076","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Template: Zone Last Ran >= 71 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ payload.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 71*3600 %}1{% else %}0{% endif %}","output":"str","x":790,"y":2060,"wires":[["174186fb5d054240"]]},{"id":"9896327569c234da","type":"link in","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"","links":["af4788fe.215ba8"],"x":95,"y":2060,"wires":[["e95ac52f03478921"]]},{"id":"e95ac52f03478921","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Lawn Zones","field":"all_zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":290,"y":2060,"wires":[["287dd3b1af5dc2d0"]]},{"id":"174186fb5d054240","type":"api-render-template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":1050,"y":2060,"wires":[["f2c9c3a5b8b11a64"]]},{"id":"287dd3b1af5dc2d0","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"all_zones","arrayType":"msg","x":220,"y":2120,"wires":[["74cd40702021e86d","acdcc72fea065aac"],["224d30a98f52c287"]]},{"id":"74cd40702021e86d","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Zone Settings Lawn","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 15,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 15,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 15,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 15,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 15,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 15,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":460,"y":2180,"wires":[["151eb6ba5b2d39cd"]]},{"id":"bf015af2161c5ec2","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Append Run Zones","func":"if (typeof msg.run_zones === 'undefined'){\n msg.run_zones = []\n}\n\n// Add zone to run_zones\nmsg.run_zones.push(msg.payload.zone)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":210,"y":2180,"wires":[["287dd3b1af5dc2d0"]]},{"id":"151eb6ba5b2d39cd","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"zones","arrayType":"msg","x":720,"y":2180,"wires":[[],["45ee74d06e9cac2c"]]},{"id":"45ee74d06e9cac2c","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"If Zone in Run Zone","property":"run_zones","propertyType":"msg","rules":[{"t":"cont","v":"payload.zone","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":710,"y":2240,"wires":[["8d3c8370996be2da"],["151eb6ba5b2d39cd"]]},{"id":"95a54981805b22f2","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2320,"wires":[["02d1e639f7ac6596","7b985932412db47d"]]},{"id":"a4b3eba196a504dc","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":2500,"wires":[["6ea0448df1383ec2"]]},{"id":"02d1e639f7ac6596","type":"change","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2380,"wires":[["863b8fa63f210ebe"]]},{"id":"8d3c8370996be2da","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":2320,"wires":[["b1c9631973c2f4b1"]]},{"id":"863b8fa63f210ebe","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":510,"y":2440,"wires":[["a4b3eba196a504dc","de509d99b9d965b3"],[],["7d8374976c01e3dc"]]},{"id":"7d8374976c01e3dc","type":"mqtt out","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":790,"y":2460,"wires":[]},{"id":"b0debe46542c4c67","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":2420,"wires":[[]]},{"id":"de509d99b9d965b3","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.payload.name + \" ran for \" + msg.payload.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2420,"wires":[["b0debe46542c4c67"]]},{"id":"b1c9631973c2f4b1","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":2320,"wires":[["95a54981805b22f2"]]},{"id":"6ea0448df1383ec2","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Delay 10","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":320,"y":2440,"wires":[["151eb6ba5b2d39cd"]]},{"id":"224d30a98f52c287","type":"api-current-state","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":2060,"wires":[["bf015af2161c5ec2"],["38affe5cc680d076"]]},{"id":"5a27d31bfb4a6990","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Actually Handle Watering","info":"","x":1150,"y":2340,"wires":[]},{"id":"197853479ad9eeda","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Decide Which Zones to Run","info":"","x":1020,"y":2160,"wires":[]},{"id":"7b985932412db47d","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Zone On","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":2280,"wires":[]},{"id":"acdcc72fea065aac","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Run Zones","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":2260,"wires":[]},{"id":"f78cdb84200eb171","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Recently Ran\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":3380,"wires":[[]]},{"id":"93965a61d2c4f5de","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"< 1\" in 5 Days","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"0.5","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.neighbor_5in1_rain_last_5_days","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":420,"y":620,"wires":[["dd9855ca4017c8c0"],["47f1a8018e58e032"]]},{"id":"54bad548.7e9fcc","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power,switch.irrigation_drip","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":390,"y":100,"wires":[["bcbf413e.7b188"]]},{"id":"5a10cd93.8e94b4","type":"inject","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":100,"wires":[["54bad548.7e9fcc"]]},{"id":"a77808ff.3f1288","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"On Longer than 26 minutes?","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gte","v":"1600000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":720,"y":60,"wires":[["54ae6ec3.1bc63"]]},{"id":"54ae6ec3.1bc63","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload[0].entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":60,"wires":[[]]},{"id":"bcbf413e.7b188","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":160,"wires":[["a77808ff.3f1288","3b848bce.76aea4"],["656ad2cd6fb99f57"]]},{"id":"3b848bce.76aea4","type":"change","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Reset Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":100,"wires":[["cdd3b7ef.04a618"]]},{"id":"43dedcca.ac7734","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Master","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1480,"y":180,"wires":[[]]},{"id":"c42e6d62.7a24c","type":"api-current-state","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Master On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_master_valve","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":750,"y":200,"wires":[["cdd3b7ef.04a618"],["3b848bce.76aea4"]]},{"id":"cdd3b7ef.04a618","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":880,"y":120,"wires":[["5e9007a27732bba9"]]},{"id":"63f07877e73b952a","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1100,"y":180,"wires":[[],["749afd72791a5127"]]},{"id":"5e9007a27732bba9","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":1070,"y":120,"wires":[["63f07877e73b952a"]]},{"id":"061b74f643477dd9","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1380,"y":120,"wires":[["43dedcca.ac7734"],[]]},{"id":"749afd72791a5127","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1260,"y":60,"wires":[["061b74f643477dd9"]]},{"id":"656ad2cd6fb99f57","type":"function","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"clear msg","func":"msg = {}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":200,"wires":[["c42e6d62.7a24c"]]}] \ No newline at end of file +[{"id":"9584418c.dafc2","type":"tab","label":"Automations","disabled":false,"info":""},{"id":"f602e6ba.609d28","type":"tab","label":"Irrigation","disabled":false,"info":""},{"id":"9cfe6331fbc680d5","type":"group","z":"9584418c.dafc2","name":"Delivery Logo Object Detection","style":{"label":true},"nodes":["ed80a3f.522526","f3a3e80f.3e8e38","6469ec7efdb06d81","6f08d11c854dfb00","9b7c5535c74a94a3","d8a16fd91366d112","bcaf3569e7816922","d58f6ef71c326040","7347dd9c5cdf8a37","935c3eb83c353f53","42be35f83b764861","b2a5543693ac851e","c13f0f20a56d6af5","7151828122e3b80c","bace446bfa7b343d","5acbb2cbdbdea368","c061be05c01527e0","e263410e9a3af7d8","df028b4014ad3c15","d9e9a93275328762"],"x":54,"y":2099,"w":1492,"h":322},{"id":"3c4349a7eea9bd3b","type":"group","z":"9584418c.dafc2","name":"Set Cameras Online","style":{"label":true},"nodes":["bd19a17005513c2f","24d1a94e275e5e44","58d0c98797e19829","7a8e43b6f7c84bac","ab66afa5b576de3f","ccf5998fdf8ee50d"],"x":54,"y":1839,"w":492,"h":242},{"id":"35da177d9e2fd258","type":"group","z":"9584418c.dafc2","name":"Virtual Radar Server","style":{"label":true},"nodes":["a9a323de66b6f772","ee139512bcad0966","7da69a7e8ecadc7c","26e32b1d7824356a","3a82b835.c57d48","91afebbf8b9edf05","5684b08aacd6d225","4ca1a5ad47ce7a18","ba68e03143ba4af8","5f1d1b471a1c7cbb","2cd08c8da06afaf6","ea911291f04c7d18","43e5fa289c7550ff","97761f13f8e5c31b","ea239028eda07991"],"x":54,"y":1499,"w":1272,"h":322},{"id":"bd2acc7efb5be5fd","type":"group","z":"9584418c.dafc2","name":"Front Porch Light Occupancy Brightness","style":{"label":true},"nodes":["3f2a2e4d99057b69","3e399d83e4e7f4c3","59f5bc2571b0f12f","c68c969a6b8c2833","b1a99d9698d831b2","17b35d69307a8455","d11c183fff8d848d","fae7fa701710e258","1ef176bec8ed5da0","254a48eabb9cf476"],"x":54,"y":1279,"w":1092,"h":202},{"id":"11e25fc28c23144c","type":"group","z":"9584418c.dafc2","name":"Front House Lights","style":{"label":true},"nodes":["86bc310cbc0562af","2fb6a7afb6502a32","8c55985bffebd56a"],"x":54,"y":1119,"w":472,"h":142},{"id":"b808f2d7ae539c87","type":"group","z":"9584418c.dafc2","name":"Indoor Lights Dim Evening","style":{"label":true},"nodes":["e93027cb.6a6308","fc81cfda.29ff5","8ee35d65.a7569","41b918d5.7ce018","5420f9c0.5356c8","77184c93.8790d4","39a5ce57.78e3d2","ea19fe14.80749","ea2604f9.4cdf98","8a82f465.846018","d8ad0651.bf7a18","d9cc182cc3eb2a93","cde7b3c9ca39891b","1457bf6605a50448","fa90c550.d6c948"],"x":54,"y":659,"w":1073,"h":444},{"id":"9df353d4c0fc9a54","type":"group","z":"9584418c.dafc2","name":"Server Rack Temperature","style":{"label":true},"nodes":["73550501.be7fbc","7dff3ae1.e36a04","88822bfe.2cc598","96b5207d.407dd","b259f0eb.3e83","c7ff978f.ff0728","29b17ed7.fab972"],"x":54,"y":459,"w":932,"h":182},{"id":"18fe74aea06a1180","type":"group","z":"9584418c.dafc2","name":"AC Stale Air","style":{"label":true},"nodes":["ebe84a6f70b4bc2f","cf1c689e51b98aec","6af7abba85612dd9","8b6280c5c448720c","9ce46ce21d8cc964","2b6721107586ceae","830c3ddd08ef396c"],"x":54,"y":299,"w":1132,"h":142},{"id":"cf3a0410bcf837ae","type":"group","z":"9584418c.dafc2","name":"Door Alerts","style":{"label":true},"nodes":["2022689a.938918","8ec438b6.4eb2e8","28fa66cd.af058a","9c1d9c7c.ed9c7","896f5b34.7b4328","c5124616.c9bd48","f9d93af6.184028","3314ec9f.ca8994","5c24f744.30fcb8","6aa388d0.707768","cf758271.d4fd6","5a740c2d.009864","c5c85c0aa2d8c8ca"],"x":54,"y":19,"w":1012,"h":262},{"id":"3cf0491ac33aecfa","type":"group","z":"f602e6ba.609d28","name":"Max Time and Master Valve Control","style":{"label":true},"nodes":["54bad548.7e9fcc","5a10cd93.8e94b4","a77808ff.3f1288","54ae6ec3.1bc63","bcbf413e.7b188","3b848bce.76aea4","43dedcca.ac7734","c42e6d62.7a24c","cdd3b7ef.04a618","63f07877e73b952a","5e9007a27732bba9","061b74f643477dd9","749afd72791a5127","656ad2cd6fb99f57"],"x":54,"y":19,"w":1532,"h":222},{"id":"43a30fe5a5052c22","type":"group","z":"f602e6ba.609d28","name":"Custom Water","style":{"label":true},"nodes":["d269f175.c9dc6","3367e45f.cc981c","116d5bb3.ee92a4","80df47d5.602888","fb46876c.845298","98eeafa7.bd2b9","565ee5c1.561bfc","22a20603.86a06a","a8d96e.1f00969","808e6a81.92e2e8","883f2c00.1d94e8","e42ff3d9.593dc","76160bc4.8cd644","e2c37b65c5582c2b","860a4c61d7557dc9"],"x":54,"y":259,"w":1452,"h":262},{"id":"a9182c2cc04d2d9a","type":"group","z":"f602e6ba.609d28","name":"Irrigation Delays","style":{"label":true},"nodes":["dd9855ca4017c8c0","c3a696a117416327","27f2580e35031830","9cb8187c669c6485","47f1a8018e58e032","427f7fa58d86cc59","1d9a4d0bb4645f32","d9ebbaa37f5911a9","eeecfc1e8864e39f","89487a4efedec1db","1e4b3bc7c25b294f","2c45af5b3ee5cf0a","d7e50e7a2810667d","28936ec687ee4eb0","974833b6a2eca853","478a5a84d38ba181","c01fd0612615e927","93965a61d2c4f5de"],"x":54,"y":539,"w":752,"h":502},{"id":"0f07749a4e1672ad","type":"group","z":"f602e6ba.609d28","name":"Supply Voltage Control","style":{"label":true},"nodes":["1ae21386.a831bc","117145a7.67e99a","882aff35f788008b"],"x":54,"y":1059,"w":472,"h":142},{"id":"a08dae6118c91c19","type":"group","z":"f602e6ba.609d28","name":"Run Lawn","style":{"label":true},"nodes":["f2c9c3a5b8b11a64","38affe5cc680d076","9896327569c234da","e95ac52f03478921","174186fb5d054240","287dd3b1af5dc2d0","74cd40702021e86d","bf015af2161c5ec2","151eb6ba5b2d39cd","45ee74d06e9cac2c","95a54981805b22f2","a4b3eba196a504dc","02d1e639f7ac6596","8d3c8370996be2da","863b8fa63f210ebe","7d8374976c01e3dc","b0debe46542c4c67","de509d99b9d965b3","b1c9631973c2f4b1","6ea0448df1383ec2","224d30a98f52c287","5a27d31bfb4a6990","197853479ad9eeda","7b985932412db47d","acdcc72fea065aac"],"x":54,"y":2019,"w":1272,"h":522},{"id":"79694877249c9902","type":"group","z":"f602e6ba.609d28","name":"Attempt Lawn","style":{"label":true},"nodes":["3b656b89.1ac154","493b435f.c9851c","7b12e66f.57d068","8c060f00.cf577","4422f61c.847d88","dcdeabc7.780578","722d03d6.2ff77c","af4788fe.215ba8","c90fd5e6.c5c678","862ad27a.d347d","83edf648.3f9ed8","8d4bfe8e.ee805","815fddc0.6604c","06d6255efdc31c47","5420d0eed32223fb","3ff9ce03ef7b554b","576b66fa1bd202a3","a3d75225807b70eb","219b37105a8304f1","e7430e17f0b24ed8","b6e7d5b8891bba6d","339ee0ada21856e0","d01fbafafbb34692","f5684be88477322f","336585d4eee0ca73","b3c4a3638c17629e","2fc67b25514de5a5","08e3098cf183e086"],"x":54,"y":1219,"w":672,"h":782},{"id":"68ec980b932fdba7","type":"group","z":"f602e6ba.609d28","name":"Attempt Front Beds","style":{"label":true},"nodes":["583f46a3.fc4c38","d9147878.b61cf8","c7e5552e.7f8a08","6bcf06fb.9ca748","f587589f.d739e8","d9d17e8f.590e6","d9f893eb.834f3","9d851699.6a8458","4fae5b92.a9cd44","418058c4.af3158","7350c911a0b1a86d","fdcfa1521191fa40","4f2902edc77f2d3b","f6881b4bf93c27c5","ed6e3d4225582e20","593bee0e8c958df8","67916c3a5554a794","f7ac7a90f3da2298","45c5dbbbd8ce50a1","abb8777dd08aa743","d8637d8d96b68fca","b403eec7866aea22"],"x":54,"y":2559,"w":672,"h":582},{"id":"55a2162532da4e14","type":"group","z":"f602e6ba.609d28","name":"Run Front Beds","style":{"label":true},"nodes":["a2ab7368.923fb","a31e3daf.17207","21ced698.708b5a","c661d489.9c9bc8","accc6697.196268","487ff788.8c5c98","2238b09b.1b5b5","84258ddd.41da4","9129b06e.d8925","5ce1803b.06628","62b5545bc6d6e627","aa53225140781dd7","8113d83074ff7701","d83b5ff7a2212931","f78cdb84200eb171"],"x":54,"y":3159,"w":1332,"h":262},{"id":"59ea88a27ef998e7","type":"group","z":"9584418c.dafc2","name":"Drone Delivery Logo Object Detection","style":{"label":true},"nodes":["4e2d750742dc8890","cdc9c2c982e3fe5f","300267d7c89b0955","1ae58f8afe36e04c","5c59c5c412e759ce","aa523c5cbfe26949","b4392caec775b305","81d6e9a99eb61c67","8bec0433aa6e51fa","1aa9e39b6be88864","ec51454057c055e2","765c7c5a61100728","1bda1e8b7f76e5f3","14855ff357d5fbad","a95b4fa60f1238d7","081d788e92e34986","9799e777bb06f63f","6d56b297fcfe0016","2f18405339079200","b4d7bb6e129bacea","b442c20392c7ce60","ec6b4698123ebc34"],"x":54,"y":2439,"w":1412,"h":282},{"id":"cb7e3560a0078392","type":"group","z":"9584418c.dafc2","name":"Global Entry Schedule","style":{"label":true},"nodes":["5123f652827fa902","970920516fa379e8","51f2291060d07336","91d3d26774f9468e","7415468104c18108","b8a4a1ee4e15f778","79c00f8c61888f52","a61d605915dc23ff","c44a5c4d6d17ee9f","fa9f2ef8fecf1de2","7d01abce7bc68291","b7c50947c4507d03","1480d9470754a6a3","ca8d58af48d7b7c5","414a38bf0735b27c","c0546e86d17e99e9","d5ab0aa6d198ba81","88d3b091fc333998"],"x":54,"y":2739,"w":1012,"h":282},{"id":"26b2ac79d4c32bda","type":"group","z":"9584418c.dafc2","name":"Timelapse","style":{"label":true},"nodes":["83e2179938d08d58","59e4459459f077c9","089b07fa48286f29","7ff9bf1a917cbf50","a826a8c498d6d1e3"],"x":54,"y":3059,"w":612,"h":262},{"id":"6f393a92ae952332","type":"group","z":"9584418c.dafc2","name":"Faucet Auto Drip","style":{"label":true},"nodes":["08b26d8311cd9187","716e8fabff85ffb9","7b988b93a658f526","7fe1e564efbd46af","16e1a3e2f53e6bdf","d85faf19968afde1"],"x":54,"y":3359,"w":1032,"h":202},{"id":"e28fc796ce042622","type":"group","z":"9584418c.dafc2","name":"Generic Listener to Push Notifications from SMTP Inbox","style":{"label":true},"nodes":["7eb1a3d60fccbc76","cb1f141562c8fd2b","1cd709e001bf5e89","7f48460e08988c9e","24fc1882c8436738"],"x":54,"y":3599,"w":892,"h":142},{"id":"e1dc0b88.463bb8","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"546e31ed.0db1c","type":"mqtt-broker","name":"Mosquitto","broker":"10.0.1.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9f81fd881d01a666","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"4f8f8feffed26998","type":"sqlitedb","db":"/data/amazon.db","mode":"RWC"},{"id":"96b8babe5c0a6107","type":"deepstack-server","proto":"http","host":"codeproject","port":"32168","version":"v1","rejectUnauthorized":true},{"id":"2022689a.938918","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 1 Minute","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 1 minute\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":120,"wires":[[]]},{"id":"8ec438b6.4eb2e8","type":"api-current-state","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Notify On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.door_notify","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":360,"y":60,"wires":[["c5124616.c9bd48"],[]]},{"id":"28fa66cd.af058a","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 1m","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":120,"wires":[["2022689a.938918"]]},{"id":"9c1d9c7c.ed9c7","type":"change","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Reset If Closed","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":220,"wires":[["28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"]]},{"id":"896f5b34.7b4328","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":60,"wires":[[]]},{"id":"c5124616.c9bd48","type":"template","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Opened","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{ data.new_state.attributes.friendly_name }} opened","output":"str","x":740,"y":60,"wires":[["896f5b34.7b4328"]]},{"id":"f9d93af6.184028","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.*_door$","entityIdType":"regex","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":100,"wires":[["8ec438b6.4eb2e8","28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"],["9c1d9c7c.ed9c7"]]},{"id":"73550501.be7fbc","type":"trigger-state","z":"9584418c.dafc2","d":true,"g":"9df353d4c0fc9a54","name":"Rack Temperature","server":"e1dc0b88.463bb8","version":4,"inputs":1,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.rack_exhaust_temperature","entityIdType":"exact","debugEnabled":false,"constraints":[],"customOutputs":[],"outputInitially":false,"stateType":"num","enableInput":true,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":170,"y":560,"wires":[["7dff3ae1.e36a04"],[]]},{"id":"7dff3ae1.e36a04","type":"switch","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Above 90?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"95","vt":"num"},{"t":"lte","v":"90","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":560,"wires":[["29b17ed7.fab972"],["96b5207d.407dd"]]},{"id":"88822bfe.2cc598","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn on Fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":710,"y":500,"wires":[[]]},{"id":"96b5207d.407dd","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":580,"wires":[["c7ff978f.ff0728"],[]]},{"id":"b259f0eb.3e83","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn off fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":890,"y":540,"wires":[[]]},{"id":"e93027cb.6a6308","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Master Bedroom Lamps On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.master_bedroom_lamps","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":702,"wires":[["fc81cfda.29ff5"],[]]},{"id":"fc81cfda.29ff5","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 128","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"128\",\"transition\":5, \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1001,"y":700,"wires":[[]]},{"id":"c7ff978f.ff0728","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack fan auto off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.rack_fan_auto_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":730,"y":600,"wires":[["b259f0eb.3e83"],[]]},{"id":"29b17ed7.fab972","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":520,"wires":[[],["88822bfe.2cc598"]]},{"id":"3314ec9f.ca8994","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Garage Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"cover.garage_door","entityIdType":"regex","outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":160,"wires":[["8ec438b6.4eb2e8"],[]]},{"id":"8ee35d65.a7569","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":942,"wires":[["5420f9c0.5356c8"],[]]},{"id":"41b918d5.7ce018","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Table On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_table_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":1062,"wires":[["d8ad0651.bf7a18"],[]]},{"id":"5420f9c0.5356c8","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"40\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":842,"wires":[[]]},{"id":"77184c93.8790d4","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Sink On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_sink_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":882,"wires":[["5420f9c0.5356c8"],[]]},{"id":"39a5ce57.78e3d2","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":822,"wires":[["5420f9c0.5356c8"],[]]},{"id":"5c24f744.30fcb8","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 5m","op1":"","op2":"5","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":160,"wires":[["6aa388d0.707768","2022689a.938918"]]},{"id":"6aa388d0.707768","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Alexa Announce Opened","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"alexa_media","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"The\" & $lowercase(msg.data.new_state.attributes.friendly_name) & \"has been opened for\" & msg.payload & \" minutes.\",\"data\":{\"method\":\"all\",\"type\":\"announce\"},\"target\":[\"Office\",\"Kitchen\",\"Master\",\"Living Room\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":180,"wires":[[]]},{"id":"cf758271.d4fd6","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 10m","op1":"","op2":"10","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":200,"wires":[["6aa388d0.707768","2022689a.938918"]]},{"id":"5a740c2d.009864","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 15m","op1":"","op2":"15","op1type":"nul","op2type":"str","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":240,"wires":[["6aa388d0.707768","2022689a.938918"]]},{"id":"ea19fe14.80749","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Entryway On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.entryway_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":1002,"wires":[["5420f9c0.5356c8"],[]]},{"id":"ea2604f9.4cdf98","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Sconces On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":762,"wires":[["fc81cfda.29ff5"],[]]},{"id":"8a82f465.846018","type":"comment","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"100% = 255","info":"","x":970,"y":773,"wires":[]},{"id":"d8ad0651.bf7a18","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 80","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"80\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":922,"wires":[[]]},{"id":"86bc310cbc0562af","type":"inject","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"At 10:30PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 22 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":1200,"wires":[["2fb6a7afb6502a32","8c55985bffebd56a"]]},{"id":"2fb6a7afb6502a32","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":1220,"wires":[[]]},{"id":"3f2a2e4d99057b69","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Motion","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door_all_occupancy","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1380,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"3e399d83e4e7f4c3","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights to 254","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"254\",\"transition\":2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1360,"wires":[["1ef176bec8ed5da0","59f5bc2571b0f12f"]]},{"id":"59f5bc2571b0f12f","type":"delay","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":560,"y":1440,"wires":[["c68c969a6b8c2833"]]},{"id":"c68c969a6b8c2833","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":1440,"wires":[["254a48eabb9cf476"]]},{"id":"d9cc182cc3eb2a93","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * 3","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":742,"wires":[["1457bf6605a50448"]]},{"id":"b1a99d9698d831b2","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Open","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":1440,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"17b35d69307a8455","type":"within-time-switch","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"22:30","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseStart","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":400,"y":1380,"wires":[["3e399d83e4e7f4c3"],[]]},{"id":"d11c183fff8d848d","type":"change","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1440,"wires":[["59f5bc2571b0f12f"]]},{"id":"a9a323de66b6f772","type":"http request","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Get Aircraft","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://vrs:8080/VirtualRadar/AircraftList.json","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"x":610,"y":1660,"wires":[["7da69a7e8ecadc7c","91afebbf8b9edf05","4ca1a5ad47ce7a18","2cd08c8da06afaf6","43e5fa289c7550ff"]]},{"id":"ee139512bcad0966","type":"inject","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Every 20 Seconds","props":[],"repeat":"20","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1660,"wires":[["ea239028eda07991"]]},{"id":"7da69a7e8ecadc7c","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon","func":"var alert = {}\nvar message = \"Airborne:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1660,"wires":[["5684b08aacd6d225"]]},{"id":"26e32b1d7824356a","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_adsb","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":1660,"wires":[[]]},{"id":"3a82b835.c57d48","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1600,"wires":[["26e32b1d7824356a"]]},{"id":"91afebbf8b9edf05","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Interesting Tail #","func":"var alert = {}\nvar message = \"Interesting:\\n\"\n// N518GS George Strait\n// N628TS Elon\n// N898TS Taylor Swift\n// N621MM Taylor Swift\n// 82-8000 AF1\n// 92-9000 AF1\n// N5DA Don Adams Prop\n// N4DA Don Adams Lear\n// N68885 Zuckerberg\n// N681JK JB\n// N635PA\n// N628PA\n// N636PA\nvar interesting = [\"N68885\", \"N518GS\", \"N628TS\", \"82-8000\", \"92-9000\", \"N621MM\", \"N898TS\", \"N681JK\", \"N635PA\", \"N628PA\", \"N636PA\"]\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (interesting.includes(msg.payload.acList[i].Reg)) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":1600,"wires":[["3a82b835.c57d48"]]},{"id":"5684b08aacd6d225","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1660,"wires":[["26e32b1d7824356a"]]},{"id":"4ca1a5ad47ce7a18","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon Landing","func":"var alert = {}\nvar message = \"Landing:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1720,"wires":[["ba68e03143ba4af8"]]},{"id":"ba68e03143ba4af8","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1720,"wires":[["26e32b1d7824356a"]]},{"id":"5f1d1b471a1c7cbb","type":"sqlite","z":"9584418c.dafc2","g":"35da177d9e2fd258","mydb":"4f8f8feffed26998","sqlquery":"msg.topic","sql":"","name":"Amazon","x":1000,"y":1780,"wires":[["ea911291f04c7d18"]]},{"id":"2cd08c8da06afaf6","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Write Amazon Landing","func":"var sql = \"\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n var latlong = \"0,0\"\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Lat !== \"undefined\" && typeof msg.payload.acList[i].Long !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n latlong = msg.payload.acList[i].Lat + \",\" + msg.payload.acList[i].Long.toString()\n sql += `INSERT INTO deliveries (timestamp, registration, latlong, altitude) VALUES (\"${Date.now()}\", \"${msg.payload.acList[i].Reg}\", \"${latlong}\", \"${msg.payload.acList[i].Alt}\"); `\n }\n }\n }\n}\n\nif (sql.length > 0){\n msg.topic = sql\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1780,"wires":[["5f1d1b471a1c7cbb"]]},{"id":"ea911291f04c7d18","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Generate Heatmap","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"shell_command","service":"generate_heatmap","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1780,"wires":[[]]},{"id":"cde7b3c9ca39891b","type":"link in","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["1457bf6605a50448"],"x":325,"y":722,"wires":[["e93027cb.6a6308","ea2604f9.4cdf98","39a5ce57.78e3d2","77184c93.8790d4","8ee35d65.a7569","ea19fe14.80749","41b918d5.7ce018"]]},{"id":"1457bf6605a50448","type":"link out","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["cde7b3c9ca39891b"],"x":295,"y":722,"wires":[]},{"id":"8c55985bffebd56a","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Sconces Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_sconces"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1160,"wires":[[]]},{"id":"fae7fa701710e258","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Unlock","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"lock.front_door","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"unlocked","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1320,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"ebe84a6f70b4bc2f","type":"inject","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Every 30 Minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["830c3ddd08ef396c"]]},{"id":"cf1c689e51b98aec","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Thermostat Idle","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"Idle","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.thermostat_state","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":440,"y":340,"wires":[["6af7abba85612dd9"],[]]},{"id":"6af7abba85612dd9","type":"function","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Idle > 2 hours","func":"// If last changed > 3 hours\nif (parseInt(msg.payload.timeSinceChangedMs) > 3600000*2) {\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":400,"wires":[["8b6280c5c448720c"]]},{"id":"8b6280c5c448720c","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Low","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"low\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":340,"wires":[["9ce46ce21d8cc964"]]},{"id":"9ce46ce21d8cc964","type":"delay","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":900,"y":400,"wires":[["2b6721107586ceae"]]},{"id":"2b6721107586ceae","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Auto","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"auto\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"830c3ddd08ef396c","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Attic > 100","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"attic","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":400,"wires":[["cf1c689e51b98aec"],[]]},{"id":"43e5fa289c7550ff","type":"function","z":"9584418c.dafc2","d":true,"g":"35da177d9e2fd258","name":"Speedy","func":"var alert = {}\nvar message = \"Speedy:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (typeof msg.payload.acList[i].Spd == \"number\") {\n if (msg.payload.acList[i].Spd > 600) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1540,"wires":[["97761f13f8e5c31b"]]},{"id":"97761f13f8e5c31b","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1540,"wires":[["26e32b1d7824356a"]]},{"id":"ed80a3f.522526","type":"server-state-changed","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Vehicle Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.street_car_count","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":2200,"wires":[["bcaf3569e7816922","7347dd9c5cdf8a37"],[]]},{"id":"f3a3e80f.3e8e38","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n event_id: msg.event_id,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":2200,"wires":[["e263410e9a3af7d8"]]},{"id":"6469ec7efdb06d81","type":"api-call-service","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.detection_result,\t \"data\": { \"attachments\": [\"/config/images/logo.jpg\"]}\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1440,"y":2320,"wires":[[]]},{"id":"6f08d11c854dfb00","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":760,"y":2260,"wires":[["b2a5543693ac851e"]]},{"id":"9b7c5535c74a94a3","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Output msg","func":"var oldmsg = msg;\n\nmsg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n event_id: msg.event_id\n};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":2260,"wires":[["6f08d11c854dfb00"]]},{"id":"d8a16fd91366d112","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":450,"y":2260,"wires":[["9b7c5535c74a94a3"]]},{"id":"bcaf3569e7816922","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Events","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events?cameras=driveway&labels=car&has_snapshot=1&zones=street&in_progress=1&limit=1","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":350,"y":2200,"wires":[["d58f6ef71c326040","7347dd9c5cdf8a37"]]},{"id":"d58f6ef71c326040","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Extract Event ID","func":"if (JSON.parse(msg.payload).length > 0) {\n msg = {\n event_id: JSON.parse(msg.payload)[0].id,\n };\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":2200,"wires":[["7347dd9c5cdf8a37","c13f0f20a56d6af5"]]},{"id":"7347dd9c5cdf8a37","type":"debug","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"Event Debug","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":2140,"wires":[]},{"id":"bd19a17005513c2f","type":"inject","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Every 15 Minutes","props":[],"repeat":"900","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1940,"wires":[["24d1a94e275e5e44","ab66afa5b576de3f","7a8e43b6f7c84bac","58d0c98797e19829","ccf5998fdf8ee50d"]]},{"id":"24d1a94e275e5e44","type":"http request","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Set Doorbell Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.34/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":410,"y":2000,"wires":[[]]},{"id":"935c3eb83c353f53","type":"function","z":"9584418c.dafc2","d":true,"g":"9cfe6331fbc680d5","name":"Rate Limiter","func":"// 1s\nvar interval = (1000*1); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":2260,"wires":[["6469ec7efdb06d81"]]},{"id":"42be35f83b764861","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Add SubLabel","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/{{{event_id}}}/sub_label","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1180,"y":2260,"wires":[["935c3eb83c353f53","6469ec7efdb06d81"]]},{"id":"b2a5543693ac851e","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":2260,"wires":[["42be35f83b764861"]]},{"id":"c13f0f20a56d6af5","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=driveway&h=1000","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":730,"y":2200,"wires":[["f3a3e80f.3e8e38"]]},{"id":"7151828122e3b80c","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"60","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2260,"wires":[["5acbb2cbdbdea368","df028b4014ad3c15","bace446bfa7b343d"]]},{"id":"ea239028eda07991","type":"within-time-switch","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":410,"y":1660,"wires":[["a9a323de66b6f772"],[]]},{"id":"58d0c98797e19829","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 1 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1880,"wires":[[]]},{"id":"7a8e43b6f7c84bac","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 2 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.33/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1920,"wires":[[]]},{"id":"ab66afa5b576de3f","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 3 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.35/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1960,"wires":[[]]},{"id":"ccf5998fdf8ee50d","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set PTZ Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.36/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":400,"y":2040,"wires":[[]]},{"id":"1ef176bec8ed5da0","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1340,"wires":[[]]},{"id":"254a48eabb9cf476","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1440,"wires":[[]]},{"id":"4e2d750742dc8890","type":"server-state-changed","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Drone Motion Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.drone_detect_motion","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":2480,"wires":[["9799e777bb06f63f"],[]]},{"id":"cdc9c2c982e3fe5f","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2480,"wires":[["b4392caec775b305"]]},{"id":"300267d7c89b0955","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Deepstack Output","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":2620,"wires":[]},{"id":"1ae58f8afe36e04c","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:5000/api/bullet/latest.jpg?quality=100","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":670,"y":2480,"wires":[["cdc9c2c982e3fe5f"]]},{"id":"5c59c5c412e759ce","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"40","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2540,"wires":[["300267d7c89b0955","aa523c5cbfe26949","2f18405339079200"]]},{"id":"aa523c5cbfe26949","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2680,"wires":[[]]},{"id":"b4392caec775b305","type":"jimp-image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"380","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"170","parameter3Type":"num","parameter4":"170","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1050,"y":2480,"wires":[["5c59c5c412e759ce","081d788e92e34986"]]},{"id":"81d6e9a99eb61c67","type":"switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":2540,"wires":[["8bec0433aa6e51fa"]]},{"id":"8bec0433aa6e51fa","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Output msg","func":"var oldmsg = msg;\n\nmsg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2540,"wires":[["1aa9e39b6be88864","b4d7bb6e129bacea"]]},{"id":"1aa9e39b6be88864","type":"file","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1060,"y":2540,"wires":[["ec51454057c055e2"]]},{"id":"ec51454057c055e2","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":2540,"wires":[["6d56b297fcfe0016"]]},{"id":"765c7c5a61100728","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/drone_detect/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2600,"wires":[[]]},{"id":"1bda1e8b7f76e5f3","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/back_porch/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2640,"wires":[[]]},{"id":"14855ff357d5fbad","type":"mqtt out","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","topic":"frigate/events","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"546e31ed.0db1c","x":1360,"y":2680,"wires":[]},{"id":"a95b4fa60f1238d7","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Build MQTT","func":"msg.payload = {'type':'update', 'after':{'label':'PrimeAir'}}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1190,"y":2680,"wires":[["14855ff357d5fbad"]]},{"id":"081d788e92e34986","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1000,"y":2680,"wires":[[]]},{"id":"9799e777bb06f63f","type":"within-time-switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:30:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"15:30:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":430,"y":2480,"wires":[["1ae58f8afe36e04c"],[]]},{"id":"6d56b297fcfe0016","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Rate Limiter","func":"var interval = (1000*30); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":2600,"wires":[["a95b4fa60f1238d7","1bda1e8b7f76e5f3","765c7c5a61100728","b442c20392c7ce60"]]},{"id":"2f18405339079200","type":"while-loop","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Loop \"payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"10","time":"loops","timeType":"msg","x":460,"y":2540,"wires":[["81d6e9a99eb61c67"],["1ae58f8afe36e04c"]]},{"id":"a42b21223ce98e3e","type":"inject","z":"9584418c.dafc2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":480,"y":2420,"wires":[["1ae58f8afe36e04c"]]},{"id":"bace446bfa7b343d","type":"while-loop","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Loop \"msg.payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"5","time":"loops","timeType":"msg","x":240,"y":2340,"wires":[["d8a16fd91366d112"],["c13f0f20a56d6af5"]]},{"id":"b4d7bb6e129bacea","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write Match Image","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":740,"y":2600,"wires":[]},{"id":"b442c20392c7ce60","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Call Frigate API","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":750,"y":2680,"wires":[]},{"id":"5acbb2cbdbdea368","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2380,"wires":[[]]},{"id":"c061be05c01527e0","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1060,"y":2380,"wires":[[]]},{"id":"ec6b4698123ebc34","type":"inject","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Manually Create Event","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1280,"y":2480,"wires":[["6d56b297fcfe0016"]]},{"id":"e263410e9a3af7d8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"650","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"625","parameter3Type":"num","parameter4":"130","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1110,"y":2200,"wires":[["7151828122e3b80c","c061be05c01527e0"]]},{"id":"5123f652827fa902","type":"inject","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"*/1 8-23 * * *","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":2860,"wires":[["970920516fa379e8","88d3b091fc333998"]]},{"id":"970920516fa379e8","type":"http request","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"PHX","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=7160","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2860,"wires":[["51f2291060d07336"]]},{"id":"51f2291060d07336","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/07","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-07')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"PHX: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2860,"wires":[["7415468104c18108","a61d605915dc23ff"]]},{"id":"91d3d26774f9468e","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"HOU","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2820,"wires":[]},{"id":"7415468104c18108","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"PHX","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2900,"wires":[]},{"id":"b8a4a1ee4e15f778","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2860,"wires":[[]]},{"id":"79c00f8c61888f52","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2780,"wires":[["c44a5c4d6d17ee9f"]]},{"id":"a61d605915dc23ff","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2860,"wires":[["fa9f2ef8fecf1de2"]]},{"id":"c44a5c4d6d17ee9f","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2780,"wires":[["d5ab0aa6d198ba81"]]},{"id":"fa9f2ef8fecf1de2","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2860,"wires":[["b8a4a1ee4e15f778"]]},{"id":"7d01abce7bc68291","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"All","func":"var oldmsg = msg;\nvar slots = msg.payload.availableSlots\n\n// for (var i = 0; i < msg.payload.availableSlots.length; i++) {\n// if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-07')){\n// console.log(msg.payload.availableSlots[i].startTimestamp)\n// match = true\n// }\n// }\n\nmsg = {\n payload: slots,\n 'location': \"DAL\"\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2940,"wires":[["1480d9470754a6a3","b7c50947c4507d03"]]},{"id":"b7c50947c4507d03","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2940,"wires":[["ca8d58af48d7b7c5"]]},{"id":"1480d9470754a6a3","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2980,"wires":[]},{"id":"ca8d58af48d7b7c5","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2940,"wires":[["414a38bf0735b27c"]]},{"id":"414a38bf0735b27c","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Dallas https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2940,"wires":[[]]},{"id":"c0546e86d17e99e9","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/03","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-03')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"HOU: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2780,"wires":[["91d3d26774f9468e","79c00f8c61888f52"]]},{"id":"d5ab0aa6d198ba81","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2780,"wires":[[]]},{"id":"83e2179938d08d58","type":"api-call-service","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Timelapse Snapshots","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":[],"entityId":["camera.back_porch","camera.bullet","camera.driveway","camera.front_door"],"data":"{\"filename\":\"/config/media/images/{{ entity_id.entity_id }}/{{ now().strftime('%Y%m%d-%H%M%S') }}.jpg\"}","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":540,"y":3180,"wires":[[]]},{"id":"59e4459459f077c9","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End","nameInt":"⏲ golden hour dawn end = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3100,"wires":[["83e2179938d08d58"]]},{"id":"089b07fa48286f29","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start","nameInt":"⏲ golden hour dusk start = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3280,"wires":[["83e2179938d08d58"]]},{"id":"7ff9bf1a917cbf50","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start - 3h","nameInt":"⏲ golden hour dusk start↶ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":"-3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3220,"wires":[["83e2179938d08d58"]]},{"id":"a826a8c498d6d1e3","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End + 3h","nameInt":"⏲ golden hour dawn end↷ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":"3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3160,"wires":[["83e2179938d08d58"]]},{"id":"c5c85c0aa2d8c8ca","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Safe Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.large_safe","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":80,"wires":[["c5124616.c9bd48"],[]]},{"id":"fa90c550.d6c948","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 8 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 20 * * 1,2,4,5,6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":700,"wires":[["1457bf6605a50448"]]},{"id":"08b26d8311cd9187","type":"inject","z":"9584418c.dafc2","d":true,"g":"6f393a92ae952332","name":"Every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":3460,"wires":[["716e8fabff85ffb9","7b988b93a658f526","d85faf19968afde1"]]},{"id":"716e8fabff85ffb9","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Attic Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":3400,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7b988b93a658f526","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Thermostat Outdoor Temperature <= 35","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"35","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.thermostat_outdoor_ambient_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":480,"y":3460,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7fe1e564efbd46af","type":"api-call-service","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Turn on Faucet Drip","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.bhyve_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":3460,"wires":[[]]},{"id":"16e1a3e2f53e6bdf","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Faucet Drip Off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.bhyve_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":780,"y":3460,"wires":[["7fe1e564efbd46af"],[]]},{"id":"d85faf19968afde1","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Compost External Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.compost_external_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":3520,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"504a90c2bb116cda","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":1920,"wires":[["f7c82af0e299c914"]]},{"id":"f7c82af0e299c914","type":"http request","z":"9584418c.dafc2","name":"Enable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":1920,"wires":[[]]},{"id":"aa9d132ce4c33794","type":"http request","z":"9584418c.dafc2","name":"Set Overlay Text","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text={{{payload}}}°F","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":1140,"y":1980,"wires":[[]]},{"id":"8f9a073f4ebb3133","type":"inject","z":"9584418c.dafc2","name":"On Demand */5","props":[],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":700,"y":1980,"wires":[["446f812e8b1f4307"]]},{"id":"acd933c5c0eddc8b","type":"http request","z":"9584418c.dafc2","name":"Disable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=false","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":2040,"wires":[[]]},{"id":"6d26bb1db9ea5e67","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":2040,"wires":[["acd933c5c0eddc8b"]]},{"id":"446f812e8b1f4307","type":"api-current-state","z":"9584418c.dafc2","name":"Outdoor Temperature","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.433_weather_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":920,"y":1980,"wires":[["aa9d132ce4c33794"]]},{"id":"df028b4014ad3c15","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"debug 2","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":2360,"wires":[]},{"id":"7eb1a3d60fccbc76","type":"Mailin SMTP","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Recieve Mail","port":25,"x":150,"y":3660,"wires":[["1cd709e001bf5e89"]]},{"id":"cb1f141562c8fd2b","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 1","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3640,"wires":[[]]},{"id":"88d3b091fc333998","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=5300","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2940,"wires":[["7d01abce7bc68291"]]},{"id":"1cd709e001bf5e89","type":"within-time-switch","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"09:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"22:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":370,"y":3660,"wires":[["24fc1882c8436738"],["7f48460e08988c9e"]]},{"id":"7f48460e08988c9e","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 0","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 0} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3700,"wires":[[]]},{"id":"24fc1882c8436738","type":"api-current-state","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Andrew Home?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.andrew","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":580,"y":3640,"wires":[["cb1f141562c8fd2b"],["7f48460e08988c9e"]]},{"id":"d9e9a93275328762","type":"inject","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":780,"y":2140,"wires":[["c13f0f20a56d6af5"]]},{"id":"d269f175.c9dc6","type":"server-events","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Custom Water Event Fired","server":"e1dc0b88.463bb8","version":3,"exposeAsEntityConfig":"","eventType":"irrigation_custom_water","eventData":"","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":190,"y":340,"wires":[["883f2c00.1d94e8"]]},{"id":"3367e45f.cc981c","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":400,"wires":[["116d5bb3.ee92a4"]]},{"id":"116d5bb3.ee92a4","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":340,"wires":[["565ee5c1.561bfc","80df47d5.602888","e2c37b65c5582c2b"]]},{"id":"80df47d5.602888","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"fb46876c.845298","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1320,"y":400,"wires":[["98eeafa7.bd2b9","860a4c61d7557dc9"]]},{"id":"98eeafa7.bd2b9","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":980,"y":480,"wires":[["3367e45f.cc981c"]]},{"id":"565ee5c1.561bfc","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":400,"wires":[["22a20603.86a06a"]]},{"id":"22a20603.86a06a","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"x":1090,"y":400,"wires":[["fb46876c.845298"],[],["a8d96e.1f00969"]]},{"id":"a8d96e.1f00969","type":"mqtt out","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1350,"y":340,"wires":[]},{"id":"3b656b89.1ac154","type":"inject","z":"f602e6ba.609d28","g":"79694877249c9902","name":"3:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 03 * * 2,5","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":1280,"wires":[["493b435f.c9851c"]]},{"id":"493b435f.c9851c","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":1280,"wires":[["8c060f00.cf577"],["7b12e66f.57d068"]]},{"id":"7b12e66f.57d068","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1300,"wires":[[]]},{"id":"8c060f00.cf577","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","576b66fa1bd202a3"],"x":595,"y":1260,"wires":[]},{"id":"4422f61c.847d88","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["3ff9ce03ef7b554b"],"x":135,"y":1480,"wires":[["219b37105a8304f1"]]},{"id":"dcdeabc7.780578","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["1eaa857e.b6b8db","c90fd5e6.c5c678","b8fe96458628f202"],"x":595,"y":1460,"wires":[]},{"id":"722d03d6.2ff77c","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8d4bfe8e.ee805","d67106b42368e630"],"x":135,"y":1900,"wires":[["b3c4a3638c17629e"]]},{"id":"af4788fe.215ba8","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["405789f7.0727a8","eb1a5268c1aec843","9896327569c234da"],"x":595,"y":1900,"wires":[]},{"id":"c90fd5e6.c5c678","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["dcdeabc7.780578","89d715ddf12d2195"],"x":135,"y":1600,"wires":[["e7430e17f0b24ed8"]]},{"id":"862ad27a.d347d","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["83edf648.3f9ed8"],"x":595,"y":1580,"wires":[]},{"id":"808e6a81.92e2e8","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":400,"wires":[["e42ff3d9.593dc"]]},{"id":"883f2c00.1d94e8","type":"api-current-state","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"24v Power","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_24v_power","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":400,"wires":[["808e6a81.92e2e8"],[]]},{"id":"e42ff3d9.593dc","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":480,"y":340,"wires":[["76160bc4.8cd644"]]},{"id":"76160bc4.8cd644","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"","rules":[{"t":"set","p":"zones","pt":"msg","to":"payload.event.zones","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":340,"wires":[["116d5bb3.ee92a4"]]},{"id":"83edf648.3f9ed8","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["862ad27a.d347d","1bb3825011174363"],"x":135,"y":1700,"wires":[["b6e7d5b8891bba6d"]]},{"id":"8d4bfe8e.ee805","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["722d03d6.2ff77c"],"x":595,"y":1720,"wires":[]},{"id":"583f46a3.fc4c38","type":"inject","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"5:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * 1,3,5","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":2620,"wires":[["d9147878.b61cf8"]]},{"id":"d9147878.b61cf8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.front_bed_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":2620,"wires":[["c7e5552e.7f8a08"],["45c5dbbbd8ce50a1"]]},{"id":"c7e5552e.7f8a08","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","f6881b4bf93c27c5"],"x":595,"y":2600,"wires":[]},{"id":"6bcf06fb.9ca748","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4f2902edc77f2d3b"],"x":135,"y":2820,"wires":[["ed6e3d4225582e20"]]},{"id":"f587589f.d739e8","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["1eaa857e.b6b8db","9d851699.6a8458"],"x":595,"y":2800,"wires":[]},{"id":"d9d17e8f.590e6","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4fae5b92.a9cd44"],"x":135,"y":3040,"wires":[["d8637d8d96b68fca"]]},{"id":"d9f893eb.834f3","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["5ce1803b.06628"],"x":595,"y":3040,"wires":[]},{"id":"9d851699.6a8458","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f587589f.d739e8"],"x":135,"y":2940,"wires":[["593bee0e8c958df8"]]},{"id":"4fae5b92.a9cd44","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["d9d17e8f.590e6"],"x":595,"y":2920,"wires":[]},{"id":"a2ab7368.923fb","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Zone Settings Front Beds","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"zone\": \"switch.irrigation_front_beds\",\n \"time\": 20,\n \"name\": \"Front beds\"\n}","output":"json","x":250,"y":3200,"wires":[["62b5545bc6d6e627"]]},{"id":"a31e3daf.17207","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":3200,"wires":[["21ced698.708b5a"]]},{"id":"21ced698.708b5a","type":"delay","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":3200,"wires":[["c661d489.9c9bc8"]]},{"id":"c661d489.9c9bc8","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":3200,"wires":[["accc6697.196268"]]},{"id":"accc6697.196268","type":"change","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.zones.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":3200,"wires":[["487ff788.8c5c98"]]},{"id":"487ff788.8c5c98","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"55a2162532da4e14","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":850,"y":3260,"wires":[["2238b09b.1b5b5","9129b06e.d8925"],[],["84258ddd.41da4"]]},{"id":"2238b09b.1b5b5","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":3340,"wires":[[]]},{"id":"84258ddd.41da4","type":"mqtt out","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1130,"y":3320,"wires":[]},{"id":"9129b06e.d8925","type":"function","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.zones.name + \" ran for \" + msg.zones.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":3260,"wires":[["d83b5ff7a2212931"]]},{"id":"5ce1803b.06628","type":"link in","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"","links":["db46e0c1.f9ab5","d9f893eb.834f3"],"x":95,"y":3200,"wires":[["a2ab7368.923fb"]]},{"id":"815fddc0.6604c","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":1900,"wires":[["af4788fe.215ba8"]]},{"id":"418058c4.af3158","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":3040,"wires":[["d9f893eb.834f3"]]},{"id":"1ae21386.a831bc","type":"inject","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"06:00 24v Off","props":[],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","x":180,"y":1140,"wires":[["117145a7.67e99a","882aff35f788008b"]]},{"id":"117145a7.67e99a","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1100,"wires":[[]]},{"id":"06d6255efdc31c47","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1380,"wires":[["2fc67b25514de5a5"],["3ff9ce03ef7b554b"]]},{"id":"5420d0eed32223fb","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","08e3098cf183e086"],"x":595,"y":1360,"wires":[]},{"id":"3ff9ce03ef7b554b","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","4422f61c.847d88","8524a273a6a8ffd0"],"x":595,"y":1400,"wires":[]},{"id":"576b66fa1bd202a3","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8c060f00.cf577"],"x":135,"y":1380,"wires":[["06d6255efdc31c47"]]},{"id":"7350c911a0b1a86d","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":2720,"wires":[["abb8777dd08aa743"],["4f2902edc77f2d3b"]]},{"id":"fdcfa1521191fa40","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","b403eec7866aea22"],"x":595,"y":2700,"wires":[]},{"id":"4f2902edc77f2d3b","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","6bcf06fb.9ca748"],"x":595,"y":2740,"wires":[]},{"id":"f6881b4bf93c27c5","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["c7e5552e.7f8a08"],"x":135,"y":2720,"wires":[["7350c911a0b1a86d"]]},{"id":"882aff35f788008b","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off Force Run","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_force_run"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1160,"wires":[[]]},{"id":"a3d75225807b70eb","type":"delay","z":"f602e6ba.609d28","g":"79694877249c9902","name":"30 Minute Delay","pauseType":"delay","timeout":"30","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":280,"y":1760,"wires":[["339ee0ada21856e0"]]},{"id":"e2c37b65c5582c2b","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":300,"wires":[[]]},{"id":"860a4c61d7557dc9","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":460,"wires":[[]]},{"id":"62b5545bc6d6e627","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Template: Zone Last Ran >= 23 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ zones.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 23*3600 %}1{% else %}0{% endif %}","output":"str","x":310,"y":3260,"wires":[["aa53225140781dd7"]]},{"id":"aa53225140781dd7","type":"api-render-template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":250,"y":3320,"wires":[["8113d83074ff7701"]]},{"id":"8113d83074ff7701","type":"switch","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":3320,"wires":[["a31e3daf.17207"],["f78cdb84200eb171"]]},{"id":"d83b5ff7a2212931","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":3260,"wires":[[]]},{"id":"dd9855ca4017c8c0","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":580,"wires":[[]]},{"id":"c3a696a117416327","type":"function","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.25) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":680,"wires":[["47f1a8018e58e032"],["dd9855ca4017c8c0"]]},{"id":"27f2580e35031830","type":"api-get-history","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Rainfall 120h","server":"e1dc0b88.463bb8","version":1,"startDate":"","endDate":"","entityId":"sensor.netatmo_home_rain_sum_rain_today_inches","entityIdType":"equals","useRelativeTime":true,"relativeTime":"120h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":310,"y":680,"wires":[["c3a696a117416327"]]},{"id":"9cb8187c669c6485","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rainfall","info":"","x":150,"y":600,"wires":[]},{"id":"47f1a8018e58e032","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":660,"wires":[[]]},{"id":"427f7fa58d86cc59","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":640,"wires":[["27f2580e35031830","93965a61d2c4f5de"]]},{"id":"1d9a4d0bb4645f32","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":840,"wires":[[]]},{"id":"d9ebbaa37f5911a9","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Forecast","info":"","x":170,"y":760,"wires":[]},{"id":"eeecfc1e8864e39f","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":760,"wires":[[]]},{"id":"89487a4efedec1db","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":800,"wires":[["2c45af5b3ee5cf0a"]]},{"id":"1e4b3bc7c25b294f","type":"function","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n \nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) >= 60) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":800,"wires":[["eeecfc1e8864e39f"],["1d9a4d0bb4645f32"]]},{"id":"2c45af5b3ee5cf0a","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":300,"y":800,"wires":[["1e4b3bc7c25b294f"]]},{"id":"d7e50e7a2810667d","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":1000,"wires":[[]]},{"id":"28936ec687ee4eb0","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind","info":"","x":150,"y":920,"wires":[]},{"id":"974833b6a2eca853","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":920,"wires":[[]]},{"id":"478a5a84d38ba181","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":960,"wires":[["c01fd0612615e927"]]},{"id":"c01fd0612615e927","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.neighbor_5in1_wind","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":330,"y":960,"wires":[["974833b6a2eca853"],["d7e50e7a2810667d"]]},{"id":"219b37105a8304f1","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":1480,"wires":[["dcdeabc7.780578"],["d01fbafafbb34692"]]},{"id":"e7430e17f0b24ed8","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":1600,"wires":[["862ad27a.d347d"],["f5684be88477322f"]]},{"id":"b6e7d5b8891bba6d","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1700,"wires":[["8d4bfe8e.ee805"],["a3d75225807b70eb"]]},{"id":"339ee0ada21856e0","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1820,"wires":[["8d4bfe8e.ee805"],["336585d4eee0ca73"]]},{"id":"ed6e3d4225582e20","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":2820,"wires":[["f587589f.d739e8"],["f7ac7a90f3da2298"]]},{"id":"593bee0e8c958df8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":2940,"wires":[["4fae5b92.a9cd44"],["67916c3a5554a794"]]},{"id":"d01fbafafbb34692","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1500,"wires":[[]]},{"id":"f5684be88477322f","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1620,"wires":[[]]},{"id":"336585d4eee0ca73","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Wind\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1820,"wires":[[]]},{"id":"b3c4a3638c17629e","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":1900,"wires":[["815fddc0.6604c"]]},{"id":"67916c3a5554a794","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2960,"wires":[[]]},{"id":"f7ac7a90f3da2298","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2840,"wires":[[]]},{"id":"45c5dbbbd8ce50a1","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2640,"wires":[[]]},{"id":"2fc67b25514de5a5","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":1360,"wires":[["5420d0eed32223fb"]]},{"id":"08e3098cf183e086","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["5420d0eed32223fb"],"x":325,"y":1960,"wires":[["815fddc0.6604c"]]},{"id":"abb8777dd08aa743","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":2700,"wires":[["fdcfa1521191fa40"]]},{"id":"d8637d8d96b68fca","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":3040,"wires":[["418058c4.af3158"]]},{"id":"b403eec7866aea22","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["fdcfa1521191fa40"],"x":325,"y":3100,"wires":[["418058c4.af3158"]]},{"id":"f2c9c3a5b8b11a64","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Continue?","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":1230,"y":2060,"wires":[["287dd3b1af5dc2d0"],["bf015af2161c5ec2"]]},{"id":"38affe5cc680d076","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Template: Zone Last Ran >= 71 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ payload.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 71*3600 %}1{% else %}0{% endif %}","output":"str","x":790,"y":2060,"wires":[["174186fb5d054240"]]},{"id":"9896327569c234da","type":"link in","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"","links":["af4788fe.215ba8"],"x":95,"y":2060,"wires":[["e95ac52f03478921"]]},{"id":"e95ac52f03478921","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Lawn Zones","field":"all_zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":290,"y":2060,"wires":[["287dd3b1af5dc2d0"]]},{"id":"174186fb5d054240","type":"api-render-template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":1050,"y":2060,"wires":[["f2c9c3a5b8b11a64"]]},{"id":"287dd3b1af5dc2d0","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"all_zones","arrayType":"msg","x":220,"y":2120,"wires":[["74cd40702021e86d","acdcc72fea065aac"],["224d30a98f52c287"]]},{"id":"74cd40702021e86d","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Zone Settings Lawn","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 15,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 15,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 15,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 15,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 15,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 15,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":460,"y":2180,"wires":[["151eb6ba5b2d39cd"]]},{"id":"bf015af2161c5ec2","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Append Run Zones","func":"if (typeof msg.run_zones === 'undefined'){\n msg.run_zones = []\n}\n\n// Add zone to run_zones\nmsg.run_zones.push(msg.payload.zone)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":210,"y":2180,"wires":[["287dd3b1af5dc2d0"]]},{"id":"151eb6ba5b2d39cd","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"zones","arrayType":"msg","x":720,"y":2180,"wires":[[],["45ee74d06e9cac2c"]]},{"id":"45ee74d06e9cac2c","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"If Zone in Run Zone","property":"run_zones","propertyType":"msg","rules":[{"t":"cont","v":"payload.zone","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":710,"y":2240,"wires":[["8d3c8370996be2da"],["151eb6ba5b2d39cd"]]},{"id":"95a54981805b22f2","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2320,"wires":[["02d1e639f7ac6596","7b985932412db47d"]]},{"id":"a4b3eba196a504dc","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":2500,"wires":[["6ea0448df1383ec2"]]},{"id":"02d1e639f7ac6596","type":"change","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2380,"wires":[["863b8fa63f210ebe"]]},{"id":"8d3c8370996be2da","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":2320,"wires":[["b1c9631973c2f4b1"]]},{"id":"863b8fa63f210ebe","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":510,"y":2440,"wires":[["a4b3eba196a504dc","de509d99b9d965b3"],[],["7d8374976c01e3dc"]]},{"id":"7d8374976c01e3dc","type":"mqtt out","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":790,"y":2460,"wires":[]},{"id":"b0debe46542c4c67","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":2420,"wires":[[]]},{"id":"de509d99b9d965b3","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.payload.name + \" ran for \" + msg.payload.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2420,"wires":[["b0debe46542c4c67"]]},{"id":"b1c9631973c2f4b1","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":2320,"wires":[["95a54981805b22f2"]]},{"id":"6ea0448df1383ec2","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Delay 10","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":320,"y":2440,"wires":[["151eb6ba5b2d39cd"]]},{"id":"224d30a98f52c287","type":"api-current-state","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":2060,"wires":[["bf015af2161c5ec2"],["38affe5cc680d076"]]},{"id":"5a27d31bfb4a6990","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Actually Handle Watering","info":"","x":1150,"y":2340,"wires":[]},{"id":"197853479ad9eeda","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Decide Which Zones to Run","info":"","x":1020,"y":2160,"wires":[]},{"id":"7b985932412db47d","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Zone On","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":2280,"wires":[]},{"id":"acdcc72fea065aac","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Run Zones","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":2260,"wires":[]},{"id":"f78cdb84200eb171","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Recently Ran\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":3380,"wires":[[]]},{"id":"93965a61d2c4f5de","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"< 1\" in 5 Days","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"0.5","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.neighbor_5in1_rain_last_5_days","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":420,"y":620,"wires":[["dd9855ca4017c8c0"],["47f1a8018e58e032"]]},{"id":"54bad548.7e9fcc","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power,switch.irrigation_drip","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":390,"y":100,"wires":[["bcbf413e.7b188"]]},{"id":"5a10cd93.8e94b4","type":"inject","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":100,"wires":[["54bad548.7e9fcc"]]},{"id":"a77808ff.3f1288","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"On Longer than 26 minutes?","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gte","v":"1600000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":720,"y":60,"wires":[["54ae6ec3.1bc63"]]},{"id":"54ae6ec3.1bc63","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload[0].entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":60,"wires":[[]]},{"id":"bcbf413e.7b188","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":160,"wires":[["a77808ff.3f1288","3b848bce.76aea4"],["656ad2cd6fb99f57"]]},{"id":"3b848bce.76aea4","type":"change","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Reset Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":100,"wires":[["cdd3b7ef.04a618"]]},{"id":"43dedcca.ac7734","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Master","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1480,"y":180,"wires":[[]]},{"id":"c42e6d62.7a24c","type":"api-current-state","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Master On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_master_valve","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":750,"y":200,"wires":[["cdd3b7ef.04a618"],["3b848bce.76aea4"]]},{"id":"cdd3b7ef.04a618","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":880,"y":120,"wires":[["5e9007a27732bba9"]]},{"id":"63f07877e73b952a","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1100,"y":180,"wires":[[],["749afd72791a5127"]]},{"id":"5e9007a27732bba9","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":1070,"y":120,"wires":[["63f07877e73b952a"]]},{"id":"061b74f643477dd9","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1380,"y":120,"wires":[["43dedcca.ac7734"],[]]},{"id":"749afd72791a5127","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1260,"y":60,"wires":[["061b74f643477dd9"]]},{"id":"656ad2cd6fb99f57","type":"function","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"clear msg","func":"msg = {}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":200,"wires":[["c42e6d62.7a24c"]]}] \ No newline at end of file diff --git a/extras/docker-compose/other/docker-compose.yml b/extras/docker-compose/other/docker-compose.yml index 2335ef11..3592365c 100644 --- a/extras/docker-compose/other/docker-compose.yml +++ b/extras/docker-compose/other/docker-compose.yml @@ -550,7 +550,7 @@ services: restart: always image: ghcr.io/blakeblackshear/frigate:stable #image: ghcr.io/blakeblackshear/frigate:0.13.0-beta7 - shm_size: "128mb" + shm_size: "256mb" devices: - /dev/bus/usb:/dev/bus/usb - /dev/dri/renderD128 @@ -587,6 +587,13 @@ services: - traefik.http.routers.frigate_local.tls.domains[0].main=*.home.domain.com - traefik.http.routers.frigate_local.rule=Host(`frigate.home.domain.com`) - traefik.http.routers.frigate_local.service=frigate + # Go2rtc Local + - traefik.http.services.go2rtc.loadbalancer.server.port=1984 + - traefik.http.routers.go2rtc_local.service=go2rtc + - traefik.http.routers.go2rtc_local.tls=true + - traefik.http.routers.go2rtc_local.tls.certResolver=le-home + - traefik.http.routers.go2rtc_local.tls.domains[0].main=*.home.domain.com + - traefik.http.routers.go2rtc_local.rule=Host(`go2rtc.home.domain.com`) environment: - PLUS_API_KEY=secret @@ -600,7 +607,7 @@ services: - 32168:32168 volumes: - /opt/codeproject/config:/etc/codeproject/ai - - /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYolo/custom-models/ + #- /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYolo/custom-models/ - /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/custom-models/ labels: # HTTP Local Only diff --git a/extras/docker-compose/unified/docker-compose.yml b/extras/docker-compose/unified/docker-compose.yml index 4f22f1ca..82535e5d 100644 --- a/extras/docker-compose/unified/docker-compose.yml +++ b/extras/docker-compose/unified/docker-compose.yml @@ -780,7 +780,7 @@ services: restart: always image: ghcr.io/blakeblackshear/frigate:stable #image: ghcr.io/blakeblackshear/frigate:0.13.0-beta7 - shm_size: "128mb" + shm_size: "256mb" devices: - /dev/bus/usb:/dev/bus/usb - /dev/dri/renderD128 @@ -817,6 +817,13 @@ services: - traefik.http.routers.frigate_local.tls.domains[0].main=*.home.domain.com - traefik.http.routers.frigate_local.rule=Host(`frigate.home.domain.com`) - traefik.http.routers.frigate_local.service=frigate + # Go2rtc Local + - traefik.http.services.go2rtc.loadbalancer.server.port=1984 + - traefik.http.routers.go2rtc_local.service=go2rtc + - traefik.http.routers.go2rtc_local.tls=true + - traefik.http.routers.go2rtc_local.tls.certResolver=le-home + - traefik.http.routers.go2rtc_local.tls.domains[0].main=*.home.domain.com + - traefik.http.routers.go2rtc_local.rule=Host(`go2rtc.home.domain.com`) environment: - PLUS_API_KEY=secret @@ -830,7 +837,7 @@ services: - 32168:32168 volumes: - /opt/codeproject/config:/etc/codeproject/ai - - /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYolo/custom-models/ + #- /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYolo/custom-models/ - /opt/codeproject/modules:/app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/custom-models/ labels: # HTTP Local Only diff --git a/github_action_secrets.yaml b/github_action_secrets.yaml index 66a8d51d..f51950f3 100644 --- a/github_action_secrets.yaml +++ b/github_action_secrets.yaml @@ -64,6 +64,7 @@ signal_group_bvst: "group.id" signal_group_bvst_ins: "group.id" signal_group_adsb: "group.id" signal_group_frigate: "group.id" +signal_group_homeassistant: "group.id" tile_user: user tile_password: password pfsense_json_key: secret diff --git a/images/nodered_1.png b/images/nodered_1.png index c882830283443bf42fe44b08d38dd48ba85a7a5a..9929c77e70c7d1ffdd3f514428906c8bd1d309de 100644 GIT binary patch delta 78 zcmey<$n>X?X+kx-m@qfTzTWPQO_~iNW+4W~R))q_rWV=;237_JY&&lLn!LY3Rsmh2 T{Ar>a0}yz+`njxgN@xNA{FE40 delta 78 zcmey<$n>X?X+kwSGp{Az(I)?mO_~iNrXdC- - # Very briefly describe what you see in this image from my doorbell camera. - # Your message needs to be short to fit in a phone notification. Don't - # describe stationary objects or buildings. - # image_filename: /config/media/images/front_door.jpg - # response_variable: generated_content + entity_id: camera.front_door_fullres + - service: google_generative_ai_conversation.generate_content + continue_on_error: true + data: + prompt: >- + Very briefly describe what you see in this image from my doorbell camera. + Your message needs to be short to fit in a phone notification. Don't + describe stationary objects or buildings. + image_filename: /config/media/images/front_door.jpg + response_variable: generated_content - service: notify.signal_frigate data: message: >- - A person was detected + A person was detected {{ generated_content.text }} Clip: https://secret/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/clip.mp4 @@ -152,21 +152,20 @@ automation: data: filename: /config/media/images/doorbell.jpg target: - entity_id: camera.front_door + entity_id: camera.front_door_fullres continue_on_error: true - service: siren.turn_on entity_id: siren.garage_chime_siren continue_on_error: true - # Broken temporarily? - # - service: google_generative_ai_conversation.generate_content - # continue_on_error: true - # data: - # prompt: >- - # Very briefly describe what you see in this image from my doorbell camera. - # Your message needs to be short to fit in a phone notification. Don't - # describe stationary objects or buildings. - # image_filename: /config/media/images/doorbell.jpg - # response_variable: generated_content + - service: google_generative_ai_conversation.generate_content + continue_on_error: true + data: + prompt: >- + Very briefly describe what you see in this image from my doorbell camera. + Your message needs to be short to fit in a phone notification. Don't + describe stationary objects or buildings. + image_filename: /config/media/images/doorbell.jpg + response_variable: generated_content - service: notify.signal_frigate data: message: >- diff --git a/packages/garage_door.yaml b/packages/garage_door.yaml index 6b6cf9fa..294a7e7b 100644 --- a/packages/garage_door.yaml +++ b/packages/garage_door.yaml @@ -31,7 +31,7 @@ automation: id: "garge_lights_off" trigger: platform: state - entity_id: binary_sensor.garage_motion + entity_id: binary_sensor.garage_person_occupancy from: "on" to: "off" for: "00:10:00"