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

I can not login remotely

$
0
0

@lukash1 wrote:

Hello, I have already read a lot in the forum. Unfortunately nothing has worked yet.

I would like to access my Home Assistant remotely. I already have a remote proxy running for some other applications. This reverse proxy is running on an Apache2 server.

The connections are SSL encrypted. (via let’s Encrypt)

I also get to the login page normally. But when I have entered my username and password, the message appears:

“Unable to connect to Home Assistant.”

What am I doing wrong?

<VirtualHost *:80>
 ServerName homeassistant.domain.com
 ProxyPreserveHost On
 ProxyRequests Off
 ProxyPass / http://192.168.178.200:8123
 ProxyPassReverse / http://192.168.178.200:8123
 ProxyPass /api/websocket ws://192.168.178.200:8123/api/websocket
 ProxyPassReverse /api/websocket ws://192.168.178.200:8123/api/websocket

 RewriteEngine on
 RewriteCond %{HTTP:Upgrade} =websocket [NC]
 RewriteRule /(.*)  ws://192.168.178.200:8123/$1 [P,l]
 RewriteCond %{HTTP:Upgrade} !=websocket [NC]
 RewriteRule /(.*)  http://192.168.178.200:8123/$1 [P,l]

</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
 ServerName homeassistant.domain.com

 SSLProxyEngine On
 Include /etc/letsencrypt/options-ssl-apache.conf



 ProxyPreserveHost On
 ProxyRequests Off
 ProxyPass / http://192.168.178.200:8123
 ProxyPassReverse / http://192.168.178.200:8123
 ProxyPass /api/websocket ws://192.168.178.200:8123/api/websocket
 ProxyPassReverse /api/websocket ws://192.168.178.200:8123/api/websocket

 RewriteEngine on
 RewriteCond %{HTTP:Upgrade} =websocket [NC]
 RewriteRule /(.*) ws://192.168.178.200:8123/$1 [P,l]
 RewriteCond %{HTTP:Upgrade} !=websocket [NC]
 RewriteRule /(.*)  http://192.168.178.200:8123/$1 [P,l]
 SSLCertificateFile /etc/letsencrypt/live/homeassistant.domain.com/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/homeassistant.domain.com/privkey.pem
</VirtualHost>
</IfModule>

# 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: "https://homeassistant.domain.com:8123"
   use_x_forwarded_for: true
   trusted_proxies:
    - 192.168.178.202

# Text to speech
tts:
  - platform: google_translate

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

My Home Assistant run on IP 192.168.178.200
My reverse Proxy run on IP 192.168.178.202

Sorry if the answer is already in the forum, but I either did not find it or did not understand it.

Thanks for your help

Posts: 2

Participants: 2

Read full topic


Hikvision Still Image

$
0
0

@shabz wrote:

Hi guys,

Im wondering if anyone here can help me out, if gone through multiple threads and cant find an answer that works. What im trying to do is, add a card on the HA dash which grabs a still image from my Hikvision Camera. I’ve figured out the correct url to get a still image, however im unable to add it to the dash.

Any suggestions? I’ve tried Stream component and failed with getting it to work.

Posts: 2

Participants: 2

Read full topic

Auto start configuration disaster

$
0
0

@JJ462 wrote:

I’m a bit of a newbie with home assistant so please bare with me. I have a Raspberry Pi 4 and have installed of Home Assistant on to it using your manual installation instructions. All well and good. I then decided to setup the auto start ability.

I followed your instructions for “Autostart using systemd” using the template for Python virtual environment. When I had completed that it stated that I needed to reload the systemd. I did a ctrl Z and went back to the command line. I then typed in “sudo systemctl —system daemon-reload” I then got a message “We trust you have received the usual lecture from the local system administrator etc etc”

It then asked for a home assistant password. I wasn’t sure which password it meant, so I tried 3 and got a message stating authentication was required to manage the system as root. I was obviously somewhere I should not have been. I then got a message “Connection timed out”. The command line came back but my monitor will not now display any text when I type. The connection to HA on my iPad(where I’m typing this) has been lost also. Any ideas. Does it just need a restart?

I partly solved the problem by reloading home assistant onto my raspberry. I can now type again but I tried the “sudo systemctl —system daemon-reload” command and it wanted a password to what I assume is the root directory. I’ll work on autostart.

Posts: 2

Participants: 2

Read full topic

MariadB in docker issue - unconnected user unauthenticated host

$
0
0

@fliptoback wrote:

Hi,

I have home assistant in a docker container currently running great in DSM. I wanted to setup MariadB to integrate with HA so what I did is to first install Portainer in docker and then use the “App Templates” of Portainer to install mariadB.

However, no matter what i tried, I kept getting these error logs and i cannot connect to mariadB (currently port 3306).

2020-04-04 1:01:49 10 [Warning] Aborted connection 10 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘172.17.0.1’ (This connection closed normally without authentication)

I have searched google for days but could not come to a solution.

Appreciate any help please.

Thanks

Posts: 13

Participants: 2

Read full topic

More Lovelace Migration

$
0
0

@AnthonyBr wrote:

Hi All, looking for some tips on migrating to Lovelace. I knew it was happening in 107 and that I’d have to take the plunge, so I did… But now my “home” screen is a complete mess with all the badges on it…

Using the UI seems to be a really slow way of moving everything over, with each of the ZWave device have a few entities to “home”.

What have people found is the best way to “clean up”.

Doesn’t help that at this stage I don’t have a good vision of the end view I’m looking for, so for now, a tidy is more the order of the day.

Thanks.

Posts: 1

Participants: 1

Read full topic

Having trouble configuring

$
0
0

@KTibow wrote:

I’m starting up with Alexa and Home Assistant with this guide. It says I need a Redirect URI though. Where can I find one that works?

Posts: 1

Participants: 1

Read full topic

Floorplan temperature

$
0
0

@olivierjag2 wrote:

hi

i have question:

with my sensor in my floorplan a used this script and I work fine. But when a click on my plan, I cannot change the temperature for my climate

  • name: Sensors
    entities:
    - sensor.bureau_temperature
    text_template: '${entity.state ? entity.state : “unknown”}
    class_template: ’
    var temp = parseFloat(entity.state.replace("¡", “”));
    if (temp < 10)
    return “temp-very-low”;
    else if (temp < 15)
    return “temp-below-average”;
    else if (temp < 21)
    return “temp-medium”;
    else
    return “temp-very-high”;

now with my climate i test this but i don’t work, can you help me?

        - name: climate
          entities:

            - climate.sinope_climate_bureau
           
          text_template: '${entity.state ? entity.attributes.current_temperature + "°" : "undefined"}'
          class_template: '  
            var temp = parseFloat(entity.state.replace("¡", ""));
            if (temp < 10)
              return "temp-very-low";
            else if (temp < 19)
              return "temp-below-average";
            else if (temp < 21)
              return "temp-medium";
            else
              return "temp-very-high";
              
             '

Posts: 2

Participants: 2

Read full topic

Xiaomi human body problem - how to fix it


Z2M devices not supported

$
0
0

@Sabbathy wrote:

Hey all
Little problem looking for help with. I’ve had z2m running for a year or so now. No problems been great. Have a mixture of hue bulbs and xiaomi devices.

Realised the other day one of my xiaomi door sensors. Wasn’t actually working. Have tried deleting and re-pairing. But just says not supported.

Just installed Z2M assistant and seen it says this for all my devices.

Im thinking about rebuilding my set up but a bit worried non of my devices will pair successfully now. Any thoughts why it might say unsupported and not re-pair the door sensor ???

Posts: 2

Participants: 2

Read full topic

Automation based on list entries of a sensor

$
0
0

@murmusbahnus wrote:

Hi all,

sorry for the bad title. I try to automate something with the new Minecraft integration.
There is a sensor called sensor.minecraftserver_players_online which contains an array of the currently players. You can view it with the following template:

{{states.sensor.gruebelgrotte_players_online.attributes.players_list}}’

If someone is online you get a list of the usernames like this:

‘[‘PlayerA’, ‘PlayerB’, ‘PlayerC’]’

I want to make some automations based on users which are going online or offline.
So I need a trigger when a username is in the list and when a username is going out of the list.
Can someone help me with this?

Posts: 6

Participants: 3

Read full topic

Recorder cannot exclude specific sensor(s)

$
0
0

@Maco65 wrote:

Based on the documentation https://www.home-assistant.io/integrations/recorder:
" You can also use the include list to define the domains/entities to record, and exclude some of those within the exclude list."
I have made such entry in my configuration file:

recorder:
  purge_keep_days: 10
  include:
    domains:
      - air_quality
      - binary_sensor
      - sensor
      - switch
  exclude:
    entities:
      - sensor.hacs
      - switch.8ch_relay08

Unfortunately both “excluded” sensor and switch appears in my history view.
What I do wrong ? Where to look to fix it ?

Posts: 2

Participants: 2

Read full topic

Can IFTTT webhook return the media player being talked to?

$
0
0

@nix1016 wrote:

Is it possible for IFTTT webhook to pass the google home being spoken to in HTTP request to Home Assistant? I’m currently triggering tts by the IFTTT webhook requests and I can only hard-code the response on a particular media_player. It would be handy to know which google home device triggered the request and therefore play back the response on that media player.

Posts: 1

Participants: 1

Read full topic

WLED Fixing Turn Off Behavior of Segments

$
0
0

@haushund wrote:

Hey guys,

I’ve just started using HA and set up a long LED Strip (16m WS2812b) using the WLED integration and I partioned the strip into 5 different segments, so I can controll them as individual LED Strips. And for the most part it works great, I can assign each of them their own color, effects and all the other good stuff, but I’ve got one issue that I couldn’t find a fix for yet:
I can not turn off individual segments… only all the segments at once. Or rather, any time I turn off an individual segment, all the segments turn off (even though this is not shown in the entity states / the dashboard)
This is what it looks like in the Dashboard:
image

This does kind of make sense, as the WLED Software from Aircookie doesn’t support native “off switches” for the individual segments. However, what I usually do, when controling the LEDs with the WLED UI is setting the color of a given Segment to black (or brightness to 0). This works perfectly for me using the WLED App, but I don’t know how to do this with HA…

I’m not quite sure how to go about this… I though about the following two approaches, but I didn’t know how to implement them:

  1. Creating an automation that turns the WLEDs to “on” and set the color to black everytime they are turned off --> Drawback: The state of the WLED entities would always be “on”
  2. Change the configuration of the WLED turn off service to set the color to black instead of turning the device off --> Probably same drawback as before: State is managed properly
  3. Fixing this issue in the python implemention of the WLED integration. However, I don’t know if this is viable to do… I’ve got no problem coding with python, but I’m unsure about how to get my changes to work in my HA instance. Do I have build my own HA instance to do that? Or can I just fork the WLED integration repository and make a custom add-on that I can use instead of the default WLED integration?

Also, if anyone has a better idea on how to approach this, I’d be happy to hear it.

And thank you guys in advance for any help you can provide me with!

Posts: 1

Participants: 1

Read full topic

Controlling opening and closing of electric clerestory windows

$
0
0

@Faramir wrote:

My next project is to include the opening and closing of our electrically controlled clerestory windows into HA. But I am not exactly sure how to include that into Lovelace / Frontend

The opening and closing of the windows will be controlled by Sonoff minis.
Basically to open the windows I have to give the “open window” sonoff mini the command to switch on, this in turn will start the electric actuators to open the windows. Within Tasmota I’ve set-it up so that the Sonoff mini will automatically switch off again after 20 seconds. (That’s how long it takes to actuate the windows.)

To close the windows is very similar, but I give another sonoff mini (the “close window” one) the switch on command. Which again will automatically switch off and stop actuating the window after 20 seconds.

Where I am unsure on how to represent / control that in the HA fronted / Lovelace is that I’d like one button or maybe picture element that remembers if I’ve opened or closed the windows. Obviously in the resting state both the “open windows” and the “close windows” sonoff minis would report back that they are switched off, so the minis are not much use in determining if the windows are open or not.

My thinking is that I somehow have HA remember if I last opened or closed the windows without needing to check a sensor / switch. But how would I do that?

Any pointers to further reading or examples would be much appreciated.

Cheers

Posts: 7

Participants: 2

Read full topic

None entity_id in script?

$
0
0

@Mariusthvdb wrote:

HI,

cant find the changes in the script which support an empty/none entity_id.
Please let mask if this then is correct syntax (template at the bottom) in the case of no lights being ‘on’:

  sequence:
    service: light.turn_off
    data_template:
      entity_id: >
        {% set ns = namespace(group=[]) %}
        {% if is_state('group.daughter','not_home') %}
          {% set ns.group = expand(states.group.all_inside_lights) %}
        {% else %}
          {% set ns.group = expand(states.group.all_main_inside_lights) + expand(states.group.plafond_spots_woonkamer) %}
        {% endif %}
        {% set all_lights_on =
         ns.group|selectattr('state','eq','on')|map(attribute='entity_id')|list|join(',') %}
        {{all_lights_on if all_lights_on|list|length != 0 else none}}
      transition: 6

if I simply use {{all_lights_on}} I get an error:

Slapen lighting: Error executing script. Invalid data for call_service at pos 1: not a valid value for dictionary value @ data['entity_id']

if you help me find the pointer to the changes, thanks!
only found this https://github.com/home-assistant/core/pull/31427 so in the above script added ‘none’. Hope this is what was meant to be?

Posts: 2

Participants: 2

Read full topic


How to show artwork/logo in new Media Control Card v0.107+?

$
0
0

@drkbg wrote:

What should I do to enable the new Media Control Card to show album art or logo of radio station?

I have a custom online radio station script that send stream url of radio station to my chromecasts but no logo is shown. How can I achieve this?

Posts: 1

Participants: 1

Read full topic

Locative device tracker keeps changing ID

$
0
0

@rb666 wrote:

I have tried various GPS based location trackers over the years, and still haven’t found one that works properly with HA, maybe it’s just me.

Since recently am testing Locative, which looked real good. The IOS app is easy to use and makes sense.

But once again I run into a major issue. The device tracker that is created automatically within HASS keeps changing it’s ID (in the form of: device_tracker.name_0668d082_1a81_41b3_8431_0849d6062283). This obviously makes it entirely useless! It seems to happen at least on some HA restarts. But possible also at other random times. Without me changing anything in the IOS App.

Anyone have a working Locative setup and can tell me what I’m doing wrong?

Posts: 1

Participants: 1

Read full topic

MQTT Discovery not working

$
0
0

@simonhills wrote:

I’m in the process of remodelling my kitchen and whilst doing so, I’ve decided to add smart light; Ikea Trafri. As my server (UnRAID with HA in Docker is a long way away, I’m using a Raspberry Pi 3b+ running zigbee2MQTT and a cc2531 flahed accordingly. Mosquitto is running on my UnRAID and working properly. I use it to report my tablet battery level (WallPanel) to HA and Node-Red and toggle a Sonoff Smartplug accordingly. I manually added the tablet MQTT sensor and it works well.

I have successfully added one bulb to my Pi and can see it in the config file and I’ve renamed it test_bulb. Node-Red can see it, but Home Assistant won’t discover it. I don’t want to have to add every bulb separately, so I really want to get this working.

Here are the relevant bits of my HA config:

mqtt:
  broker: 192.168.1.105
  port: 1883
  client_id: HomeAssistant
  discovery: true
  discovery_prefix: zigbee2mqtt/
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'


sensor:


  - platform: mqtt
    state_topic: "/HA/sensor/battery"
    name: "WallPanel Battery Level"
    unit_of_measurement: "%"
    device_class: battery
    value_template: '{{ value_json.value }}'

Note: as my discovery prefix i’ve tried zigbee2mqtt, /zigbeer2mqtt, /zigbee2mqtt/ and zigbeer2mqtt/

Node red posts this JSON upon bulb rediscovery:

{"type":"device_removed","message":"left_network","meta":{"friendly_name":"0x680ae2fffe3696b2"}}

This is under the topic zigbee2mqtt/bridge/log . It’s worth noting my battery posts with an extra / at the start /HA/sensor/battery .

I am bamboozled as to why discovery does not work. Can you help me? Thanks

Posts: 3

Participants: 2

Read full topic

Lack of movement from sensor not firing automation or script

$
0
0

@jrhbright wrote:

I’m almost a complete newbie but normally I can figure things out for myself by looking through the forum, but this time I just can’t figure out why this is not working.
I have a xiaomi motion sensor, connected to HA via Deconz.
I want stuff to happen after 10 minutes of inactivity, so have written this, in a package:

automation:
  - alias: no presence in dining room
    trigger:   
      - platform: state
        entity_id: binary_sensor.presence_15
        to: 'off'
        for:
          minutes: 10
    action:
      service: script.no_one_in_dining_room
script:
  no_one_in_dining_room:
    sequence:
      - service: notify.mobile_app_pixel_3
        data: 
          title: "Dining Room Presence"
          message: "No one detected in the dining room for a while"

Note that I’ve simplified the automation and the script to the bare bones here, trying to rule out possibilities, once I’ve got this working it will hopefully do a lot more, hence the use of a script.

I’ve confirmed that the sensor has been off for more than 10 minutes:

but nothing is running

What am I missing?

Posts: 5

Participants: 2

Read full topic

Platform error device_tracker.huesensor - cannot import name

$
0
0

@John_Olsen wrote:

When I validate my configuration i get this error message:
“Platform error device_tracker.huesensor - cannot import name ‘ENTITY_ID_FORMAT’ from ‘homeassistant.components.device_tracker.const’ (/usr/src/homeassistant/homeassistant/components/device_tracker/const.py)”
I have tried to create an automation, but didnt touch any HUE components, so this error is mysterious! - After I got this error I have tried to remove the HUE integration, but it doesnt make any difference!

Posts: 1

Participants: 1

Read full topic

Viewing all 100467 articles
Browse latest View live


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