2021.4: For our advanced users ❤️

I just create a new VM and got 15 errors on 4 minutes

Logger: aiohttp.server
Source: /usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py:393
First occurred: 3:52:50 PM (15 occurrences)
Last logged: 3:56:44 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 314, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'invalid HTTP method'"

@checking12, apologies - must have overlooked your reply a while back. To answer your question, yes, the control panel UI from ZwaveJS2MQTT loads fine. It’s the HA integration part which seems to break. I experienced this once before and I ended up having to re-add all my Z-wave devices (40+) to HA. I’d really like to avoid that again as I’ve got a lot of automation tied in.

Perhaps this has been mentioned earlier, but is there a way to monitor the progress of the database? I presume something gets posted in the system log once it’s done?.

New VM, New DB
Same issue
image
I’m not getting the data into the DB (i’m on GTM-6 time zone)

turn on debug i still not able to found were my data is going

2021-04-22 04:14:26 DEBUG (SyncWorker_1) [homeassistant.components.recorder.util] querying 0 rows took 1.091529s
2021-04-22 04:14:26 DEBUG (SyncWorker_8) [homeassistant.components.recorder.util] querying 0 rows took 1.091722s
2021-04-22 04:14:26 DEBUG (SyncWorker_8) [homeassistant.components.history] get_significant_states took 1.092386s
2021-04-22 04:14:26 DEBUG (SyncWorker_8) [homeassistant.components.history] getting 1 first datapoints took 0.000005s
2021-04-22 04:14:26 DEBUG (SyncWorker_1) [homeassistant.components.history] get_significant_states took 1.101079s
2021-04-22 04:14:26 DEBUG (SyncWorker_1) [homeassistant.components.history] getting 1 first datapoints took 0.000007s
2021-04-22 04:14:26 DEBUG (SyncWorker_8) [homeassistant.components.history] Extracted 0 states in 1.121329s
2021-04-22 04:14:26 DEBUG (SyncWorker_17) [homeassistant.components.recorder.util] querying 0 rows took 1.139882s
2021-04-22 04:14:26 DEBUG (SyncWorker_17) [homeassistant.components.history] get_significant_states took 1.140660s
2021-04-22 04:14:26 DEBUG (SyncWorker_17) [homeassistant.components.history] getting 1 first datapoints took 0.000008s
2021-04-22 04:14:26 DEBUG (SyncWorker_33) [homeassistant.components.recorder.util] querying 0 rows took 0.592246s
2021-04-22 04:14:26 DEBUG (SyncWorker_33) [homeassistant.components.history] get_significant_states took 0.592902s
2021-04-22 04:14:26 DEBUG (SyncWorker_33) [homeassistant.components.history] getting 1 first datapoints took 0.000006s

2021-04-22 04:16:08 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.cocina_mq_6, old_state=<state sensor.cocina_mq_6=50.00; unit_of_measurement=ppm, friendly_name=Cocina MQ-6, device_class=voltage @ 2021-04-22T04:15:57.489719-06:00>, new_state=<state sensor.cocina_mq_6=49.80; unit_of_measurement=ppm, friendly_name=Cocina MQ-6, device_class=voltage @ 2021-04-22T04:16:08.862998-06:00>>
2021-04-22 04:16:08 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.t_alita_2_int_pulsos_rx, old_state=<state sensor.t_alita_2_int_pulsos_rx=469.00; unit_of_measurement=pulses/min, friendly_name=T.Alita-2 Int Pulsos RX, icon=mdi:pulse @ 2021-04-22T04:15:14.504562-06:00>, new_state=<state sensor.t_alita_2_int_pulsos_rx=468.00; unit_of_measurement=pulses/min, friendly_name=T.Alita-2 Int Pulsos RX, icon=mdi:pulse @ 2021-04-22T04:16:08.865640-06:00>>
2021-04-22 04:16:08 DEBUG (SyncWorker_4) [homeassistant.components.recorder.util] querying 1 rows took 0.029657s
2021-04-22 04:16:08 DEBUG (SyncWorker_4) [homeassistant.components.history] getting 1 first datapoints took 0.030217s

Next step is to downgrade MariaDB 10 to 5

Hello!
I have a feature request with respect to this new feature you have introduced (variables check), but not sure where to write about it, so decided to put it as a reply to your post - atleast this way we mantain the context.

The problem - when I get a warning of this type: “Template variable warning: ‘input_flash_time’ is undefined when rendering…” I am not provided the name of the script which has caused the warning. As you could have seen by now, my scripts are pretty general and I use a lot of variables with same names in differnt scripts. Thus, not knowing the name of the script which spawn the warning brings me another challenge - to find a script where a variable was invoked.

Am I missing something or there is no reference to the problematic script indeed? If so, could it be a feature request? (really helpfull one)

Thanks!

Feel free to create a feature request if none exists yet for that: Feature Requests - Home Assistant Community

1 Like

if you continue reading past ‘when rendering’ it lists the entire template causing the problem and you can search for that template.

Unfortunatelly it is not so simple in real life as it is in dreams…
It only provides a body of a template, not the name of a script where this template is called - and it is a big difference. Sometimes you may have dozens and dozens of templates within same script referencing variables you pass to this scripts. And another script may accept variables with similar names, and templates in that another script would be pretty similar in a syntax to the templates from the first one. And from the body of a template you would never tell which script it belongs to. And you have to look through all of your scripts to finally find where you have misspelled it… And the problem is, that often you do not even remember which script used variable with such name, and you have to look through nerly half of your scripts before you finally remember where it was… I guess, now you see the point and necessity.

You can copy the entire template and search all your files for the entire template. It’ll get you to the exact template. If it gets you to the wrong template, then you just found another template that you have to adjust.

I understand your frustrations, but it has the information you’re looking for right now, it just doesn’t list the template entity it comes from.

My point is: You have the power to find this right now and it’s a copy/paste away with a text editor like VSCode or Notepad++.

EDIT: To clarify further…

Here’s the 1 button click option in visual studio code…
image

and here’s the 1 button search option in notepad++
image

3 Likes

Thanks for the tip!
I’ll get one of these and try it. Should make life much easier…

I have the same problem.
Does anyone have any idea what’s going on?

Screenshot 2021-04-23 094049

Same here: :roll_eyes:

image

I checked the update addon log.
I don’t understand the errors. Could that be the problem?

The same problem as what? You don’t reply to anyone in particular, and the post above yours has no problem stated.

If you are seeing a screen suggesting you downgrade, ignore it, it is harmless.

Do you collect posts or what is this answer?
People who follow the thread know what the problem i mean.

And it has been answered multiple times. Here and elsewhere. Please use the search function before posting.

It’s a known issue.

It has not been fixed yet.

No because the thread is 770+ posts long and there is more than just your issue. Grow the hell up.

I used the search function…
and thanks for the short info

:clap: applause…
and thank you for your support

have a look here, to see the status of the various issues (and fixes/duplicates)

3 Likes

Hi everyone!
One simple question, after this update, I got a lot of Teplate variable warning which is of course expected.
But how do I debug these? When reading the warning message, I do not know in which file, which line, or maybe which custom_component is causing the issue. I am sure I missed something…

Source: helpers/template.py:1335
First occurred: April 23, 2021, 11:56:00 PM (2126 occurrences)
Last logged: 12:15:00 AM

Template variable warning: dict object has no element Undefined when rendering '{% set values = {'idle':'off','heat':'heating','cool':'cooling','fan only':'fan'} %}{{ values[value_json.running_state] }}'
Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'
Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
Template variable warning: 'dict object' has no attribute 'power_on_behavior' when rendering '{{ value_json.power_on_behavior }}'
Template variable warning: 'mappingproxy object' has no attribute 'icon' when rendering '{%- for item in states.sensor if ( not is_state_attr(item.entity_id, 'hidden', true) and ( is_state_attr(item.entity_id, 'device_class', 'battery') or 'battery' in item.attributes.icon | lower or (item.entity_id | lower).endswith('_bat') or (item.name | lower).endswith('_bat') ) or ( ( 'battery' in item.entity_id | lower or 'battery' in item.name | lower ) and ( item.attributes.icon is not defined ) and ( not is_state_attr(item.entity_id, 'battery_alert_disabled', true) ) and ( not is_state_attr(item.entity_id, 'restored', true) ) ) ) -%} {{ item.entity_id }}{% if not loop.last %}, {% endif %} {%- endfor -%}'