2022.2: Let's start streamlining!

These are all good examples, and I’ve bookmarked this post for my future reference.

You are right, however, in that I was originally referring to an additional field added to templates, not unlike the one that already exists for determining how the availability of a sensor is handled, the availability field. My example was my attempt at trying to figure out exactly what you were talking about doing instead.

In reality, couldn’t the availability issue also be handled as you’ve shown above without that field. But there was some thought put into adding this field initially, before unknown as added as a state. I just thought it might make sense to consider doing the same to make it a bit more consistent. Clearly, you can do pretty much anything you need with a template somewhere, there’s no disputing that. That was all I was saying.

It really depends on the usage. For me, it hosts HA only. That’s it job. and I take great pains to optimize the installation (with what knowledge I have about HA), nothing iextraneous. The temps stay about where they were when I had the fan, but even then well below what is considered ‘normal’ operating temps, and far below where throttling would occur. In my case, and I’d guess in most typical HA instances (unless hats and GPIO connections are used, or powering an external USB drive), you likely don’t need a fan. But it is easy enough to add a fan without having to worry about controlling it with HA. My fans just plugged in and ran when it was on. I never felt the need to control the speed. That just seemed like unnecessary complexity to me. Just a data point, not saying this is the ONLY way.

The fan itself wasn’t noisy, it was the vibration of the fan in the case enclosure that drove me nuts. Had to go. :wink:

I’ll likely upgrade to Amber/Yellow whenever it is widely available and keep the pi for dev/test/backup.

definition: something external made by Apple?

3 Likes

Yeah, that was supposed to be isubliminal. Not enough to get past YOU though. I own a ton of AAPL, so I plug it whenever I can! :wink:

Annoying thing is I only went to Python 3.9 (paid python package -dependency) to “future proof”. If I’d stayed on Python 3.8 it would never have attempted the update. You live you learn.

Can you post a link to the custom repository?
Thank you!
Starmanj

Are you telling us that you have to pay qnap for python 3.9?

It’s not published but you can grab it off my Github where my install is backed up

Thank you David!

No it’s not QNAP per say, there are developers in France (qnapclub.eu) who have a third party repositary for lots of applications QNAP themselves don’t want to support e.g. Home Assistant, Radarr, Sonarr etc. The majority are free but recently they’ve started charging for the framework, for example Home Assistant (up to 2021.12) sat on Python 3.8 which they built on Apache + PHP8.0 and now the new one is on Python 3.9 which they built on Apache + PHP8.1. It’s only 5 to 10 Euro and “usually” takes a lot of the hassle out of it.

Consider Docker, spare 5-10€.

1 Like

I’ve only recently started using docker and I’m running Readarr, Soulseek, Calibre, Room-Assistant, Pi-Hole, Tiny Media Manager and nGinx so it would seem the obvious next step.

Just worried about the amount of outbound connections HASS has and what a PITA it might be to get everything talking.

In docker hass runs with --host net

Edit cancel my mis-type. The correct invocation is --network=host Raspberry Pi - Home Assistant

1 Like

Actually I was reading the official documentation on how to use HASS in a docker on QNAP and it said Host. Just never clicked!

What this conversation has reminded me of is that when I moved over to the Python 3.9 framework I realised a week or so after that it was just one custom card that had killed my dashboard on 2021-12-10 as it happened again and I used method of elimination / last in - first out!

So… I’ve reinstalled the 3.8 framework, used the appropriate package for HASS, deleted that card and I’m up and running again.

Probably have to reverse a couple of changes but at least the bones are back. Still not ruling out docker if only to keep the version I want!!

By the way, is this our own good @frenck on the cover of one of those albums in the screenshot of the new media bar?

Untitled

3 Likes

@nickrout Yeap, they mention about that on livestream.

I don’t have time for livestreams, I spend it reading the release notes :slight_smile:

4 Likes

2022.2.4 seems to break mqtt:

Logger: homeassistant.components.binary_sensor
Source: components/mqtt/debug_info.py:82
Integration: Binary Sensor (documentation, issues)
First occurred: 11:10:58 (11 occurrences)
Last logged: 11:10:58

Error adding entities for domain binary_sensor with platform mqtt
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 778, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/binary_sensor.py", line 121, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 657, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 247, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 320, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 509, in async_added_to_hass
    debug_info.add_entity_discovery_data(
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 82, in add_entity_discovery_data
    debug_info = hass.data[DATA_MQTT_DEBUG_INFO]
KeyError: 'mqtt_debug_info'
Logger: homeassistant.components.switch
Source: components/mqtt/debug_info.py:53
Integration: Switch (documentation, issues)
First occurred: 11:10:45 (7 occurrences)
Last logged: 11:10:45

Error adding entities for domain switch with platform mqtt
Error while setting up mqtt platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 778, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 657, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 247, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 321, in async_added_to_hass
    await self._availability_subscribe_topics()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 397, in _availability_subscribe_topics
    self._availability_sub_state = await async_subscribe_topics(
  File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 94, in async_subscribe_topics
    await requested.resubscribe_if_necessary(hass, current)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 47, in resubscribe_if_necessary
    debug_info.add_subscription(self.hass, self.message_callback, self.topic)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 53, in add_subscription
    debug_info = hass.data[DATA_MQTT_DEBUG_INFO]
KeyError: 'mqtt_debug_info'

EDIT: there’s an issue open,

2022.2.3 Mqtt worked
2022.2.4 Mqtt broken.
All mqtt communication dependent devices not updating HA