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

Run HA script after receiving HTTP GET request

$
0
0

@SuperMaximus wrote:

I need my doorbell device to send telegram picture to my mobile.
I made HA script for Telegram and the problem is that doorbell can only send HTTP GET (not POST) request after the button was pressed by visitor.
I need to make HA react to HTTP GET request (using RESTful API) and execute script.
Is this mission possible?

Posts: 1

Participants: 1

Read full topic


Xiao Mi Robot Vacuum Time Out

$
0
0

@ppppp wrote:

We are on Home Assistant 0.108.9 Home Assistant 0.109.3 (just upgraded). Today we are trying to connect a Xiao Mi Robot Vacuum into the system. After backup the iOS system, retrieved the database file and decrypted the token. Adding the following YAML into the configuration file seems could not get the robot connected.

vacuum:
  - platform: xiaomi_miio
    name: "Xiao-Mi-Robot"
    host: 192.168.20.10
    token: A_VALID_TOKEN_WAS_USED

A static IP had been assigned to the robot and pinging it is ok (see screenshot below)

CleanShot 2020-05-03 at 21.09.09

These is the error log showing on our system.

2020-05-03 21:43:55 DEBUG (SyncWorker_4) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:43:54, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:43:55 DEBUG (SyncWorker_4) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6685, 'method': 'get_status', 'params': []}
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] Retrying with incremented id, retries left: 1
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\x9f' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x12j \xdd' (total 4)
            ts = 2020-05-03 13:43:59
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:43:59, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6786, 'method': 'get_status', 'params': []}
2020-05-03 21:44:05 ERROR (SyncWorker_4) [miio.miioprotocol] Got error when receiving: timed out
2020-05-03 21:44:05 WARNING (SyncWorker_4) [homeassistant.components.xiaomi_miio.vacuum] Got exception while fetching the state: No response from the device
2020-05-03 21:44:06 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6787, 'method': 'get_status', 'params': []}
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 3
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\xaa' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x12j \xdd' (total 4)
            ts = 2020-05-03 13:44:10
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:44:10, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6888, 'method': 'get_status', 'params': []}
2020-05-03 21:44:16 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.xiao_mi_robot is taking over 10 seconds
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 2
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\xaf' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x12j \xdd' (total 4)
            ts = 2020-05-03 13:44:15
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:44:15, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6989, 'method': 'get_status', 'params': []}
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 1
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\xb4' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x12j \xdd' (total 4)
            ts = 2020-05-03 13:44:20
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:44:20, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 7090, 'method': 'get_status', 'params': []}

I am reading https://github.com/home-assistant/core/issues/11048 which looks like the exact issue I am having but seems it had been resolved long time ago. I am presuming that upgrading Home Assistant would also have all its dependencies updated to the latest version which means the issue mentioned in the issue above should had been fixed in the version I am running in 2020.

Has anyone had encountered this issue recently? Any hint would be greatly appreciated.

Posts: 1

Participants: 1

Read full topic

Config - Lovelace Dashboard

$
0
0

@skgunputh wrote:

Hey lovely people.

I have a situation where i cannot find a solution online.

I have the default “overview” dashboard. I keep it managed automatically.
I have another dashboard where i experiment with the UI manually.
I have a dashboard for a non-admin user.

The user has the mobile app and going on the user profile, chosen the default dashboard for him.
But alas, the “overview” dashboard is still available to him. If he wants, he can access things I do not wish by changing the default view on his app.

Any solution please?

Posts: 1

Participants: 1

Read full topic

State attribute is not retrieved when using a for loop

$
0
0

@MvB wrote:

Hi,

I’m stuck on creating a for loop that retrieves multiple names from the attributes of a sensor.

If I do the following:

{% for faces in state_attr('image_processing.microsoftface_ip_webcam','faces') %}
{%- if loop.first %} {% elif loop.last %} and {% else %}, {% endif -%}
{{ states.image_processing.microsoftface_ip_webcam.attributes.faces }}
{% endfor %}

I get:

[{'name': 'Carmen', 'confidence': 58.236}, {'name': 'Michiel', 'confidence': 54.443}]
 and [{'name': 'Carmen', 'confidence': 58.236}, {'name': 'Michiel', 'confidence': 54.443}]

Which makes sense. But since I want the name I add the .name to the end:

{% for faces in state_attr('image_processing.microsoftface_ip_webcam','faces') %}
{%- if loop.first %} {% elif loop.last %} and {% else %}, {% endif -%}
{{ states.image_processing.microsoftface_ip_webcam.attributes.faces.name }}
{% endfor %}

But then no names are returned:


and 

My goal is to have both the names displayed. e.g. Carmen and Michiel

Could someone help me figure out what I’m am doing wrong?

ps I can access the seperate name values {{states.image_processing.microsoftface_ip_webcam.attributes.faces[0].name }}, but since the list doesn’t always have the same amount of values, I would like to create it dynamically.

Posts: 1

Participants: 1

Read full topic

Do I have to predefine input_numbers in yaml first?

$
0
0

@alexdodd wrote:

Read the documentation on input_number, but also looking at frenck s github has slightly confused me. I mean I always start with confusion using HA, and work my way backwards. Frenck obvs does things a little different to an out the box standard setup.

Before my setup get wild and large I am hoping to split things out as granular as he has, but for now i’m stuck at pondering this the below.

He has a yaml file called input_number which is one of the packages he calls through:
packages: !include_dir_named integrations

input_number contains:

---
# The input_number integration allows the user to define values that can be
# controlled via the frontend and can be used within conditions of automation.
#
# The frontend can display a slider, or a numeric input box. Changes to the
# slider or numeric input box generate state events. These state events can be
# utilized as automation triggers as well.
#
# https://www.home-assistant.io/integrations/input_number/
#
# I don't store my input number entities in my YAML configuration,
# instead I manage them via the Home Assistant frontend.
#
input_number: ~

What doesnt it mean configure on the front end? I can’t see a way to make sliders on the front end? But I could add them inYAML following the documentation. Am i missing something?

I want to keep everything I do as simple as possible, and I can already see a few uses for sliders and things, and i’d rather I was doing it “as intended”.

Posts: 4

Participants: 2

Read full topic

Refreshing Lock entity causes lock to change state

$
0
0

@ha_steve wrote:

I’m seeing this on all three of my z-wave locks (all are Kwikset 914 Convert locks):

  1. Unlock the lock
  2. call zwave.refresh_entity on the lock
  3. lock state changes to “locked” even though the lock is still unlocked

Can someone with a z-wave lock check this?

Posts: 1

Participants: 1

Read full topic

System monitor-IPv6 address display not correct

$
0
0

@SecretVN wrote:

I have a problem with IPv6 address, fe80::22c4:6f81:57df:d65e%eth0. The result has a suffix %eth0 and not clear when display in hass. How can I omit %eth0 in the display? This is my configuration:

  • platform: systemmonitor
    resources:
    - type: ipv6_address
    arg: eth0

Posts: 1

Participants: 1

Read full topic

Can't get the custom cards to work

$
0
0

@Naelwan wrote:

Hi !

I’m trying to install custom cards on my Hassio but can’t get them to work.
I tried locally and via HACS but the results are the same :
image

It is doing so with any card I’m trying to implement.

What I’ve done so far :

  • Download through HACS and add to lovelace (prompt after install) + add to the raw config
  • Download locally and add it to the raw config

Tried most of the things I’ve seen on the forum without success.
I only notice that when I add to raw config I get the following message :
“Resources should no longer be added to the Lovelace configuration but can be added in the Lovelace config panel.”
I can’t find anything called Lovelace config panel though.

Could I get any help ?

Thanks !

Posts: 1

Participants: 1

Read full topic


Z-wave heal network shows random node IDs

$
0
0

@antb wrote:

When I heal the z-wave network I see references to node ID numbers for nodes I don’t have devices on.

Is this normal or is there something terribly wrong with my network?

See log extract below. I currently have devices relating to Nodes 1 through 18. Node 128 and other numbers outside of the normal range appear in the log.

2020-05-03 16:25:05.693 Info, Node007, Received reply to FUNC_ID_ZW_GET_ROUTING_INFO

2020-05-03 16:25:05.693 Info, Node007, Neighbors of this node are:

2020-05-03 16:25:05.693 Info, Node007, Node 1

2020-05-03 16:25:05.693 Info, Node007, Node 4

2020-05-03 16:25:05.693 Info, Node007, Node 16

2020-05-03 16:25:05.693 Info, Node007, Node 18

2020-05-03 16:25:05.693 Detail, Node128, Expected reply was received

2020-05-03 16:25:05.693 Detail, Node128, Message transaction complete

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Camera - still image from livestream

$
0
0

@skgunputh wrote:

Hello,

I have an HikVision NVR and a Xiaovv PTZ camera (only has RTSP port exposed).

I have two lovelace card in my dashboard, I cannot get a Still Image URL for the HikVision, therefore it shows a broken icon, but clicking the card opens the stream. Even if the link for still image doesn’t work, i cannot remove it from the configuration as Home Assistant gives error.

My Xiaovv camera shows the livestream directly in the card but it continously stream. It does not have the still image too so i was wondering if its possible to capture a snapshot at intervals and show it as still image?

ffmpeg:
stream:
camera:    
  - platform: generic
    still_image_url: "http://admin:pwd@192.168.0.xx/ISAPI/Streaming/channels/401/picture"
    stream_source: "rtsp://admin:pwd@192.168.0.xx:554/Streaming/Unicast/channels/401"
    authentication: digest
    name: Front Cam

camera 1:    
- platform: ffmpeg
  name: TV Cam
  input: rtsp://admin:password@192.168.0.xx/live/ch00_1

Posts: 1

Participants: 1

Read full topic

Dyson Ventilator - Night Mode

$
0
0

@Saible wrote:

Hello all,

I have read about some struggles with the integrated Dyson night mode activation but none seem to answer my challenge.

I have a dyson ventilator, works as it should and I exposed it to Homekit, as I wanted.

Now I’d like to add an automation, that says when the ventilator turns on (i.e. via press in Homekit), Home Assistant should turn on Night Mode, as this is not a setting I can set via Homekit.

I have used the interface as well as the editor and neither bring me to a working solution. Here below what I have in code:

- id: '1588509558524'
  alias: Dyson Nightmode
  description: ''
  trigger:
  - entity_id: fan.bedroom
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - service: dyson.set_night_mode
    data:
      entity_id: fan.bedroom
      night_mode: true

The log gives me the following error whenever it is executed (it executed exactly as planned, so the error is in the action):

Log Details (ERROR)

Logger: homeassistant.components.automation
Source: helpers/script.py:798 
Integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22)) 
First occurred: 5:35:53 PM (3 occurrences) 
Last logged: 7:01:45 PM

Dyson Nightmode: Error executing script. Invalid data for call_service at pos 1: value should be a string for dictionary value @ data['entity_id']

Thank you for any and all help;
Sebastian

Posts: 1

Participants: 1

Read full topic

Utility meter should only write one a cycle

$
0
0

@ASL07 wrote:

Hello,
I have daily and monthly utility meters. Data is saved into influxdb as well.
I would expect the daily meter to accumulate the energy value and only save the value to the database once a day, and the monthly one to only save the value once a month.
However, the utility meter value is updated constantly, more than once a day, or once a month. This increases disk space usage in influxdb and home assistant for no reason.
Anyone can let me know if this is the proper behaviour and if there is any fix for it?
Here is my configuration:

# Utility meters
utility_meter:
  apartment_1_montly_energy_kwh:
    source: sensor.apartment_1_energy_kwh
    cycle: monthly
  apartment_1_daily_energy_kwh:
    source: sensor.apartment_1_energy_kwh
    cycle: daily
sensor:
  - platform: mqtt
    name: "Apartment 1 power"
    state_topic: "panel/sensor/apartment_1_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 1 energy"
    state_topic: "panel/sensor/apartment_1_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 1 power factor"
    state_topic: "panel/sensor/apartment_1_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

I also have Template sensors to convert the energy value from sensor to kWh:

- platform: template
    sensors:
      apartment_1_energy_kwh:
        entity_id: sensor.apartment_1_energy
        value_template: "{{ states('sensor.apartment_1_energy') | float / 1000 }}"
        friendly_name: "Apartment 1 energy kWh"
        unit_of_measurement: kWh

As you can see below, the utility meter is saving lots of records to grafana. I am only interested in the value at the end of the day (for faily) and at the end of the month (for monthly):

Posts: 1

Participants: 1

Read full topic

How to set up this sensor?

$
0
0

@Makis wrote:

I just install an anemometer (reports values through mqtt)

  - platform: mqtt
    name: "Wind Speed"
    state_topic: "anemometer/wind"
    unit_of_measurement: 'km/h'

Since it reports values very often I added the below sensor in order to have a better sample

  - platform: statistics
    entity_id: sensor.wind_speed
    name: wind speed average 1 minute
    #unit_of_measurement: 'km/h'
    sampling_size: 30
    max_age:
      minutes: 2

I am getting the wind speed from other sources too (comparison) so I have the following (final for my automation) sensor

  - platform: min_max
    #type: max
    name: Wind Speed Automation
    entity_ids:
      - sensor.marousi
      - sensor.dark_sky_wind_speed
      - sensor.ha_wind_speed
      #- sensor.wind_speed_average_1_minute

As you can see I tried to add my personal stats (sensor.wind_speed_average_1_minute) but I am getting value unknown.

In logs said something like “different measurement” that’s why I tried to add the “km/h” but it wouldn’t pass the configuration validation.

Any ideas how I could have the max value from these sensors?

Annotation 2020-05-03 204232

Posts: 1

Participants: 1

Read full topic

How to keep switch on while sensor temp is high

$
0
0

@caruzer wrote:

I have an automation that turns on a fan when the temp is higher than a specific value. Works great.

What is the best way to turn that off, after the temp is lowered below that value?

Should I use a second automation? Or is there a way to combine them into a single automation?
Or is there a non-triggered way of monitoring the temp and determining whether to turn it on/off?

Posts: 1

Participants: 1

Read full topic

Help with template error

$
0
0

@popboxgun wrote:

I can’t figure out why this template isn’t working. If I go to services in Developer Tools, I am able to run ffmpeg.start with the entity_id, but this error seems to indicate that ffmpeg.start isn’t valid?

- alias: Wyzecam Noise Detection
  trigger:
    platform: state
    entity_id: input_boolean.wyzecam_noise_detect
  action:
    data_template:
      entity_id: binary_sensor.wyzecam_noise 
    service_template: >-
      {% if (trigger.to_state) == 'on' %}
        ffmpeg.start
      {% elif (trigger.to_state) == 'off' %}
        ffmpeg.stop
      {% endif %}
2020-05-03 13:39:06 ERROR (MainThread) [homeassistant.components.automation] Wyzecam Noise Detection: Error executing script. Unexpected error for call_service at pos 1: Template rendered invalid service:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 115, in async_prepare_call_from_config
domain_service = cv.service(domain_service)
File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 411, in service
raise vol.Invalid(f"Service {value} does not match format <domain>.<name>")
voluptuous.error.Invalid: Service does not match format <domain>.<name>

Posts: 2

Participants: 2

Read full topic


How to control a media player via alexa

$
0
0

@tal wrote:

I exported my plex media_player to Alexa and can confirm that Alexa sees it, I cannot figure out how to control the media player via speech. I’ve tried to give it pause/play commands but it doesn’t seem to recognize the item.

Is there a specific syntax I need to use with Alexa or is my configuration wrong?

Thanks!


Posts: 1

Participants: 1

Read full topic

Delay in scripts

Missing Groups in Lovelace

$
0
0

@winnettjeff wrote:

Hello. Wondering if anyone has any ideas about this. I’m running HA, latest version, on a Pi 3. Still using hte default (automatic) Lovelace UI, have not yet taken over manual configuration of it.

A couple of months ago my list of automations disappeard from the Overview page of my HA we inerface, not apparent reason. They still show up in the Cnfiguration page but this is not nearly as convenient.

Several weeks later my group of battery level indicators, configured as a group in my group.yaml file, also disappeared from the Overview page. I can’t find it anwhere. I can find the individual battery levels by looking in the entities list, or in debeloper > states, but the group seems to hae vanished, even though it is still in the group.yaml file. I’ve tried rearranging the order of the groups in the group.yaml file to see if it is, perhaps, some limit I’m not aware of on the number of things that can be displayed in the Overview page. No change, the battery level group remains missing.

Haven’t found anything in web searches or log files, and config checker continues to say everything is still fine.

I’d sure appreciate any ideas anyone might have.

Thanks.
Jeff

Posts: 2

Participants: 2

Read full topic

How to set schedule on Honeywell TH6320ZW2003 thermostat

$
0
0

@blackwood821 wrote:

I have successfully paired my Honeywell TH6320ZW2003 thermostat with Home Assistant using the Aeotec Z-Stick Gen5. It works fine… I can turn the heat and AC on and off and can change the temperature but I don’t see any way to adjust the schedule that I have programmed directly on the thermostat. I am switching away from Total Connect 2.0 to Home Assistant. Total Connect 2.0 allowed me to change the schedule (although it wouldn’t let the “heat to” and “cool to” temperatures get within 3 degrees of each other even though the thermostat allows it) so I’m assuming there is a way to control the schedule via Home Assistant. Any suggestions are much appreciated.

Posts: 1

Participants: 1

Read full topic

Alexa control

Viewing all 105523 articles
Browse latest View live


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