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

Tuya Switches disappeared this morning

$
0
0

@browetd wrote:

Hello … Since this morning Oct 26 at 9:40 (GMT+1), all my switches defined in Home Assistant disappeared (without restarting HA). I restarted HA, same problem and no error message… My devices are still in Tuya and working fine within the Android App. Other types (scenes and climate devices) are still correctly loaded in HA…
Anyone has the same issue ?

Thanks, Didier

Posts: 1

Participants: 1

Read full topic


Execute script from another script?

$
0
0

@kol wrote:

I have a script and want it to be executed from another script. HA runs all services but never execute the service with script. (script.tvzone_turn_off). is it intentionally not allowed to avoid recursive calls? or I do something wrong?

sleep_all:
  alias: Sleep all equipment
  sequence:
    - service: switch.turn_off            
      data:
        entity_id: switch.rf3_switch_asus
    - service: script.tvzone_turn_off            
    - service: switch.turn_off            
      data:
        entity_id: switch.sonoffdual

Posts: 10

Participants: 4

Read full topic

How to improve sensor?

$
0
0

@RalfP wrote:

Hi all,

I have the following working sensor (value_template), but I learned that it should be something with is_state_attr instead of states.sensor.

I just did not figure out the correct syntax for doing so.

  - platform: rest
    resource: http://some.resource.ip.xy
    scan_interval: 10
    name: "sensor_name"
    value_template: "{{ value_json['system.system_info'] }}"
    json_attributes:
      - system
  - platform: template
    sensors:
      oekofen_aussentemp:
        friendly_name: 'some_friendly_name'
        value_template: '{{ (((states.sensor.sensor_name.attributes["system"]["L_ambient"]|int) *0.1) | round(1) )}}'
        unit_of_measurement: "°C"

During startup I get this error message in the log but after some seconds the value is showing up.

Could not render template some_friendly_name: UndefinedError: 'mappingproxy object' has no attribute 'system'

I’ve read https://www.home-assistant.io/docs/configuration/templating/ up and down and other entries in the forum but this is the only working format I can craft.

Help highly appreciated :slight_smile:
Ralf

Posts: 27

Participants: 5

Read full topic

How to have constant update interval

$
0
0

@song85129 wrote:

Hi,
I have two sensor sending data to a cloud service.
I use rest sensor + template sensors to retrieve data from cloud service in json format.
Sensors send data to the cloud every 15mins
I set the scan_interval to 600 in the rest sensor setting so ideally it should update the rest sensor every 10 mins. I can see this from log that the state of the rest sensor is updated every 10 mins.

However, the template sensors which retrieve temperature from rest sensor json data doesn’t update as expected. It seems that the value only changes when there is a change of the json value.
In the template sensor, I use round(1) to round the number to 1 decimal. So my temperature sensor value in home assistant only shows points when there is a change to the value.
It seems that if I set the round(2) to round the number to 2 decimals. The update will be more frequent.

Now I just want to have constant update interval of my temperature sensor even if the value is not changed.
I tried force_update: true in rest sensor, but it didn’t work,
I tried adding entity_id: sensor.time, but it didn’t work.

I don’t know what to do now, Does anyone encountered similar problem before?

Also is it possible to log the values in home assistant with 2 decimal places but on the lovelace UI cards and badges only shows value with 1 decimal place?

Thank you.

P.S. From my observation, the Aquara temperature sensor only send update when there is a value change through deconz usb gateway. I guess there is no way to change that too?

Posts: 4

Participants: 4

Read full topic

Speedtest suddenly slow on my Pi

$
0
0

@Wizbowes wrote:

The speedtest component is suddenly reporting very slow on my Pi that I’m not seeing elsewhere. The Pi, hardwired into my router, is reporting around 23Mb/s whereas everything else is reporting 45Mb/s. This suddenly happened at 2am two nights ago where it went from fine to dreadful - no action on my part. speedtest.cli has the same issues.

I’ve replace the network cable and the port on the router is Gb. Anybody else suffering the same?

Posts: 5

Participants: 2

Read full topic

Power socket daily schedule - Schedy?

$
0
0

@axg20202 wrote:

Hi all, Total noob to HA so apologies in advance. I’m running HA on Freenas and have been dabbling with yaml and starting to get somewhere but there is a schedule I want to develop that I can’t find a similar example of, which is surprising given how common a scenario it must be. It’s basically an HA equivalent of one of those digital timer power sockets that can be programmed for days of the week.

I am going to get a Zwave power socket that I want to use to control my coffee machine to come on and off at specific times on given days of the week. I want to have a Mon-Fri on and off time schedule, and then a Sat-Sun on and off schedule. I’d also like to be able to override this at any time with a simple virtual switch.

What’s the simplest method to achieve this?

Rather than coming begging as a new forum member, I’ve at least had a crack at it, using Schedy. The idea is that the schedule can change depending on whether I’m working from home or at the office, and there is a means to overide the schedule by switching it to off or on (constant). I have no idea if the below code is correct though (I adapted it from the Schedy tutorial) and I’ve realised I don’t really know how I integrate it with HA and link it to the switch entity. Can someone help me get it over the line please?

## This goes in schedy_coffee.yaml in AppDaemon’s apps directory:

schedy_coffee:  # This is our app instance name.
  module: hass_apps_loader
  class: SchedyApp

  actor_type: switch

  expression_environment: |
    def schedule_mode():
        return state("input_select.schedule_mode")

  watched_entities:
  - input_select.schedule_mode

  rooms:

    kitchen:
      actors:
        switch.kitchen_1:
      schedule:
      - v: "ON"
        rules:
        - weekdays: 1-5   #Mon-Fri
          rules:
          - rules:
            - x: "Next() if schedule_mode() == 'Normal' else Break()"
            - { start: "06:00", end: "08:00" }
          - rules:
            - x: "Next() if schedule_mode() == 'WFH or on leave' else Break()"
            - { start: "06:30", end: "15:00" }
          - rules:
            - x: "Next() if schedule_mode() == 'Off' else Break()"
            - v: "OFF"
          - rules:
            - x: "Next() if schedule_mode() == 'On (constant)' else Break()"
            - v: "ON"
        - weekdays: 6-7   #Sat-Sun
          rules:
          - rules          
            - x: "Next() if schedule_mode() =! 'Off' else Break()"          
            - { start: "06:30", end: "10:00" }
            - { start: "12:00", end: "15:00" }
          - rules
            - x: "Next() if schedule_mode() == 'On (constant)' else Break()"
            - v: "ON" 
          - v: "OFF"


## This goes in the HA configuration.yaml

input_select:
  schedule_mode:
    name: Coffee machine schedule mode
    options:
    - Normal
    - WFH or on leave
    - Off
    - On (constant)

Posts: 1

Participants: 1

Read full topic

Switch without a real device

$
0
0

@Nordin-010 wrote:

Hello guys,

To better understand how Home Assistant work, I’d like to create an Entity, which is just an On/Off switch that I can control from the UI. So, it’s not a real device, but actually a UI control. If the switch is turned on, it sends a turn-on signal to Home Assistant. I want to have a another UI view that listens for the switch change to make a lamp on or off, or send an email or whatever.

So first, I want simply create a UI control with a on/off switch.
Second, another view that listens to the on/off switch.

How can I achieve that?

What I know until now is that I can add a switch in Configuration.yaml something like this:
switch:
platform: view_control
entity id: switch.view.manual.control

But I guess it’s too naive to think like that.

I hope you can help.

Posts: 5

Participants: 3

Read full topic

Help to understand the "Big Picture"

$
0
0

@Pensee wrote:

Hi, I am new to Home assistant, I got a raspberripi 4 4gb, download latest yesterday version and install ok no problem it’s up and running.
I have only a chrome cast audio, and I can cast some text to speech to it ;-))

But I need some directions on the “big picture”.

I don’t want to go too fancy, just few on/off some disable light, Shutters, radio, some private voice assistant later (now Snips belong to Sonos that path is now uncertain, and Almond look very young). Broadcom RM mini 3 RF bridge (TV remote), maybe I could move CCTV from NAS depending on drive storage …

Hardware : does anybody boot Home Assistant on their Pi from usb 3 drive, or is it still in waiting ?

Network : What is the best practices, do you reserve some manual IPs in your router for your devices (sonof, shelly, etc …) and start DHCP over that first range ?
I have 2 routers at each end of the house, one is the main one, the other is in repeater mode with WDS so only one network. do you use a specific. Vlan for your devices to split the traffic ? How badly do you need SSL , DNS for basic home use ? (Which unmissable add-on do you recommend)

Firmware : I think I would go for some Shelly 2.5 for the widows shutters and maybe a couple of dimmer. I already have with me 2 Sonof basic original in their box (no tasmota yet). Should I go for Tasmota on Shelly 2.5 too? Tasmota for Shelly dimmer ? Do you mix shelly and tasmota firmware ?

Terminal into hassio? I can’t find a way to type a command line directly into hassio, where is it hidden. (I need to change IP address). No ssh neither. If I put a screen on the raspi, I don’t have a usual prompt ???

Node red : after install, I got 502: Bad Gateway, I need to sort that out, not sure about secret credential and SSL … I would feel more confortable if I could sort out the all network options related first

Cast : I would love to be able to listen to some web radios cast directly from Home assistant (one screen for all, no more apps) , What the best way to do that ? some sort of Lovelace radio ** ? After my text to speech positive expérience, How to set audio source to a cast destination ?

** I have heard Sonos buy Snips because 90% of voice assistant is for audio purpose, if that is true then a Lovelace/almond radio could also make sense.

Thanks for your help !

Posts: 5

Participants: 3

Read full topic


WTGR800 Wind Sensor not recognized by RFLink

$
0
0

@chris669 wrote:

Just trying to configure RFLink with my old wind sensor Oregon WTGR800. It’s in the list of supported hardware but is recognized as WGR800, which is the new wind sensor from Oregon. Any idea? Just trying to get the wind speed, no problems to get hygro.

2019-11-26 17:15:03 DEBUG (MainThread) [rflink.protocol] received data: 20;04;Oregon WGR800;DEBUG=0B031a
2019-11-26 17:15:03 DEBUG (MainThread) [rflink.protocol] received data: 99046030c00000002c8700;
2019-11-26 17:15:03 DEBUG (MainThread) [rflink.protocol] got packet: 20;04;Oregon WGR800;DEBUG=0B031a99046030c00000002c8700;
2019-11-26 17:15:03 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'oregon wgr800', 'debug': '0b031a99046030c00000002c8700'}
2019-11-26 17:15:04 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'oregonwgr800_update_time', 'sensor': 'update_time', 'value': 1574784904, 'unit': 's'}
2019-11-26 17:15:04 DEBUG (MainThread) [homeassistant.components.rflink] event of type sensor: {'id': 'oregonwgr800_update_time', 'sensor': 'update_time', 'value': 1574784904, 'unit': 's'}
2019-11-26 17:15:04 DEBUG (MainThread) [homeassistant.components.rflink] entity_ids: []
2019-11-26 17:15:04 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known and automatic add disabled

Posts: 1

Participants: 1

Read full topic

Anyone used a plant sensor other than Xaiomi?

$
0
0

@Matt_Barnes wrote:

I could not find anyone selling the Xaiomi mi flora sensors at a sensible price so bought some Vegtrug ones. They look similar although bigger and still work off bluetooth and report temp / light / moisture / fertilisation as per the Xaiomi.

I managed to get the MAC address and add it into HA using the miflora platform in my config:


  - platform: miflora
    mac: 'my mac address'
    name: Epipremnum Aureum
    force_update: true
    median: 3

And then added the plant sensor:

      
      

plant:
  Epipremnum_aureum:
    sensors:
      moisture: sensor.epipremnum_aureum_moisture
      battery: sensor.epipremnum_aureum_battery
      temperature: sensor.epipremnum_aureum_temperature
      conductivity: sensor.epipremnum_aureum_conductivity
      brightness: sensor.epipremnum_aureum_light_intensity
    min_moisture: 20

      

I can see the sensors in my config, and the battery is reporting 97%. All other sensors are reporting “null” in the plant sensor:

problem: none
sensors:
  moisture: sensor.epipremnum_aureum_moisture
  battery: sensor.epipremnum_aureum_battery
  temperature: sensor.epipremnum_aureum_temperature
  conductivity: sensor.epipremnum_aureum_conductivity
  brightness: sensor.epipremnum_aureum_light_intensity
unit_of_measurement_dict:
  battery: '%'
moisture: null
battery: 97
temperature: null
conductivity: null
brightness: null
friendly_name: Epipremnum_aureum

and each individual sensor is reporting state unknown:

image

Has anyone used a non Xaoimi sensor with the Mi plant add on?

My long term plan is to use an ESP32 and MQTT the information into HA but thought I would try this first and now it appears not to work I am unsure that using something like the below will work either?

Thoughts?

Posts: 1

Participants: 1

Read full topic

Template fan assistance

$
0
0

@joe8mofo wrote:

So i have a fan setup based on switches. switch.sonoff_100092da4f_2 is fan on and low speed. This switch is on no matter the speed of the fan.
switch.sonoff_100092da4f_3 is fan med speed
switch.sonoff_100092da4f_4 is fan high speed.

configuration.yaml

fan:
  - platform: template
    fans:
      living_room_fan:
        friendly_name: "Livingroom fan"
        value_template: "{{ states('input_boolean.livingroom_fan_state') }}"
        speed_template: "{{ states('input_select.livingroom_fan_speed') }}"
        turn_on:
          service: script.living_fan_on
        turn_off:
          service: script.living_fan_off
        set_speed:
          service: script.livingroom_fan_set_speed
          data_template:
            speed: "{{ speed }}"
        speeds:
          - '1'
          - '2'
          - '3'

scripts:

livingroom_fan_set_speed:
    alias: Livingroom Fan Set Speed
    sequence:
    - service: input_select.select_option
      data_template:
        entity_id: input_select.livingroom_fan_speed
        option: '{{speed}}'
    - service: script.turn_on
      data_template:
        entity_id: script.livingroom_fan_speed_{{ speed }}



living_fan_off:
  alias: Livingroom Fan Off
  sequence:
    - service: switch.turn_off
      data:
        entity_id:
    - service: input_boolean.turn_off
      data:
        entity_id: input_boolean.livingroom_fan_state
living_fan_on:
  alias: Livingroom Fan Off
  sequence:
    - service: input_boolean.turn_on
      data:
        entity_id: input_boolean.livingroom_fan_state
    - delay:
        seconds: 1
    - service_template: >
        {% if is_state("input_select.livingroom_fan_speed", "1") %}
          script.living_fan_1
        {% elif is_state("input_select.bedroom_fan_speed", "2") %}
          script.living_fan_2
        {% elif is_state("input_select.bedroom_fan_speed", "3") %}
          script.living_fan_3
        {% endif %}

living_fan_1:
  alias: Living Fan Speed 1
  sequence:
    - service: switch.turn_on
      data:
        entity_id: switch.sonoff_100092da4f_2

living_fan_2:
  alias: Living Fan Speed 2
  sequence:
    - service: switch.turn_on
      data:
        entity_id: switch.sonoff_100092da4f_3

living_fan_3:
  alias: Living Fan speed 3
  sequence:
    - service: switch.turn_off
      data:
        entity_id: switch.sonoff_100092da4f_3
    - service: switch.turn_on
      data:
        entity_id: switch.sonoff_100092da4f_4

Posts: 4

Participants: 2

Read full topic

Automation execute power shell script on a Windows 10 machine?

Login attempt or request with invalid authentication from local IP

$
0
0

@bramschats wrote:

Hello,

I am running the latest Hassio on my NUC running ubuntu and docker. The IP address of my Hassio instance is 192.168.25.25. The problem is that since the depreciation of ‘trusted networks’ I am getting this error message about twice a day:

Login attempt or request with invalid authentication from 192.168.25.1

I have run the debug and disabled some devices but I am not able to find out where the problem is coming from. Despite the configuration I am still getting this messages.

  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.25.0/24
        - 127.0.0.1
    - type: homeassistant

Hope someone can help me solve this problem.

Posts: 4

Participants: 2

Read full topic

Skybell Add-On Not Found

$
0
0

@mala wrote:

I installed hass.io and tried to find the Skybell HD plugin I read about before. However, when I search the add-on store it doesn’t find anything about Skybell. Is this add-on not available anymore?

Posts: 2

Participants: 2

Read full topic

Send a sensor value to Google Nest (Google Home with Video) and display it, possible?


Adding iotawatt problem

$
0
0

@getut wrote:

I’ve found tons of stuff about adding iotawatt, but I’m missing a step somewhere. I found the thread on a jinja template to pull in all the sensors associated with it but it isn’t working for me.

Here is the jinja template from the other thread. The error I am getting is "Error rendering template: UndefinedError: ‘None’ has no attribute ‘attributes’

I have already added the rest sensor iotawatt into my configuration.yaml and rebooted and HA can see the iotawatt. If I check states in dev tools, I can even see all my outputs and inputs there. The template just doesn’t run and I can’t see my inputs and outputs outside of dev tools.

sensor:
  - platform: template
    sensors:
{%- for i in range(states.sensor.iotawatt.attributes.inputs| length) %}
{%- set input = states.sensor.iotawatt.attributes.inputs[i] %}
  {%- if input.Watts %}
      iotawatt_input_{{ input.channel }}:
        value_template: {{"{{states.sensor.iotawatt.attributes.inputs["}}{{i}}{{"].Watts}}"}}
        unit_of_measurement: Watts
  {%- endif %}
{%- endfor %}
{%- for i in range(states.sensor.iotawatt.attributes.outputs| length) %}
{%- set output = states.sensor.iotawatt.attributes.outputs[i] %}
      iotawatt_output_{{ output.name }}:
        value_template: {{"{{states.sensor.iotawatt.attributes.outputs["}}{{i}}{{"].value}}"}}
        unit_of_measurement: {{ output.units }}
{%- endfor %}

Posts: 3

Participants: 2

Read full topic

DuckDNS Let's Encrypt Certificate expired

$
0
0

@bwoodworth wrote:

I have the DuckDNS add-on installed and configured like so:

{
“lets_encrypt”: {
“accept_terms”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
},
“token”: “************”,
“domains”: [
my.duckdns.org
],
“seconds”: 300
}

When I try to access Home Assistant the browser is telling me the SSL cert is expired (Nov.24th), but the logs for the DuckDNS add-on say the certificate is good until Feb. 23:

INFO: Using main config file /data/workdir/config
Processing my.duckdns.org

  • Checking domain name(s) of existing cert… unchanged.
  • Checking expire date of existing cert…
  • Valid till Feb 23 18:24:46 2020 GMT Certificate will not expire
    (Longer than 30 days). Skipping renew!

The http: config is like this:

http:
base_url: https://my.duckdns.org:8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

I can’t figure out why the expiry date between the cert served up in the browser and the one in the logs of the DuckDNS add-on are different. I can provide any other info if necessary.

Posts: 1

Participants: 1

Read full topic

Retrieve my echo volume

$
0
0

@ygarti wrote:

Hi All,

i would like to retrieve my echo volume but i didn’t find any way to do that.

if somebody know how to achieve this even with an outside script (which is not the preferred way) i’ll be forever in your debt.

Thanks :slight_smile:

Posts: 1

Participants: 1

Read full topic

Homekit integration: multiple binds to 0.0.0.0 on port 5353

$
0
0

@meme1337 wrote:

Hello guys and girls!

I’m having an issue since I enabled the homekit component in Home Assistant, version 0.101.1. Maybe some of you could help a fellow tinkerer out!

I’m running HA on docker, with network_mode: host because I’ve also an Aqara gateway, that needs this if running on docker.

The issue is that HA binds itself to multiple 0.0.0.0 addresses on port 5353 for, I believe, multicast discovery, but the wrong “interfaces” never consume the udp packets, so these ends up saturating the UDP sockets memory, and then UDP packets errors start popping up.
Here an example from netstat -ulpn, as you can see the Recv-Q backlog is ramping up, and this is just after 20 minutes of HA running.

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4568832 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 0 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 4603072 0 0.0.0.0:5353 0.0.0.0:* homeassistant
udp 0 0 0.0.0.0:5353 0.0.0.0:* homeassistant

If I just expose port 8123 on docker and remove network_mode: host, then the issue isn’t present, but I can’t afford to lose all the sensors from Aqara, so this is not an option.

This issue is similar to Issue#20095 (https://github.com/home-assistant/home-assistant/issues/20095).

Has anyone ever had this problem and found a way to solve it?
Thanks!

Posts: 1

Participants: 1

Read full topic

Energy Monitoring Automations/Visuals

$
0
0

@jccshmny wrote:

I just wanted to get some advice/examples from anyone who is doing whole home energy monitoring. Not looking to get anything groundbreaking from the data, but want enough information to be able to make adjustments to our usage within the billing cycle and analyze it over time for trends.

I currently have an Aeotec HEM monitoring the AC mains coming into the home. It seems to be within 1-2kWh/day of the meter (I’m assuming that is as close as it gets). I also get daily usage alerts from the power company that I am ingesting via an IMAP sensor that pulls the kWh from the email body and places it in an MQTT topic for retention since the IMAP value doesn’t survive HA restarts.

This all is a bit convoluted, but was hoping someone could chime in with any advice or tips on how to create some meaningful automations and some visualizations to enable this.

Posts: 1

Participants: 1

Read full topic

Viewing all 109599 articles
Browse latest View live


Latest Images

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