StreamAssist icon indicating copy to clipboard operation
StreamAssist copied to clipboard

Activating the microphone button restarts HomeAssistant

Open jramirezcolombia opened this issue 10 months ago • 31 comments

When I activate the microphone from the button, Home Assistant loses connection and restarts. What is the cause and how can I fix it?

jramirezcolombia avatar Apr 03 '25 13:04 jramirezcolombia

I have same issue after upgrading HomeAssistant from 2025.1.1 to 2025.4.0. Additionally i don't see any error in the HA log

xfaustus avatar Apr 03 '25 13:04 xfaustus

I'm using version 2025.4.0 and nothing appears in the logs or in the debugging status either.

jramirezcolombia avatar Apr 03 '25 14:04 jramirezcolombia

Upgrading HA from 2025.3 to 2025.4.0 ends with an out of memory error (OOM killer) and a rollback to 2025.3. After I disabled all integrations step by step I found this one to be the culprit.

Pls let me know if I can help debug. The OOM logs from the host don't help much as it just kills the main ha-core process.

kgroshert avatar Apr 03 '25 15:04 kgroshert

I just wanted to log this also as I have the same problem after upgrading to 2025.4 cannot seem to get log's and Home Assistant just reboots when you activate the MIC in Home Assistant

HomeStudiosDIY avatar Apr 03 '25 18:04 HomeStudiosDIY

Same Issue. Currently, on 2025.4.0 but had this issue before with 2024.3.X when I didn't set an "STT Start Media". This seems to be something else.

This error goes on forever till, I assume, the memory runs out:

run_assist error <class 'TypeError'>: PipelineInput.__init__() got an unexpected keyword argument 'conversation_id'

Here is the full log as soon as I turn on the Microphone:

2025-04-03 12:10:09.729 DEBUG (MainThread) [homeassistant.core] 
Bus:Handling <Event call_service[L]: domain=switch, service=turn_on, service_data=entity_id=switch.wohnzimmer_micro_mic>

2025-04-03 12:10:09.729 DEBUG (MainThread) [homeassistant.core] 
Bus:Handling <Event state_changed[L]: entity_id=switch.wohnzimmer_micro_mic, 
old_state=<state switch.wohnzimmer_micro_mic=off; icon=mdi:numeric-0, 
friendly_name=Wohnzimmer Micro MIC @ 2025-04-03T12:10:00.867201+02:00>, 
new_state=<state switch.wohnzimmer_micro_mic=on; icon=mdi:numeric-0, 
friendly_name=Wohnzimmer Micro MIC @ 2025-04-03T12:10:09.729576+02:00>>

2025-04-03 12:10:09.730 DEBUG (MainThread) [custom_components.stream_assist.core.stream] 
stream open

2025-04-03 12:10:09.732 DEBUG (Recorder) [homeassistant.components.recorder.core] 
Processing task: <Event call_service[L]: domain=switch, service=turn_on, service_data=entity_id=switch.wohnzimmer_micro_mic>

2025-04-03 12:10:09.735 DEBUG (Recorder) [homeassistant.components.recorder.core] 
Processing task: <Event state_changed[L]: entity_id=switch.wohnzimmer_micro_mic, 
old_state=<state switch.wohnzimmer_micro_mic=off; icon=mdi:numeric-0, 
friendly_name=Wohnzimmer Micro MIC @ 2025-04-03T12:10:00.867201+02:00>, 
new_state=<state switch.wohnzimmer_micro_mic=on; icon=mdi:numeric-0, 
friendly_name=Wohnzimmer Micro MIC @ 2025-04-03T12:10:09.729576+02:00>>

2025-04-03 12:10:09.736 DEBUG (MainThread) [libav.tcp] 
Starting connection attempt to 192.168.178.164 port 554

2025-04-03 12:10:09.748 DEBUG (MainThread) [libav.tcp] 
Successfully connected to 192.168.178.164 port 554

2025-04-03 12:10:09.796 DEBUG (MainThread) [libav.rtsp] 
SDP:
v=0
o=- 1743672567143662 1 IN IP4 192.168.178.164
s=Session streamed by "preview"
i=reolink rtsp stream
t=0 0
a=tool:BC Streaming Media v202210012022.10.01
a=type:broadcast
a=control:*
a=range:npt=now-
a=x-qt-text-nam:Session streamed by "preview"
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKCgPZA=,aO48sA==
a=recvonly
a=control:track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408
a=recvonly
a=control:track2

2025-04-03 12:10:09.845 DEBUG (MainThread) [libav.rtsp] 
setting jitter buffer size to 0

2025-04-03 12:10:13.674 DEBUG (MainThread) [homeassistant.components.assist_pipeline.audio_enhancer] 
Initialized microVAD

2025-04-03 12:10:13.674 DEBUG (MainThread) [custom_components.stream_assist.core] 
run_assist error <class 'TypeError'>: PipelineInput.__init__() got an unexpected keyword argument 'conversation_id'

2025-04-03 12:10:13.675 DEBUG (MainThread) [homeassistant.components.assist_pipeline.audio_enhancer] 
Initialized microVAD

2025-04-03 12:10:13.675 DEBUG (MainThread) [custom_components.stream_assist.core] 
run_assist error <class 'TypeError'>: PipelineInput.__init__() got an unexpected keyword argument 'conversation_id'

2025-04-03 12:10:13.675 DEBUG (MainThread) [homeassistant.components.assist_pipeline.audio_enhancer] 
Initialized microVAD

2025-04-03 12:10:13.675 DEBUG (MainThread) [custom_components.stream_assist.core] 
run_assist error <class 'TypeError'>: PipelineInput.__init__() got an unexpected keyword argument 'conversation_id'

2025-04-03 12:10:13.675 DEBUG (MainThread) [homeassistant.components.assist_pipeline.audio_enhancer] 
Initialized microVAD

Mariuss811 avatar Apr 03 '25 20:04 Mariuss811

I had the same issue with memory filling up within seconds when i upgraded HA to 2025.4.1. Related issue: https://github.com/AlexxIT/StreamAssist/issues/63

vivobg avatar Apr 07 '25 14:04 vivobg

For what it's worth, I had the same issue - had reboot loops until I disabled the Stream Assist integration. When trying to re-enable, home assistant would freeze nearly immediately, crashing with an OOM.

For whatever reason, this fork from vash2695 here seems to work just fine for me without issue, which does make me suspect some relationship with the newer continued conversation features, since that fork has some support for that.

justicefreed avatar Apr 08 '25 03:04 justicefreed

Any idea when this might be fixed please?

Tobi-Wheeler avatar Apr 11 '25 02:04 Tobi-Wheeler

@AlexxIT I hope you can fix it, soon. We are really like your solution, please let us to continue to use this nice integration.

SzaKiKa1 avatar Apr 17 '25 19:04 SzaKiKa1

I'm working on a different solution right now. It should solve the tasks of this component even better. I don't want to add details until it's ready.

AlexxIT avatar Apr 18 '25 08:04 AlexxIT

I'm working on a different solution right now. It should solve the tasks of this component even better. I don't want to add details until it's ready.

So you are saying this integration is done for and we should uninstall it? Just trying to clarify as I only just got this going on my panel and loved it for 2 weeks before it broke. Love being able to use a remote mic stream!

Tobi-Wheeler avatar Apr 18 '25 21:04 Tobi-Wheeler

I plan to return to this integration after I release a new solution. Perhaps some of the current users will migrate to the new solution.

AlexxIT avatar Apr 19 '25 09:04 AlexxIT

I plan to return to this integration after I release a new solution. Perhaps some of the current users will migrate to the new solution.

what do you have in mind? I was thinking we have the wyoming-satellite, maybe we can pipe the output to that or something like that? That would require less maintenance...

florian-asche avatar Apr 19 '25 15:04 florian-asche

I plan to return to this integration after I release a new solution. Perhaps some of the current users will migrate to the new solution.

Cool, I am looking forward to your new solution and a fix to stream assist. Thank you!

FWIW I and a few others ended up on stream assist from this project which points people to stream assist as one of the options. IT's sort of an Amazon Alexa Show DIY project for home assistant :)

https://github.com/dinki/View-Assist

TaeKwonBow avatar Apr 20 '25 17:04 TaeKwonBow

I'm happy to introduce you to something I've been working on lately: https://github.com/AlexxIT/StreamAssist/issues/66

AlexxIT avatar Apr 24 '25 19:04 AlexxIT

Can we impliment this through frigate?

Tobi-Wheeler avatar Apr 25 '25 04:04 Tobi-Wheeler

Can we impliment this through frigate?

Yes but frigate needs this newest (not yet released) version of go2rtc first.

And probably you wanna put in HA configuration.yaml:

go2rtc:
  url: http://frigate-ip:1984

tbrasser avatar Apr 25 '25 06:04 tbrasser

Any idea when the latest go2rtc will be pushed to frigate so we can give it a go?

Tobi-Wheeler avatar Apr 26 '25 21:04 Tobi-Wheeler

https://docs.frigate.video/configuration/advanced/#custom-go2rtc-version

AlexxIT avatar Apr 27 '25 04:04 AlexxIT

Hopefully you can fix it soon! this is actually a must have, such a pity that I just discovered it and its not working, but in your YT video all seems to be as expected and look amazing. Thank you

Ehipock avatar May 01 '25 12:05 Ehipock

has anyone actually got this working through go2rtc???? want to give it a try but don't want to mess up my frigate!

Tobi-Wheeler avatar May 13 '25 02:05 Tobi-Wheeler

(huh, GH shows some weird comment order, I was replying to @Tobi-Wheeler )

Kinda, but my wall tablets lose their microphone permission every day it seems (android ip webcam), and I didn't get the response working on a different player. Also the gain and sensitivity numbers I've no idea what to set them to. But updating go2rtc to latest nightly, adding config to frigate config, and then adding them via wyoming integration in HA works perfectly.

tbrasser avatar May 13 '25 06:05 tbrasser

(huh, GH shows some weird comment order, I was replying to @Tobi-Wheeler )

Kinda, but my wall tablets lose their microphone permission every day it seems (android ip webcam), and I didn't get the response working on a different player. Also the gain and sensitivity numbers I've no idea what to set them to. But updating go2rtc to latest nightly, adding config to frigate config, and then adding them via wyoming integration in HA works perfectly.

So not really stable and useable then? I'm keen to give it a go but don't want to use dev go2rtc as I will forget I've done it and it wont update automatically anymore once the custom go2rtc is installed. guess ill wait for the new go2rtc to be pushed to frigate or stream assist to be updated.

Tobi-Wheeler avatar May 14 '25 04:05 Tobi-Wheeler

Hi Alex, just wondering if there has been any progress on a fix for this yet? Cheers

Tobi-Wheeler avatar Jun 05 '25 03:06 Tobi-Wheeler

In core/init.py line 164 ... session=chat_session.async_get_chat_session( hass, assist.get("conversation_id") ), instead of passing conversation_id

#69

GothShoot avatar Jul 22 '25 21:07 GothShoot

Does this fix it?Sent from my Galaxy -------- Original message --------From: Romuald Mocq @.> Date: 23/07/25 09:50 (GMT+12:00) To: AlexxIT/StreamAssist @.> Cc: Tobi-Wheeler @.>, Mention @.> Subject: Re: [AlexxIT/StreamAssist] Activating the microphone button restarts HomeAssistant (Issue #64) GothShoot left a comment (AlexxIT/StreamAssist#64) In core/init.py line 164 ... session=chat_session.async_get_chat_session( hass, assist.get("conversation_id") ), instead of passing conversation_id

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Tobi-Wheeler avatar Jul 24 '25 05:07 Tobi-Wheeler

Hi just wondering if there have been any updates on fixing this issue? Thank you

MooCoow avatar Jul 31 '25 21:07 MooCoow

I would like to know if there is a way to fix this problem?

Alex10011977 avatar Aug 01 '25 10:08 Alex10011977

Checking in if there have been any progress on fixing this issue or if a workaround has been found. Thank you

MooCoow avatar Nov 04 '25 16:11 MooCoow

I haven't had time to address this issue yet. I've heavily reworked the component's logic to align with newer versions of HA, but haven't had a chance to debug it.

AlexxIT avatar Nov 05 '25 10:11 AlexxIT