Advertisement
Guest User

Untitled

a guest
Apr 27th, 2019
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 11.19 KB | None | 0 0
  1. homeassistant:
  2.   #packages: !include_dir_named packages
  3.   # Name of the location where Home Assistant is running
  4.   name: Home
  5.   # Location required to calculate the time the sun rises and sets
  6.   latitude: 42.2421889
  7.   longitude: 14.3937108
  8.   # Impacts weather/sunrise data (altitude above sea level in meters)
  9.   elevation: 330
  10.   # metric for Metric, imperial for Imperial
  11.   unit_system: metric
  12.   # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  13.   time_zone: Europe/Rome
  14.   # Customization file
  15.  
  16.   customize: !include customize.yaml
  17.   customize_glob: !include customize_glob.yaml
  18.   packages: !include_dir_named packages
  19.   whitelist_external_dirs:
  20.    - /home/homeassistant/.homeassistant/
  21.    
  22.  
  23.  
  24.  
  25. cover: !include covers.yaml
  26. group: !include groups.yaml
  27. automation: !include automations.yaml
  28. script: !include scripts.yaml
  29. zone: !include zones.yaml
  30. #automation: !include_dir_merge_list automations
  31. #script: !include_dir_merge_named scripts
  32. #sensor: !include sensors.yaml
  33. # Show links to resources in log and frontend
  34. # introduction:
  35.  
  36. # Enables the frontend
  37. frontend:
  38.   themes: !include_dir_merge_named themes/
  39. # Enables configuration UI
  40. config:
  41. # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  42. # http:
  43. #   base_url: example.duckdns.org:8123
  44.  
  45. # Checks for available updates
  46. # Note: This component will send some information about your system to
  47. # the developers to assist with development of Home Assistant.
  48. # For more information, please see:
  49. # https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
  50. #updater:
  51.   # Optional, allows Home Assistant developers to focus on popular components.
  52.   # include_used_components: true
  53.  
  54. # Discover some devices automatically
  55. discovery:
  56.   ignore:
  57.    - igd
  58.  
  59. recorder:
  60.   purge_interval: 1
  61.   purge_keep_days: 3
  62.   include:
  63.     domains:
  64.    - sensor
  65.     - climate
  66.     - binary_sensor
  67.     - light
  68.     - device_tracker
  69.   exclude:
  70.     entities:
  71.    - sensor.last_boot
  72.     - sensor.date
  73.     - sensor.time
  74.     - sensor.workday
  75.     - sun.sun
  76.     - sensor.moon
  77.     - sensor.fasi_lunari
  78.     - sensor.stagioni
  79.     - sensor.season
  80.  
  81. # Allows you to issue voice commands from the frontend in enabled browsers
  82. conversation:
  83. # Enables support for tracking state changes over time
  84. history:
  85. # View all events in a logbook
  86. logbook:
  87. # Enables a map showing the location of tracked devices
  88. map:
  89. # Track the sun
  90. sun:
  91. # System Health
  92. system_health:
  93. # stream
  94. stream:
  95. # Sensors
  96. #sensor:
  97. weather:
  98.   - platform: darksky
  99.     api_key: da81aece40d0794fd3884199c8a5b1ae
  100.     latitude: 42.2421889 # mettete le vostre coordinate
  101.     longitude: 14.3937108 # mettete le vostre coordinate
  102.     #language: it
  103.     mode: daily
  104.  
  105.  
  106. # Text to speech
  107. tts:
  108.   - platform: google_translate
  109.     service_name: google_say
  110.     cache: true
  111.     cache_dir: /tmp/tts
  112.     time_memory: 300
  113.     base_url: https://ago1980.duckdns.org:8123
  114.     language: 'it'
  115.  
  116. # Cloud
  117. cloud:
  118. lovelace:
  119.   mode: yaml
  120.  
  121. updater:
  122.    
  123. custom_updater:
  124.   show_installable: false
  125.   hide_sensor: false
  126.   track:
  127.  - components
  128.   - cards
  129.   card_urls:
  130.  - https://raw.githubusercontent.com/kalkih/mini-graph-card/master/tracker.json
  131.   - https://raw.githubusercontent.com/bramkragten/custom-ui/master/updater.json
  132.  
  133. #######google assistan#######
  134. google_assistant:
  135.   project_id: homeassistant-8cda8
  136.   api_key: AIzaSyDf0Z_7gjggEi49YHurM-nNChJzhkFs_iA
  137.   exposed_domains:
  138.    - light
  139.    # - group
  140.     - switch
  141.     - climate
  142.    
  143.  ########MEDIA PLAYER####
  144. cast:
  145.   media_player:
  146.     - host: 192.168.1.3
  147.  
  148. ####influxdb##########
  149. influxdb:
  150.   host: 192.168.1.8
  151.   include:
  152.     domains:
  153.      - sensor
  154.  
  155.  
  156. duckdns:
  157.   domain: ago1980
  158.   access_token: 87194178-d0da-4121-b265-97122f9660a2
  159.  
  160. http:
  161.   base_url: https://ago1980.duckdns.org:8213
  162.   ssl_certificate: /etc/letsencrypt/live/ago1980.duckdns.org/fullchain.pem
  163.   ssl_key: /etc/letsencrypt/live/ago1980.duckdns.org/privkey.pem
  164.  
  165.  
  166. mqtt:
  167.   broker: 192.168.1.8
  168.  
  169.  
  170. light:
  171.   - platform: mqtt
  172.     name: "Sonoff power"
  173.     state_topic: "stat/sonoff5/POWER"
  174.     command_topic: "cmnd/sonoff5/POWER"
  175.     availability_topic: "tele/sonoff5/LWT"
  176.     qos: 1
  177.     payload_on: "ON"
  178.     payload_off: "OFF"
  179.     payload_available: "Online"
  180.     payload_not_available: "Offline"
  181.     retain: false  
  182. ###################test################
  183.   - platform: mqtt
  184.     name: "Sonoff0 power"
  185.     state_topic: "stat/sonoff3/POWER1"
  186.     command_topic: "cmnd/sonoff3/POWER1"
  187.     availability_topic: "tele/sonoff3/LWT"
  188.     qos: 1
  189.     payload_on: "ON"
  190.     payload_off: "OFF"
  191.     payload_available: "Online"
  192.     payload_not_available: "Offline"
  193.     retain: false  
  194.  
  195.   - platform: mqtt
  196.     name: "Sonoff1 power"
  197.     state_topic: "stat/sonoff3/POWER2"
  198.     command_topic: "cmnd/sonoff3/POWER2"
  199.     availability_topic: "tele/sonoff3/LWT"
  200.     qos: 1
  201.     payload_on: "ON"
  202.     payload_off: "OFF"
  203.     payload_available: "Online"
  204.     payload_not_available: "Offline"
  205.     retain: false  
  206.  
  207. #######Switch##########
  208. switch:
  209.   - platform: template
  210.     switches:
  211.       infocamera:
  212.         value_template: "false"
  213.         turn_on:
  214.           service: script.infocamera
  215.           data:
  216.             entity_id: switch.2
  217.         turn_off:
  218.           service: script.infocamera
  219.           data:
  220.             entity_id: switch.1
  221.  
  222.        
  223.  
  224. ##########Sensori#######
  225. sensor:
  226.   - platform: mqtt
  227.     name: "Temperature"
  228.     state_topic: "tele/sonoff5/SENSOR"
  229.     unit_of_measurement: °C
  230.     value_template: '{{ value_json.DS18B20.Temperature }}'  
  231.  
  232.  
  233.   - platform: mqtt
  234.     state_topic: "ha/_temperature1"
  235.     name: "ds18"
  236.     unit_of_measurement: "°C"
  237.     qos: 1
  238.  
  239.  
  240.   - platform: command_line
  241.     name: CPU Temp
  242.     command: "cat /sys/class/thermal/thermal_zone0/temp"
  243.     unit_of_measurement: "°C"
  244.     value_template: '{{ value | multiply(0.001) | round(1) }}'
  245.  
  246.   - platform: template
  247.     sensors:
  248.       battery_ago1980:
  249.         friendly_name: ago1980
  250.         unit_of_measurement: '%'
  251.         value_template: >-
  252.             {%- if states.device_tracker.ago1980.attributes.battery %}
  253.                 {{ states.device_tracker.ago1980.attributes.battery|round }}
  254.             {% else %}
  255.                 {{ states.sensor.battery_ago1980.state }}
  256.             {%- endif %}
  257.         device_class: battery
  258.  
  259.   - platform: time_date
  260.     display_options:
  261.      - 'time'
  262.       - 'date'
  263.       - 'date_time'
  264.       - 'time_date'
  265.       - 'time_utc'
  266.       - 'beat'
  267.  
  268.   - platform: yr
  269.  
  270.   - platform: command_line
  271.     name: ssl_expiration
  272.     unit_of_measurement: Giorni
  273.     scan_interval: 43200 #secondi (ossia ogni 12 ore)
  274.     command: ssl-cert-check -b -c /etc/letsencrypt/live/ago1980.duckdns.org/cert.pem | awk '{ print $NF }'
  275.  
  276.  
  277.  
  278.   - platform: systemmonitor
  279.     resources:
  280.       - type: processor_use
  281.  
  282.       - type: disk_free
  283.         arg: /
  284.       - type: memory_free
  285.       - type: memory_use_percent
  286.       - type: ipv4_address
  287.         arg: wlan0
  288.  
  289.   - platform: uptime
  290.     name: Uptime
  291.     unit_of_measurement: minutes
  292.  
  293.  
  294.   - platform: template
  295.     sensors:
  296.       solarr_angle:
  297.         friendly_name: "Presa Xiaomi"
  298.         unit_of_measurement: 'W'
  299.         value_template: "{{ states.switch.plug_158d0001dc8bc1.attributes.load_power }}"
  300.  
  301.  
  302.   - platform: waze_travel_time
  303.     name: tragitto casa lavoro
  304.     origin: zone.home
  305.     destination: zone.lavoro
  306.     region: 'EU'
  307.  
  308.  
  309.   - platform: dnsip
  310.   # Resolve IP address of home-assistant.io via Google DNS
  311.   - platform: dnsip
  312.     hostname: ago1980.duckdns.org
  313.     name: IP server
  314.     resolver: 8.8.8.8
  315.  
  316.   - platform: command_line
  317.     name: mqtt_server
  318.     command: systemctl show mosquitto.service | awk -F= '/^SubState=/ {print $2}'
  319.     scan_interval: 60
  320.  
  321.   - platform: mqtt
  322.     name: "Tensione"
  323.     state_topic: "tele/Pzem/SENSOR"
  324.     value_template: "{{ value_json['ENERGY'].Voltage }}"
  325.     unit_of_measurement: "V"
  326.  
  327.   - platform: mqtt
  328.     name: "Corrente"
  329.     state_topic: "tele/Pzem/SENSOR"
  330.     value_template: "{{ value_json['ENERGY'].Current }}"
  331.     unit_of_measurement: "A"
  332.  
  333.   - platform: mqtt
  334.     name: "Potenza Ist."
  335.     state_topic: "tele/Pzem/SENSOR"
  336.     value_template: "{{ value_json['ENERGY'].Power }}"
  337.     unit_of_measurement: "W"
  338.  
  339.   - platform: mqtt
  340.     name: "Potenza Factor"
  341.     state_topic: "tele/Pzem/SENSOR"
  342.     value_template: "{{ value_json['ENERGY'].Factor }}"
  343.     unit_of_measurement: " "
  344.  
  345.   - platform: mqtt
  346.     name: "Energia Oggi"
  347.     state_topic: "tele/Pzem/SENSOR"
  348.     value_template: "{{ value_json['ENERGY'].Today }}"
  349.     unit_of_measurement: "kWh"
  350.  
  351.   - platform: mqtt    
  352.     name: "Energia Ieri"
  353.     state_topic: "tele/Pzem/SENSOR"
  354.     unit_of_measurement: "kWh"
  355.     value_template: "{{ value_json['ENERGY'].Yesterday }}"
  356.  
  357.   - platform: mqtt    
  358.     name: "Energia Totale"
  359.     state_topic: "tele/Pzem/SENSOR"
  360.     unit_of_measurement: "kWh"
  361.     value_template: "{{ value_json['ENERGY'].Total }}"
  362.  
  363.  
  364.   - platform: template
  365.     sensors:
  366.       enel:
  367.         friendly_name: "enel"
  368.         icon_template: mdi:coin
  369.         valuetemplate: "{{((states.sensor.consumo_totale_mensile.state | float) + (30.000 | float)) | round(2)}}"
  370.         unitofmeasurement: 'khw'
  371.  
  372. ###########################################################################################
  373.  
  374.  
  375. speedtestdotnet:
  376.   scan_interval:
  377.     hours: 5
  378.     #minutes: 30
  379.   monitored_conditions:
  380.    - ping
  381.     - download
  382.     - upload
  383.  
  384. xiaomi_aqara:
  385.   gateways:
  386.     - host: '192.168.1.5'
  387.       mac: 78:11:dc:af:30:30
  388.       key: btutf73qptnx8f7d
  389.  
  390. mysensors:
  391.   gateways:
  392.     - device: '192.168.1.8'
  393.       persistence_file: '/home/homeassistant/.homeassistant/mysensors.json'
  394.       tcp_port: 5003
  395.   optimistic: false  
  396.   persistence: true  
  397.   version: 2.3.1
  398.  
  399.   #####TELEGRAM#####
  400. telegram_bot:
  401.   - platform: polling
  402.     api_key: 392124673:AAHWjPB5WnwWoTPEh0H-X0Mc9ykfgLFQ4iU
  403.     allowed_chat_ids:
  404.      - 360307101
  405.  
  406. notify:
  407.   - name: telegram
  408.     platform: telegram
  409.     chat_id: 360307101
  410.  
  411. #####IPCAM#####
  412. ffmpeg:  
  413. camera 1:
  414.   - platform: ffmpeg
  415.     name: Test1
  416.     input: rtsp://192.168.1.170:1081/mac/live/ch0?admin:mario2015
  417.  
  418. camera 2:
  419.   - platform: ffmpeg
  420.     name: Test
  421.     input: rtsp://192.168.1.200:554/onvif1
  422.  
  423. camera 3:
  424.   - platform: ffmpeg
  425.     name: Test2
  426.     input: rtsp://192.168.1.168:554/onvif1
  427.  
  428. camera:
  429.   - platform: generic
  430.     still_image_url: https://api.sat24.com/animated/IT/infraPolair/3/W_dot_%20Europe%20Standard%20Time/9263758  
  431.     name: Tempo Infrared
  432.   - platform: generic
  433.     still_image_url: https://api.sat24.com/animated/IT/rainTMC/3/W_dot_%20Europe%20Standard%20Time/6012921  
  434.     name: Rain
  435.  
  436. #############Tracker###########
  437. device_tracker:
  438.   - platform: life360
  439.     username: agorusso80@gmail.com
  440.     password: mario2015
  441.  
  442.   - platform: nmap_tracker
  443.     hosts: 192.168.1.1/24    
  444.     interval_seconds: 65
  445.  
  446. history_graph:
  447.   gr1:
  448.     name: Lights Graph
  449.     entities:
  450.      - sensor.temperature_158d00022caebe
  451.       - sensor.temperature
  452.     hours_to_show: 72
  453.     refresh: 300
  454.  
  455. sonoff:
  456.   username: agorusso80@gmail.com
  457.   password: mario2015
  458.   scan_interval: 3
  459.   grace_period: 600
  460.   api_region: 'eu'
  461.  
  462.  
  463. ############test################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement