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

ESP8266 DHT22 Intermittently Not Updating in HA

$
0
0

I have a couple of DHT22s hooked up to NodeMCU ESP8266s around the house. I’m integrating them into HA using ESPHome which has worked great. The update interval for the Temperature and Humidity from the DHT22 is set for 60s. That said, I’m now noticing that often it is not being reported to HA for much longer than this for some reason. See the pictures below of the temp and humidity sensors from the same DHT22, but having been updated in HA 20ish and 40ish mintus ago. So not only are they not updating every 60 seconds, but they’re also not updating at the same time - in this case, almost 20 mins apart.
Screen Shot 2020-12-13 at 12.32.16 PM Screen Shot 2020-12-13 at 12.32.26 PM

When I go into the log of the device in ESPHome, it is reporting temperature and humidity every 60 seconds.

Has anyone experienced this? Any ideas on why the ESP is reporting every 60 seconds but HA isn’t getting it every 60 seconds?

1 post - 1 participant

Read full topic


Want to start recording data on InfluxDB@DSM NAS - how do I start?

$
0
0

I’m a newbie and fails with what ios most likely basic stuff but I really need some help to get in the right direction.

Today I run Home Assistent on a RPi4 and records data in a MariaDB on a DSM NAS.

I would like to start recording data in InfluxDB on my DSM NAS. Later I would like to start using Grafana to create dashboards.
I have searched for and found a few guides that says they do what I want but I fail so far.

Are there anyone here that have

  • Installed InfluxDB as a Docker container on a DSM NAS
  • Prepared the InfluxDB for Home Assistant
  • Configured Home Assistant to start recording data on InfluxDB

Are there any guides that someone can point me too?

Regards,
Niklas

1 post - 1 participant

Read full topic

ZHA disconnects from all devices after a while

$
0
0

Hi,

I’m running HA in a venv. I installed and configured ZHA that connect to all my Aqara devices ad an Ikea Lightbulb.
The problem I’m facing is that when nobody is at home or during the night (so when door sensors or motion sensors don’t change state) ZHA disconnnects from all devices.
Is like ZHA goes into a sleep mode. If I reload the integration ZHA connects to all the devices.

Does anyone already faced this problem? I really have no idea what to do :frowning:

1 post - 1 participant

Read full topic

Howto reboot a Raspberry Pi and keeping your secrets

$
0
0

I recently had to reboot my Raspberry Pis within an automation and searched for articles about how to do that. There are quite a few about that topic, but always the password, username or the IP-adresses were part of the scripts.
It is not possible to directly put a secret string with ‘!secret < value >’ into a shell command. Because I copy my home-assistant config to GitHub, I came up with the following solution:

  • create a key pair and setup the rasps for ssh login with a key pair.
    (detailed descriptions can be found on the web)
  • copy the key pair files (in my case ‘id_rsa*’) to your config into a new folder ‘/config/.ssh’
  • create a generic shell command with parameters ‘user’ and ‘ip_address’:
shell_command:
  reboot_raspi: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa "{{user}}"@"{{ip_address}}" sudo reboot now'
  • create a script for each raspberry:
script:
  reboot_raspi1:
    alias: reboot Raspi1
    sequence:
    - service: shell_command.reboot_raspi
      data_template: 
        ip_address: !secret raspi1_ip
        user: !secret raspi_user
  reboot_raspi2:

and put your username and ip-adress into your ‘secrets.yaml’ file:

raspi_user: pi
raspi1_ip: 192.168.x.x
raspi1_mac: xx.xx.xx.xx.xx.xx
raspi2_ip: 192.168.x.x
...

Hope this will help…

1 post - 1 participant

Read full topic

No internal access after DuckDNS/LetsEncrypt

$
0
0

Hi there,

I’ve successfully installed DuckDNS and LetsEncrypt. It is working from the external name of https://mydomain.duckdns.org just fine.

My Internal and External URLs are set as follows on the General page:
External: https://mydomain.duckdns.org
Internal: http://homeassistant.iot.mydomain.org:8123

But now, my internal name/url http://homeassistant.iot.mydomain.org:8123 doesn’t work any longer.

This happened as soon as I restarted with this added to the configuration.yaml file.

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

So by adding that, I no longer have internal access? I tried the following and none of them work from my internal network:

http://homeassistant.iot.mydomain.org
http://homeassistant.iot.mydomain.org:443
http://homeassistant.iot.mydomain.org:8123
http://(internal-IP)
http://(internal-IP):443
http://(internal-IP):8123

Could someone tell me if I’m missing something in my config or if this is the way it is now that I’ve added those certificates and this is part of the lockdown to make it secure?

3 posts - 3 participants

Read full topic

SSH (sshpass) command failed on HA logs (and not working)

$
0
0

Hi!

I’ve made a command line switch which send a different command for on or off, but it seems that it is not working… I am using sshpass command to switch some mPower power sockets on/off. In the SSH Terminal, the command it is working flawless, but when I try to use the switch, I get error in log and it is not working… The error is “Command failed”, you can check the photo for more datails.

How can I solve it, someone knows it?

Thanks in advance!

1 post - 1 participant

Read full topic

How to remove ESPHome entities?

$
0
0

I am cleaning up some entities that were left behind after some changes in my devices. Specifically, I used to have an Sonoff Basic flashed with ESPHome that I added via the ESPHome integration. It worked great.

I replaced the switch by a MEROSS one (which also works great) but I now have the old entity as unavailable. This is understandable as the Sonoff is not there anymore (for now at least).

How can I delete that entity?

I see it on the integration screen:

image

When clicking on the device, I see it in the list (note: I chnaged its name when I was using it to something more descriptive)

Finally choosing that device I get to its main configuration screen:

I expected to find under the upper-right cog a “delete” entry, but there is none:

So how to delete this leftover entity?

I was wondering whether that should be done on the first screen, this screen has a delete entry but I am afraid to delete the WHOLE ESPHome integration, with all the other devices that rely on it. Would this delete only that entry?

1 post - 1 participant

Read full topic

How can automation A stop running automation B?

$
0
0

In my bathroom I have a couple of motion sensors. I want to create one automation that turns on the lights if one of the motion sensors detects motion, and another that turns off the lights a few minutes after both sensors detects no motion. In HomeSeer this worked well to prevent the kids being left in the dark when bathing. But how do I do this in Home Assistant? Can one automation cancel another automation that is currently running and on a Delay step?

1 post - 1 participant

Read full topic


ZHA & Conbee II No more pairing

$
0
0

Hi,
I’ve had a Conbee II working with ZHA, hosted on a Odroid C4 (armbian, venv install of HA).

Since May I’ve been adding devices (Ikea, Innr, Aqara, Sonoff) in ZHA and it has been working flawlessly, up to 27 devices added.

Last friday I went into a software (boot) issue that forced me to reinstall the whole “same” system, same SBC, same Conbee … but ever since I’ve not been able to pair any Zigbee device !

I’ve tried so far :

  • to restore from previous install (full HA config directory) : it did not work (for the ZHA part only !)
  • to delete some devices and pair them again : not working
  • to remove the integration, zigbee.db, neighboors & .zha_storage folders : not working

Is there anything to be done to “reset” the whole ZHA thing so that devices eventually pair again ?

Thanks for your help !

1 post - 1 participant

Read full topic

History is not build if number of days is more than 8

$
0
0

There is a following problem with History component. When I select the date range 6…13 December (1 week and one incomplete day), then history charts for all entities are rendered OK (even though it takes about 5 seconds), but when I select the wider range by just adding one day namely 5…13 December (1 week plus 2 days), history page is not rendered at all: the icon is in waiting state and page is empty:

I have tried another period: 1…8 December is OK, 1…9 December fails. Magic.

Recorder is MySQL. I have enabled slow queries log and detected no queries slower than 2 seconds.

1 post - 1 participant

Read full topic

Can't Disarm Manual Alarm With Automation

$
0
0

Just using just generic codes while I get this set up. I have the code set to 1111.

When I make the automation, this works when I manually trigger it:
Screen Shot 2020-12-13 at 1.24.17 PM

But when I try to change the code line to:

code: !secret alarm_code

it won’t work. Not only won’t it work, it won’t even save.

Any idea what I’m doing wrong?

1 post - 1 participant

Read full topic

Reboot after running out of power

$
0
0

Hi,
every time I go out of power, I’m no more able to log in into home assistant, and I need to restart it manually. I assume the cause (but I might be wrong) is that HA instance probably loads before the router.
Is there a way to set a delay in some config to wait a couple of minutes every time the HA gets an unexpected shut down?
Thanks.

1 post - 1 participant

Read full topic

How to delete an entity that is neither in a config file, nor in an integration?

$
0
0

I am cleaning up the devices configured in Home Assistant.

One of them (light.led01) appears in the entities but I cannot remove it:

image

This says that this entity has no unique ID and therefore cannot be managed through the UI. The “Linked” tab is empty.

It is not defined in configuration.yaml (which I keep as a single, flat file).It is not in .storage/core.enity_registry either

How can I remove it?

1 post - 1 participant

Read full topic

Automation doesn't work (Time Trigger, State at home Condition)

$
0
0

Hi,

I want to run each day @ 9:01 a automation task, which only runs if I am at home.

So I added the following automation task:

alias: zu Hause
description: ''
trigger:
  - platform: time
    at: '09:01'
condition:
  - condition: state
    entity_id: device_tracker.nils_redmi
    state: home
action:
  - service: climate.set_temperature
    data:
      temperature: 30
    entity_id: climate.int0000002
  - service: notify.mobile_app_redmi_note_5
    data:
      message: Heizung an
  - service: climate.set_temperature
    data:
      temperature: 30
    entity_id: climate.000a1be99b4c7a
  - service: climate.set_temperature
    data:
      temperature: 30
    entity_id: climate.000a1be99b5870
mode: single

The User is at home at the specific Time but the task doesn’t fire.

What did I miss here ?

Thx & Greetings

5 posts - 2 participants

Read full topic

Zigbee 3.0 to Ethernet bridge/gateway (wired not WiFi) inexpensive DIY project for ZHA

$
0
0

FYI @tube0013 is has posted some information about his inexpensive yet very powerful and flexible Zigbee to Ethernet bridge/gateway DIY project for the ZHA integration in Home Assistant.

https://github.com/zigpy/zigpy/discussions/584

I think that what makes this project interesting is that it is based on the inexpensive yet powerful WT32-ETH01 (Wireless-Tag) ESP32 board so it supports wired Ethernet instead of only WiFi. That choice of hardware and the idea of a simple serial to IP server to make ZHA access the Zigbee module over the network makes the solution very versatile.

You do not need to use the same Zigbee module as his project as the WT32-ETH01 bridge really only acts as a serial console server you should be able to replace the Zigbee module part with any other zigpy compatible serial radio module as long as you can flash it with a zigpy compatible firmware know its TX/TXD and RX/RXD ports + power and ground.

More advanced users will probably in the future also be able to replace the ESPHome firmware for the ESP32 with any other ESP32 firmware when they add support WT32-ETH01 and its Ethernet chip (like maybe Tasmota, ESPurna, ESPEasy, or ESP-LINK), as long as they feature serial console server functionality.

In fact, you should also use this solution for any other serial device/module and not just Zigbee modules. You could use a similar setup for Z-Wave, RF, Bluetooth, etc. devices/modules and enjoy a stable wired Ethernet connection.

1 post - 1 participant

Read full topic


ZHA - Xiaomi Mijia Wireless Button (WXKG01LM) Pairing issues

$
0
0

Hello!

I am having issues pairing two round Xiaomi buttons, WXKG01LM.
I am using ZHA, the coordinator is an Sonoff ZBBrigdge, and i already have 3 Xiaomi WXKG11LM buttons connected, no issues pairing, and have been working fine without interruptions for a few months.

Basically what happens, is that when i try to pair them, and using the new ZHA “feature”, the Zigbee logs, this is what happens:

  1. I press “Add Device”, and go into the “Searching for Zigbee devices”
  2. At this time, i press the pairing button on the Xiaomi device, and this soon appears:

image

  1. The device doesn’t get connected, these are the logs:

Apparently, the device tries is found, but fails to pair. Anyone had the same issue?

Thanks in advance :wink:

1 post - 1 participant

Read full topic

Changing IP address for Zigbee socket connection

$
0
0

I’ve recently set up a Zigbee gateway using a Sonoff gateway flashed with Tasmota firmware. Nice work on the part of the Tasmota crew, works a treat!

All has been running well but the IP address of the gateway eventually changed when the DHCP lease expired - as expected. I now have it using a statically allocated IP address instead so it won’t move again.

I’m sure I’m missing something here but can’t for the life of me find where I change this in Home Assistant though - I need to change the socket info from socket://192.168.xxx.182:8888 to the new addy of socket://192.168.xxx.57:8888

I can even see in the logs it’s trying connect at the old .182 address, but not where to set it!

Or do I need to remove the integration and re-add ? Will I then need to re-add all the ZB devices as well ?

Thanks in advance!

2 posts - 2 participants

Read full topic

Configuration.yaml - seems I'm missing something here

$
0
0

Hello there,

Seems I don’t know completelly how to make automations in YAML. I took example configuration for lights from here:


(example is at bottom)

Then I pasted it to my automation changing only entity_id to match mine of course.

When I hit “Save” I got this:

Not mentioning that values for brightness and kelvin should be in [brackets] and in example on official HA page they are not.

Also if I create new empty automation and click “Edit as YAML” on top right of screen the script looks completelly different than in official documentation. Whole structure is different - looking like this:

alias: New automation
description: ''
mode: single
trigger:
  - platform: device
    device_id: ''
    domain: ''
    entity_id: ''
condition: []
action:
  - device_id: ''
    domain: ''
    entity_id: ''

Please tell me is official documentation wrong or I’m stupid and missing something here. It makes me real frustrated.

11 posts - 4 participants

Read full topic

[help] Problem with automation condition

$
0
0

Hi there!

I’m starting to make some automation to control some part of my A/V receiver.
One particular command is not working.

The ‘Get Cinema Subwoofer Level’ but ‘Set Cinema Subwoofer Level’ isn’t working.
However, when I hit manually the rest command after changing the value of the input select, it’s working.
I guess it should be a problem with the condition in my automation but I can’t get it.

Can someone help??

Automation:

- alias: 'Set Cinema Subwoofer Level'
  trigger:
  - platform: state
    entity_id: input_number.cinema_amp_sub_level
  condition:
  - condition: template
    value_template: "{{ states('input_number.cinema_subwoofer_level') != states('sensor.cinema_amp_sub_level') }}"
  - condition: template
    value_template: "{{ states('input_number.cinema_subwoofer_level') not in ['unknown', 'None', 'unavailable'] }}"
  action:
  - service: rest_command.set_cinema_subwoofer_level

- alias: 'Get Cinema Subwoofer Level'
  trigger:
  - platform: state
    entity_id: sensor.cinema_amp_sub_level
  - platform: state
    entity_id: media_player.salon_main
  - platform: state
    entity_id: sensor.cinema_amp
  condition:
  - condition: template
    value_template: "{{ states('sensor.cinema_amp_sub_level') != states('input_number.cinema_subwoofer_level') }}"
  - condition: template
    value_template: "{{ states('sensor.cinema_amp_sub_level') not in ['unknown', 'None', 'unavailable'] }}"
  action:
  - service: input_number.set_value
    data:
      entity_id: input_number.cinema_subwoofer_level
      value: "{{ states('sensor.cinema_amp_sub_level')|float }}"

Sensor:

  - platform: rest
    name: Cinema Amp Sub level
    resource: http://IP-RECEIVER/YamahaRemoteControl/ctrl
    method: POST
    payload: '<YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>'
    value_template: "{{ (value_json.YAMAHA_AV.Main_Zone.Basic_Status.Volume.Subwoofer_Trim.Val|float) / 10 }}"
    scan_interval: 10

Input_number:

  cinema_subwoofer_level:
    name: Subwoofer Level
    min: -6
    max: 6
    step: 0.5
    unit_of_measurement: "dB"
    icon: mdi:smoke-detector

rest_command:

set_cinema_subwoofer_level:
  url: "http://IP-RECEIVER/YamahaRemoteControl/ctrl"
  method: POST
  payload: '<YAMAHA_AV cmd="PUT"><Main_Zone><Volume><Subwoofer_Trim><Val>{{ (states("input_number.cinema_subwoofer_level")|float * 10 )|int }}</Val><Exp>1</Exp><Unit>dB</Unit></Subwoofer_Trim></Volume></Main_Zone></YAMAHA_AV>'

1 post - 1 participant

Read full topic

Duck DNS With IPV6 & DS LITE on AVM FRITZBOX

$
0
0

Hi there,

my provider suddenly switched to IPV6. Since then, external access no longer works (DUCKDNS). Perhaps someone has a similar problem and was able to solve it somehow? I am grateful for any help.I use a Fritzbox 6591 as a router.

Thank You

2 posts - 2 participants

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>