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

Automation Error: Error executing script. Invalid data for call_service at pos 1: required key not provided @ data['topic']

$
0
0

Hello Everybody,

I’m new to Home Assistant and started to learn automations. I want to turn my Projector On by pressing a button on my UI. The projector turns on using a Tasmota IR Blaster. This setup already works in a different scenario using HTTP-Post or using the MQTT Developer Tools in Home Assistant. But getting this running from an automation is killing me. I’m just looking at the action part at the moment.

Thats the part in my automation.yaml which is not working

  - id: '1591999113709'
  alias: Beamer Off
  description: ''
  trigger:
  - entity_id: input_boolean.tv_on_off
    from: 'Off'
    platform: state
    to: 'On'
  condition: []
  action:
  - data:
      payload: '{"Protocol":"NEC","Bits":32,"Data":"0x00FD9A65"}'
      topic: cmnd/IR_LR/IRSend
    service: mqtt.publish

configuration.yaml looks like this:

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

#calendar 27.05.2020
google:
  client_id: blablabla.apps.googleusercontent.com
  client_secret: notsoimportant

# Text to speech
tts:
  - platform: google_translate

#sensors
sensor:
#Fritzbox 28.05.2020
  - platform: fritzbox_callmonitor
    name: callmon
    username: justsomeuser
    password: andaverysecretpasswort
    phonebook: 1
    prefixes:
      - '+49'
      - '+49123'
      - '1234'
variable:
  caller_information:
    value: 'Unknown'
    restore: true
    attributes:
      icon: mdi:phone-in-talk
      name: Anruferinformation

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#Themes iOS 30.05.2020
frontend:
  themes: !include_dir_merge_named themes

When I run the Automation by clicking “Execution” I get the following error:

Beamer Off: Error executing script. Invalid data for call_service at pos 1: required key not provided @ data[‘topic’]

Can someone explain to me what Key is required? According to the documentation of mqtt.publish all what is needed is the topic and payload?!

Any help is much appreciated.

Thank you very much

1 post - 1 participant

Read full topic


Disabling an automation doesn't stop the sequence, but disabling a script does - What's the difference?

$
0
0

I just stumbled upon the issue, that disabling an automation doesn’t stop a running sequence, but a running script is aborted immediately, if the script is disabled.

I don’t want to decide, if one behavior is better than the other, but I asked myself, if there’s any technical or logical reason for this behavior? Why are running scripts aborted immediately, when the script is disabled, but running automations finish their sequence, even if they are disabled while running?

1 post - 1 participant

Read full topic

Can't link Alexa skill with Home Assistant as Sprint blocks 443 can that be changed?

$
0
0

Hello,

I have followed the steps on https://www.home-assistant.io/integrations/alexa.smart_home/. All is fine up to and including being able to establish an SSL connection on https://MYSITE.duckdns.org:8123. My certificate works, and I can log into my image-based HASSIO OS (not Raspbian nor Hassbian) on my raspberry pi 4.

When I forwarded the 443 port for WAN to 8123 for LAN, it doesn’t work. For some time, I thought it was the router. Tried 448 -> 8123, works fine. Then I found out that Sprint blocks incoming ports 80 and 443, so I’m stuck NOT using those ports (I am rural and have no other choice but a sprint mobile hotspot).

However, it seems that the created Alexa skill REQUIRES it be confirmed on port 443. In the Amazon LAMBDA function, I have tried changing the BASE_URL to https://MYSITE.duckdns.org:8123, but it refuses to connect I’m assuming because I’m using port 8123 when it is expecting 443.

Does anyone know any work-around to this short of having to pay for the HASSIO service? I’m leaving Wink because of the fee they started charging.

Kind regards,
Nathan

1 post - 1 participant

Read full topic

Problems with separate zigbee and zwave USB sticks

$
0
0

New-ish to HA, using a RPi4 and a Zwave.me USB stick. Succesfully moved over all my zwave devices a couple weeks ago.

Also bought a conbee ii USB stick, and am having issues installing it.

I plugged it in, installed deconz, and was able to add devices quite happily.

Restarted the pi for some reason and my zwave network wasn’t working.

I assumed it was using the wrong USB device, but I can’t find anywhere to tell HA what the correct USB device is for the zwave stick?

I think I used the by-id device for the conbee, but I can’t remember HA asking me for the zwave stick, and for the life of me I can’t find reference to it anywhere. Is this likely to be my issue – and if so, where do I look to configure it?

Thanks!

1 post - 1 participant

Read full topic

Howto delete automations?

$
0
0

Hi guys

After a search, I see that it has been asked a few times but cannot find a way to delete automations?
I have deleted all the automations from the automations.yaml file but they still appear in the GUI.
How can I delete them before recreating them again?

Thanks in advance
Nick

1 post - 1 participant

Read full topic

How to delete a deleted mobile_app web hook?

$
0
0

so the new iOS app created a new device_tracker for my iPhone, including all new sensors with a suffix _2…

Couldn’t delete these using the integrations page (or so I think…) so manually deleted all remnants in .storage. Which worked fine, and using the app created all new entities in the system.

Only thing that is still proof of the older device, is a ‘deleted web hook’ in the cloud/webhook section.
Can we delete these somehow?

Schermafbeelding 2020-06-14 om 00.07.12

1 post - 1 participant

Read full topic

Dyson Pure Humidify+Cool (PH01) support in home.assistant?

$
0
0

Does anyone know if the PH01 is supported?

I have tried to configure with my username, password, serial number & IP address but no luck?

Any suggestion to get this device to work?

Thanks,
Oliver

1 post - 1 participant

Read full topic

My devices, entities, areas, lovelace dashboards, and automations lists are all blank (newbie)

$
0
0

(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)

1 post - 1 participant

Read full topic


iOS location + Philips AC3059/Electrolux A9 Air Purifier integration help

$
0
0

Hi hassio community,

to be brief & short:

  1. did my best to enable real time tracking with my iOS app (newest version, iPhone XS, always ON location), but it still shows some nonsense… any help for this one?
    2a. I got a Phillips AC3059 air purifier, a fancy schmancy thingy with both HEPA and carbon filter… any idea on how to integrate it to hass? Let’s say I’m kind a good in coding, but lazy to do so… so if somebody wants to help us, I’ll be more than happy to share the access to the device/hass and do the coding on the local side.
    2b. My brother nextdoor has an Electrolux Air Purifier A9 and will be willing to share the device for integration development, let me know if you’re willing to participate.

Thanks a lot for any relevant response,
Su

1 post - 1 participant

Read full topic

SonOff Bridge with Tasmota

$
0
0

I have just flashed a SOnOff bridge with Tasmota and I have it talking to the Mqtt server on Hassio. I have added a simple switch to the bridge and I was able to get the state topic and data code.
I have added the following to my config file as per the following post (Sonoff RF Bridge. Strategies for receiving data):

platform: mqtt
name: ‘Portable Switch 1’
state_topic: ‘tele/tasmota_4345DE/RESULT’
value_template: >-
{% if value_json.RfReceived.Data == ‘2B2284’ %}
{{‘ON’}}
{% else %}
{{states(‘binary_sensor.switch_1’) | upper}}
{% endif %}
off_delay: 15
device_class: None

I’m not getting any errors but I am unable to see the switch anywhere. I’m not even sure it’s working. Is there a way to verify I’m getting a response back from the bridge?
Thanks for the help

1 post - 1 participant

Read full topic

Open zwave add-on

$
0
0

If we are already leveraging the zwave integration in HASSIO. I’m assuming that the open zwave add-on would replace that integration?

1 post - 1 participant

Read full topic

External URL not working

$
0
0

I can´t make work my external URL if do the configuration from (configuration/general) It doesn´t work when I try to access it appear this:

1

and if y click in retry appear this:

2

this is the error:

Logger: aiohttp.server
Source: /usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py:355
First occurred: 10:31:56 PM (8 occurrences)
Last logged: 10:31:59 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method

But if I do the config from the configuration.yaml like this:

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

It works fine but I can´t connect using the local ip

What I´m doing wrong?

1 post - 1 participant

Read full topic

Hacs not showing in settings panel

$
0
0

I installed homeasisstant in Docker with Debian distribution and I am emulating it in virtualbox. I Create my folders as follows: docker / home / domospeed / homeasisstant

I add the requirements that you ask me to do, but it still doesn’t appear in my system to change the theme. What could it be?

re hacs

1 post - 1 participant

Read full topic

Moon Phase with correct phase and orientation

$
0
0

I always want to have a more realistic moon “phase” and its orientation shown on my HA and website, instead of a “guestimate” phase with fixed orientation. Ideally, it could be derived by mathematic formula to come up with a svg file; but I don’t have enough knowledge to do it. Therefore, I managed to crop the moon phase and its information from an excellent website: Timeanddate Moonphase
Here is the end result shown on my Lovelace dashboard:
HA2
I also use the cropped moon phase for my website:
1609L

What I did (on my ubuntu server) is to use Firefox command line to extract part of the website, and command line to further crop it to my liking. All being done by a bash script and cron job.These are all the cropped images which I can use for several projects:
moonphase_collage

If you are interested, you can download the script and sample outputs from here:
moonphaselive google drive

1 post - 1 participant

Read full topic

OpenZwave add-on network_key

$
0
0

Not sure how this works or how to interpret but just to be on the safe side and avoid problems later.

If I have generated a network key and have putted that in the openzwave add-on like this:
image

I then look into the openzwave control panel and see for my aeotec z-stick gen5 controller I see that the “security network key” is 0.
The security network is disabled.

I would expect that would mean the S2 capability? and should be enabled? Also I would expect that the network key in the add-on should be the one in the “security network key”

Or do I see this wrong?

image

1 post - 1 participant

Read full topic


Custom card always executes card creation twice

$
0
0

I have several custom cards up and running; however, the card initialization code always executes twice. Only one card is visible in the Lovelace frontend; however, if(!this.content){ ... } consistently enters twice.

The below code is based on the Lovelace custom card documentation template.

set hass(hass) {
	if (!this.content) {
		// This section always executes twice
		console.log("Card not yet created. Create my card");
		
		const card   = document.createElement('ha-card');
		card.header  = 'Example card';
		
		this.content = document.createElement('div');
		this.content.innerHTML = `Hello world`;
		
		card.appendChild(this.content);
		this.appendChild(card);
	}
	else {
		// This section executes properly for each hass update
		console.log("Card found. Update content.");
	}
}

1 post - 1 participant

Read full topic

Tasmota - WS

$
0
0

Hi,

I have a 1 meter strip of 2812B 5050 Leds connected to a D1mini on D7, I also have a DH22 on D5

In the config menu I have the pins correctly setup. D7 - WS2812 & D5 AM2301

Last night I was running Tasmota v6.7.1, the temp sensor was working correctly but the LEDs were not changing colour and would not switch off!

This morning I have upgraded to v8.3.1 and set the pins up again, again the temp sensor works fine, but the LEDs will only change brightness a little. Again they do not switch on and off and they will not change colour.

Can anyone help?

Regards
James

2 posts - 1 participant

Read full topic

Help needed setting up a routine to turn Lights ON/OFF every 30 minutes

$
0
0

Hi All

I need some help setting up lights ON/OFF every 30 minutes. This is what I have done but it is not triggering:

Steps are:
Trigger:
When Sun elevation is below 3.5 degrees
or when everybody leaves home for more than 5 minutes
or/and trigger Lounge Light every 30 minutes

Condition:
Everybody is away
Time is between 17:00 and 22:00

Action:
Delay: random time between 6 and 12 minutes
Toggle lounge light input boolean
Delay: random time between 6 and 12 minutes
Toggle lounge light input boolean

  alias: 2113 - Lounge Light ON/OFF @ Sunset when NO ONE is at Home or everyone leaves home
  description: 
  trigger:
  - below: '3.50'
    entity_id: sun.sun
    platform: numeric_state
    value_template: '{{ state_attr(''sun.sun'', ''elevation'') }}'
  - entity_id: binary_sensor.somebody
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  - minutes: /30
    platform: time_pattern
  condition:
  - condition: state
    entity_id: binary_sensor.somebody
    state: 'off'
  - after: '17:00:00'
    before: '22:00:00'
    condition: time
  action:
  - delay: 00:{{ '{:02}'.format(range(6,12) | random | int) }}:00
  - data: {}
    entity_id: input_boolean.light_lounge
    service: input_boolean.toggle
  - delay: 00:{{ '{:02}'.format(range(6,12) | random | int) }}:00
  - data: {}
    entity_id: input_boolean.light_lounge
    service: input_boolean.toggle

1 post - 1 participant

Read full topic

History Graphs

$
0
0

Hi,

Can anyone help please, since 111 update my history graphs for sensor data all appear to be broken.

All I appear to get is a flat line / no history at all.

I am backing to MariaDB and also have influxdb. Have cleared the data from both, to no avail.

Here’s what I see.

Screenshot 2020-06-14 at 09.15.50 Screenshot 2020-06-14 at 09.16.33

Thanks in advance.

Jon

2 posts - 1 participant

Read full topic

Trigger to:/from: together with for: – Why does it not work with from:?

$
0
0

So I have this best buddy, and we watch our “home” presence, respectively, to know when it’s appropriate to call each other. We’ve set up Home Zones for each other, and monitor those via a status LED. I now introduced TTS alerts, and we found, due to a smartphone’s wildly varying GPS accuracy, we get a lot of “… is at home”/"… is away" messages when crossing the Home Zone boundary.

So I thought we make a simple “for:” 5 minute delay for the “at home” triggers. This works fine for a trigger to: combined with for::

  # Frank presence
  - alias: "Frank zuhause"
    initial_state: True
    trigger:
      - platform: state
        entity_id: person.frank
        to: 'Home Frank & Hedwig'
        # 5 min delay because it flatters at zone boundary
        for: '00:05:00'
    action:
      - service: mqtt.publish
        data_template:
          topic: "weather/1/status/uv"
          payload: 0
          retain: true
      - service: script.audio_alert
        data_template:
          audiofile: "frank-home.mp3"

but not for a trigger from: combined with for::

  # Frank presence in UV light (UV 0=green=present, UV 8=red=absent)
  - alias: "Frank nicht zuhause"
    initial_state: True
    trigger:
      - platform: state
        entity_id: person.frank
        from: 'Home Frank & Hedwig'
        # 5 min delay because it flatters at zone boundary
        for: '00:05:00'
    action:
      - service: mqtt.publish
        data_template:
          topic: "weather/1/status/uv"
          payload: 8
          retain: true
      - service: script.audio_alert
        data_template:
          audiofile: "frank-not-home.mp3"

The error message from config checker is:

Invalid config for [automation]: dependency violation - key "for" requires key "to" to exist @ data['trigger'][0]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 740). 

The problem is that I can’t simply use to: "not_home" instead, because we both have other zones defined as well, and are only interested in the event that the other one enters/leaves his home zone.

N.B.: If anyone’s interested: We both use Owntracks, and have set up a secure MQTT bridge between our MQTT brokers to share some data we’re both interested in, because we live several hundred kilometers apart. Placing the green/red presence LED into the—currently defunct—UV indicator was just a convenience option.

Any good ideas? Or maybe the devs can consider making from: work with for:?

2 posts - 2 participants

Read full topic

Viewing all 96082 articles
Browse latest View live


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