diff --git a/README.md b/README.md index e2c37a36..62870581 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://github.com/aneisch/home-assistant-config/actions/workflows/check-ha-release-compatibility.yml/badge.svg)](https://github.com/aneisch/home-assistant-config/actions) [![GitHub last commit](https://img.shields.io/github/last-commit/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/commits/master) [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/graphs/commit-activity) -[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.5.1%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest) +[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.5.2%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
Buy Me A Coffee @@ -57,7 +57,7 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC Description | value -- | -- Lines of ESPHome YAML | 2802 -Lines of Home Assistant YAML | 9055 +Lines of Home Assistant YAML | 9088 [Integrations](https://www.home-assistant.io/integrations/) in use | 60 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 @@ -65,7 +65,7 @@ Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_ 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 | 137 +Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 140 Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 15 Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 15 Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1 @@ -90,17 +90,17 @@ 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 | 48 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 | 417 +Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 420 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 +Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 167 Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 6 Entities in the [`tts`](https://www.home-assistant.io/components/tts) domain | 1 Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 34 Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1 Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 1 Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6 -**Total state objects** | **1195** +**Total state objects** | **1202** ## The HACS integrations/plugins that I use: **Appdaemon**:
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)
diff --git a/configuration.yaml b/configuration.yaml index ad11e55b..e4ea7cb6 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -88,26 +88,24 @@ monitor_docker: rename: adguard: "AdGuard" appdaemon: "Appdaemon" - configurator: "VSCode" + bvst: "BVST" + codeproject: "CodeProject.AI" esphome: "ESPHome" + frigate: "Frigate" grafana: "Grafana" influxdb: "InfluxDB" librespeed: "Speedtest" - mariadb: "MariaDB" + mealie: "Recipes" mosquitto: "Mosquitto" nodered: "Node-RED" plex: "Plex" portainer: "Portainer" sqliteweb: "SQLite Web" - thermopro_mqtt: "Grill Monitor" thermostat_api_server: "Thermostat API Server" + vrs: "Virtual Radar Server" vscode: "VSCode" watchtower: "Watchtower" zwavejs: "Zwave-JS" - vrs: "Virtual Radar Server" - github-runner-1: "Github Runner 1" - github-runner-2: "Github Runner 2" - codeproject: "CodeProject.AI" frontend: themes: !include_dir_merge_named themes diff --git a/custom_components/alexa_media/.translations/pl.json b/custom_components/alexa_media/.translations/pl.json index 4e495061..8d653ffd 100644 --- a/custom_components/alexa_media/.translations/pl.json +++ b/custom_components/alexa_media/.translations/pl.json @@ -12,7 +12,7 @@ "invalid_credentials": "Nieprawidłowe dane logowania", "invalid_url": "URL jest nieprawidłowy: {message}", "unable_to_connect_hass_url": "Nie można połączyć się z adresem URL Home Assistanta. Sprawdź wewnętrzny adres URL w sekcji Konfiguracja -> Ogólne", - "unknown_error": "Nieznany błąd, włącz zaawansowane debugowanie i zgłoś log z tego zdarzenia" + "unknown_error": "Nieznany błąd: {message}" }, "step": { "proxy_warning": { @@ -32,7 +32,7 @@ "user": { "data": { "debug": "Zaawansowane debugowanie", - "email": "Adres email", + "email": "Adres e-mail", "exclude_devices": "Wykluczone urządzenia (oddzielone przecinkami)", "hass_url": "URL dostępu do Home Assistanta", "include_devices": "Dodawane urządzenia (oddzielone przecinkami)", diff --git a/custom_components/alexa_media/__init__.py b/custom_components/alexa_media/__init__.py index 81cc382c..f31cd168 100644 --- a/custom_components/alexa_media/__init__.py +++ b/custom_components/alexa_media/__init__.py @@ -622,7 +622,8 @@ async def async_update_data() -> Optional[AlexaEntityData]: ) if not entry_setup: _LOGGER.debug("Loading config entry for %s", component) - hass.async_add_job( + config_entry.async_create_task( + hass, hass.config_entries.async_forward_entry_setup( config_entry, component ) diff --git a/custom_components/alexa_media/alexa_entity.py b/custom_components/alexa_media/alexa_entity.py index 2b99f4e3..1e22339e 100644 --- a/custom_components/alexa_media/alexa_entity.py +++ b/custom_components/alexa_media/alexa_entity.py @@ -114,7 +114,10 @@ def is_light(appliance: dict[str, Any]) -> bool: """Is the given appliance a light controlled locally by an Echo.""" return ( is_local(appliance) - and "LIGHT" in appliance.get("applianceTypes", []) + and ( + "LIGHT" in appliance.get("applianceTypes", []) + or ("SMARTPLUG" in appliance.get("applianceTypes", []) and appliance.get("customerDefinedDeviceType") == "LIGHT") + ) and has_capability(appliance, "Alexa.PowerController", "powerState") ) @@ -131,8 +134,10 @@ def is_switch(appliance: dict[str, Any]) -> bool: """Is the given appliance a switch controlled locally by an Echo.""" return ( is_local(appliance) - and "SMARTPLUG" in appliance.get("applianceTypes", []) - and appliance["manufacturerName"] == "Amazon" + and ( + "SMARTPLUG" in appliance.get("applianceTypes", []) + or "SWITCH" in appliance.get("applianceTypes", []) + ) and has_capability(appliance, "Alexa.PowerController", "powerState") ) diff --git a/custom_components/alexa_media/const.py b/custom_components/alexa_media/const.py index e6ba9b3d..28dd9994 100644 --- a/custom_components/alexa_media/const.py +++ b/custom_components/alexa_media/const.py @@ -14,7 +14,7 @@ PERCENTAGE, ) -__version__ = "4.9.2" +__version__ = "4.10.0" PROJECT_URL = "https://github.com/alandtse/alexa_media_player/" ISSUE_URL = f"{PROJECT_URL}issues" NOTIFY_URL = f"{PROJECT_URL}wiki/Configuration%3A-Notification-Component#use-the-notifyalexa_media-service" diff --git a/custom_components/alexa_media/helpers.py b/custom_components/alexa_media/helpers.py index 69434af8..9dd21149 100644 --- a/custom_components/alexa_media/helpers.py +++ b/custom_components/alexa_media/helpers.py @@ -17,6 +17,7 @@ from homeassistant.const import CONF_EMAIL, CONF_URL from homeassistant.exceptions import ConditionErrorMessage from homeassistant.helpers.entity_component import EntityComponent +from homeassistant.helpers.instance_id import async_get as async_get_instance_id import wrapt from .const import DATA_ALEXAMEDIA, EXCEPTION_TEMPLATE @@ -271,7 +272,7 @@ async def calculate_uuid(hass, email: str, url: str) -> dict: if entry.data.get(CONF_EMAIL) == email and entry.data.get(CONF_URL) == url: return_index = index break - uuid = await hass.helpers.instance_id.async_get() + uuid = await async_get_instance_id(hass) result["uuid"] = hex( int(uuid, 16) # increment uuid for second accounts diff --git a/custom_components/alexa_media/manifest.json b/custom_components/alexa_media/manifest.json index bdc9f45e..c2786972 100644 --- a/custom_components/alexa_media/manifest.json +++ b/custom_components/alexa_media/manifest.json @@ -9,5 +9,5 @@ "issue_tracker": "https://github.com/alandtse/alexa_media_player/issues", "loggers": ["alexapy", "authcaptureproxy"], "requirements": ["alexapy==1.27.10", "packaging>=20.3", "wrapt>=1.14.0"], - "version": "4.9.2" + "version": "4.10.0" } diff --git a/custom_components/alexa_media/media_player.py b/custom_components/alexa_media/media_player.py index 81843521..db06c9dd 100644 --- a/custom_components/alexa_media/media_player.py +++ b/custom_components/alexa_media/media_player.py @@ -185,7 +185,8 @@ async def async_setup_entry(hass, config_entry, async_add_devices): _LOGGER.debug( "%s: Loading config entry for %s", hide_email(account), component ) - hass.async_add_job( + config_entry.async_create_task( + hass, hass.config_entries.async_forward_entry_setup( config_entry, component ) diff --git a/custom_components/alexa_media/notify.py b/custom_components/alexa_media/notify.py index 218dd680..17a68a8a 100644 --- a/custom_components/alexa_media/notify.py +++ b/custom_components/alexa_media/notify.py @@ -20,6 +20,7 @@ BaseNotificationService, ) from homeassistant.const import CONF_EMAIL +from homeassistant.helpers.group import expand_entity_ids import voluptuous as vol from .const import ( @@ -237,7 +238,7 @@ async def async_send_message(self, message="", **kwargs): _LOGGER.debug("Processed Target by string: %s", processed_targets) entities = self.convert(processed_targets, type_="entities") try: - entities.extend(self.hass.components.group.expand_entity_ids(entities)) + entities.extend(expand_entity_ids(self.hass, entities)) except ValueError: _LOGGER.debug("Invalid Home Assistant entity in %s", entities) tasks = [] diff --git a/custom_components/alexa_media/translations/es.json b/custom_components/alexa_media/translations/es.json index 8148dc7a..35a5bf28 100644 --- a/custom_components/alexa_media/translations/es.json +++ b/custom_components/alexa_media/translations/es.json @@ -11,8 +11,8 @@ "identifier_exists": "Correo electrónico para la URL de Alexa ya registrado", "invalid_credentials": "Credenciales no válidas", "invalid_url": "La URL no es válida: {message}", - "unable_to_connect_hass_url": "No se puede conectar con la URL de Home Assistant. Verifique la URL externa en Configuración - > General", - "unknown_error": "Error desconocido: {mensaje}" + "unable_to_connect_hass_url": "No se puede conectar con la URL de Home Assistant. Verifique la URL externa en Configuración -> General", + "unknown_error": "Error desconocido: {message}" }, "step": { "proxy_warning": { @@ -60,38 +60,38 @@ }, "services": { "clear_history": { - "description": "Clear last entries from Alexa Voice history for each Alexa account.", + "description": "Borrar las últimas entradas del historial de voz de Alexa para cada cuenta.", "fields": { "email": { - "description": "Accounts to clear. Empty will clear all.", - "name": "Email address" + "description": "Cuentas a borrar. Si se deja vacío se borraran todas.", + "name": "Dirección de correo electrónico" }, "entries": { - "description": "Number of entries to clear from 1 to 50. If empty, clear 50.", - "name": "Number of Entries" + "description": "Número de entradas a borrar del 1 al 50. Si se deja vacío, se borraran 50.", + "name": "Número de entradas" } }, - "name": "Clear Amazon Voice History" + "name": "Borrar el historial de voz de Amazon" }, "force_logout": { - "description": "Force account to logout. Used mainly for debugging.", + "description": "Obligar el cierre de sesión de la cuenta. Usar principalmente para depuración.", "fields": { "email": { - "description": "Accounts to clear. Empty will clear all.", - "name": "Email address" + "description": "Cuentas a borrar. Si se deja vacío se borraran todas.", + "name": "Dirección de correo electrónico" } }, - "name": "Force Logout" + "name": "Obligar cierre de sesión" }, "update_last_called": { - "description": "Forces update of last_called echo device for each Alexa account.", + "description": "Obligar la actualización del último dispositivo Echo llamado para cada cuenta Alexa.", "fields": { "email": { - "description": "List of Alexa accounts to update. If empty, will update all known accounts.", - "name": "Email address" + "description": "Cuentas de Alexa para actualizar. Si se deja vacío, se actualizaran todas las cuentas.", + "name": "Dirección de correo electrónico" } }, - "name": "Update Last Called Sensor" + "name": "Actualizar el último sensor utilizado" } } } diff --git a/custom_components/alexa_media/translations/pl.json b/custom_components/alexa_media/translations/pl.json index 4e495061..8d653ffd 100644 --- a/custom_components/alexa_media/translations/pl.json +++ b/custom_components/alexa_media/translations/pl.json @@ -12,7 +12,7 @@ "invalid_credentials": "Nieprawidłowe dane logowania", "invalid_url": "URL jest nieprawidłowy: {message}", "unable_to_connect_hass_url": "Nie można połączyć się z adresem URL Home Assistanta. Sprawdź wewnętrzny adres URL w sekcji Konfiguracja -> Ogólne", - "unknown_error": "Nieznany błąd, włącz zaawansowane debugowanie i zgłoś log z tego zdarzenia" + "unknown_error": "Nieznany błąd: {message}" }, "step": { "proxy_warning": { @@ -32,7 +32,7 @@ "user": { "data": { "debug": "Zaawansowane debugowanie", - "email": "Adres email", + "email": "Adres e-mail", "exclude_devices": "Wykluczone urządzenia (oddzielone przecinkami)", "hass_url": "URL dostępu do Home Assistanta", "include_devices": "Dodawane urządzenia (oddzielone przecinkami)", diff --git a/custom_components/alexa_media/translations/ru.json b/custom_components/alexa_media/translations/ru.json index b56d6aaf..6f7f06e0 100644 --- a/custom_components/alexa_media/translations/ru.json +++ b/custom_components/alexa_media/translations/ru.json @@ -1,48 +1,48 @@ { "config": { "abort": { - "forgot_password": "The Forgot Password page was detected. This normally is the result of too may failed logins. Amazon may require action before a relogin can be attempted.", - "login_failed": "Alexa Media Player failed to login.", - "reauth_successful": "Alexa Media Player successfully reauthenticated." + "forgot_password": "Обнаружена страница «Забыли пароль». Обычно это является результатом неудачных попыток входа в систему. Amazon может потребовать действия, прежде чем будет предпринята попытка повторного входа.", + "login_failed": "Алекса Медиа Проигрыватель логин не удался.", + "reauth_successful": "Алекса Медиа Проигрыватель успешно прошел повторную аутентификацию. Пожалуйста, игнорируйте сообщение «Прервано» от HA." }, "error": { - "2fa_key_invalid": "Invalid Built-In 2FA key", + "2fa_key_invalid": "Неверный встроенный ключ 2FA", "connection_error": "Ошибка подключения; проверьте сеть и повторите попытку", "identifier_exists": "Электронная почта для Alexa уже зарегистрирована", "invalid_credentials": "Неверные учетные данные", "invalid_url": "Недопустимый URL-адрес: {message}", "unable_to_connect_hass_url": "Не удалось подключиться к URL-адресу Home Assistant. Проверьте внешний URL-адрес в разделе «Конфигурация» - > «Общие».", - "unknown_error": "Неизвестная ошибка, пожалуйста, сообщите информацию журнала" + "unknown_error": "Неизвестная ошибка: {message}" }, "step": { "proxy_warning": { "data": { - "proxy_warning": "Ignore and Continue - I understand that no support for login issues are provided for bypassing this warning." + "proxy_warning": "Игнорировать и продолжить. Я понимаю, что для обхода этого предупреждения не предоставляется никакой поддержки при проблемах со входом в систему." }, - "description": "The HA server cannot connect to the URL provided: {hass_url}.\n> {error}\n\nTo fix this, please confirm your **HA server** can reach {hass_url}. This field is from the External Url under Configuration -> General but you can try your internal url.\n\nIf you are **certain** your client can reach this url, you can bypass this warning.", - "title": "Alexa Media Player - Unable to Connect to HA URL" + "description": "Homa Assistant сервер не может подключиться по указанному адресу: {hass_url}.\n> {error}\nЧтобы это исправить, подтвердите, что ваш **сервер высокой доступности** может подключаться к домену {hass_url} . Это поле взято из внешнего URL-адреса в разделе «Конфигурация» -> «Общие», но вы можете попробовать свой внутренний URL-адрес.\n\nЕсли вы **уверены**, что ваш клиент может получить доступ к этому URL-адресу, вы можете обойти это предупреждение.", + "title": "Алекса Медиа Проигрыватель - не может подключиться к Home Assistant адресу" }, "totp_register": { "data": { - "registered": "OTP from the Built-in 2FA App Key confirmed successfully." + "registered": "OTP от встроенного ключа приложения 2FA успешно подтвержден." }, - "description": "**{email} - alexa.{url}** \nHave you successfully confirmed an OTP from the Built-in 2FA App Key with Amazon? \n >OTP Code {message}", - "title": "Alexa Media Player - OTP Confirmation" + "description": "**{email} - Алекса .{url}** \nВы успешно подтвердили OTP от встроенного ключа приложения 2FA с Amazon?\n >ОТП-кодe {message}", + "title": "Алекса Медиа Проигрыватель — подтверждение OTP" }, "user": { "data": { "debug": "Расширенные возможности отладки", "email": "Адрес электронной почты", "exclude_devices": "Исключенные устройства (через запятую)", - "hass_url": "Url to access Home Assistant", + "hass_url": "URL-адрес для доступа к Home Assistant", "include_devices": "Включенные устройства (разделенное запятыми)", - "otp_secret": "Built-in 2FA App Key (automatically generate 2FA Codes)", + "otp_secret": "Встроенный ключ приложения 2FA (автоматически генерирует коды 2FA). Это не шесть цифр.", "password": "Пароль", "scan_interval": "Секунды между сканированиями", - "securitycode": "2FA Code (recommended to avoid login issues)", + "securitycode": "[%key_id:55616596%]", "url": "Домен региона Amazon (например, amazon.co.uk)" }, - "description": "Пожалуйста, подтвердите информацию ниже.", + "description": "Пожалуйста, подтвердите информацию ниже. Для устаревшей конфигурации отключите опцию «Использовать метод прокси-сервера для входа».", "title": "Alexa Media Player - Конфигурация" } } @@ -52,7 +52,7 @@ "init": { "data": { "extended_entity_discovery": "Включить устройства, подключенные через Echo", - "public_url": "Public URL to access Home Assistant (including trailing '/')", + "public_url": "Публичный URL-адрес для доступа к Home Assistant (включая завершающий '/')", "queue_delay": "Секунды ожидания, чтобы выполнить команды вместе" } } @@ -60,38 +60,38 @@ }, "services": { "clear_history": { - "description": "Clear last entries from Alexa Voice history for each Alexa account.", + "description": "Очистить последнюю сущность из Алекса Голосовой Истории для каждого аккаунта.", "fields": { "email": { - "description": "Accounts to clear. Empty will clear all.", - "name": "Email address" + "description": "Аккаунты к очистке. Если пустое, то очистить все.", + "name": "Почтовые адреса" }, "entries": { - "description": "Number of entries to clear from 1 to 50. If empty, clear 50.", - "name": "Number of Entries" + "description": "Количество сущностей для очистки, от 1 до 50. Если пустое, то очистить 50.", + "name": "Количество сущностей" } }, - "name": "Clear Amazon Voice History" + "name": "Очистить Алекса Голосовую Историю" }, "force_logout": { - "description": "Force account to logout. Used mainly for debugging.", + "description": "Принудительный выход из аккаунта. В основном используется для отладки.", "fields": { "email": { - "description": "Accounts to clear. Empty will clear all.", - "name": "Email address" + "description": "Аккаунты для очистки. Если пустое, то будут очищены все.", + "name": "Почтовые адреса" } }, - "name": "Force Logout" + "name": "Принудительный выход" }, "update_last_called": { - "description": "Forces update of last_called echo device for each Alexa account.", + "description": "Принудительное обновление последнего вызванного устройства для каждого аккаунта Алекса.", "fields": { "email": { - "description": "List of Alexa accounts to update. If empty, will update all known accounts.", - "name": "Email address" + "description": "Список аккаунтов Алекса для обновления. Если пустое, будут обновлены все аккаунты.", + "name": "Почтовые адреса" } }, - "name": "Update Last Called Sensor" + "name": "Обновление последнего вызванного сенсора" } } } diff --git a/extras/Node-RED/flows.json b/extras/Node-RED/flows.json index 299f8403..b4faef9a 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","6f08d11c854dfb00","9b7c5535c74a94a3","d8a16fd91366d112","bcaf3569e7816922","d58f6ef71c326040","42be35f83b764861","b2a5543693ac851e","c13f0f20a56d6af5","7151828122e3b80c","bace446bfa7b343d","5acbb2cbdbdea368","c061be05c01527e0","e263410e9a3af7d8","d9e9a93275328762","a12e93d199527cae","b4b8f84a.7e57a8","63fd5090444c9cad","2dfdead1d2e3b78b","c1fe21bcb3184137"],"x":54,"y":2099,"w":1372,"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","c3cb1c7d15767014"],"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","9896327569c234da","e95ac52f03478921","174186fb5d054240","287dd3b1af5dc2d0","74cd40702021e86d","bf015af2161c5ec2","151eb6ba5b2d39cd","45ee74d06e9cac2c","95a54981805b22f2","a4b3eba196a504dc","02d1e639f7ac6596","8d3c8370996be2da","863b8fa63f210ebe","7d8374976c01e3dc","b0debe46542c4c67","de509d99b9d965b3","b1c9631973c2f4b1","6ea0448df1383ec2","224d30a98f52c287","5a27d31bfb4a6990","197853479ad9eeda","7b985932412db47d","acdcc72fea065aac","38affe5cc680d076"],"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","aa53225140781dd7","8113d83074ff7701","d83b5ff7a2212931","f78cdb84200eb171","62b5545bc6d6e627"],"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","1b266e9b338a4dfe","85644b2ab18e7141","041a81d375ec985d","bfbece91f0b61e8b","f3b23466b80725e0"],"x":54,"y":2739,"w":1102,"h":342},{"id":"26b2ac79d4c32bda","type":"group","z":"9584418c.dafc2","name":"Timelapse","style":{"label":true},"nodes":["83e2179938d08d58","59e4459459f077c9","089b07fa48286f29","7ff9bf1a917cbf50","a826a8c498d6d1e3"],"x":54,"y":3099,"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":3379,"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":"27555ce732fc54b0","type":"global-config","name":"global-config","env":[{"name":"bb_pass","value":"PASSWORD","type":"str"},{"name":"bb_number","value":"19402326788","type":"str"}]},{"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"],[]]},{"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":"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":1000,"y":2260,"wires":[["b2a5543693ac851e"]]},{"id":"9b7c5535c74a94a3","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Output msg","func":"msg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n event_id: msg.event_id\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"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":430,"y":2260,"wires":[["63fd5090444c9cad"]]},{"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"]]},{"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":[["c13f0f20a56d6af5"]]},{"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":"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":1320,"y":2340,"wires":[[]]},{"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":1180,"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":true,"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","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":"bace446bfa7b343d","type":"while-loop","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Loop \"msg.payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"4","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","a12e93d199527cae","c061be05c01527e0"]]},{"id":"5123f652827fa902","type":"inject","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","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// Pass message if slots not empty\nif(slots.length > 0){\n msg.message = slots[0].startTimestamp\n return msg;\n}","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","414a38bf0735b27c"]]},{"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*120); // 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","bfbece91f0b61e8b"]]},{"id":"414a38bf0735b27c","type":"api-call-service","z":"9584418c.dafc2","d":true,"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":3220,"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":3140,"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":3320,"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":3260,"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":3200,"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":3480,"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":3420,"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":3480,"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":3480,"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":3480,"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":3540,"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":"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":"a12e93d199527cae","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/input.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1200,"y":2140,"wires":[[]]},{"id":"f8a0990e2842810d","type":"server-state-changed","z":"9584418c.dafc2","name":"Dead Zwave Node","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_node_status","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"dead","ifStateType":"str","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":170,"y":3800,"wires":[["1ba5d7539019ce84"],[]]},{"id":"1ba5d7539019ce84","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has died\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":3800,"wires":[[]]},{"id":"1b266e9b338a4dfe","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BB Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1040,"y":3040,"wires":[]},{"id":"85644b2ab18e7141","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BlueBubbles","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"andrew-bb","valueType":"other","valueValue":"true"}],"x":870,"y":3040,"wires":[["1b266e9b338a4dfe"]]},{"id":"041a81d375ec985d","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Build BB Message","func":"msg.url = msg.payload + \"/api/v1/message/text?password=\" + env.get(\"bb_pass\")\nmsg.payload = {\n \"chatGuid\": \"iMessage;-;+\" + env.get(\"bb_number\"),\n \"message\": msg.message + \" https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n \"method\": \"private-api\"\n}\n\nreturn msg;\n\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":3040,"wires":[["85644b2ab18e7141"]]},{"id":"bfbece91f0b61e8b","type":"api-current-state","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Get BlueBubbles URL","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_text.bluebubbles_url","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":3040,"wires":[["f3b23466b80725e0"]]},{"id":"f3b23466b80725e0","type":"json","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Object to JSON","property":"message","action":"str","pretty":false,"x":460,"y":3040,"wires":[["041a81d375ec985d"]]},{"id":"b4b8f84a.7e57a8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Annotate","data":"outlinedImage","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_16_WHITE","parameter1Type":"jimpFont","parameter2":"10","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"timestamp","parameter4Type":"msg","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","sendProperty":"outlinedImage","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":700,"y":2260,"wires":[["9b7c5535c74a94a3","2dfdead1d2e3b78b"]],"icon":"font-awesome/fa-image"},{"id":"63fd5090444c9cad","type":"api-render-template","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Time","server":"e1dc0b88.463bb8","version":0,"template":"{{ now().strftime(\"%m-%d-%YT%H:%M:%S\") }}","resultsLocation":"timestamp","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":570,"y":2260,"wires":[["b4b8f84a.7e57a8"]]},{"id":"2dfdead1d2e3b78b","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Annotate","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":2360,"wires":[]},{"id":"c1fe21bcb3184137","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Output msg","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":2360,"wires":[]},{"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"],["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 * * *","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":"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","c3cb1c7d15767014"]]},{"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,"timeout":"","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.nws_wind_speed","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","4fae5b92.a9cd44"]]},{"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":"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"]]},{"id":"c3cb1c7d15767014","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"50","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.precip_probability","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":860,"wires":[["1d9a4d0bb4645f32"],["eeecfc1e8864e39f"]]},{"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":"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"]]}] \ 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","6f08d11c854dfb00","9b7c5535c74a94a3","d8a16fd91366d112","bcaf3569e7816922","d58f6ef71c326040","42be35f83b764861","b2a5543693ac851e","c13f0f20a56d6af5","7151828122e3b80c","bace446bfa7b343d","5acbb2cbdbdea368","c061be05c01527e0","e263410e9a3af7d8","d9e9a93275328762","a12e93d199527cae","b4b8f84a.7e57a8","63fd5090444c9cad","2dfdead1d2e3b78b","c1fe21bcb3184137"],"x":54,"y":2099,"w":1372,"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","9c1d9c7c.ed9c7","896f5b34.7b4328","c5124616.c9bd48","f9d93af6.184028","3314ec9f.ca8994","5c24f744.30fcb8","6aa388d0.707768","cf758271.d4fd6","5a740c2d.009864","c5c85c0aa2d8c8ca","28fa66cd.af058a","aee87977a0670889"],"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","c3cb1c7d15767014"],"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","9896327569c234da","e95ac52f03478921","174186fb5d054240","287dd3b1af5dc2d0","74cd40702021e86d","bf015af2161c5ec2","151eb6ba5b2d39cd","45ee74d06e9cac2c","95a54981805b22f2","a4b3eba196a504dc","02d1e639f7ac6596","8d3c8370996be2da","863b8fa63f210ebe","7d8374976c01e3dc","b0debe46542c4c67","de509d99b9d965b3","b1c9631973c2f4b1","6ea0448df1383ec2","224d30a98f52c287","5a27d31bfb4a6990","197853479ad9eeda","7b985932412db47d","acdcc72fea065aac","38affe5cc680d076"],"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","aa53225140781dd7","8113d83074ff7701","d83b5ff7a2212931","f78cdb84200eb171","62b5545bc6d6e627"],"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","1b266e9b338a4dfe","85644b2ab18e7141","041a81d375ec985d","bfbece91f0b61e8b","f3b23466b80725e0"],"x":54,"y":2739,"w":1102,"h":342},{"id":"26b2ac79d4c32bda","type":"group","z":"9584418c.dafc2","name":"Timelapse","style":{"label":true},"nodes":["83e2179938d08d58","59e4459459f077c9","089b07fa48286f29","7ff9bf1a917cbf50","a826a8c498d6d1e3"],"x":54,"y":3099,"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":3379,"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":"27555ce732fc54b0","type":"global-config","name":"global-config","env":[{"name":"bb_pass","value":"PASSWORD","type":"str"},{"name":"bb_number","value":"19402326788","type":"str"}]},{"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":"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":[["5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864","28fa66cd.af058a"]]},{"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","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864","28fa66cd.af058a"],["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","aee87977a0670889"]]},{"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":220,"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"]]},{"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"]]},{"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"],[]]},{"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":"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":1000,"y":2260,"wires":[["b2a5543693ac851e"]]},{"id":"9b7c5535c74a94a3","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Output msg","func":"msg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n event_id: msg.event_id\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"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":430,"y":2260,"wires":[["63fd5090444c9cad"]]},{"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"]]},{"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":[["c13f0f20a56d6af5"]]},{"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":"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":1320,"y":2340,"wires":[[]]},{"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":1180,"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":true,"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","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","d":true,"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":"bace446bfa7b343d","type":"while-loop","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Loop \"msg.payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"4","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","a12e93d199527cae","c061be05c01527e0"]]},{"id":"5123f652827fa902","type":"inject","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","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// Pass message if slots not empty\nif(slots.length > 0){\n msg.message = slots[0].startTimestamp\n return msg;\n}","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","414a38bf0735b27c"]]},{"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*120); // 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","bfbece91f0b61e8b"]]},{"id":"414a38bf0735b27c","type":"api-call-service","z":"9584418c.dafc2","d":true,"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":3220,"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":3140,"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":3320,"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":3260,"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":3200,"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":3480,"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":3420,"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":3480,"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":3480,"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":3480,"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":3540,"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":"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":"a12e93d199527cae","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/input.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1200,"y":2140,"wires":[[]]},{"id":"f8a0990e2842810d","type":"server-state-changed","z":"9584418c.dafc2","name":"Dead Zwave Node","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_node_status","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"dead","ifStateType":"str","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":170,"y":3800,"wires":[["1ba5d7539019ce84"],[]]},{"id":"1ba5d7539019ce84","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has died\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":3800,"wires":[[]]},{"id":"1b266e9b338a4dfe","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BB Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1040,"y":3040,"wires":[]},{"id":"85644b2ab18e7141","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BlueBubbles","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"andrew-bb","valueType":"other","valueValue":"true"}],"x":870,"y":3040,"wires":[["1b266e9b338a4dfe"]]},{"id":"041a81d375ec985d","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Build BB Message","func":"msg.url = msg.payload + \"/api/v1/message/text?password=\" + env.get(\"bb_pass\")\nmsg.payload = {\n \"chatGuid\": \"iMessage;-;+\" + env.get(\"bb_number\"),\n \"message\": msg.message + \" https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n \"method\": \"private-api\"\n}\n\nreturn msg;\n\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":3040,"wires":[["85644b2ab18e7141"]]},{"id":"bfbece91f0b61e8b","type":"api-current-state","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Get BlueBubbles URL","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_text.bluebubbles_url","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":3040,"wires":[["f3b23466b80725e0"]]},{"id":"f3b23466b80725e0","type":"json","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Object to JSON","property":"message","action":"str","pretty":false,"x":460,"y":3040,"wires":[["041a81d375ec985d"]]},{"id":"b4b8f84a.7e57a8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Annotate","data":"outlinedImage","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_16_WHITE","parameter1Type":"jimpFont","parameter2":"10","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"timestamp","parameter4Type":"msg","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","sendProperty":"outlinedImage","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":700,"y":2260,"wires":[["9b7c5535c74a94a3","2dfdead1d2e3b78b"]],"icon":"font-awesome/fa-image"},{"id":"63fd5090444c9cad","type":"api-render-template","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Time","server":"e1dc0b88.463bb8","version":0,"template":"{{ now().strftime(\"%m-%d-%YT%H:%M:%S\") }}","resultsLocation":"timestamp","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":570,"y":2260,"wires":[["b4b8f84a.7e57a8"]]},{"id":"2dfdead1d2e3b78b","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Annotate","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":2360,"wires":[]},{"id":"c1fe21bcb3184137","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Output msg","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":2360,"wires":[]},{"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":"aee87977a0670889","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 5 Minutes","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 5 minutes\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":160,"wires":[[]]},{"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"],["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 * * *","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":"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","c3cb1c7d15767014"]]},{"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,"timeout":"","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.nws_wind_speed","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","4fae5b92.a9cd44"]]},{"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":"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"]]},{"id":"c3cb1c7d15767014","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"50","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.precip_probability","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":860,"wires":[["1d9a4d0bb4645f32"],["eeecfc1e8864e39f"]]},{"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":"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"]]}] \ No newline at end of file diff --git a/extras/appdaemon/apps/apps.yaml b/extras/appdaemon/apps/apps.yaml index 37efa882..ff85bc6f 100644 --- a/extras/appdaemon/apps/apps.yaml +++ b/extras/appdaemon/apps/apps.yaml @@ -128,8 +128,8 @@ Occupancy Simulator: log_msg: "1" step_evening_name: Evening step_evening_start: sunset - 00:30:00 - step_night_name: Night - step_night_start: "23:59:59" + # step_night_name: Night + # step_night_start: "23:59:59" # Turn on some devices in the evening step_evening_on_1: light.master_bedroom_lamps @@ -139,48 +139,9 @@ Occupancy Simulator: step_evening_on_7: light.guest_bedroom_nightstand_lamp step_evening_on_8: light.back_bedroom_nightstand_lamp - #random_master_name: Master - #random_master_start: Evening - #random_master_end: Night - #random_master_maxduration: 02:00:00 - #random_master_minduration: 00:30:00 - #random_master_number: '2' - #random_master_on_1: light.master_bedroom_lamps - #random_master_off_1: light.master_bedroom_lamps - - # Randomly turn dining room light on and off a few times - #random_dining_name: Dining Room - #random_dining_start: Evening - #random_dining_end: Night - #random_dining_maxduration: 01:00:00 - #random_dining_minduration: 00:10:00 - #random_dining_number: '3' - #random_dining_on_1: light.dining_room_light - #random_dining_off_1: light.dining_room_light - - #random_living_name: Living Room - #random_living_start: Evening - #random_living_end: Night - #random_living_maxduration: 02:00:00 - #random_living_minduration: 00:30:00 - #random_living_number: '5' - #random_living_on_1: light.living_room_lamps - #random_living_off_1: light.living_room_lamps - #random_living_on_2: light.living_room_can_lights - #random_living_off_2: light.living_room_can_lights - - #random_office_name: Office - #random_office_start: Evening - #random_office_end: Night - #random_office_maxduration: 02:00:00 - #random_office_minduration: 00:30:00 - #random_office_number: '2' - #random_office_on_1: light.andrew_desk_lamp - #random_office_off_1: light.andrew_desk_lamp - # Ensure all off late step_dark_name: Dark - step_dark_start: "23:32:00" + step_dark_start: "23:30:00" step_dark_off_1: light.master_bedroom_lamps step_dark_off_2: light.dining_room_light step_dark_off_3: light.kitchen_table_light diff --git a/extras/docker-compose/other/docker-compose.yml b/extras/docker-compose/other/docker-compose.yml index a2715dfa..a6f73278 100644 --- a/extras/docker-compose/other/docker-compose.yml +++ b/extras/docker-compose/other/docker-compose.yml @@ -165,6 +165,7 @@ services: driver: none restart: always labels: + - com.centurylinklabs.watchtower.monitor-only=true # HTTPS for CF - traefik.enable=true - traefik.http.routers.vault.entrypoints=websecure diff --git a/extras/docker-compose/unified/docker-compose.yml b/extras/docker-compose/unified/docker-compose.yml index 0441eee2..b17206b0 100644 --- a/extras/docker-compose/unified/docker-compose.yml +++ b/extras/docker-compose/unified/docker-compose.yml @@ -378,6 +378,7 @@ services: driver: none restart: always labels: + - com.centurylinklabs.watchtower.monitor-only=true # HTTPS for CF - traefik.enable=true - traefik.http.routers.vault.entrypoints=websecure diff --git a/images/nodered_1.png b/images/nodered_1.png index 047bb328..799d598a 100644 Binary files a/images/nodered_1.png and b/images/nodered_1.png differ diff --git a/images/nodered_2.png b/images/nodered_2.png index 8ab6eec1..874f1efc 100644 Binary files a/images/nodered_2.png and b/images/nodered_2.png differ diff --git a/packages/frigate.yaml b/packages/frigate.yaml index 75d190d0..88aeeff2 100644 --- a/packages/frigate.yaml +++ b/packages/frigate.yaml @@ -344,6 +344,27 @@ automation: entity_id: binary_sensor.front_door_button_pressed from: 'off' to: 'on' + - platform: state + id: front_door + entity_id: binary_sensor.front_door + from: 'off' + to: 'on' + - platform: state + id: back_door + entity_id: binary_sensor.back_porch_door + from: 'off' + to: 'on' + - platform: state + id: garage_exterior_door + entity_id: binary_sensor.garage_exterior_door + from: 'off' + to: 'on' + - platform: state + id: garage_interior_door + entity_id: binary_sensor.garage_interior_door + from: 'off' + to: 'on' + condition: "{{ is_state('binary_sensor.security_status','on') }}" action: - if: "{{ trigger.id == 'garage_door' }}" then: @@ -361,6 +382,30 @@ automation: data: camera: front_door label: Doorbell + - if: "{{ trigger.id == 'front_door' }}" + then: + - service: shell_command.frigate_create_event + data: + camera: front_door + label: FrontDoorOpened + - if: "{{ trigger.id == 'back_door' }}" + then: + - service: shell_command.frigate_create_event + data: + camera: back_porch + label: BackDoorOpened + - if: "{{ trigger.id == 'garage_exterior_door' }}" + then: + - service: shell_command.frigate_create_event + data: + camera: garage + label: GarageExteriorDoorOpened + - if: "{{ trigger.id == 'garage_interior_door' }}" + then: + - service: shell_command.frigate_create_event + data: + camera: garage + label: GarageInteriorDoorOpened # Handled by NodeRed # - alias: Frigate Timelapse Snapshots diff --git a/ui-lovelace/05-server.yaml b/ui-lovelace/05-server.yaml index 596b5655..cd4efaf5 100644 --- a/ui-lovelace/05-server.yaml +++ b/ui-lovelace/05-server.yaml @@ -170,27 +170,18 @@ cards: show_header_toggle: false title: Docker entities: + - switch.docker_bvst + - switch.docker_codeproject - switch.docker_esphome - switch.docker_grafana - #- switch.docker_librespeed + - switch.docker_librespeed + - switch.docker_mealie - switch.docker_plex - switch.docker_portainer - switch.docker_sqliteweb - # - switch.docker_github_runner_1 - # - switch.docker_github_runner_2 - - entity: switch.docker_auto_southwest - name: Southwest CLI - switch.docker_vrs - - switch.docker_codeproject - # - switch.docker_adguard - # - switch.docker_appdaemon - # - switch.docker_influxdb - # - switch.docker_mariadb - # - switch.docker_mosquitto - # - switch.docker_nodered - # - switch.docker_thermostat_api_server - # - switch.docker_vscode - # - switch.docker_zwavejs + - switch.docker_watchtower + #- type: custom:gui-sandbox