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

NGINX Reverse Proxy not loading some elements

$
0
0

@MrSir wrote:

Hi Everyone,

First up just wanted to say a big thank you to everyone’s contributions on this forum. I’ve solved many problems over the last 6 months with such a rich source of helpful info!

Unfortunately I’ve run into a problem I haven’t been able to find a solution for. I have set up an NGINX Reverse Proxy which is working fine and dandy for plex, my irrigation system, etc etc. It is also PARTIALLY working for home assistant. I am able to connect, log in, see my home page and all that good stuff - however there are some elements which will not load through the proxy (they work totally fine locally).

A prime example of this is my ‘camera.adelaideradar’ entity (Australian weather radar station).

I have HA 0.104.2 running in a FreeBSD jail (so it’s NOT hassio).

HA Config:

http:
  ssl_certificate: /home/hass/homeassistant/ssl/test2/server-selfsigned-CA.crt
  ssl_key: /home/hass/homeassistant/ssl/test2/server-selfsigned-CA.key
  base_url: https://homeassistant.MYDOMAIN
  use_x_forwarded_for: true
  trusted_proxies: 192.168.1.73
  ip_ban_enabled: true
  login_attempts_threshold: 5

My NGINX Config is as follows:

server {
    listen 443 ssl;
    server_name homeassistant.MYDOMAIN;
    ssl_certificate /usr/local/etc/letsencrypt/live/homeassistant.MYDOMAIN/fullchain.pem;
    ssl_certificate_key /usr/local/etc/letsencrypt/live/homeassistant.MYDOMAIN/privkey.pem;
    include common_ssl.conf;
    include common_general.conf;

    location / {
        proxy_pass https://192.168.1.166:8123;
        proxy_ssl_trusted_certificate /usr/local/etc/nginx/server-selfsigned-CA.crt;
        proxy_set_header Host $host;
        proxy_ssl_verify off;
        proxy_redirect http:// https://;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_buffering off;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    location /api/websocket {
        proxy_pass https://192.168.1.166:8123/api/websocket;
        proxy_ssl_trusted_certificate /usr/local/etc/nginx/server-selfsigned-CA.crt;
        proxy_set_header Host $host;
        proxy_ssl_verify off;
        proxy_redirect http:// https://;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_buffering off;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

When attempting to open up one of the entities that doesn’t work, the NGINX logs give a response of 444 (i.e. dropped connection):

192.168.1.1 - - [24/Jan/2020:08:49:37 +1030] "GET /api/camera_proxy/camera.adelaideradar?token=XXXX HTTP/1.1" 444 0 "https://homeassistant.MYDOMAIN/lovelace/default_view" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"

(of course in the above I have replaced my real domain with MYDOMAIN).

So it looks like NGINX is dropping some of the requests for entities - yet is allowing others to pass through… I suspect the change required will be in the NGINX config.
Any help would be greatly appreciated!

Posts: 5

Participants: 3

Read full topic


LG Webostv error: no setup function defined

$
0
0

@Vinz87 wrote:

Enabling webostv: in my configuration results in the following error:

ERROR (MainThread) [homeassistant.setup] Setup failed for webostv: No setup function defined.

What does it mean? I’m on Home Assistant v101.3 on a Raspberry Pi, virtual environment installation, and I’m trying to connect to a new LG 55B9PLA.
I already did it in the past months, on previous installations of Home Assistant, I don’t know if something changed in the meanwhile.

Posts: 2

Participants: 2

Read full topic

Emby broke 0.104

Template Binary Sensor getting config error

$
0
0

@Kfox wrote:

No matter how I arrange this, I keep getting an error.

binary_sensor:
  - platform: template
    sensor:
      Bathroom_Fan: 
        friendly_name: "2nd BATHROOM FAN motion"
        delay_off:
          minutes: 2
        value_template: "{{ is_state('sensor.ge_26931_smart_motion_switch_burglar_5', '8') }}"

Discover some devices automatically

discovery:

# Sensors
sensor:
  # Weather prediction
  - platform: yr
  - platform: random
  #- platform: template
  # Motion
  #- plateform:  state

I get more errors if I UNcomment -platform: template

Thx

Posts: 2

Participants: 2

Read full topic

Single mqtt message translated to multiple sensor events with custom creation time

$
0
0

@matheusbrat wrote:

Hi,

I’m building a esp8266 with temp/hum which has deep sleep functionality as a lot of people. But I want to wakeup it, save it to rtc memory, go to sleep and avoid connecting to internet multiple times. So once every 3 hours, it would publish all messages to mqtt (or maybe a single message to avoid the connection overhead).

My question would be: is it possible to translate a single mqtt message into multiple sensor reads? Also, how could I set a custom date?

For example:
10:10 esp8266 message publish 6 entries (2 for each hour) this is transformed in 6 sensor entries with first being:
Last message + 30 min (10:40)
Last message + 30 min (11:10)
Last message + 30 min (11:40)
Last message + 30 min (12:10)

So I guess I would need some type of processing of the mqtt message and being able to set a custom datetime for when the event happened. So when I plot this, even if everything was received at once, I would still see a nice graph.

I thought on using appdaemon + connecting to the dabatase and inserting the data manually but this seems so hacky. I hope it is possible in a different way.

Any suggestions? Thanks.

Posts: 3

Participants: 3

Read full topic

Z-Wave Thermostat Entities

$
0
0

@Tim1 wrote:

I have been using a GoControl Z-Wave Plus thermostat (GC-TBZ48L) for some time now and am happy with it. The only downside has been that 2 climate entities are created (one for heat, one for cool). This has been normal and expected behavior.

With the release of Home Assistant 0.103 a fix was included for this (https://github.com/home-assistant/home-assistant/pull/27040) which should instead create a single entity as long as COMMAND_CLASS_THERMOSTAT_MODE is supported by the Z-Wave thermostat. I updated but still had 2 entities (I assumed this to be normal, as perhaps the Z-Wave device needed to be removed/added to be detected with the new update). I removed the thermostat via the Z-Wave control panel, verified it was gone, restarted Home Assistant, added the thermostat and then found that 2 entities were still created (one for heat and one for cool).

My thermostat seems to support the appropriate command class: https://products.z-wavealliance.org/products/2370/classes

Additionally when adding the thermostat I get the following line in the OZW Log:

Info, Node015, ZWave+ Info Received from Node 15
#and after other command classes listed
Info, Node015,     COMMAND_CLASS_THERMOSTAT_MODE

So it seems OZW does see the command class Home Assistant needs based on this new update.

Anyone having any success with the new update combining their Z-Wave thermostat entities?

Posts: 4

Participants: 2

Read full topic

MQTT trigger doesnt work

$
0
0

@dinth wrote:

Ive got MQTT messages like this:

zwave/Kitchen/Remote/91/1/1 "Pressed 2 Times"
zwave/Kitchen/Remote/91/1/1 "Inactive"

and wanted them to trigger an automation:

  - id: kitchen_remote_front_garden_light_on
    alias: Kitchen remote front garden light on
    trigger:
      platform: mqtt
      topic: zwave/Kitchen/Remote/91/1/1
      payload: "Pressed 2 Times"

Unfortunatelly this automation never gets triggered. Triggering it by the service works, so the automation works fine, just doesnt trigger.
I bet it has something to do with spaces with payload, but how can i fix that?

Posts: 4

Participants: 3

Read full topic

Spotify Playlist card authentication does not work

$
0
0

@parkkralle wrote:

I would like use the custom spotify card. (https://github.com/custom-cards/spotify-card)

After installation I only get the authenticate picture.
image

If I click on it the login window appears, then I will be forwarded to a page with the error message “INVALID_CLIENT: Invalid client”.
image

My configuration:

  • Spotify Developer
    image
  • Home Assistant
    image

image

What is wrong in my configuration?

PS:
The Spotify Player does work.
image

Thanks for help!

Posts: 5

Participants: 2

Read full topic


Install vscode (visual studio code) as a separate docker container

$
0
0

@cpuram wrote:

I am running my home-assistant (not HassIO) as a docker container and wanted to install vscode. Here is what I did.

  1. create local folders to hold vscode config data

mkdir /config
mkdir /config/working_folder

  1. install docker container
    docker run --name vscode --restart unless-stopped -p 8443:8443 -itd -v /config:/config -v /path_to_hass_config:/config/working_folder -e ‘TZ=Australia/Adelaide’ -e PASSWORD=xxx -e SUDO_PASSWORD=xxx linuxserver/code-server

  2. log into vscode web-ui on http://ip:8443. on the welcome page under Start, click “Add workspace folder…” and select /config/working_folder. you should be able to see all your hass config files. At this point, we have a working code editor.

  3. However to make it similar to hassio extension, with all those autofill bells and whistles, we need to install a few extensions. I fetched the list from the official addon here.

emilast.LogFileHighlighter
ESPHome.esphome-vscode
keesschollaart.vscode-home-assistant
lukas-tr.materialdesignicons-intellisense
oderwat.indent-rainbow
redhat.vscode-yaml
usernamehw.errorlens
vscode-icons-team.vscode-icons

for some reason I am unable to search for them with in vscode web-ui. so I downloaded vsix files and install them manually. here is how I did it.

a) goto vscode marker place and search for the above extensions, one at a time, and download them.
b) move those vsix files to vscode config folder
c) In the vscode web-ui, click on hamburger icon (top left) > view > extensions
d) in the extensions side bar click the 3 dots (’…’) and click “install from vsix”. under /config select and install the extensions, one by one.

  1. close the vscode web-ui (browser) and reopen it.
  2. In order to provide home-assistant access to vscode, in the settings, search for home assistant and provide url (http://ip:8123) and a long lived token.
  3. similarly you need to provide esphome url (http://ip:6052) as well.

hope this helps someone.

Posts: 1

Participants: 1

Read full topic

Configuration is not loading my YAML file

$
0
0

@venkatesh wrote:

I am on Home Assistant 0.104.3
Recently I tried to make changes to configuration.yaml and other yaml file which are included from “includes” folder. But none of the changes are getting after I restart home-assistant.

So while looking at the folders, I found “.storage” and it has “lovelace” file and if I change in this file, the changes are reflecting in UI.

So how I can use YAML configuration instead of lovelace. Please guide me thanks.

Posts: 4

Participants: 2

Read full topic

Setting up snapshot and sending MP3 to several Sonos?

$
0
0

@tottow wrote:

Hi,

I was wondering if anybody has done a script that just snapshots the current Sonos playing (1 or more speakers), sends a sound/mp3 to all of the “active ones” and then restores what it was playing. I have a functioning doorbell script that works for ONE entity. I see a lot of examples where people do unjoin and send the sound to one speaker, but I would if possible like to send it to those Sonos players that are in use when the doorbell rings. Could I just drop the unjoin part and use snapshot and restore?

All examples appreciated!

TJ

Posts: 1

Participants: 1

Read full topic

Script to call scene doesn't work

$
0
0

@Bollux wrote:

Hi all,

I’m trying to create a script to call a specific scene. I call the script from my floorplan. When i add the script and reboot hassio, i get and error that default.config could not setup dependancies.

'movie_scene_toggle': 
  sequence:
  - service: scene.turn_on
    data_template:
      entity_id: >
        {% if states.light.0xec1bbdfffea31ba3_light.attributes.brightness == 20 %}
          scene.livingroom_normal
        {% else %}
          scene.livingroom_dim
        {% endif %}

Posts: 1

Participants: 1

Read full topic

What's "Text to Speak" for on these Chromecast media card?

Error adding iCloud integration

$
0
0

@BoDikeman wrote:

Hello everyone,
Running hassio for less than 24 hours and get nothing (as in no devices) when I add the iCloud integration. Tried the front end and configuration.yaml route with the same results. I get the following in the log:

2020-01-24 09:24:51 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry my@emailaddress.com for icloud
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 215, in async_setup
    hass, self
  File "/usr/src/homeassistant/homeassistant/components/icloud/__init__.py", line 158, in async_setup_entry
    await hass.async_add_executor_job(account.setup)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/icloud/__init__.py", line 307, in setup
    self.update_devices()
  File "/usr/src/homeassistant/homeassistant/components/icloud/__init__.py", line 341, in update_devices
    self._fetch_interval = self._determine_interval()
  File "/usr/src/homeassistant/homeassistant/components/icloud/__init__.py", line 411, in _determine_interval
    int(min(intervals.items(), key=operator.itemgetter(1))[1]),
ValueError: min() arg is an empty sequence

My iCloud is pretty generic. My whole family and all of their devices are in FInd My. Not using 2FA.

On several occasions after adding the integration I receive an email notification from Apple regarding a new sign in to iCloud. It’s just that nothing happens after that.

Any ideas what to try next?

Thanks everyone,
Bo

Posts: 1

Participants: 1

Read full topic

LIFX Problems out of the blue

$
0
0

@urbanscribe wrote:

suddenly all the LIFX cloud api died and scenes become unavailable
same config

scene:
  - platform: lifx_cloud
    token: HIDDEN

on 104.3 stable
worked yesterday on same build
reboot/restarted multiple time
following error each time

curl works. also http request = 200 (ok)

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/lifx_cloud/scene.py", line 41, in async_setup_platform
    scenes_resp = await httpsession.get(url, headers=headers)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
    timeout=real_timeout
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
    req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
    req=req, client_error=client_error)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 985, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1013, in _create_connection_transport
    await waiter
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/lifx_cloud/scene.py", line 41, in async_setup_platform
    scenes_resp = await httpsession.get(url, headers=headers)
  File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 45, in __exit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 92, in _do_exit
    raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError

Posts: 1

Participants: 1

Read full topic


Aqara Zigbee motion sensors don't seem to use repeaters and become unavailable after ~12 hours

$
0
0

@dshanaghy wrote:

I am troubleshooting some aqara motion sensors setup within Hass.io
They are connected via the husbzb-1 controller which is working flawlessly with other devices.

TL/DR

  • 1 aquara motion sensor is close to the hub and works fine.
  • 2 other aquara motion sensors repeatedly become unavailable
  • Repeaters added to the husbzb: smartthings outlet, GE lightswitch don’t seem to be utilized by the aquara motion sensors
  • I haven’t found any useful information in the logs when the sensors become unavailable.
  • I have an aqara door contact sensor in the laundry room and that is functioning fine.

Open Questions

  • SmartThings & Hue hub: Can devices added to husbzb use these as repeaters?
  • How can I find in log files what the parent of a zigbee device is?
  • What would be the best/easiest way to map the network?

DETAILS

One of the aqara motion sensors is about 10ft from the controller in the living room. It’s working perfectly and im using it for motion and occupancy automations. I saw a post about them not working when mounted upside down. This one IS working and IS mounted upside down! Many other post out there about them becoming unavailable but the conditions didn’t quite seem to match with mine in various ways

I have tried 2 other aqara motion sensors in various locations further from the controller.

  • laundry room [40ft through 3 walls + fridge]

  • kitchen [30ft through 2 walls].

They usually work for about 12 hours, then go into an unavailable state until I remove and re-add them.

I’ve turned on debug logging for ZHA but the best information i can glean has mostly been from the “add zha device” screen. That info doesn’t go into the home-assistant.log file. Is it being written to file?

There is a smart things outlet in the living room (between the hub and the kitchen/laundry room) which I changed from the smart things hub to the husbzb controller to act as a repeater. I did this because im unsure if the smart things hub will repeat signals for devices that were not attached directly to it (I am unsure of same question with my philips hue hub)

I also added a GE zigbee lightswitch in the laundry room to the husbzb to repeat the signals directly from that area but it didn’t help and that lightswitch is working perfectly. I shutdown the hass box and pressed the buttons on all the devices to be sure they re parented themselves.

I moved the unavailable sensors closer to the hub in the hallway to see if it would become available again. I also pressed the button a few times. That was 4.5 hours ago now and it’s still unavailable.

Been going through all this moving around, re-adding, re-parenting, trying to route through repeaters for 3 days now.

I’m pretty much at my wits end with these things…I like their small size and form factor and wide angle of detection as compared to most other zigbee motion sensors but they seem very unreliable and I don’t get why they appear to not parent with a repeater. I haven’t seen any logging of a parent Id in the logs when I add them.

Log Settings

logger:
  default: info
  logs:
    homeassistant.components.zigpy: debug
    homeassistant.components.bellows: debug
    homeassistant.components.zha: debug

Posts: 7

Participants: 3

Read full topic

Setting RGB light color based on sensor value

$
0
0

@vmazmaz wrote:

Hello,

I’m currently trying to create a custom color temperature slider for WWA LED strip (cold white, warm white and amber instead of RGB). For that I have basically created template sensors for the RGB channels based on the input of a color temperature slider.
I would like to change the color of my lights when I change the slider position. I have created an automation but this results in a config error:

  alias: CT WWA
  trigger:
  - entity_id: input_number.ct_slider
    platform: state
  condition: []
  action:
  - data:
      rgb_color: 
        - {{ states('sensor.red') | int }}
        - {{ states('sensor.green') | int }}
        - {{ states('sensor.blue') | int }}
    entity_id: light.wled2
    service: light.turn_on

Thank you !

Posts: 10

Participants: 4

Read full topic

Snektek Epever Solar Dashboard Monitoring Data Extraction

$
0
0

@xion2000 wrote:

I’m in the early ish stages of using Home Assistant and one of the things I would very much like to do would be to extract some of the data from my solar data I collect using a snektek Epever Solar Wifi dashboard (a great piece of equipment for monitoring any epever inverter remotelly), to use within Home Assistant (specifically Battery Voltage) I run a small PC from 12v leisure batteries that I charge through the day from a few solar panels hooked up to the epever inverter. During the winter months there is not enough sunlight (in the UK) to allow me to run totally off grid so I use a 2A car battery charger to maintain the battery level. I would like to extract the battery voltage from the solar dashboard (webpage) and setup a command within Home Assistant to only turn on the battery charger when the battery voltage falls below a certain level.

Posts: 1

Participants: 1

Read full topic

Picture Entity Card - Create thumbnail on server

$
0
0

@whereismycoffee wrote:

I setup 4 hikvision cameras using the generic camera config with a snapshot URL. The UI automatically created picture entity cards that show a thumbnail. Correct me if I’m wrong, but it appears that the thumbnail is simply the full sized image resized on the client. This is very bandwidth intensive and I’d prefer to have thumbnails created server side and only request a full image when I click on it. Is there a supported setup that accomplishes this? Thanks.

Posts: 5

Participants: 2

Read full topic

Alert component

$
0
0

@jeppper wrote:

Can someone explain what the “can acknowledge” variable does?
I do get notifications on my iOS device but they look and behave the same, whether “can acknowledge” is set to true or false.

Is it possible to add a custom sound to an alert?
I can with the notify service, but it would be great if this was also possible with alerts.

Posts: 4

Participants: 2

Read full topic

Viewing all 105473 articles
Browse latest View live


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