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

How does Home Assistant confirm that actions were successful?

$
0
0

@sofakng wrote:

I’m new to Home Assistant and I’m wondering how it confirms that actions were successful.

For example, if I send an HTTP command to an HDMI switch to change inputs, what happens if the switch is offline or doesn’t actually process the command?

Ideally I’d like to send a command and wait for a response/reply/update from the device. Another example would be if I send an ‘ON’ command to a device, I don’t want Home Assistant to assume it was successful so the GUI should either show perhaps gray-out the device until it receives a confirmation?

Posts: 1

Participants: 1

Read full topic


Does Home Assistant confirm that Z-Wave commands are sent/received successfully?

$
0
0

@sofakng wrote:

I’ve posted a similar topic in the [Configuration] forum but I’m also wondering specifically about Z-Wave.

If I send an [On] command to a Z-Wave device, does Home Assistant confirm that it was both sent and received successfully?

For example, if I want to automate a pool heater and tell Home Assistant to turn it off, I need to know if it fails via e-mail or push notification.

Maybe this is how Home Assistant already works, but I envision a process like this:

  1. Send Z-Wave command to device.
  2. GUI/UI freezes device and waits for device confirmation.
  3. If no device confirmation is sent, poll device for current status.
  4. If current status matches command then command was successful.
  5. If current status doesn’t match command or no response received then re-send command.

Does that make sense?

Posts: 1

Participants: 1

Read full topic

Keeping track on power usage of a device

$
0
0

@Gladz0r wrote:

I’ve got a Shelly device that has an total power consumption sensor.
It measures the power consumption from the time it was plugged in untill now.
How can I keep track on how much it has been using every day? So I want to record the usage in days (monday, tuesday, wednesday,…) and weeks.
image

Posts: 1

Participants: 1

Read full topic

Extract attribute from declared mqtt switch

$
0
0

@itajackass wrote:

I’ve a swith declared as mqtt:

switch:
  - platform: mqtt
    name: valve_1_front_garden
    state_topic: "stat/sonoff4chpro_one/POWER1"
    command_topic: "cmnd/sonoff4chpro_one/POWER1"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: false

Now I’ve a script where I need to retrieve the value from state_topic ( in my case example: sonoff4chpro_one ) to create a valid message to publish.
Any idea how to extract this value from my switch? How to get attribute state_topic?

My goal is to have a topic: cmnd/sonoff4chpro_one/pulsetime

{% set switch = ‘valve_1_front_garden’ %} is hardcoded only for example purpose. In the real environment is it passed as variable

script:
  my_script_1:
    sequence:
      - service: mqtt.publish
        data_template:
          topic: >
            {% set switch = 'valve_1_front_garden' %}
            # i need here to get value: sonoff4chpro_one and put in variable: device_name
            {% set topic = 'cmnd/[SWITCH_NAME]/pulsetime' %}
            {{ topic | replace('[SWITCH_NAME]', device_name)  }}

          payload: 200

Posts: 1

Participants: 1

Read full topic

Odd Template Output

$
0
0

@jamespreedy wrote:

Hiya, thanks in advance for your help.

I’m working with a template where I output a time calculated as sunset minus / plus a specified offset.

Firstly the below gives me “21:17:32”

          {% set offset = "00:30:00" %}
          {% set offset = as_timestamp(strptime(offset, "%H:%M:%S")) %}
          {% set sunset = as_timestamp(states.sun.sun.attributes.next_setting) %}
          {{ (sunset) | timestamp_custom('%H:%M:%S') }}

Next, if I take off the offset, I get “19:47:32”

          {% set offset = "00:30:00" %}
          {% set offset = as_timestamp(strptime(offset, "%H:%M:%S")) %}
          {% set sunset = as_timestamp(states.sun.sun.attributes.next_setting) %}
          {{ (sunset - offset) | timestamp_custom('%H:%M:%S') }}

Finally, if I add the offset, I get “21:47:32”

          {% set offset = "00:30:00" %}
          {% set offset = as_timestamp(strptime(offset, "%H:%M:%S")) %}
          {% set sunset = as_timestamp(states.sun.sun.attributes.next_setting) %}
          {{ (sunset + offset) | timestamp_custom('%H:%M:%S') }}

For me, if the sunset is “21:17:32” I would expect (sunset + offset) to be “21:47:32” which is it … but I would expect (sunset - offset) to be “20:47:32”, not “19:47:32” … it seems to be an hour off.

I’m sure I’m doing something silly, but if anyone can help, I’d really appreciate it.

Thanks!

Posts: 1

Participants: 1

Read full topic

Arduino non home assistant

Zero an enphase envoy daily sensor at midnight

$
0
0

@Jon_ctrl wrote:

My enphase daily consumption sensor starts at around 30kw each day and tracks up correctly from this offset.
I guess this is due to my system being 2 phase.

I would like to zero this sensor at midnight, do I need to create a template sensor to fix this sensor?
as this start value varies each day, it’s a little beyond my knowledge to fix it.

How would you approach this issue?

Posts: 1

Participants: 1

Read full topic

Detail window opens up on bottom half of screen on chrome mobile android

$
0
0

@giygas wrote:

beginning a few weeks ago, clicking an entity in the frontend led to the detail pane opening on the bottom half of the screen, like so:

https://youtu.be/zW22pJvCnxM

this doesn’t happen in Firefox, only chrome (and the HA web app)

it happens on multiple phones, i tried it on a note 10 and s10

any ideas what could be causing this?

Posts: 1

Participants: 1

Read full topic


Binary Sensor act like a cover

$
0
0

@ZombiEd wrote:

Is there a way to have a binary sensor act like a cover? I want to create a glance card to show window sensors which are just off/on to display Open/Closed with a windows-open icon and a windows-closed icon.

Posts: 1

Participants: 1

Read full topic

Automation with if - else and telegram trigger.event.data.user_id

$
0
0

@FaserF wrote:

Hello,
I am having problems with if else states in an automation.
My goal is,that I get a notification, when someone writes a telegram bot to shutdown the server and I want to see the name. I thought I could get the name by the trigger.event.data.user_id, but I always get a message from the bot that the server was shutdown by unknown, not by the person.

  - alias: Shutdown
    initial_state: on
    trigger:
      platform: event
      event_type: telegram_command
      event_data:
        command: '/shutdown'
    action:
      - service: shell_command.shutdownserver
      - service: notify.telegram
        data_template:
          message: >
            Server was shutdown by {% if (is_state("{{ trigger.event.data.user_id}}", "88888888")) -%} Person A {% elif (is_state("{{trigger.event.data.user_id}}", "77777777")) -%} Person B {% else %} Unknown {{trigger.event.data.user_id}} {% endif %}. Waiting 2,5 Minutes to turn off the plug.

Posts: 1

Participants: 1

Read full topic

Camara Lovelace Question

$
0
0

@michielvdenberg wrote:

Hi All,

I have a camara and I have google hub. Now when someone push mu doorbell I want to cast a full screen shot of my camara. I got everything working fine except one thing.

I don’t get my video to show a full screen. I only get this small image and I want it fullscreen.

Anybody got a idea how to get a camara feed full screen?

Posts: 2

Participants: 1

Read full topic

There is no "homeassistant" local user in the database

$
0
0

@Madivad wrote:

I have been struggling with this all day and I’m really getting nowhere, although I’m understanding the problem, I just don’t know how to fix it.

I have found countless references and just about every time people talk about blowing out the system and starting again (uninstalling and reinstalling) and while I’ve done that with MQTT, I haven’t done it to HA itself.

I’m using Home Assistant in the Synology Package which is basically a HassIO / HassOS with the add-on packages.

The only packages I’ve added on are File Editor, MQTT, and TasmoAdmin.

I have uninstalled and reinstalled MQTT numerous times (at least 6). I have had login as [] and also included users and passwords. I have tried it with anonymous set to True and False, always restarting MQTT, often restarting HA as well. The MQTT installation itself doesn’t seem to be the problem, all my devices are seeing each other and talking (I can view everything perfectly in MQTT Explorer).

What is not happening though, is Home Assistant can’t use MQTT.

MQTT logs:

[17:16:47] INFO: Setup mosquitto configuration
[17:16:47] WARNING: SSL not enabled - No valid certs found!
[17:16:47] INFO: No local user available
[17:16:47] INFO: Initialize Hass.io Add-on services
[17:16:47] INFO: Initialize Home Assistant discovery
[17:16:48] INFO: Start Mosquitto daemon
1591946208: mosquitto version 1.6.3 starting
1591946208: Config loaded from /etc/mosquitto.conf.
1591946208: Loading plugin: /usr/share/mosquitto/auth-plug.so
1591946208: |-- *** auth-plug: startup
1591946208:  ├── Username/password checking enabled.
1591946208:  ├── TLS-PSK checking enabled.
1591946208:  └── Extended authentication not enabled.
1591946208: Opening ipv4 listen socket on port 1883.
1591946208: Opening ipv6 listen socket on port 1883.
1591946208: Opening websockets listen socket on port 1884.
1591946208: Warning: Mosquitto should not be run as root/administrator.
1591946208: New connection from 172.30.32.1 on port 1883.
[INFO] found madmqtt on Home Assistant
1591946209: New client connected from 172.30.32.1 as mqtt-explorer-61cfc303 (p2, c1, k60, u'madmqtt').
1591946213: New connection from 172.30.32.1 on port 1883.
1591946213: New client connected from 172.30.32.1 as DVES_428AAA (p2, c1, k30, u'madmqtt').
1591946213: New connection from 172.30.32.1 on port 1883.
1591946213: New client connected from 172.30.32.1 as DVES_CA6F7B (p2, c1, k30, u'madmqtt').
1591946230: New connection from 172.30.32.1 on port 1883.
[WARN] Not found homeassistant on local database
1591946230: Socket error on client <unknown>, disconnecting.
1591946350: New connection from 172.30.32.1 on port 1883.
1591946350: Socket error on client <unknown>, disconnecting.
1591946470: New connection from 172.30.32.1 on port 1883.
1591946470: Socket error on client <unknown>, disconnecting.
1591946507: New connection from 172.30.32.1 on port 1883.
1591946507: Socket error on client <unknown>, disconnecting.
1591946508: New connection from 172.30.32.1 on port 1883.
1591946508: Socket error on client <unknown>, disconnecting.
1591946510: New connection from 172.30.32.1 on port 1883.
1591946511: Socket error on client <unknown>, disconnecting.
1591946515: New connection from 172.30.32.1 on port 1883.
1591946515: Socket error on client <unknown>, disconnecting.
1591946523: New connection from 172.30.32.1 on port 1883.
1591946523: Socket error on client <unknown>, disconnecting.
1591946539: New connection from 172.30.32.1 on port 1883.
[WARN] Not found homeassistant on local database
1591946539: Socket error on client <unknown>, disconnecting.

As can be seen, other things are interacting with the broker, just not HA.

Developer Tools Logs

2020-06-12 17:21:47 ERROR (Thread-5) [homeassistant.components.mqtt] Unable to connect to the MQTT broker: Connection Refused: not authorised.
2020-06-12 17:21:47 WARNING (Thread-5) [homeassistant.components.mqtt] Disconnected from MQTT server (5)
2020-06-12 17:21:48 ERROR (Thread-5) [homeassistant.components.mqtt] Unable to connect to the MQTT broker: Connection Refused: not authorised.
2020-06-12 17:21:48 WARNING (Thread-5) [homeassistant.components.mqtt] Disconnected from MQTT server (5)
2020-06-12 17:21:51 ERROR (Thread-5) [homeassistant.components.mqtt] Unable to connect to the MQTT broker: Connection Refused: not authorised.
2020-06-12 17:21:51 WARNING (Thread-5) [homeassistant.components.mqtt] Disconnected from MQTT server (5)

configuration.yaml

is basically blank, and nothing to do with MQTT

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

# Text to speech
tts:
  - platform: google_translate

# All these files are empty
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

switch:
  - platform: orvibo
    switches:
     -  host: 192.168.1.82
        mac: ac:cf:23:****
        name: "Room1"

     -  host: 192.168.1.81
        mac: ac:cf:23:24***
        name: "Room2"

I’m drawing a blank, any help appreciated

edit: this is my MQTT config from the Supervisor > MQTT > Configuration

logins: []
anonymous: true
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

As mentioned, I have tried this with logins provided (for madmqtt and others) and with anonymous true and false

Posts: 5

Participants: 2

Read full topic

EZVIZ cameras on ffmpeg no longer working after update

$
0
0

@VagoHome wrote:

Hi all.
I eventually upgraded my very obsolete HA installation to the 0.110.4 version, all ok but the cameras.

my yaml file configuration is

camera:
  - platform: ffmpeg
    name: soggiorno
    input: rtsp://admin:FRFXXX@10.0.1.54:554

and the card is

camera_image: camera.soggiorno
image: /local/Living.jpg
type: picture-elements

The card appears grey.
What I tested:
I tryed to add the ffmpeg: argument to my configuration file, not working
I reverted the old version of HA to check… all is working ok
I tryed to use the ezviz integration configuration, HA hangs in checking the conf file

What can I check?

Thankyou

Posts: 1

Participants: 1

Read full topic

OpenZWave Beta Aeotec WallMote Duo Scene Activation

$
0
0

@Veldkornet wrote:

With the new OpneZWave Beta, I’m trying to get my Aeotec Wallmote Duo to work. Nothing fancy, just that if I touch the button, I can make a light switch on.
In the “normal” Zwave integration, I would be able to create an automation based on the following:

trigger:
- event_data:
    entity_id: zwave.aeon_labs_zw129_wallmote_duo
    scene_data: 0
    scene_id: 1
  event_type: zwave.scene_activated
  platform: event

However, the “zwave.” entities are not available in the OpenZWave beta, what’s the correct method to do this? Do I need to act upon something in MQTT? And if so, how would I go about this exactly?

Posts: 8

Participants: 3

Read full topic

DuckDNS aliases not working?

$
0
0

@Amardeep wrote:

Hi everyone, I recently set up a new Home Assistant instance on a rpi 3b+ (currently v.0.110.0), and I have remote access with SSL working using the DuckDNS add-on. I’m trying to set it up to work with my personal domain using the add-on’s “aliases” option. I have a CNAME set up from my personal domain to my DuckDNS domain. My config is as follows:

lets_encrypt:
  accept_terms: true
  certfile: fullchain.pem
  keyfile: privkey.pem
token: MY_TOKEN
domains:
  - MY_DUCKDNS_DOMAIN.duckdns.org
  - MY_DOMAIN
aliases:
  - domain: MY_DOMAIM
    alias: MY_DUCKDNS_DOMAIN.duckdns.org
seconds: 300

I can access remotely with SSL using the MY_DUCKDNS_DOMAIN.duckdns.org, but when I access using MY_DOMAIN, it connects without SSL.

Are aliases not working, or have I do e something wrong?

Posts: 1

Participants: 1

Read full topic


Turn on and off TV if no signal from kodi

$
0
0

@Anand_Suppiah wrote:

Hi guys. This is what I have. Raspberry Pi 4 running libreelec (kodi) with home assistant in a docker.

the RPI is connected to a dumb tv hia hdmi for KODI.
I also have a chromecast connected to the tv via another HDMI port.
I then wired the TV power cable through a sonoff switch to be able to control it (on off only).
When not in use for 15 minutes, kodi will cut off power to hdmi (power saving mode) which will make the screen go black with backlight on.

What I want to do is,

  1. Turn off the tv if
    condition a. kodi is in power saving mode (hdmi turned off)
    b. chromecast is not playing anything.

  2. turn on the tv if
    condition a. kodi exits power saving mode
    b. chromecast starts playing.

I think i know what to do with respect to the chromecast. How do I get HA to detect when kodi enters power saving mode? my TV has got no CEC function.

Saw this guide - https://www.home-assistant.io/integrations/kodi/ but appears to be for cec supported tv only.

Posts: 1

Participants: 1

Read full topic

Help combining automations

$
0
0

@Anand_Suppiah wrote:

Hi. I have a dumb fan with IR remote. it has off, low, med and high. I then changed the switch to sonoff switch to control it. I then synced the IR remote with the sonoff remote using the following automations:-

Automation 1

- id: '1'
  alias: MBR Fan - turn off remote if switch off
  description: ''
  trigger:
  - entity_id: switch.sonoff_10004ea43b_2
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data: {}
    entity_id: fan.master_bedroom_fan_remote
    service: fan.turn_off

Automation 2

- id: '1591893775027'
  alias: MBR Fan - on switch when remote medium
  description: ''
  trigger:
  - entity_id: fan.master_bedroom_fan_remote
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: template
    value_template: '{{ is_state_attr(''fan.master_bedroom_fan_remote'', ''speed'',
      ''medium'') }}'
  action:
  - data: {}
    entity_id: switch.sonoff_10004ea43b_2
    service: switch.turn_on
  - delay: 00:00:5
  - data:
      speed: medium
    entity_id: fan.master_bedroom_fan_remote
    service: fan.set_speed

Automation 3

- id: '1591893775028'
  alias: MBR Fan - on switch when remote fast
  description: ''
  trigger:
  - entity_id: fan.master_bedroom_fan_remote
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: template
    value_template: '{{ is_state_attr(''fan.master_bedroom_fan_remote'', ''speed'',
      ''high'') }}'
  action:
  - data: {}
    entity_id: switch.sonoff_10004ea43b_2
    service: switch.turn_on
  - delay: 00:00:05
  - data:
      speed: high
    entity_id: fan.master_bedroom_fan_remote
    service: fan.set_speed

Automation 4

- id: '1591893775029'
  alias: MBR Fan - on switch when remote low
  description: ''
  trigger:
  - entity_id: fan.master_bedroom_fan_remote
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: template
    value_template: '{{ is_state_attr(''fan.master_bedroom_fan_remote'', ''speed'',
      ''low'') }}'
  action:
  - data: {}
    entity_id: switch.sonoff_10004ea43b_2
    service: switch.turn_on
  - delay: 00:00:05
  - data:
      speed: low
    entity_id: fan.master_bedroom_fan_remote
    service: fan.set_speed

Automation 5

- id: '1591937568366'
  alias: MBR-Fan - Turn off switch if remote off
  description: ''
  trigger:
  - entity_id: fan.master_bedroom_fan_remote
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data: {}
    entity_id: switch.sonoff_10004ea43b_2
    service: switch.turn_off
- id: '1591938076531'
  alias: MBR Fan - Set remote speed to Med if Switch on
  description: ''
  trigger:
  - entity_id: switch.sonoff_10004ea43b_2
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      speed: medium
    entity_id: fan.master_bedroom_fan_remote
    service: fan.set_speed

I’m sure there is a way to simplify this to just 2 automations. Hope someone can help me

Posts: 1

Participants: 1

Read full topic

Trigger automation when temperature goes down (from unknown value, to unknown value)

$
0
0

@Stefan_Fasth wrote:

I have a kind of heater to my pool which only does any good when the sun is shining.
So I want to turn the pump off when thats no longer the case.

I can not use sun up/down, I also have to consider the weather (cloudy, rainy or sunny) as well as trees blocking the heater at certain times during the day.

So my thought was that when the temperature from the inlet starts to sink (a sign that the heater is not doing any good) I should turn the pump off. So how do I trigger an automation based on dropping temperature (for example during the last 15 minutes the temperature has dropped 0.5 degrees).

Posts: 5

Participants: 3

Read full topic

How to keep internal state for Automation condition

$
0
0

@ebalcsk wrote:

Hello

What i want to do:
Keeping internal state of my monitors [D-SUB,DVI,HDMI] and acting upon automation.
Depending on the internal state need to send different command to change the input.

The pseudo-code should look like:

>  #initialization
>   var1 = DVI 
> 
>   if automatization triggered (change to HDMI):
>        if var1 in [D-SUB,DVI]
>             - open input menu
>             if var1 = D-sub 
>                  - go up one in the menu
>             if var2 = DVI
>                  - go down one in the menu
>             - click to accept
>             var1 = HDMI

I found a hass-variables https://github.com/rogro82/hass-variables package in the net, but i not sure if this is the right way to go?

variable:
  Monitor_1_input:
    value: "DVI"
  Monitor_2_input:
    value: "DVI"

Also how to use the created variable in the automation condition?

Posts: 3

Participants: 2

Read full topic

Lutron Caseta - Error upon start up: Unknown options lutron_caseta

$
0
0

@jacknotexotic wrote:

Hi all,

I’m having a bit of a challenge with connecting a lutron smart hub to home assist.

I was able to configure the lutron certificate add-on, log into the lutron smart hub and add the certificate, then update the config.yaml to reflect the smart hub ip and cert.

Everything appeared fine, but I don’t see any of my switches under devices. I rebooted hassio adn noticed the below warning upon startup in the logs.

Any help would be greatly appreciated. This is my first venture into HA.

20-06-12 09:59:48 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-06-12 10:02:15 WARNING (MainThread) [supervisor.addons.validate] Unknown options lutron_caseta
20-06-12 10:02:15 INFO (SyncWorker_1) [supervisor.docker.interface] Clean addon_a0d7b954_lutron-cert application
20-06-12 10:02:16 INFO (SyncWorker_1) [supervisor.docker.addon] Start Docker add-on hassioaddons/lutron-cert-amd64 with version 0.5.2
20-06-12 10:02:16 INFO (MainThread) [supervisor.api.security] /host/info access from a0d7b954_lutron-cert
20-06-12 10:04:31 WARNING (MainThread) [supervisor.addons.validate] Unknown options lutron_caseta
20-06-12 10:04:33 INFO (SyncWorker_8) [supervisor.docker.interface] Stop addon_a0d7b954_lutron-cert application
20-06-12 10:04:37 INFO (SyncWorker_8) [supervisor.docker.interface] Clean addon_a0d7b954_lutron-cert application
20-06-12 10:04:37 WARNING (MainThread) [supervisor.addons.validate] Unknown options lutron_caseta
20-06-12 10:04:38 INFO (SyncWorker_1) [supervisor.docker.addon] Start Docker add-on hassioaddons/lutron-cert-amd64 with version 0.5.2
20-06-12 10:04:38 INFO (MainThread) [supervisor.api.security] /host/info access from a0d7b954_lutron-cert

Posts: 1

Participants: 1

Read full topic

Viewing all 96073 articles
Browse latest View live


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