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

Could not update status for Nanoleaf (192.168.100.X is not available)

$
0
0

Hi All,

I see many times this error:

Could not update status for Nanoleaf (192.168.100.2 is not available)

I did power off the Nanoleaf and restart it again, didn’t work.
When I see this error the Nanoleaf still react on actions using HA

Yesterday I had this error:

2020-06-13 22:07:21 ERROR (MainThread) [homeassistant.components.automation] Scene - Evening: Error executing script. Unexpected error for call_service at pos 5: 192.168.100.2 is not available
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 267, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 735, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 428, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
    self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.100.2', port=16021): Read timed out. (read timeout=2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pynanoleaf/pynanoleaf.py", line 188, in _request
    response = self._session.send(req.prepare(), timeout=self.timeout)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.100.2', port=16021): Read timed out. (read timeout=2)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step
    self, f"_async_{cv.determine_script_action(self._action)}_step"
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 656, in _async_call_service_step
    *self._prep_call_service_step(), blocking=True, context=self._context
  File "/usr/src/homeassistant/homeassistant/core.py", line 1259, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1294, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/nanoleaf/light.py", line 210, in turn_on
    self._light.brightness = int(brightness / 2.55)
  File "/usr/local/lib/python3.7/site-packages/pynanoleaf/pynanoleaf.py", line 109, in brightness
    self._put("state", {"brightness": {"value": value}})
  File "/usr/local/lib/python3.7/site-packages/pynanoleaf/pynanoleaf.py", line 219, in _put
    self._request(path, 'PUT', data)
  File "/usr/local/lib/python3.7/site-packages/pynanoleaf/pynanoleaf.py", line 194, in _request
    raise Unavailable("{} is not available".format(self.host)) from e
pynanoleaf.pynanoleaf.Unavailable: 192.168.100.2 is not available

2020-06-14 06:26:01 ERROR (SyncWorker_12) [homeassistant.components.nanoleaf.light] Could not update status for Nanoleaf (192.168.100.2 is not available)

What can I do to solve this?

1 post - 1 participant

Read full topic


Xxxxx.duckdns.org refuses to connect (shared grafana url in docker synology)

$
0
0

I did a fresh install of grafana. Imported a dashboard and everything is up and running without issues.
The link of the shared dashboard is exact the same as in the previous version of grafana.

when I use the url in a browser the dashboard is shown, however when I use it in an I-frame connection is refused.
Must be something I do have to configure but cannot figure out what it is.

Any suggestions ?

1 post - 1 participant

Read full topic

Scrape the fire risk :fire:

$
0
0

Hello fellow home Assitors!

I having a hard time to successful scrape the fire risk for portugal from the “The Portuguese Institute for Sea and Atmosphere” in short IPMA (ipma.pt/en).

They offer a Wildfire Risk indicator on which base some things a allowed/prohibited by law (for example bbq :cut_of_meat: or the use of firecrackers :firecracker:). The indicator itself has 5 different stages like this:

image
Found on this domains:

The site showing the actual risk itself is dynamic and presented inside a map:

[Sorry new user can only put one images in a post :slightly_frowning_face:]
https://www.ipma.pt/en/riscoincendio/rcm.pt/#0#0105

I tried already a lot’s of combinations but where never able to get the actual risk level (1 - 5) scraped, here is my last try:

  - platform: scrape
    name: Risco
    resource: http://www.ipma.pt/en/riscoincendio/rcm.pt/index.jsp#0#0105
    select: 'img'
    index: 14
    select: 'img:nth-of-type(14)'
    select: ".maincol-full .leaflet-container .leaflet-map-pane .leaflet-objects-pane .leaflet-popup-pane .leaflet-popup .leaflet-popup-content-wrapper .leaflet-popup-content table"
    attribute: class
    attribute: title
    headers:
      User-Agent: Mozilla/5.0

Some one got an idea how to do this? :fire_engine:

1 post - 1 participant

Read full topic

MQTT register device instied of entity

$
0
0

Hi Everyone,

I just moved from OpenHab to HA to see the ‘other world’ too. First of all I’m a newbie hobbyst in home automation. I’m developing my own DIY devices and have tons of questions. I have read the docs but I have something maybe I missed and I would like to ask help.

I read that it is possible to auto discover my MQTT devices by sending specific messages to specific topic. I made some test and what I could achive is to register my DIY sensors as a seperate HA entity.

I’m developing a multisensor which measuser multiple things (temp, humidity, light, motion etc.). I would like to register my multisensor device as a device with seperate entities it measures. Is that possible?
For example my smart phone is recognized under HA devices as a device and its properties are registered as entities connected to that device (battery, wifi name, RSSI…).

I’ve tried to search for register devices and similar keywords but I found only related topics to autodiscover which only registers under entities not under devices. Problably I search for the wrong words or terms. Any help would be really appriciated.

Thanks a lot!

1 post - 1 participant

Read full topic

Fan, speed and speeds dont match

$
0
0

Hello,

I’m trying to create a fan. I used the following template:

- platform: template        
  fans:
    badkamer_beneden_fan:
      friendly_name: "Badkamer ventilator"
      value_template: "{{ 'on' }}"
      speed_template: >
        {% if is_state('switch.fibaro_system_fgs222_double_relay_switch_2x1_5kw_switch', 'off')   %}
          {% if is_state('switch.fibaro_system_fgs222_double_relay_switch_2x1_5kw_switch_2', 'off')   %}
            '1' 
          {% else %}
            '2'
          {% endif %}
        {% else %} 
          '3'
        {% endif %}
      turn_on:
        service: script.badkamer_beneden_aan
        data_template:
          speed:   "{{speed}}"
      turn_off:
        service: script.badkamer_beneden_1
      set_speed:
        service: script.badkamer_beneden_aan
        data_template:
          speed:   "{{speed}}"
      speeds:
        - '1'
        - '2'
        - '3'

Now somehow, my speeds and my speed_template are not matching, since I get the following error line in my log files:

2020-06-14 12:59:15 ERROR (MainThread) [homeassistant.components.template.fan] Received invalid speed: '2'. Expected: ['1', '2', '3'].

Somebody any clue?

Thanks,

Bart.

1 post - 1 participant

Read full topic

Turn off OTA updates Tradfri conbee

$
0
0

Hello,

I have hassio installed on a raspberry pi 3 and have a conbee connected to it.

I have some Ikea lights and on/of switches connected. Some time ago I activated the OTA updates for the products and since then I will believe that this is causing the tradfri products to lose its connection to the conbee. For the to connect again I have to toggle the power to them. My xiaomi sensors are still connected. I believe that it’s because of updates pushed to the Tradfri products and I want to turn of the automatic OTA update again to see if it helps but I can’t for my life find where I activated it and thus not find where to deactivate it again. It’s not a real problem when i’m home but if i’m away and can’t power toggle it’s a problem. especially if it happens when they are on and therefore doesn’t turn off as they should.

Or is it just a problem with the Tradfri drivers that does this?

1 post - 1 participant

Read full topic

Mqtt discovery with cmqttd

$
0
0

I am new to Home Assistant. I have the cmqttd daemon connected to the mosquito broker plugin but the mqtt integration is not discovering the lights and binary sensors as expected.

I have Home Assistant 0.111.1 running on Raspberry Pi 4 Model B 2019 4GB

I have a Clipsal 5500PCU attached to my established c-bus network and a USB connection between the RPi and the 5500PCU. Both status lights are lit.

I loaded the Mosquito broker plugin and can manually publish and receive messages on the mosquitto broker from the CLI

I discovered the IP address of the mqtt broker on the hassio network with
docker network inspect hassio

I installed the cmqttd docker image and initiate the daemon with:
docker run --device /dev/ttyUSB0 --network hassio -e “TZ=Australia/Melbourne” cmqttd cmqttd -s /dev/ttyUSB0 -b 172.30.33.0 --broker-disable-tls
and get: “Connected to MQTT broker

I installed the mqtt integration and enabled discovery.

At this point I expected to see my cbus units to “automatically appear in the Home Assistants UI” - but they are nowhere to be found.

Can anybody assist me to interact with my c-but lights and PIR sensors from Home Assistant via mqtt and cmqttd?

Thank you in advance…

1 post - 1 participant

Read full topic

Home assistant starts in safe mode because of missing items in secrets.yaml

$
0
0

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

1 post - 1 participant

Read full topic


Conditions

$
0
0

I just cannot get this to pass the config check.

The error relates to the conditions:
Invalid config for [automation]: [condiition] is an invalid option for [automation]. Check: automation->condiition. (See /config/configuration.yaml, line 83).
but if I remove conditions automation passes test and works
please help!

- alias: Ubisys_c4_1_button_1
    trigger:
      platform: state
      entity_id: sensor.0x001fee000000504d_action
      to: '1_toggle'
    condiition:
      condition: 'or'
      conditions:
        - condition: state
          entity_id: 'switch.0x00124b001cd60859_switch'
          state: 'off'
        - condition: state
          entity_id: switch.0x00124b001cd60881_switch
          state: off
        - condition: state
          entity_id: switch.0x00124b001cd5fc6e_switch
          state: off
    action:
      - service: switch.turn_on
        entity_id: switch.0x00124b001cd60859_switch
      - service: switch.turn_on
        entity_id: switch.0x00124b001cd60881_switch
      - service: switch.turn_on
        entity_id: switch.0x00124b001cd5fc6e_switch

2 posts - 1 participant

Read full topic

All RESTful switches stopped working: "No route to resource/endpoint"

$
0
0

Hi,

running HA 0.111.2 on a RPi 3B+ under Supervisor 227 on HassOS 4.10.
All current at the time of writing.

A few HA updates ago, all of my formerly working RESTful switches, controlling several ESP8266-based devices, all stopped working. I didn’t notice right away, because the switches control less-critical features on those devices.

The devices themselves work. One of them, for example, is a WeMo-compatible Power Plug. The WeMo parts works (discovery, switch, everything), but not the RESTful API that controls the LED.

Only message I get from the log:

2020-06-14 15:06:54 ERROR (MainThread) [homeassistant.components.rest.switch] No route to resource/endpoint: http://192.168.178.172/state.json

Subquestion: Any hints how to get more information from the log? Here’s part of my logger configuration (which doesn’t change a thing):

logger:
  default: error
  logs:
    homeassistant.components.rest.switch: debug
    homeassistant.components.rest.binary_switch: debug
    homeassistant.components.switch: debug
    homeassistant.components.binary_switch: debug

And here is one of my switch configs:

switch:
  - platform: rest
    name: sonoff_led_1
    timeout: 45
    resource: http://192.168.178.172/state.json
    method: post
    body_on: 'green=true'
    body_off: 'green=false'
    is_on_template: '{{ value_json.led }}'
    headers:
      Accept: text/json
      Content-Type: application/x-www-form-urlencoded

On POST, the device’s interface takes form-urlencoded POST parameters, and returns JSON in the response’s body. Here’s an example with curl (from within the Home Assistant container!):

bash-5.0# curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: text/json" -d "green=true" http://192.168.178.172/state.json

returns a reply body

{"state":"off","logicstate":"false","led":"true","blinking":"0"}

Anyone has any idea what has changed to cause this? I checked the code for RESTful switch / sensor on Github - nothing seems to have changed there.

Thanks!

1 post - 1 participant

Read full topic

Tuya lights recognised, but entities not available

$
0
0

I installed the ‘Smart Life’ app on my 'phone and registered and configured the Tuya lights. They work OK from the app.

I enabled the Tuya integration and signed in and the the lights show up on ‘Lovelace’ - but are not working. Investigation shows that the lights are recognised as devices, but are shown as ‘unavailable’ under entities. I’ve tried ‘tuya.pull_devices’ and ‘tuya.force_update’ from Developer Tools->Services, but it makes no difference. I’ve also tried deleting and reinstalling the Tuya Integration.

A search show that others have experienced this problem, but so far I’ve not found a definitive fix. Has anyone any ideas, please?
Jim

1 post - 1 participant

Read full topic

MQTT JSON Device tracker does not recognise latitude longitude in payload

$
0
0

Hi All,

For quite some time I’ve been using a GPS tracker that communicates over LoRa with The Things Network. This tracker works by sending its location every few minutes when it detects motion by its integrated accelerometer.
To get the location of the tracker visible in Home Assistant I’ve used the following procedure:

  1. TTN is setup to receive the data and communicates this over MQTT, the payload decoder makes sure that the latitude and longitude are reported in JSON format. This is all done in a single message. TTN used to split the attributes (bat, lat, lon, time, rssi, etc. etc.) in separate messages but no longer does this.
  2. Node-RED takes the the latitude and longitude messages from the TTN-MQTT and combines these into a single message and sends it to the internal MQTT server that runs in my home. This so that my Home Assistant instance only needs to connect with one MQTT server.
  3. In Home Assistant I’ve configured a MQTT JSON device tracker that is aimed at the topic that Node-Red forwards the messages to.

These above steps have been working perfectly for about a year or so. Then the battery of the tracker when dead and I needed to replace them. Because I was doing busy doing other things I forgot about this until a few months later. With the new batteries the device shows up in TTN, shows up on the MQTT broker but it doesn’t show in Home-Assistant anymore. I get the following log error:

Skipping update for following data because of missing or malformatted data: 
{"app_id":"yabby","dev_id":"tracker","hardware_serial":"XXXX","port":1,"counter":269,"payload_raw":"XXXX=",

"payload_fields":{"batV":4.75,"fixFailed":false,"heading":45,"inTrip":false,
"latitude":52.XXX,"longitude":5.XXX,"parked":false,"speedKmph":0,"type":"position"},

"metadata":{"time":"2020-06-14T14:37:32.078169156Z","frequency":867.7,"modulation":"LORA","data_rate":"SF11BW125","airtime":823296000,"coding_rate":"⅘",
"gateways":[{"gtw_id":"eui-fcc23dfffe0f0bc2","timestamp":1765017268,"time":"2020-06-13T17:58:24.569087Z","channel":6,"rssi":-112,"snr":-9,"rf_chain":0},{"gtw_id":"mjs-gateway-1","timestamp":3717837036,
"time":"2020-06-14T14:37:32Z",
"channel":0,"rssi":-120,"snr":-12.75,"rf_chain":0}],"latitude":52.XXX,"longitude":5.XXX,"location_source":"registry"}}

I did some research and it seems that TTN stopped posting the different attributes of the message in a separate topic. This means that I only get a single message that looks like this (privacy sensitive data randomised):

{
  "batV": 4.75,
  "fixFailed": false,
  "heading": 135,
  "inTrip": true,
  "latitude": 52.6586387,
  "longitude": 5.8706059,
  "parked": false,
  "speedKmph": 0,
  "type": "position"
}

When I look into the MQTT JSON documentation I would think that this would work as the JSON message includes the latitude and longitude. Am I missing something? Or is there something else I need to change to get things working again? Would be really nice to now also see the history of movements which was added in one of the recent Home Assistant updates.

1 post - 1 participant

Read full topic

Fibaro Home Center Switches as Lights

$
0
0

I recently migrated to a Fibaro Home Center 3 for managing my Z-wave devices. So far it works pretty well, however, it seems like all on/off switches (relays, wall plugs, e.t.c) in Home Center are by default interpreted as switch entities in HA, whereas I would rather want them to be Light entities instead.

Looking through the source code for the Fibaro integration, it appears that it should actually be possible to add switches as Light entities if they are controlling light sources:

 # Switches that control lights should show up as lights
 if (
     device_type == "switch"
     and device.properties.get("isLight", "false") == "true"
 ):
     device_type = "light"

However, I don’t understand what I need to do to set the isLight property to true. I can’t find anything in the Home Center GUI related to this and if I try to set it manually in the integration configuration I just get an invalid property error (I’ve tried both isLight and is_light).

 fibaro:
   gateways:
     - url: http://IP-address/api/
       username: !secret fibaro_username
       password: !secret fibaro_password
       device_config:
         kitchen_spotlights:
           isLight: true

I know that I could solve this by using the light switch integration, but I would prefer to just add the entities correctly from the beginning, especially since it seems like it should be possible to do.

1 post - 1 participant

Read full topic

Writing an automation to execute only once?

$
0
0

I would like to send a message to an Echo when my child turns on the computer…something like “good morning, did you brush your teeth”. I can detect when the computer turns on or comes out of sleep by seeing if it’s connected to the wifi network…so triggering isn’t a problem…but I’d like to deliver that message only once, not every time he turns on the computer during the day.

Is there an easy way to do this?

2 posts - 1 participant

Read full topic

Xiaomi Aqara Error

$
0
0

Hello everybody

Until a while ago, I had my Xiaomi Aqara integrated in my HA with a water leak sensor. That had worked too. But suddenly I get an error message (print screen attached).

I’ve tried removing it and adding it from scratch. Including on the Mi Home app.

As I understand the error, the HA can no longer cope with a token that is longer than 16 characters. However, I have other integrations, with 32 characters tokens.

Maybe someone gave me a hint what I could try?

Thank you for that and have a nice Sunday everyone.

BR

1 post - 1 participant

Read full topic


MQTT Sensor is shown as unknown value, and I can't see why

$
0
0

I’ve set up a small MQTT sensor, but for some reason the value is shown as unknown, can somebody spot why?

The sensor setup:

  - platform: mqtt
    state_topic: "sensornode/netatmo/battery/percentage"
    name: "Netatmo panel battery"
    value_template: '{{ value_json.value | multiply(100) | int }}'
    unit_of_measuremen

Looking at the MQTT with MQTTbox it shows:

image

So as I can see it, it does report values, so why does the sensor report unknown in HA?
image

3 posts - 1 participant

Read full topic

WebSocket API Connected Clients

$
0
0

I enabled the WebSocket API Connected Clients sensor as I have occasionally had the “Client exceeded max pending messages” error. I have noticed that, when Home Assistant first starts up this shows 0 but then, within less than 1 minute of starting, it rapidly goes up to over 90.
I find this odd because most of the time I only have 4 browsers/apps connected (Google Chrome browser on desktop, iOS app on iPad, Android app on phone, and Chromium browser on raspberry Pi running as kiosk).

Is this the sort of thing which should be fixed by this PR, PR#6149 Close websocket connection after being hidden for 5 minutes, or is this something else and should I be concerned?
If so, is there a way I can find what clients are actually connecting via the WebSocket API rather than just the number?

Edit: I am running Home Assistant Core on a Raspberry Pi 3 B+ in a Python virtual environment.

1 post - 1 participant

Read full topic

Kwikset Lock - Can't Lock / Unlock, Can read all sensors

$
0
0

I’m able to see all the sensors and see the LOCK / UNLOCK controls.
image

image
Clicking LOCK or UNLOCK doesn’t cause any action from the lock.

However, if I manually unlock or lock the deadbolt you can see the updates:
image

Any ideas on why the LOCK and UNLOCK commands are not working?

1 post - 1 participant

Read full topic

First steps with Home Assistant: No connection to Ikea Tradfri

$
0
0

Hi!
Actually I run my first home automation. I decided to use Home Assistant.
But i have one problem: At the moment i only have some Ikea Tradfri lights that run on ZigBee protocol, as far as i know.
I bought a CC2531 USB stick to control them.
The CC2531 is recognized by HomeAssistant.
I have installed Mosquitto Broker and ZigBee2MQTT. The setup of Mosquitto Broker and ZigBee2MQTT seems correct, i have creted a user and it is written in the Config File of ZigBee2MQTT.
No errors so far in the Logfile.
But i cant recognize any of my Tradfri LED lights.
Any advice/ideas?
Thanks a lot!

1 post - 1 participant

Read full topic

Script group all switches with specific prefix

$
0
0

Is there a way to script a group with all switches whose names begin with a certain prefix.

I already have something like this

update_all_automation_group:
  sequence:
    - service: group.set
      data_template:
        object_id: "all_automations"
        entities: "{{ states.automation | map(attribute='entity_id') | join(',') }}"

but now I need a group of every switch starting with switch.nr_automation_

Is this doable?

1 post - 1 participant

Read full topic

Viewing all 96092 articles
Browse latest View live


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