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

[Question] Reading data from P1 port with Hassio

$
0
0

@Rickyy wrote:

Hello,

In Holland we have a ‘smart’ energy device which enables us to read data like current/peak usage of your electricity and gas. There is a P1 port on the device which we can use to read the data from.

I’ve noticed that there is software available for the raspberry pi (P1 Monitor) to collect this information.
I want to know if it’s possible to connect my Hassio machine to the P1 monitor so I can also display the data on my Hassio VM.

Does someone has a solution for this?
Thank you in advance!

Best regards,

Rick

Posts: 2

Participants: 2

Read full topic


Template use to set entity_id

$
0
0

@c0revin wrote:

Hi all,

I try to set some input_boolean to “on” when certain input_select option is activated, and I want the previously active input_boolean to be turned of.

I wrote the following code and it parses fine, but no input_booleans get turned on.

help appreciated!


- alias: some input_booleans - external update
  trigger:
    - platform: state
      entity_id: input_select.remote_activities
  condition:
    condition: template
    value_template: "{{ trigger.to_state.state != 'unknown' }}"
  action:
    - delay: '00:00:20'
    - service: input_boolean.turn_on
      data_template:
        entity_id: >
          {% if is_state(trigger.to_state), 'act 1' %}
            input_boolean.act1
          {% elif is_state(trigger.to_state), 'act 2' %}
            input_boolean.act2
          {% else %}
            input_boolean.dummy
          {% endif %}
    - service: input_boolean.turn_off
      data_template:
        entity_id: >   
          {% if is_state(trigger.from_state), 'act 1' %}
            input_boolean.act1
          {% elif is_state(trigger.from_state), 'act 2' %}
            input_boolean.act2
          {% else %}
            input_boolean.dummy
          {% endif %}

Posts: 12

Participants: 4

Read full topic

Enabling the rpi_rf integration (hass.io)

Newly getting Login attempt failed msgs since 105.mumble

$
0
0

@Linwood wrote:

Been using HA for a year or so, updated recently to 0.105.3 (maybe coincidence) and now getting regular “Login attempt failed” from the PC on which I run the browser connected to HA.

I am logging in with saved credentials, not entering any. HA is working fine, I can connect fine. The exact message is:

2020-02-16 11:17:17 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 192.168.130.41

HA is not exposed externally. There’s nothing unusual running on my PC.

It is also possible that an update to Chrome or windows may have been involved, both are fully up to date, but the timing of the 105 updates is the best match to when it started (though I went through each subversion and not sure on which it started). I have been unable to find any particular thing I do to cause it – I am making relatively minor configuration changes, setting up different camera types for streaming, cleaning up some unused entities, etc. Purposely going into a bunch of options to try to cause it has no effect. It does not seem to happen when I am not actively using it (vs it just sitting there logged in).

HA is in Hassio on a VM on a different server and subnet, and this does not correspond to reboots or restarts there.

Anyone else seeing these? Any ideas?

Sadly it is maybe 2-3 times a day max, making it harder to pin down. If it’s not something known I’ll start a sniffer trace and just let it run until it happens again, though unfortunately all that will show are packets, not what originated them on the PC.

Linwood

Posts: 1

Participants: 1

Read full topic

motionEye snapshot url does not work

$
0
0

@taikapanu wrote:

How to use the snapshot url provided by motionEye?
I get this:

http://192.168.2.253:8123/api/hassio_ingress/<random text>/picture/1/current/?_username=admin&_signature=<random text>

Using it works on the same browser where I’m logged in to home assistant. But if I try incognito or telegram notify I get 401 access error. I tried the example here following the user and password but does not work either. Same 401 error. https://www.home-assistant.io/integrations/telegram/#photo-support

How to get the snapshot using this?

Posts: 3

Participants: 1

Read full topic

Use HA to publish a media_player entity (Marantz SR5012)

$
0
0

@kitus wrote:

Hello everyone,

Given how powerful the HomeKit component it, I would like to control the volume of my network player though Apple’s Home.app.

I just configured the component so that it exposes the media_player domain, but I was unsuccessful as the snapshot displays
.

Any idea?

Thanks

Posts: 1

Participants: 1

Read full topic

Automation or script?

$
0
0

@Jiran wrote:

Hello, try to create such automation but seems like there must be multiple IF ELSE conditions. Could you point me which is the right way to achieve what is described in diagram?
topeni-2

Posts: 3

Participants: 2

Read full topic

Home Assistant password

$
0
0

@Makis wrote:

Hi
I am wondering if (for extra security reasons) there is a way to to have an extra password before I enter in HA frontend. (like a 6-8 code, not my credentials

I am thinking what if someone stole my laptop, or my mobile. (I have the companion app)
How do you handle this in general?

  • a little out of topic of HA but I am also looking for a secure cloud service in order to keep valuable info as secure as possible. Do you have any recommendations?

For example I tried a few services like tresorist dropbox etc… and in windows environment the folder is is available to anyone have access to my laptop.

Posts: 3

Participants: 3

Read full topic


Problem with automations.yaml

$
0
0

@Axteroide wrote:

So I’m trying to make my lights change when my TV source is on Netflix based on this post: Using the LG webOS source value to trigger events

- alias: "TV Netflix"
  trigger:
    platform: state
    entity_id: sensor.living_room_source
    to: 'Netflix'
  condition:
    - condition: state
      entity_id: sun.sun
      state: 'below_horizon'
    - condition: state
      entity_id: media_player.tele
      state: 'playing'
  action:
    entity_id: scene.movies

Having this error:
Invalid config for [automation]: [entity_id] is an invalid option for [automation]. Check: automation->action->0->entity_id. (See /config/configuration.yaml, line 11).

But I have that defined in my configuration.yaml file

media_player:
  platform: webostv
  name: tele
  host: IP...

I’m new at HomeAssistant and have no idea what I’m doing wrong here…
Any solutions?

Thank you.

Posts: 4

Participants: 2

Read full topic

Dark shadows around icons on a picture-elements card

$
0
0

@scpowered wrote:

Hopefully I am not creating a duplicate topic here but have searched for a few days now with no luck (maybe I am not using the correct terms).

I am using a picture-elements card to show the floorplan of the house. After I updated to .105 I started to have a problem with a shadow showing up around the last icon I clicked on. It will go away if I click elsewhere.

I have tried different devices(pc,ipad,android phone), browsers(chrome,firefox) and the android app. Results are the same.

I have tried different icons. Results are the same.

This is the same for both of my home assistant setups. One is running HA (hassio) on a raspberry pi 2 for the shop. The other is running HA (hassio) on ubuntu/docker for the house.

Has anyone else experienced this?

Thank you for your help!

Posts: 2

Participants: 2

Read full topic

How to add a customized time and binary input?

$
0
0

@WoJWoJ wrote:

I use Home Assistant coupled with App Daemon for the automations.

I currently have automations of the style “30 minutes before sunset, switch on the lights in the living room”. The drawback is that the details are hard-coded: it is always 30 minutes, and every week day.

If I want to change either of these conditions (the number of minutes, or the fact that the automation runs) I have to edit my App Daemon code.

To solve this, I wanted to add to Home Assistant

  • an input for the minutes
  • a binary input for the execution or not of the automation
  • relevant entries in the UI to switch / update them.

and query them from App Daemon to adjust the automation details.

It did not work :slight_smile:

This is how I added the inputs:

# configuration/sensor/automated_light.yaml
# this is parsed because configuration.yaml has 
# sensor: !include_dir_merge_list configuration/sensor/ 
input_number:
  minutes_before_sunset:
    name: minutes avant coucher du soleil
    initial: 30
    min: 0
    step: 5
    mode: box

input_datetime:
  shut_off_lights_when:
    name: extinction des lumières
    has_date: false
    has_time: true

input_boolean:
  shut_off_lights:
    name: extinction des lumières
    initial: on
    icon: mdi:car
  switch_on_lights:
    name: allumage des lumières
    initial: on

and the relevant part in ui-lovelace.yaml

- entities:
    - sensor.minutes_before_sunset
    - sensor.shut_off_lights
    - sensor.shut_off_lights_when
    - sensor.switch_on_lights
    title: Automatisation des lumières
    type: entities

This gives on the dashboard:

image

and I cannot find any of the inputs in Development Tools / States

What is the correct way to add such entries?

Posts: 7

Participants: 2

Read full topic

How can I create a card that is button size with large temperature reading without an icon?

$
0
0

@not_a_coder wrote:

How can I create a card that is button size with large temperature reading without an icon? After doing a web search the only example that I could find is a sensor widget in AppDaemon Dashboard for Home Assistant.

It is found here but I am not interested in using AppDaemon. How can I customize a button to look the same in Lovelace? I have HassOS 3.10 and Home Assistant 0.105.4 on a RPi4

Posts: 1

Participants: 1

Read full topic

Do I need boolean

$
0
0

@Mr_hairy wrote:

Hello Automaters,

I have a PIR sensor which when motion is detected it switches on 2 lights, then after 2 mins of not detecting movement the lights switch off which is covered by the 2 automations below.
I also have a seperate routine activated by saying

“OK Google, turn on upstairs lights”

part that routine switches on the same 2 lights.

The problem I am experiencing is when i have activated the lights via Google i want them to stay on but when the PIR senses motion, two minutes later the lights switch off.
From what i have read in forums and HA Integrations , a boolean input may help but i have no idea where to start to be honest and I wonder if anyone can help with a bit of code to start me off.

My HA automation is as follows which works fine.

- id: 'xxxxx'
  alias: Turn on upstairs lights when there is movement
  description: ''
  trigger:
  - entity_id: binary_sensor.sonoff_pir_2
    platform: state
    to: 'on'
  condition:
  - after: '17:30'
    before: '23:59'
    condition: time
  action:
  - data: {}
    entity_id: switch.dave_s_light
    service: switch.turn_on
  - entity_id: switch.lynsey_s_light
    service: switch.turn_on
- id: 'xxxxx'
  alias: Turn off upstairs lights 2 mins after last movement
  description: ''
  trigger:
  - entity_id: binary_sensor.sonoff_pir_2
    for: 00:02:00
    platform: state
    to: 'off'
  condition: []
  action:
  - data: {}
    entity_id: switch.dave_s_light
    service: switch.turn_off
  - entity_id: switch.lynsey_s_light
    service: switch.turn_off

Thanks all, please prod and poke me if you need further information.

Posts: 3

Participants: 2

Read full topic

How to debug the element which slows down startup?

$
0
0

@WoJWoJ wrote:

I noticed that Home Assistant’s startup freezes at one point, and then resumes. I guess it is one of the components slowing it down.

How to debug this?

Setting the debug level to debug I see in the logs:

(...)
2020-02-16 20:55:40 DEBUG (MainThread) [aioharmony.hubconnector] HarmonyHub.home: Retrieving Harmony Hub information.
2020-02-16 20:55:40 DEBUG (MainThread) [aioharmony.hubconnector] HarmonyHub.home: Sending post request: {'id ': 1, 'cmd': 'setup.account?getProvisionInfo', 'params': {}}
2020-02-16 20:55:40 DEBUG (MainThread) [aiounifi.api] [{'_id': '5d656c38d02e7d00f7897a69',
  '_is_guest_by_uap': False,
  '_last_seen_by_uap': 1581882932,
  '_uptime_by_uap': 18158,
  'anomalies': 0,
  'ap_mac': 'f0:9f:c2:73:34:fe',
  'assoc_time': 1581864657,
(... dict output ...)
  'vlan': 0,
  'wifi_tx_attempts': 2022},
 {'_id': '5e1b342eb9d82100f7ae7d87',

← here is the point when the startup freezes for a minute or so

2020-02-16 20:56:10 INFO (SyncWorker_10) [homeassistant.util.package] Attempting install of semantic_version==2.8.2
2020-02-16 20:56:15 INFO (SyncWorker_4) [homeassistant.util.package] Attempting install of hacs_frontend==13
2020-02-16 20:56:20 INFO (MainThread) [homeassistant.setup] Setting up light
2020-02-16 20:56:20 INFO (MainThread) [homeassistant.components.light] Setting up light.mqtt
(...)

The freeze is not a big deal because Home assistant works great after starting up. I would however prefer to pin-point the culprit because this may mean other problems (DNS resolution for instance) which need to be fixed.

Posts: 2

Participants: 2

Read full topic

Media Player Volume Sensitivity

$
0
0

@mehstg wrote:

Hi all

I have an Ikea Tradfri switch in one of my that I am in the process of setting up as a volume up/down controller for the Sonos ceiling speaker in that room. I have the following automation which works:

# Automation to handle Sonos Control by Bathroom Switch
- id: '1237'
  alias: 'Bathroom Switch Volume Up'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: bathroom_switch
      event: 1002
  action:
    - service: media_player.volume_up
      entity_id: media_player.bathroom
- id: '1238'
  alias: 'Bathroom Switch Volume Down'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: bathroom_switch
      event: 2002
  action:
    - service: media_player.volume_down
      entity_id: media_player.bathroom

Unfortunately, it takes a million button presses to make any meaninful difference to the volume level. The media_player volume_up/down methods do not seem to have any configuration for sensitivity. I was wondering what the best way of achieving this would be. Putting it in a script seems a bit messy and I would rather keep it in the YAML. Am I able to loop the action maybe so one button press triggers 5-10 volume up commands?

Any help much appreciated.

Posts: 2

Participants: 2

Read full topic


Purge exeption

$
0
0

@vincent.ducamps wrote:

Hi everyone,

I run my homeassistant with mariaDB database grow fast so need to purge it, but I would like keep some data (like pressure and temperature) it is possible to exclude some sensors of purge?

Posts: 1

Participants: 1

Read full topic

HassOS running on ESXi - PCI passthrough no boot

$
0
0

@narsaw wrote:

I am running HassOS 3.10 on a VMware hypervisor as a virtual machine. I have a PCI-e usb controller that I am trying to pass to the VM but every time I do, the VM will not boot. I remove the passthrough card from the VM configuration and the VM works w/o issues.

I am trying to attach a Aeotec stick to the VM for zwave integration.

Anyone else running with this configuration?

Posts: 6

Participants: 3

Read full topic

Xiaomi Mi Contro Hub Integration - Possible?

$
0
0

@gianlulen80 wrote:

Good Morning,
Im evaluating to buy a Rasperry PI4 + Home Assistant in order to manage my Xiaomi Home Getway and devices (e.g., water leaks sensor and others) in a better way than the Xiaomi Home App.

The gateway version 272 with firmware 1.4.1_175.0220. Questions:

  1. Is it possible? on the app, under “about” on the hub menu > i see a “wireless communication protocol” menu where i can enable the “wireless communication protocol” and see a password. (Lumi Hub Communication protocol). Can u confirm me ? So is feasble?
  2. Using HA is possible for example in case of alarm from a leak sensor receive an email?

Thanks for help me
regards
Gianluca

Posts: 1

Participants: 1

Read full topic

Garage Door Automation Problems

$
0
0

@gdc wrote:

Hi There,
I am trying to automate my garage doors to automatically close and open on Life360
Device tracking, I am using a switch to set the the state of Door open or closed and Ultrasonic detector for car presence,using a ESPhome on NodeMCU, the ESPHome setup seems to work perfectly, the desired states for the entity’s are sent to HA . I have set up two groups for our two life360 tracking accounts, one group is AllAway it changes from home to not_home when we are both away correctly. the other group is OneAway which changes to not_home when just one person is away.
However I cant get the automation’s for open and close to work, I have read and tried all sorts of ideas to no avail, Can some one look at me automation’s and tell me what I am missing, Cheers

- id: '1580612369371'
  alias: Garage 1 Door Close
  description: ''
  trigger:
  - entity_id: group.allaway
    from: home
    platform: state
  condition:
  - condition: or
    conditions:
    - condition: state
      entity_id: binary_sensor.johns_car_2
      state: 'off'
    - condition: state
      entity_id: binary_sensor.rosalies_car
      state: 'off'
  action:
  - entity_id: switch.garage_1_control_2
    service: switch.toggle

- id: '1580622081620'
  alias: Garage 1 Door Open
  description: ''
  trigger:
  - entity_id: group.oneaway
    from: not_home
    platform: state
  condition:
  - condition: state
    entity_id: binary_sensor.garage_1_status
    state: 'off'
  - condition: or
    conditions:
    - condition: state
      entity_id: binary_sensor.johns_car_2
      state: 'off'
    - condition: state
      entity_id: binary_sensor.rosalies_car
      state: 'off'
  action:
  - entity_id: switch.garage_1_control_2
    service: switch.toggle

Posts: 3

Participants: 3

Read full topic

"Entity id already exists" error, but the entity does not exist in any configuration file

$
0
0

@WoJWoJ wrote:

From Home Assistant log (ver. 0.105.4):

(...)
2020-02-16 22:15:03 INFO (SyncWorker_8) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log
2020-02-16 22:15:03 INFO (MainThread) [homeassistant.bootstrap] Setting up {'logger', 'system_log'}
2020-02-16 22:15:03 INFO (MainThread) [homeassistant.setup] Setting up logger
2020-02-16 22:15:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs
2020-02-16 22:15:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_9. Platform mqtt does not generate unique IDs
2020-02-16 22:15:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs

I tried to locate these switch_2 and switch_9 duplicate entries:

# find . -type f -exec grep -Hn "switch_2" {} \;                                                                                
./home-assistant.log:5:homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs
./home-assistant.log:15:homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.switch_2. Platform mqtt does not generate unique IDs
./.storage/core.entity_registry:504:                "entity_id": "switch.switch_2",
./.storage/core.restore_state:861:                    "friendly_name": "switch_2",
./.storage/core.restore_state:869:                "entity_id": "switch.switch_2",
Binary file ./home-assistant_v2.db matches

It looks like it is registered only once in ./.storage/core.entity_registry. I have stopped HA, deleted core.* files and restarted HA → the output above is after that operation. (switch_9 is the same).

These names used to exist a long time ago (more than just these two) but are long gone and not present in any configuration.

Is this a bug?

Posts: 1

Participants: 1

Read full topic

Viewing all 106762 articles
Browse latest View live


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