rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
467 stars 69 forks source link

disable mdns? #161

Open cranky-coder opened 2 months ago

cranky-coder commented 2 months ago

Is it possible to disable registering wyoming satellite with mdns? No matter what i do (even by putting the hardcoded zeroconf name and zeroconf address parameters) I regularly get this error.

Apr 28 20:43:12 office-voiceassistant run[1265]: DEBUG:root:Namespace(mic_uri=None, mic_command='parecord --property=media.role=phone --rate=16000 --channels=1 --format=s16le --raw --latency-msec 10', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=3, mic_auto_gain=7, snd_uri=None, snd_command='paplay --property=media.role=announce --rate=44100 --channels=1 --format=s16le --raw --latency-msec 10', snd_command_rate=44100, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri='tcp://127.0.0.1:10400', wake_word_name=['ok_nabu'], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri='tcp://127.0.0.1:10500', startup_command=None, detect_command=None, detection_command='/home/jbrunk/wyoming-enhancements/snapcast/scripts/awake.sh', transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command='/home/jbrunk/wyoming-enhancements/snapcast/scripts/done.sh', streaming_start_command=None, streaming_stop_command=None, error_command=None, connected_command=None, disconnected_command=None, awake_wav='sounds/awake.wav', done_wav='sounds/done.wav', uri='tcp://0.0.0.0:10700', name='office satellite', area=None, no_zeroconf=False, zeroconf_name='office satellite', zeroconf_host='192.168.2.171', debug_recording_dir=None, debug=True, log_format='%(levelname)s:%(name)s:%(message)s') Apr 28 20:43:12 office-voiceassistant run[1265]: INFO:root:Ready Apr 28 20:43:13 office-voiceassistant run[1265]: Traceback (most recent call last): Apr 28 20:43:13 office-voiceassistant run[1265]: File "<frozen runpy>", line 198, in _run_module_as_main Apr 28 20:43:13 office-voiceassistant run[1265]: File "<frozen runpy>", line 88, in _run_code Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/wyoming_satellite/__main__.py", line 410, in <module> Apr 28 20:43:13 office-voiceassistant run[1265]: run() Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/wyoming_satellite/__main__.py", line 404, in run Apr 28 20:43:13 office-voiceassistant run[1265]: asyncio.run(main()) Apr 28 20:43:13 office-voiceassistant run[1265]: File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run Apr 28 20:43:13 office-voiceassistant run[1265]: return runner.run(main) Apr 28 20:43:13 office-voiceassistant run[1265]: ^^^^^^^^^^^^^^^^ Apr 28 20:43:13 office-voiceassistant run[1265]: File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run Apr 28 20:43:13 office-voiceassistant run[1265]: return self._loop.run_until_complete(task) Apr 28 20:43:13 office-voiceassistant run[1265]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 28 20:43:13 office-voiceassistant run[1265]: File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete Apr 28 20:43:13 office-voiceassistant run[1265]: return future.result() Apr 28 20:43:13 office-voiceassistant run[1265]: ^^^^^^^^^^^^^^^ Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/wyoming_satellite/__main__.py", line 377, in main Apr 28 20:43:13 office-voiceassistant run[1265]: await register_server( Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/.venv/lib/python3.11/site-packages/wyoming/zeroconf.py", line 35, in register_server Apr 28 20:43:13 office-voiceassistant run[1265]: await aiozc.async_register_service(service_info) Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/.venv/lib/python3.11/site-packages/zeroconf/asyncio.py", line 207, in async_register_service Apr 28 20:43:13 office-voiceassistant run[1265]: return await self.zeroconf.async_register_service( Apr 28 20:43:13 office-voiceassistant run[1265]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/.venv/lib/python3.11/site-packages/zeroconf/_core.py", line 342, in async_register_service Apr 28 20:43:13 office-voiceassistant run[1265]: await self.async_check_service(info, allow_name_change, cooperating_responders, strict) Apr 28 20:43:13 office-voiceassistant run[1265]: File "/home/jbrunk/wyoming-satellite/.venv/lib/python3.11/site-packages/zeroconf/_core.py", line 508, in async_check_service Apr 28 20:43:13 office-voiceassistant run[1265]: raise NonUniqueNameException Apr 28 20:43:13 office-voiceassistant run[1265]: zeroconf._exceptions.NonUniqueNameException Apr 28 20:43:13 office-voiceassistant run[1264]: Traceback (most recent call last): Apr 28 20:43:13 office-voiceassistant run[1264]: File "/home/jbrunk/wyoming-satellite/script/run", line 12, in <module> Apr 28 20:43:13 office-voiceassistant run[1264]: subprocess.check_call([context.env_exe, "-m", "wyoming_satellite"] + sys.argv[1:]) Apr 28 20:43:13 office-voiceassistant run[1264]: File "/usr/lib/python3.11/subprocess.py", line 413, in check_call Apr 28 20:43:13 office-voiceassistant run[1264]: raise CalledProcessError(retcode, cmd)

Any time I make a config change and restart the service, or a apply an update, or do anything to home assistant that requires wyoming to restart, it starts spitting out this error, and I just have to wait for mdns to realize that the service is still the exact same thing it was before the restart and let it register. So I am curious if it's possible to disable the use of mdns.

zachs-55 commented 2 months ago

script/run can take '--no-zeroconf' as a parameter