Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 108952 articles
Browse latest View live

NGINX add-on and Internal IP

$
0
0

@Mr.Art wrote:

Hi guys. How can I run NGINX Home Assistant SSL proxy not only on name.domain.org, but also on my local IP adress http://192.168.1.15:8123? I need both of them. When I try to type https://192.168.1.15:8123 on iOS HA Companion App, it shows the cert error. I tried to follow these steps: NGINX Configuration. However, I can’t find nginx config file on my system. Even add-on or share folders are empty. I am running HassOS on RPi 4. Thank you in advance for some suggestions or tips.

Posts: 1

Participants: 1

Read full topic


HA not using configuration.yaml

$
0
0

@wassini wrote:

I have installed HA on a RPi4 and I have a lot of integration working “out-of-the-box” - like Philips hue and TP-link and others - but it seems that no matter what I put in the /config/configuration.yaml nothing changes. I have tried to add several different sensors with no luck. Nothing new shows up in the “Entity” list or anywhere else.
I have tried to add some very basic sensors directly from the documentation (copy/paste) still no luck.
Like:

sensor:
# My IP
  - platform: rest
    resource: http://ip.jsontest.com
    name: External IP

or

sensor:
  - platform: yr

I have validated the configuration, restarted the service and rebooted the server.
I have also tried to see if there is anything in the log files - but they are almost empty.
I have tried to add a mistage and it validated it with an error - so the system looks at the configuration file.

This is the complete file:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#customize: !include customize.yaml

sensor:
# My IP
  - platform: rest
    resource: http://ip.jsontest.com
    name: External IP

Posts: 4

Participants: 2

Read full topic

RESTful sensor, XML and Monit

$
0
0

@baz123 wrote:

I’m using what I think is a new feature of the RESTful sensor to pick up an XML feed from Monit (which saves feeding it through Node-Red!).

However, I don’t really understand the different templates etc to be able to pick up the data I want cleanly.

configuralion.yaml

- platform: rest
  name: Monit Hassio
  resource: http://192.168.7.30:2812/_status?format=xml
  json_attributes_path: "$.monit"
  value_template: 'OK'
  json_attributes:
    - "platform"
    - "server"
    - "service"

This collects the XML into a single sensor, but I’d like to break it up and cannot find a combination of configuration to do that :frowning_face:

For example, how could I simply pull out a sensor that has the % of memory used and the CPU Load?

This is what the state attributes look like from the above configuration;

platform:
  name: Linux
  release: 4.19.97-v7l+
  version: '#1294 SMP Thu Jan 30 13:21:14 GMT 2020'
  machine: armv7l
  cpu: '4'
  memory: '3999756'
  swap: '102396'
server:
  id: 501a8b2fcf0b88434cba245a8b32f64c
  incarnation: '1582836234'
  version: 5.25.2
  uptime: '1682'
  poll: '120'
  startdelay: '0'
  localhostname: raspberrypi
  controlfile: /etc/monit/monitrc
  httpd:
    address: 192.168.7.30
    port: '2812'
    ssl: '0'
service:
  '@type': '5'
  name: raspberrypi
  collected_sec: '1582837928'
  collected_usec: '901937'
  status: '0'
  status_hint: '0'
  monitor: '1'
  monitormode: '0'
  onreboot: '0'
  pendingaction: '0'
  system:
    load:
      avg01: '0.17'
      avg05: '0.17'
      avg15: '0.22'
    cpu:
      user: '2.9'
      system: '1.8'
      wait: '0.0'
    memory:
      percent: '21.0'
      kilobyte: '839936'
    swap:
      percent: '0.0'
      kilobyte: '0'
friendly_name: Monit Hassio

This is the JSON the suggested debugger produces (which isn’t actually valid JSON).

{
  "monit": {
    "platform": {
      "cpu": "4",
      "machine": "armv7l",
      "memory": "3999756",
      "name": "Linux",
      "release": "4.19.97-v7l+",
      "swap": "102396",
      "version": "#1294 SMP Thu Jan 30 13:21:14 GMT 2020"
    },
    "server": {
      "controlfile": "/etc/monit/monitrc",
      "httpd": {
        "address": "192.168.7.30",
        "port": "2812",
        "ssl": "0"
      },
      "id": "501a8b2fcf0b88434cba245a8b32f64c",
      "incarnation": "1582750875",
      "localhostname": "raspberrypi",
      "poll": "120",
      "startdelay": "0",
      "uptime": "67823",
      "version": "5.25.2"
    },
    "service": {
      "@type": "5",
      "collected_sec": "1582818697",
      "collected_usec": "769251",
      "monitor": "1",
      "monitormode": "0",
      "name": "raspberrypi",
      "onreboot": "0",
      "pendingaction": "0",
      "status": "0",
      "status_hint": "0",
      "system": {
        "cpu": {
          "system": "1.7",
          "user": "3.0",
          "wait": "0.0"
        },
        "load": {
          "avg01": "0.15",
          "avg05": "0.15",
          "avg15": "0.18"
        },
        "memory": {
          "kilobyte": "910472",
          "percent": "22.8"
        },
        "swap": {
          "kilobyte": "0",
          "percent": "0.0"
        }
      }
    }
  }
}

Posts: 1

Participants: 1

Read full topic

AV receiver state condition

$
0
0

@Umbe wrote:

Hi all,
just a simple question , i try to add in the mini media player card some buttons in order to change source , but i need to add a condition which state : if the av is on change the source to the one selected otherwise wait 10 sec(the av is turning on) and then change the source.
The following is working great , but i would avoid to wait always 10 sec to change source if the av is already on

entity: media_player.denon
hide_when_off: false
hide: name
shortcuts:
  buttons:
    - icon: 'mdi:kodi'
      id: script.denon1_kodi
      type: script
    - icon: 'mdi:bluetooth'
      id: script.denon1_bluetooth
      type: script
    - data:
        entity_id: switch.TV_Audio
      icon: 'mdi:television'
      id: script.denon1_tv
      type: script
    - data:
        entity_id: switch.internet_radio
      icon: 'mdi:radio-tower'
      id: script.denon1_internet_radio
      type: script
  columns: 4
type: 'custom:mini-media-player'


and the script

  denon1_internet_radio:
    sequence:
      - service: media_player.turn_on
        data:
          entity_id: media_player.denon  
      - delay: '00:00:10'           
      - service: media_player.select_source
        data:
          entity_id: media_player.denon
          source: 'Internet Radio'      

thanks

Posts: 2

Participants: 2

Read full topic

Best way to config MQTT TRVs

$
0
0

@ninjadog wrote:

yo good folk

i have Energenie TRVs working through an mqtt broker. Everything works through mosquitto_pub and mosquitto_sub within raspbian lite…
but i want to control within HA.
How would i go about configuring these in terms of

what integration?
what platform ?
what entities ?
what built in types?
configuration.yaml content?

reading the docs, there’s several ways to “cook the egg”. what would YOU recommend, and why?

Posts: 1

Participants: 1

Read full topic

Get Home Assistant to warn me that door has been open for x minutes on interval

$
0
0

@zapp7 wrote:

I want an automation that notifies me via Pushbullet and Google Home speaker if my garage door has been open for X number of minutes. I currently have a bunch of individual automations, one that warns me after 5 minutes, another after 15 minutes, 30 minutes and so on. Is there a way to condense all these into one automation that executes every, say, 5 minutes and tells me how many minutes the door has been open? Here is my automation for the 5 minute mark as an example:

- id: '1567746701645'
  alias: ALERT Main Garage Open Longer Than 5 Minutes
  trigger:
  - entity_id: binary_sensor.garage_main
    for: 0:05:00
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: 'SECURITY ALERT: The MAIN GARAGE door has been open for more than five
        minutes on {{now().strftime(''%Y-%m-%d as of %H:%M:%S'')}}.'
    service: notify.mypushbullet
  - data:
      entity_id: media_player.googlehome1575
      message: The garage door has been open for over 5 minutes.
    service: tts.google_translate_say

Posts: 2

Participants: 2

Read full topic

SSH Addon Stopped Working

$
0
0

@sd_dracula wrote:

I have been using the SSH addon since many versions ago, using ssh key, port 22 and putty to connect.
After 106.0 update I get this:

image

Nothing wrong with the network (tried dns and IP of the raspberry pi) but the SSH addon page in HA works just fine.
image
Is this correct?
Any idea how to resolve?

Posts: 6

Participants: 3

Read full topic

VPN vs NGINX vs DDNS

$
0
0

@ninjadog wrote:

I would like to be able to access HA remotely. The Ha cloud “free” service is reporting “out of stock”. Mmmm.

So my thoughts are:-

    • VPN with Digital Ocean
    • NGINX on my LAN
    • DDNS service redirecting to open ports on my LAN router.

Thing is, the main driver for this is to see my live video streams from my RSTP cameras. But streaming the five cameras I have will need a capable solution. In this regard, I was thinking that whatever my choice is, the bottleneck will be my 20Mpbs upload on my ISP broadband, no?
In other words, why pay someone like Diigital Ocean and setup a VPS VPN with 500Mpbs download, when my LAN server can only upload at 20Mpbs from my camera?

So is there any point in hosting HA on a cloud server or even my own LAN, when the bottleneck is my ISP upload speed.
Might as well setup a DDNS account and install a firewall on my router, or better still setup GINX on a LAN server,?

What do we think?

Posts: 1

Participants: 1

Read full topic


Z-wave loading slow with 0.106

$
0
0

@jriker1 wrote:

HA has had some challenges with loading things on startup since a few versions ago with some of it’s changes but I noticed going from 105 to 106 it does the base loading, then sits. Website doesn’t work and z-wave devices not loading. How do I know that? Well the OZW_log.txt file sits there basically empty and after like 2 or more minutes of idle time it starts growing fast like it used to do right away before. Anyone know what’s going on? I could see if there was high utilization but I’m not seeing it.

THanks.

JR

Posts: 1

Participants: 1

Read full topic

Reverse gauge Card?

$
0
0

@Arsenal10108 wrote:

I just set up a oil tank level sensor with a ultrasonic distance sensor.
It reports back a distance in meters which i wrapped with a template sensor to change it over to inches.
I want to set up a gauge card in the front end that has a gauge for full and slowly goes empty. Typical tank set up. Problem is that the gauge card reads the low numbers of a full tank and reports back low numbers for the gauge.
For reference, I have a 275 Gal oil tank, when the tank is full the oil level is a little over 7" from the sensor, so the sensor is reporting back 7" as the tank empties the distance gets greater, I want to interpret that as the gauge getting smaller, not larger.
Could be something really simple I am just missing.
I basically just want to flip the gauge visuals so shorter is full gauge and longer is empty gauge.

Posts: 2

Participants: 2

Read full topic

`allow_unreachable` in Philips Hue config appears to do nothing

$
0
0

@Tediore wrote:

Running HA Core version 0.106.0. I have allow_unreachable: true set in my configuration for Philips Hue, but it doesn’t appear to actually do anything. I tested this by turning the mains power to a bulb off. The Hue API shows the bulb as unreachable (and so does the Hue app), but Home Assistant will report the bulb as on or off if I flip the toggle even though the bulb is unreachable. The Hue groups that it is a part of also change to on or off accordingly. Based on the Hue docs I’d expect the bulb to go to a state of unavailable or something similar. Here’s my config:

hue:
  bridges:
  - host: 10.0.0.166
    allow_unreachable: true
    allow_hue_groups: true

Config check shows no errors. Changed log level to debug and didn’t find anything either. I just tested the behavior now so I don’t know how it functioned before version 0.106.0 unfortunately. Anyone have any thoughts? Not sure if this is a bug or if I’m just misunderstanding how that configuration option should function.

Posts: 1

Participants: 1

Read full topic

Trying to track down a log error

$
0
0

@mattlward wrote:

Running Hassio 0.105.5 on an I3 with Ubuntu 18.04.4 LTS and docker.

I have been trying to track down this error in my logs.

2020-02-27 19:43:57 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: UndefinedError: 'None' has no attribute 'state'

I tried adding the following in logger:

logger:
  default: warning
  logs:
     homeassistant.helpers.condition: debug

But this does not seem to work as I do not see anything additional in the log. Suggestions please!

Thanks Matt

Posts: 1

Participants: 1

Read full topic

ON-OFF camera streaming

$
0
0

@Klagio wrote:

Hi, I wish to put a switrch or similar on the front end, so that I can temporarily stop a streaming (on the front end is enough). IS this achievable somehow?

Posts: 2

Participants: 2

Read full topic

Don't use server host option?

$
0
0

@Vaughanza wrote:

Hi Guys ,
Just updated my HA and I get a Safe mode and says , Dont use server host option ?

Any idea where I need to look to sort this out ,

Thanks

Posts: 3

Participants: 3

Read full topic

How are zones within zones handled by device tracker

$
0
0

@Dilby wrote:

HI,

I have two zones setup one is “Home” the other is “Village” with Home inside of it. How does a device tracker set it state based on this?

Thanks

Posts: 2

Participants: 2

Read full topic


Telegram Notification Not An Option in Node Red Service Call

$
0
0

@bigverm23 wrote:

notify:
  - platform: telegram
    name: telegram
    chat_id: 12345678
telegram_bot:
  - platform: broadcast
    api_key: xxxxxxxxxxxxxxxxxxxx
    allowed_chat_ids:
      - 12345678

yet when I got to call service to send a test notification, there is no “telegram_bot” option under Domain, nor is telegram available under the Notify Domain as a Service…what am I missing?

Posts: 1

Participants: 1

Read full topic

Still need to change to Lovelace, What is best way?

$
0
0

@carbuthn wrote:

The Addon for Lovelace conversion does not appear to be in the Addon Store, what is the best way to swap to using Lovelace?
Thanks.

Posts: 3

Participants: 2

Read full topic

Most basic input_boolean config not working

$
0
0

@viktak wrote:

Dear All,

I was wondering if there is something special prerequisite to get the input_boolean working.

It looks pretty straightforward based on the documentation and other people’s work, but I haven’t been able to get it to work for the last couple of hours… (I am new to HA, but come from a strong programming background).

This is in my configuration.yaml:

input_boolean:
  test:
    name: Test
    icon: mdi:harddisk

This is in one of the lovelace views:

  - type: entities
    title: Settings
    entities:
      - entity: input_boolean.test

They pass validation, but on the UI this is what shows up:

input_boolean

This is consistent with the fact that the entity (input_boolean.test right?) doesn’t show up in dev/states either.

I’m sure it’s something most basic, but I can’t find anything on it in the documentation.

Or it may be Friday evening…

Posts: 6

Participants: 3

Read full topic

Utility Meter Reset All Data

NGINX Reverse Proxy for HA

$
0
0

@ninjadog wrote:

Using latest Home Assistant installed as a Python venv .Was working fine.

I then installed NGINX and followed this guide:

However, I’m getting errors:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
   # Update this line to be your domain
   server_name ninjadog.ddns.net;

   # These shouldn't need to be changed
   listen [::]:80 default_server ipv6only=off;
   return 301 https://$host$request_uri;
}

server {
    # Update this line to be your domain
    server_name ninjadog.ddns.net;

    # Ensure these lines point to your SSL certificate and key
    # ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    # Use these lines instead if you created a self-signed certificate
    ssl_certificate /etc/nginx/ssl/cert.pem;
    ssl_certificate_key /etc/nginx/ssl/key.pem;

    # Ensure this line points to your dhparams file
    ssl_dhparam /etc/nginx/ssl/dhparams.pem;


    # These shouldn't need to be changed
    listen [::]:443 ssl default_server ipv6only=off; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
    # ssl on; # Uncomment if you are using nginx < 1.15.0
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;

    proxy_buffering off;

    location / {
        proxy_pass http://127.0.0.1:8123;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
}

yields:

daz@pi:~ $ sudo nginx -t
nginx: [emerg] a duplicate default server for [::]:80 in /etc/nginx/sites-enabled/ninjadog.ddns.net:11
nginx: configuration file /etc/nginx/nginx.conf test failed

If I remove the first server block to comment it out

#server {
#  # Update this line to be your domain
#   server_name ninjadog.ddns.net;
#
#   # These shouldn't need to be changed
#   listen [::]:80 default_server ipv6only=off;
#  return 301 https://$host$request_uri;
#}

Yields

daz@pi:~ $ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

And in both cases, I still get errors from journalctl ,

Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 INFO (MainThread) [homeassistant.components.switch] Setting up switch.zwave
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mqtt. Setup failed for dependencies: http
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform mqtt.light: Could not set up all dependencies.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mqtt. Setup failed for dependencies: http
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform mqtt.light: Could not set up all dependencies.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 INFO (MainThread) [homeassistant.setup] Setup of domain person took 0.8 seconds.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: auth, http
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of mobile_app. Setup failed for dependencies: http, webhook
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Could not set up all dependencies.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.1 seconds.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: api, auth, http, onboarding, search, system_log, websocket_api
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 INFO (MainThread) [homeassistant.components.light] Setting up light.zwave
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend, http
Feb 28 18:55:13 pi hass[17186]: 2020-02-28 18:55:13 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 INFO (MainThread) [homeassistant.components.updater] Submitted analytics to Home Assistant servers. Information submitted includes {}
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 3.0 seconds.
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.updater
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: automation, cloud, config, frontend, history, logbook, map, mobile_app, system_health, zeroconf
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of tts. Setup failed for dependencies: http
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not set up all dependencies.
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 4.61s
Feb 28 18:55:14 pi hass[17186]: 2020-02-28 18:55:14 WARNING (MainThread) [homeassistant.bootstrap] Detected that frontend did not load. Activating safe mode
Feb 28 18:55:18 pi hass[17186]: 2020-02-28 18:55:18 INFO (MainThread) [homeassistant.bootstrap] Starting in safe mode

configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

http:
  # For extra security set this to only accept connections on localhost if NGINX is on the same machine
  #server_host: 127.0.0.1
  # Update this line to be your domain
  base_url: https://ninjadog.ddns.net
  use_x_forwarded_for: true
  # You must set the trusted proxy IP address so that Home Assistant will properly accept connections
  # Set this to your NGINX machine IP, or localhost if hosted on the same machine.
  trusted_proxies: localhost


I dont understand , just following these guides ?? Please help

Posts: 2

Participants: 2

Read full topic

Viewing all 108952 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>