0.115: B-Day release! Media browser, tags, automations & WTH

I know there was a change with the release to the http/reverse proxy but…I don’t understand it. I’m now getting this error in my log:

2020-09-17 15:42:05 ERROR (MainThread) [homeassistant.components.http.forwarded] Too many headers for X-Forwarded-For: ['xxxxxx, xxxxxx', 'xxxxx']

It’s probably my NGINX config but I don’t know what I need to change

server {

        listen 80;
        listen 443 ssl;
        server_name xxxxxxxxxx;

#        ssl        on;
        ssl_certificate      /etc/nginx/ssl/casa_cert.pem;
        ssl_certificate_key  /etc/nginx/ssl/casa_key.pem;
        ssl_client_certificate /etc/nginx/ssl/cloudflare.crt;
        ssl_verify_client on;
        ssl_prefer_server_ciphers on;

    location / {

        proxy_pass xxxxxxxxxxx/;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Host $remote_addr;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

    }

    location /api/websocket {
        proxy_pass http://xxxxxxx/api/websocket;
        proxy_set_header Host $host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Host $remote_addr;

    }

   location = /robots.txt {
       add_header Content-Type text/plain;
       return 200 "User-agent: *\nDisallow: /\n";
   }

}

It means that the request that arrives at Home Assistant has two X-Forwarded-For header. My guess is that you are using another reverse proxy, e.g., CloudFlare?

They already set a X-Forwarded-For header. In the config you have there, you are adding a second one. The problem with that: Which one to use?! Which is the real one?

You might want to use proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; instead.

For more information see: Using the Forwarded header | NGINX

Yes, I use Cloudflare. Setting the header to proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; worked, thank you!

1 Like

First of thank you all very much for the great and amazing work.

i just updated to this version, and had to add kodi as an integration, everything is fine except executing an addon from a script is not working anymore.
i had this script but after the update its not working, and i dont have an errors
kodi.call_method

entity_id: media_player.kodi
addonid: script.pseudotv
method: Addons.ExecuteAddon
params:
  command: activate

anyone else is experiencing that?

1 Like

Ran the config checker, and it came back with this. Not sure where to begin to figure out what is going on.

Any ideas?

  General Errors: 
    - Platform error tts.google_cloud - Error relocating /usr/local/lib/python3.8/site-packages/grpc/_cython/cygrpc.cpython-38-arm-linux-gnueabihf.so: backtrace: symbol not found

great release guys, just one problem, upon restart, it always discovers my “Velux” on integration page
but i dont want it, and i cant ignore it? how can i remove that ?

always get error below

this wasnt before on 114

thnx

Just updated my Debian 10 test environment. Great work guys. It looks like a busy weekend ahead with my live installation. Cheers and happy birthday.

Ok so this template worked previously and I’m having a hard time figuring out which change caused it. I do it often so…need to figure out how to redo it apparently.

{{ states('sensor.washer_current') | int }} used to take the sensor value and convert it to a number so I could do things like evaluating greater than/less than/equal to. It still works but now it’s rounding the value to the nearest whole number. So instead of 0.46 I get 0.

{{ states('sensor.washer_current') | int > 0.036 }} <- This works but only if the value is higher than 0.5
{{ states('sensor.washer_current') > 0.036 }} <- This gives me an ‘unknown error’ in the template page.

Thank @all for your great work!
As I red about the new shelly integration, I was very happy :slight_smile.
Unfortunalety I get a connection erroer, if I want do connect to a shelly sensoer:
image

firmware on sensor is V1.8.0

Any ideas why connection fail?

Use float not int :slight_smile:

2 Likes

I have problem with broadlink integration. it can not find any of my 3 RM mini 3. I tried with ip and mac address but I am getting

Unknown error occurred

these are the logs

Logger: aiohttp.server
Source: components/broadlink/config_flow.py:47
First occurred: 11:31:03 PM (3 occurrences)
Last logged: 11:39:15 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 82, in async_step_user
    await self.async_set_device(device)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 47, in async_set_device
    "model": device.model,
AttributeError: 'rm' object has no attribute 'model'
Home Assistant has started!

Is it only me?

What the heck?! This is a huge release! Happy birthday :slightly_smiling_face::cake:

I put this into the Template Editor of version 0.114.4 and the result is 0

{{ '.46' | int }}

That’s the same result as in 0.115.

The int filter converts the supplied data to an integer (whole numbers). It’s always behaved that way.

It appears you need to use the float filter which converts to a floating point number (fractional numbers).

1 Like

Can’t wait for the update to finish. RPI 3, now takes half an hour for the update, is that normal with this huge update?

It took around 5 minutes for my system to update, I think half an hour may mean something may have gone wrong. I’m using a RPI 4 however, but even so it isn’t that much faster than a Pi 3

Hi, first of all I want to thank everyone for the excellent work.
After updating to 0.115.0 my Raspberry Pi4 started having a strange CPU load.
It went from an average of 4% before the update, to an average of 30%, with peaks at 55% after the update.
I tried to disable the sensors, automations and scripts but nothing has changed.
Please help me.

Happy birthday!

Just upgrade from 0.114.0 to 0.115.0 on Pi3 b
got 404: Not Found :frowning:

Is there any workaround for that?

1 Like

Yeah float works. Odd that I had no issues with int before. Maybe I just never noticed.

That means that you don’t have enough space I think…

Great release guys!

Anyway, I have some issues.

In connection to Broadlink changes:

  1. MP1-1K3S2U - this is a power strip with 4 different slots that can be managed separately.
    Before 0.115 there was an option for entering slots in configuration.
    I the current configuration and according to the updated documentation, this is not available.
    I am using these slots for different automations and scripts and now this is not possible.

EDIT: on 1. - It is recognizing it properly and I can reconfigure the slots.

  1. Power Strip MP2 was supported by defining it as a type “sp2”.
    Now type cannot be defined anymore and the device cannot be used.

Is there any workaround for these issues?

Update - smooth as
Happy Birthday and well done again