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

Using the NGINX Addon to Reverse Proxy a 3rd Party App

$
0
0

I have a working HASS setup on a RPi, running 0.118.2. I have used the standard guide for setting up DuckDNS and a NGINX reverse proxy, which are both installed via the supervisor as addons. This all works perfectly for remote access to my Home Assistant. (And setup was impressively easy!)

I also have another app installed on a different server, available only on my internal home network on HTTP. I’d like to securely access this app externally, without using HTTP.

Seeing as NGINX is working so well, and all the certs and stuff are already setup, I’d like to configure NGINX on HASS to handle reverse proxy-ing for that additional app.

So currently:

Looking at the documentation on the addon, it looks like I could be trying customize.active=true. However I don’t currently have anything in my /share directory.

Should I set customize.active=true and customize.default="nginx_proxy_default.conf"… then create that file and fill it out as per standard NGINX documentation?

Most importantly, if I do this, will it overwrite the existing config and break my existing reverse proxy?

Any and all help is appreciated!

1 post - 1 participant

Read full topic


Connection user and account no longer available?

$
0
0

I wanted to add a new person today and connect it to a user account so the user can log in. But as soon I click on “allow to login” behind the person add window it opens the user creating window. In older HA version I could just select an existing user I wanted to connect the person to. Old accounts still work what I see but not new accounts. Is that a know thing or do I do something wrong?

Btw: tried another browser (Chrome) and there it worked correct again. Problem is Safari on Mac it seems.

1 post - 1 participant

Read full topic

Z-wave network unavailable on restart

$
0
0

TLDR: how do I get HA to re-establish z-wave values via mqtt on restart without having to restart zwave2mqtt network? This used to work a few major versions of HA ago.

I run zwave2mqtt -> mosquitto mqtt -> home assistant all in docker on top of an Arch LTS host.

A few major versions of HA ago this was all working fine so that if I had to restart HA for some reason (change of config, new image etc) then when it came back up the z-wave network was all present and correct. This is important as I primarily use a number of z-wave devices as a security system.

Now however if I just restart home assistant, I then have to follow this up with a restart of zwave2mqtt to get the z-wave network back up and running. I’m pretty sure this is a recent (~6 month) change, but I’m only now getting around to addressing it.

I’ve tried adding in a custom component (monitor docker) so that I can add a switch to lovelace to restart zwave2mqtt if I’m away from home and something goes wrong. But I’ve found this custom component to be unreliable - plus it’s a sticking plaster and not a proper solution.

Below are the relevant bits of my docker compose, and configuration yaml, suspect I can do something with mosquitto so that the last values are read back in on restart?

docker-compose

  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto:latest
    restart: always
    environment:
    - TZ=Europe/London
    - UID=1000
    - GID=1000
    - UMASK=022    
    volumes:
      - /mnt/btrfs_raid/docker/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
      - /mnt/btrfs_raid/docker/mosquitto/data:/mosquitto/data
      - /mnt/btrfs_raid/docker/mosquitto/log:/mosquitto/log
    ports:
      - 1883:1883
      - 9001:9001

  zwave2mqtt:
    container_name: zwave2mqtt
    image: robertslando/zwave2mqtt:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    environment:
    - TZ=Europe/London
    - UID=1000
    - GID=1000    
    networks:
      - zwave
    devices:
      - /dev/ttyACM0:/dev/ttyACM0
    volumes:
      - /mnt/btrfs_raid/docker/zwave2mqtt/store:/usr/src/app/store
    ports:
      - 8091:8091

  homeassistant:
    container_name: homeassistant
    image: homeassistant/home-assistant:stable
    volumes:
      - /mnt/btrfs_raid/docker/home-assistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - TZ=Europe/London
    restart: always
    network_mode: host
    dns:
      - 1.1.1.2
      - 9.9.9.9
    depends_on:
      - mosquitto
      - zwave2mqtt

configuration.yaml (relevant bits)

mqtt:
  broker: 192.168.1.9
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

1 post - 1 participant

Read full topic

[Vacuum] Go to previously unreachable position

$
0
0

Hi there,
I’m quite challenged by my Vacuum (Roborock S50, newest Firmware) - maybe somebody can help me out:
I want to create an automation where the vacuum drives to a specific location to be cleaned. The location is not always reachable from the dock, because a door can be closed. The automation should only trigger when the door is opened. But when the internal map of the vacuum shows no connection to the goto-position (because the door was closed during last clean), the vacuum won’t navigate to it. I’ve already tried to drive directly in front of the door, but the map won’t update. Did anyone experience this, too? Does anyone have an idea how to solve this?

1 post - 1 participant

Read full topic

Error integrating Octoprint

$
0
0

I can’t integrate Octoprint in Hassio. This is my setup:

  1. Hassio in a raspberry
  2. Octoprint in an other raspberry but with installation under raspbian. In this raspberry there are also PiHole, Unifi Controller and motionEye. Due to port conflict among the programs Octoprint is installed to be reachable at port 5000.
    This is config.yaml:
octoprint:
  host: 192.168.10.3
  api_key: #################
  name: Ender3 pro
  bed: true
  number_of_tools: 1

This is the error in log:

Logger: homeassistant.setup
Source: components/octoprint/__init__.py:241
First occurred: 8:50:36 (1 occurrences)
Last logged: 8:50:36

Error during setup of component octoprint
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/octoprint/__init__.py", line 158, in setup
    octoprint_api.get("printer")
  File "/usr/src/homeassistant/homeassistant/components/octoprint/__init__.py", line 241, in get
    self.printer_last_reading[0] = response.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 2 column 5 (char 5)

I think the problem is that HASSIO look for Octoprint at the default port 80, but at that port there is PiHole.
How can i fix this?
Thanks in advance

1 post - 1 participant

Read full topic

Enable Hue Bridge scene via Button

$
0
0

Hi,
I’m really new to Home-Assistant and my problem cannot be as complicated as it is for me as a new user. But as I only find topics regarding more complicated automations and scripts, I’m no creating my own topic.

What do I want to achieve?
I want to create a button in Lovelace, which by a single click executes a scene which is stored on my Hue Bridge V2.

What have I done so far?
I created scripts for every scene I want to use in my scripts.yaml like this:

name_of_scene:
  alias: 'Scene Name'
  sequence:
  - service: hue.hue_activate_scene
    data:
      group_name: Room_Name
      scene_name: Scene_Name
  mode: single
  icon: mdi:some-icon

I then created a button in lovelace like this:

- type: button
        entity: script.name_of_scene
        name: Short Scene Name

What are my current results?
I seems to be right, what I have done because when pressing the button a popup appears in which my script can be executed (and therefore my scene gets enabled).

What should be changed?
I don’t want to press “execute”, but the script (in this case the scene) should be immediately executed when pressing the button. I tried to put “tap_action” in my Lovelace button, but this resulted in a missing popup and also didn’t enable the scene from my Hue Bridge.

I don’t think it can be very complicated to execute the script directly / immediately when pressing the button, but I don’t know how to get there. Please give me some advice on how to get this done.

Thanks in advance.

1 post - 1 participant

Read full topic

Help! Failed to call service climate/set_hvac_mode. required key not provided @ data['hvac_mode']

$
0
0

I know it’s late but, what am I doing wrong?

type: entities
show_header_toggle: false
entities:
  - entity: input_select.living_room_hvac_mode
  - type: call-service
    icon: 'mdi:thermostat'
    action_name: Change HVAC Mode...
    name: ' '
    service: climate.set_hvac_mode
    data_template:
      entity_id: climate.living_room
      hvac_mode: '{{ states.input_select.living_room_hvac_mode.state }}'

2 posts - 2 participants

Read full topic

Send files with SSH

$
0
0

I cant get it working for the /config/www folder in hassio.

I have:
raspberry pi 4
Home Assistant core 0.117.2
Addon: SSH & Web Terminal

I can use:

cp /dev/stdin/ ~/test.txt

That will create the file i want, but it is not in the /config/www folder. When i use the code from above with the full path i get a error. Permission issues, i have seen “solutions” like root access and big warnings next to them, so i dont want to mess around with root permissions and stuff.

How can i send files over SSH to the right folder?

Maybe share a new created folder? Or move files around with some code?

3 posts - 3 participants

Read full topic


Squeezebox media image bug since 0.117 or 0.118?

$
0
0

After updating I noticed that Squeezebox cover art is not shown anymore in my custom lovelace page. A different take on designing a Lovelace UI

All is fine in the mini media player I also use (see below), but when fetching the entity_picture from the media player things go wrong.

I use my chromecast devices as squeezebox players. And I grab the entity picture from the cast media player, not the squeezebox media player. When I look in the dev tools - states I see that the entity_picture attribute lists the url wrongly:

entity_picture: //<local squeezebox server ip>/music/<music id>/cover.jpg

Where it should show:

entity_picture: http://<local squeezebox server ip>/music/<music id>/cover.jpg

I assume that the image is shown correctly in the mini media player, since that will grab it from the squeezebox media player and not the cast media player.

1 post - 1 participant

Read full topic

PV generation to guided loading a Renault Zoe?

$
0
0

Hello Community,

would like to ask if that could be realized ?
HW is Fronius PV-Generator, SmartMeter(Product not jet fixed), go-Echarger.

THX

1 post - 1 participant

Read full topic

Picture-Elemtns: dynamically changing color of a State-Label and conditionals elements based on attribute

$
0
0

Hello,

Two Questions:

  1. Is it possible to change the color of a state-label in a picture-element based on a state?
    I tried the following:
type: picture-elements
elements:
  - type: state-label
    entity: sensor.valve_livingroom
    style: |
      ha-card {
        color: {% if states('sensor.valve_livingroom') | float > 0 %} red {% else %} blue {% endif %};
      top: 60%
      left: 60%
      }

Even if I move “top” and “left” outside of “ha-card”, it’s not working. It’s just empty. No error message.

  1. Is it possible to set a conditional element based on an attribute in a picture-element?
type: picture-elements
elements:
  - type: conditional
    conditions:
      - entity: climate.002018a99c23ba
        attribute: 'level', > '0.14' (or somethin similar, instead of state)
    elements:
      - type: image
        image: /local/grundriss/wohnungstuer_offen.png
        style:
          transform: none
          top: 0%

Thanks for your help!

Jens

1 post - 1 participant

Read full topic

Reading third level in JSON - help!

$
0
0

Hi,

Can anyone help me extract the “quote” from this JSON. The best I can get is contents.quotes - after that it just gives me a blank.

JSON:

{
  "success": {
    "total": 1
  },
  "contents": {
    "quotes": [
      {
        "quote": "I love doing stuff with Todd Barry and Jon Benjamin. We give the stage to good bands and funny people.",
        "length": "102",
        "author": "David Cross",
        "permalink": "https://theysaidso.com/quote/david-cross-i-love-doing-stuff-with-todd-barry-and-jon-benjamin-we-give-the-stag",
        "tags": [
          "funny",
          "people",
          "tso-love"
        ],
        "id": "x0TUs0FaOoZ7owrFc_VPVweF",
        "language": "en",
        "background": null
      }
    ],
    "requested_category": "funny",
    "requested_author": null
  },
  "baseurl": "https://theysaidso.com",
  "copyright": {
    "year": 2022,
    "url": "https://theysaidso.com"
  }
}

3 posts - 3 participants

Read full topic

Nighttime water consumption for tiny leak detection

$
0
0

I would like to measure my nighttime water consumption between 1 a.m. and 5 a.m. (when i don’t use water) in order to be notified if there has been a night-time consumption on a long period
to detect tiny leaks.
I tried history_stats but it is not suitable for consumption, I am already using utility_meter but I do not see how to use it only for a given period. ditto for the statistics component. an idea?
my counter configuration

 - platform: snmp
    host: !secret snmp_host
    community: public
    baseoid: 1.3.6.1.4.1.21796.4.6.1.3.1.7.1.1005
    name: Compteur Eau Froide
    unit_of_measurement: m³

the statistics

1 post - 1 participant

Read full topic

Can't Remove Node

$
0
0

I have tried several different methods, including the method described in the docs regarding editing the json attributes, but I can’t successfully remove/replace a node. I have tried factory resetting as well, but no luck. Here is the log message when I try and remove it as a failed node:

2020-11-24 08:28:39.903 Info, ControllerCommand_RemoveFailedNode
2020-11-24 08:28:39.903 Detail, contrlr, Queuing (Command) ControllerCommand_RemoveFailedNode: 0x01, 0x05, 0x00, 0x61, 0x32, 0x2f, 0x86
2020-11-24 08:28:39.903 Detail, Notification: ControllerCommand - Starting
2020-11-24 08:28:39.903 Detail,
2020-11-24 08:28:39.903 Info, contrlr, Sending (Command) message (Callback ID=0x2f, Expected Reply=0x61) - ControllerCommand_RemoveFailedNode: 0x01, 0x05, 0x00, 0x61, 0x32, 0x2f, 0x86
2020-11-24 08:28:39.904 Detail, contrlr, Received: 0x01, 0x04, 0x01, 0x61, 0x08, 0x93
2020-11-24 08:28:39.904 Detail,
2020-11-24 08:28:39.904 Warning, contrlr, WARNING: Received reply to FUNC_ID_ZW_REMOVE_FAILED_NODE_ID - Node not found
2020-11-24 08:28:39.904 Detail, Node147, Expected callbackId was received
2020-11-24 08:28:39.904 Detail, Node147, Message transaction complete
2020-11-24 08:28:39.904 Detail,
2020-11-24 08:28:39.904 Detail, contrlr, Removing current message
2020-11-24 08:28:39.904 Detail, Notification: ControllerCommand - Failed

I am on .116.4 and this is for a Zooz ZSE09 mini sensor.

1 post - 1 participant

Read full topic

How to get the name of the actual state_topic in an MQTT sensor?

$
0
0

I would like to have a single sensor that gathers all MQTT events for a set of topics (specifically, form Zigbee2MQTT). I tried to add

sensor:
  - platform: mqtt
    state_topic: "zigbee2mqtt/+"
    name: zigbee

and I indeed now see a sensor.zigbee with the value of the last MQTT message from Zigbee2MQTT. The problem is that I do not know what topic it relates to.

Would there be a smart way to create such a sensor and avoid making one entry per device (topic)?

2 posts - 2 participants

Read full topic


MPD player - how to play 'something'?

$
0
0

I installed ‘MPD player’ add-on, without further set-up. And I can not browse/play any files.
I put some sample ‘mp3’ in ‘/config/www’… But how play it?
Also the proper settings in ‘configuration.yaml’…
Some additional set-up is needed? Any password/user…?

1 post - 1 participant

Read full topic

Home assistant installation error

$
0
0

Good morning

i installed raspberry with its operating system.

Now I am following the guide below to install home assistant.

When I run the following command “hass -v”, after some configuration that come out it stops at the following message and doesn’t go further, of course the configuration is not completed
and it does not install

2020-11-24 02:18:39 INFO (MainThread) [homeassistant.components.updater] Submitted analytics to Home Assistant servers. Information submitted includes {}

Where can the problem be and how can I fix it?

Thanks for your help

1 post - 1 participant

Read full topic

My first automation: How do I use a variable?

$
0
0

I find it very difficult to find some information on how to use the helper variables. And the UI is no help either.

How do I read the value behind an input_select variable and combine it to use it as a new value?

My automation: I have some automation which do time based select different scene names into the variable input_select.sun_cycle - which works great.

I like to use those changes as trigger, when the conditions are right, to switch the scenes. This also works great - with trigger.to_state.state as variable.

But I like to switch on the automated scene as well when I come home or I turn the automation on. So I have to use multiple triggers and read the value of input_select.sun_cycle directly.

How do I do this?

I tried the following (and some other stuff) unsuccessfully.

alias: activate suncycle scenes
description: ''
trigger:
  - platform: state
    entity_id: input_select.sun_cycle
  - platform: state
    entity_id: person.ruben
    to: home
  - platform: state
    entity_id: input_boolean.virtual_sun_cycle
    to: 'on'
condition:
  - condition: state
    entity_id: person.ruben
    state: home
  - condition: state
    entity_id: input_boolean.virtual_sun_cycle
    state: 'on'
action:
  - service: scene.turn_on
    data_template:
      entity_id: 'scene.{{ states(input_select.sun_cycle) }}'
mode: restart

1 post - 1 participant

Read full topic

Don't understand the changes in the new template engine

$
0
0

Dear all,
after updating from 116.4 to 118.2 I experince trouble with at least one of my template sensors.
I found the breaking changes section in the release notes but I can’t figure what I would have to change.
This is my sensor setup:

#Oekofen Heizung
  - platform: rest
    resource: http://x.y.z.a?
    scan_interval: 10
    name: "oekofen"
    value_template: "{{ value_json['system.system_info'] }}"
    json_attributes:
      - system
      - weather
      - forecast
      - hk1
      - ww1
      - pe1
      - error
  - platform: template
    sensors:
      oekofen_aussentemp:
        friendly_name: 'Heizung Aussentemp. Fühler'
        value_template: "{{ ((state_attr('sensor.oekofen', 'system')['L_ambient'] | int) *0.1) | round(1) }}"
        unit_of_measurement: "°C"

The sensor oekofen is giving the same output as before:

system: 
system_info: system global variables
L_ambient:
  val: '81'
  unit: '?C'
  factor: '0.1'
  min: '-32768'
  max: '32767'
...

friendly_name: oekofen

Anyhow, the sensor oekofen_aussentemp gives me a reading of 0.0 which is the same for all other sensors related to the heating. Just saying, a heating with all values 0.0 would make that much sense the values are not 0 in the rest sensor reply.

:roll_eyes: :roll_eyes: :roll_eyes:

I know, it should be easy but I can’t figure it.

Thanks for support!!
Ralf

1 post - 1 participant

Read full topic

[Supervisor] Slow loading when outside network

$
0
0

Hi there!

I’m having issues currently that I didn’t have before with Supervisor or with addons. Whenever I go on my server from an external network on the Supervisor page or on a addon ingress page that I pinned on the side, it takes a lot of itme to load.

When I do the same but from the internal network, no issues. I don’t see any logs with issues.

Here is my setup:

  • RPI4 4GB RAM (using good power adapter)
  • 128Gb SANDISK usb hard drive (boot on usb)
  • Ubuntu 20.04 server LTS
  • Using docker image (followed Installing Home Assistant Supervised on Raspberry Pi OS)
  • Using duckdns + nginx
  • Conbee 2 attached
  • Addons: ADB, duckdns, file editor, grafana (disabled), home assistant google drive backup, influxdb (disabled), mariadb, mosquitto broker, nginx, zibee2mqtt edge

For info, the memory usage is about 26%, 13.6% of hard drive used, 35°C. In terms of internet connectivity, using Google DNS in my router, using IPV4 (I can"t seem to use V6 since I’m using a router behind the internet supplier router and passtrough just doesn’t work).
My download is 18.32Mb/s, upload 0.804Mb/s (using nPerf). When using my internet supplier status I’m at 20.7 and 1.1.

I tried to flash everything back from scratch but to no avail. I tried reinstalling every addon but doesn’t do anything either.

I really don’t know what to do, I hope I don’t need to use a NUC instead since the only issue is when I’m outside of the home network… Furthermore it’s only the supervisor, lovelace works fine, I can’t easily move between the menus et go into the HA config.

Using app on android or through chrome is the same (same on Windows using my phone connection).

Thanks for your help!

1 post - 1 participant

Read full topic

Viewing all 106627 articles
Browse latest View live


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