Fix the long nagging MQTT issues in the system. All fixed now.

This commit is contained in:
ccostan 2023-01-16 18:57:38 -05:00
parent 8b3c53ba3e
commit 792f9423b5
9 changed files with 35 additions and 130 deletions

View File

@ -1 +1 @@
2023.1.2
2023.1.4

View File

@ -18,24 +18,7 @@ homeassistant:
# - !secret external_ip
allow_bypass_login: true
# This is the section that loads with the default_config
default_config:
# dhcp:
# energy:
# frontend:
# homeassistant_alerts:
# image:
# media_source:
# my:
# network:
# person:
# sun:
# ssdp:
# stream:
# system_health:
# webhook:
# zeroconf:
### End of the default_Config stuff
config:
@ -73,17 +56,8 @@ cloud:
# light.kitchen_lights:
# display_categories: LIGHT
# http:
# server_port: !secret http_port
# ssl_certificate: !secret ssl_certificate
# ssl_key: !secret ssl_key
# ip_ban_enabled: false
# login_attempts_threshold: 3
discovery:
#updater:
light: !include light_groups.yaml
ifttt:
@ -98,7 +72,6 @@ logbook:
- group.garage_doors
- media_player.LivingRoomCC
- py.warnings
- sensor.epson_xp_7100_series_uptime
- sensor.small_garage_status
- sensor.large_garage_status
- sensor.small_garage_time_in_state
@ -131,7 +104,6 @@ history:
exclude:
entities:
- sensor.date
- sensor.epson_xp_7100_series_uptime
- sensor.pi_hole_ads_blocked_today
- sensor.pi_hole_ads_percentage_blocked_today
- sensor.pi_hole_dns_queries_today
@ -143,9 +115,6 @@ history:
logger: !include logger.yaml
recorder: !include recorder.yaml
mqtt:
# client_id: home-assistant-Carlo
# zwave:
# usb_path: /dev/ttyACM0
# config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
@ -154,9 +123,6 @@ nest:
client_id: !secret nest_client_id
client_secret: !secret nest_client_secret
# climate:
# platform: nest
tts:
- platform: amazon_polly
aws_access_key_id: !secret aws_access_key_ID

View File

@ -27,8 +27,6 @@ homeassistant:
friendly_name: 'Front Den Windows'
binary_sensor.MCU1_GPIO14:
friendly_name: 'Office Window'
binary_sensor.MCU2_GPIO4:
friendly_name: 'Dinette Windows'
binary_sensor.MCU2_GPIO5:
@ -43,7 +41,6 @@ homeassistant:
friendly_name: 'Upstairs Bedroom Window'
binary_sensor.MCU2_GPIO14:
friendly_name: 'Justin Window'
binary_sensor.MCU3_GPIO4:
friendly_name: 'Stacey Bedroom Window'
binary_sensor.MCU3_GPIO5:
@ -66,36 +63,42 @@ mqtt:
binary_sensor:
- state_topic: "NodeMCU1/GPIO4/Status"
name: "MCU1_GPIO4"
unique_id: 6829f4c5-9f99-45c4-a5d9-3c7a42b05abe
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU1/GPIO5/Status"
name: "MCU1_GPIO5"
unique_id: f5db33bf-f1e6-4d92-a637-3db4865aa2f4
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU1/GPIO10/Status"
name: "MCU1_GPIO10"
unique_id: ed998ae1-6ca6-4af8-ad6b-415992579c4c
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU1/GPIO12/Status"
name: "MCU1_GPIO12"
unique_id: ba72e789-0550-4ce5-95de-f7cd93eec7a1
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU1/GPIO13/Status"
name: "MCU1_GPIO13"
unique_id: 862ed4ad-b704-4ec0-9385-0fdbdd3db4cb
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU1/GPIO14/Status"
name: "MCU1_GPIO14"
unique_id: e3c8a195-71d4-4a14-b14e-d21f261c768d
payload_on: 1
payload_off: 0
device_class: opening
@ -103,42 +106,49 @@ mqtt:
- state_topic: "NodeMCU2/GPIO4/Status"
name: "MCU2_GPIO4"
unique_id: 27f7e335-fe5b-43d8-863f-8738dadf311e
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU2/GPIO5/Status"
name: "MCU2_GPIO5"
unique_id: a0d35c49-00ec-4f34-b70a-43e862be5d64
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU2/GPIO9/Status"
name: "MCU2_GPIO9"
unique_id: c12c6a9d-17ea-4a1d-874b-54d747251949
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU2/GPIO10/Status"
name: "MCU2_GPIO10"
unique_id: 4427df18-0f23-4f92-87bd-656275a0054e
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU2/GPIO12/Status"
name: "MCU2_GPIO12"
unique_id: 03b06196-9f7f-4324-ba60-133cfbf1ee01
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU2/GPIO13/Status"
name: "MCU2_GPIO13"
unique_id: 3dbcf4e1-f2e1-4bfd-9861-08cbd989c404
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU2/GPIO14/Status"
name: "MCU2_GPIO14"
unique_id: 04f1298a-4138-45a0-aeda-58334eec56f2
payload_on: 1
payload_off: 0
device_class: opening
@ -146,30 +156,35 @@ mqtt:
- state_topic: "NodeMCU3/GPIO4/Status"
name: "MCU3_GPIO4"
unique_id: 4cefd30a-4695-4ea1-a0fe-f82535d8d950
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU3/GPIO5/Status"
name: "MCU3_GPIO5"
unique_id: 524b7e7e-af9b-471b-be61-e2d4590c23d4
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU3/GPIO10/Status"
name: "MCU3_GPIO10"
unique_id: def60584-261a-472c-ab52-a34d4ff3038e
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU3/GPIO14/Status"
name: "MCU3_GPIO14"
unique_id: 031b204f-fa31-4d5b-ac6e-24f26c4afb06
payload_on: 1
payload_off: 0
device_class: opening
- state_topic: "NodeMCU3/Light/Status"
name: "MCU3_Light"
unique_id: 0b3ec37b-1fe9-4a7f-9336-6079727d725e
payload_on: 1
payload_off: 0
device_class: opening

View File

@ -1,38 +0,0 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# inspired by https://community.home-assistant.io/t/epson-wf-3540-ink-level-monitoring/21813
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Printer Ink Alert'
id: 6ef2a695-0b76-4eb5-b67c-2ff6f74f40b8
initial_state: 'on'
trigger:
- platform: numeric_state
entity_id:
- sensor.epson_xp_7100_series_black_ink
- sensor.epson_xp_7100_series_cyan_ink
- sensor.epson_xp_7100_series_magenta_ink
- sensor.epson_xp_7100_series_yellow_ink
- sensor.epson_xp_7100_series_photo_black_ink
below: 15
condition:
condition: time
weekday:
- wed
action:
- service: script.notify_engine
data:
value1: "{{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }} "
who: 'carlo'
apns_id: 'information'
- service: script.tweet_engine_no_image
data:
tweet: 'Looks like my {{ trigger.to_state.attributes.friendly_name }} is LOW. @CCostan - Get me some more (https://amzn.to/2AnpFwD)'
#-------------------------------------------

View File

@ -10,9 +10,9 @@ homeassistant:
#---Sensor for Light-----------------------------
binary_sensor:
- platform: mqtt
state_topic: "NodeMCU4/Motion/Motion"
mqtt:
binary_sensor:
- state_topic: "NodeMCU4/Motion/Motion"
name: "Office_Motion"
payload_on: 1
payload_off: 0

View File

@ -15,9 +15,9 @@ input_boolean:
name: Last Message
initial: off
#-------------------------------------------
sensor:
- platform: mqtt
state_topic: "polly/lastmsg"
mqtt:
binary_sensor:
- state_topic: "polly/lastmsg"
name: "Last Message"
##############################################################################
### Automations -

View File

@ -83,44 +83,6 @@ sensor:
duration:
days: 7
# - platform: version
# name: HA Installed Version
# scan_interval: 86400
- platform: command_line
name: "HA Uptime"
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /config/home-assistant.log | cut -d' ' -f-2)" +%s)))"
scan_interval: 720
value_template: >-
{% set uptime = value | int %}
{% set seconds = uptime % 60 %}
{% set minutes = ((uptime % 3600) / 60) | int %}
{% set hours = ((uptime % 86400) / 3600) | int %}
{% set days = (uptime / 86400) | int %}
{%- if days > 0 -%}
{%- if days == 1 -%}
1 day
{%- else -%}
{{ days }} days
{%- endif -%}
{{ ', ' }}
{%- endif -%}
{%- if hours > 0 -%}
{%- if hours == 1 -%}
1 hour
{%- else -%}
{{ hours }} hours
{%- endif -%}
{{ ', ' }}
{%- endif -%}
{%- if minutes > 0 -%}
{%- if minutes == 1 -%}
1 minute
{%- else -%}
{{ minutes }} minutes
{%- endif -%}
{%- endif -%}
### Building some interesting stats for tweeting. ###
- platform: template
sensors:

View File

@ -26,7 +26,6 @@ exclude:
- sensor.clock_time
- sensor.date
- sensor.external_ip
- sensor.epson_xp_7100_series_uptime
- sensor.floorplan_date
- sensor.floorplan_time
- sensor.ha_uptime

View File

@ -2,6 +2,7 @@
## Various MQTT sensors
###################################################
- platform: mqtt
state_topic: "dash/medicine/medicine_time"
mqtt:
binary_sensor:
- state_topic: "dash/medicine/medicine_time"
name: "Medicine time"