Something is killing my HA instance

For the last few days now (around 0.92.x), something is killing my instance of HA. I have a script that runs when the alarm is set and that code is below.

## Turn on radio in rumpus and ensuite when alarm sets ##
  - alias: 'Turn on radio when alarm is armed'
    initial_state: true
    hide_entity: true
    trigger:
        platform: state
        entity_id: alarm_control_panel.home_alarm
        to: 'armed_away'
## script in scripts folder [radio_alarm.yaml] ##
    action:
      - service: script.turn_on
        entity_id: script.radio_alarm


## Turn off radio in rumpus and ensuite when alarm unsets ##
  - alias: 'Turn off radio when alarm is unset'
    initial_state: true
    hide_entity: true
    trigger:
        platform: state
        entity_id: alarm_control_panel.home_alarm
        to: 'disarmed'
    action:
      - service: media_player.volume_set
        data:
          entity_id:
            - media_player.insignia_speaker
            - media_player.ensuite_speaker
            - media_player.bathroom_speaker
          volume_level: '0.50'
      - service: media_player.media_stop
        entity_id:
            - media_player.insignia_speaker
            - media_player.ensuite_speaker
            - media_player.bathroom_speaker

And here is the script that runs.

  radio_alarm:
    sequence:
      - service: media_player.play_media
        data_template:
           entity_id:
             - media_player.insignia_speaker
             - media_player.ensuite_speaker
             - media_player.bathroom_speaker
           media_content_id: http://playerservices.streamtheworld.com/api/livestream-redirect/RADIO538.mp3
           ## Comedy Channel http://listen.181fm.com/181-comedy_128k.mp3 ##
           media_content_type: 'audio/mp4'
      - delay:
          seconds: 5
      - service: media_player.volume_set
        data:
          entity_id:
            - media_player.insignia_speaker
            - media_player.ensuite_speaker
            - media_player.bathroom_speaker
          volume_level: '0.70'

Lately though, again around 0.92.x, that radio is not stopping when the alarm is unset and when that happens, HA becomes unresponsive on the frontend although SSH and Samba still work. When it’s in this state, no automations work so it well and truly dies. The only way to recover it is to do a host reboot.

I ran hassio ha logs and got the following:

/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

Anyone got ant clues?

There have been changes made to media_player in 0.92.x. Maybe one of them affects your system.

Here’s one but there are others:

media_player - The media_player component will now guard against calling services that are not supported by the entity. This means that if you attempt to invoke media_player.turn_on , but the entity does not indicate it can be turned on through supported_features , the service will not be called and will not log any message. This is a breaking change as in the past it would have called the turn_on implementation. There may be platforms that do not properly set supported_features which may result in service calls not being invoked where they would have previously.(@andrewsayre - #22878) (media_player docs)

Search 0.92: HEOS, Somfy MyLink, Genius Hub - Home Assistant for ‘media_player’ to find the others.

Thanks. I think I’ve found it? When we go out and set the alarm, we often leave the property via a gate to the beach that I’ve wired with a xiaomi door sensor. This both notifies our Google homes that the gate opened and also turns my PTZ towards the gate for 10s and take a camera snapshot.

The PTZ presets are defined in a bunch of shell commands that are no longer working and kill HA when invoked. I’ll roll back to 0.91.4 and try again.

Update: This is the bug https://github.com/home-assistant/hassio/issues/1068. Changing to use rest commands instead.

1 Like

interesting post you made. I am experiencing something that might just be related. We’ve installed a few Google Homes lately, and are still learning to use them
 One of the things we do wrong is ask Google to ‘turn of light so and so’ and because of misunderstanding, Google Home turns off all lights
 which is annoying of course, since most of them are set to a dedicated setting, so its a real pain to have that back up and running.

But, and here comes the related issue: if that happens, my Ikea lights are no longer controllable in the HA frontend. Something kills the connection between Ikea and HA. I have to restart HA to get things back up and connected again.

Secondly, I experience never before experienced Ikea hub Offliners
 Could Google home integration in HA have anything to do with this? Don’t receive errors as far as I see, but the Google Home installation in our setup seems to have caused unexpected side effects


btw what do you mean by:

Does it give you a TTS message then, or is there a specific meaning to notifying Google Home?
thks!

Hey there. Secret to Google success is:

  1. Ensure each Google Home is set to the right language.
  2. Ensure you give your devices unique names that don’t rhyme with ‘all’ like ‘hall’. Otherwise, saying turn off hall lights can be mistaken for turn off all lights. So hall might become foyer?
  3. Look for language anomalies. My Googles are set to Australian but in NZ we say ‘pool’ quite differently to how they say it in Aussie. So “turn on pool light” becomes “turn on outside light” to avoid any confusion.

In regards TTS, I find this to be the most valuable part of HA. When events happen in the house, HA sends a voice message to all five Google Homes. I have things like;

  1. “The courtyard gate just opened”
  2. “Welcome home David”
  3. “The garage door was left open so I just closed it”
  4. “The washing machine has finished”

My wife laughed when the last one went off for the first time but now she loves it!

P.S My issue is related to this bug, unrelated to Google Homes. curl shell command hangs HA · Issue #1068 · home-assistant/supervisor · GitHub

So it’s nothing to do with the recent change regarding Google TTS? what used to be:

service: tts.google_say

is now:

service: tts.google_translate_say

Thanks but no. Definitely shell command related.