91 Commits
Author SHA1 Message Date
Florian Asche 1fc29241b4 Add linting scripts and pipeline (#201)
* Add linting scripts and pipeline
2026-03-05 01:58:39 +01:00
Florian Asche a62800f5ad fix typo (#200) 2026-03-04 01:47:18 +01:00
Florian Asche 29f11c7dbc improved help output on application parameters (#188) 2026-03-04 01:09:10 +01:00
Florian Asche f2e3d8e7d3 Feature: move portcheck into python application (#187)
* moved port check from shell script into the python application
* fixed pulseaudio check console output
* portcheck has now 15 chances to get the port before abort
2026-03-04 01:08:45 +01:00
Florian Asche 68d2890fdd fix: ensure wake word state is set after the wake sound (#198) 2026-03-04 01:07:19 +01:00
Ethan Kiczek a30a10c95a Prevent wake word from interrupting active voice pipeline (#151)
* Prevent wake word from interrupting active voice pipeline
2026-03-04 00:54:19 +01:00
Florian Asche ecace7011f bugfix: start listening after wakeup sound (#185) 2026-03-01 21:01:35 +01:00
Florian Asche 80e0d6254e Fix: Suppress spurious end-file event when starting playback and tts.speak (#179)
* bugfix: supress first end of file event and only callback on second one
* add some notes on testing
* fixed tts.speak
* fix unduck after timer end
* use custom docker-entrypoint on dev container
* change mv to copy in the docs when using .env file
2026-02-26 01:31:18 +01:00
Omar Amin 9dcc4542a4 Enhance play method for playlist support (#172)
Refactor play method to support playlists and sequential playback.
2026-02-24 00:24:14 +01:00
Omar Amin 15b87942c5 Merge branch 'main' into Volume-Persistence-Across-Restarts 2026-02-22 05:34:57 +02:00
Omar Amin c4e444f8ca Refactor volume setting and add persistence
Refactor volume handling to use _apply_volume method and persist volume settings if server state is available.
2026-02-22 00:50:17 +02:00
Omar Amin c81a707c6a Enhance volume persistence with logging
Add logging for volume persistence and conditionally skip saving if unchanged.
2026-02-22 00:43:32 +02:00
Omar Amin 981a786a46 Merge branch 'main' into Volume-Persistence-Across-Restarts 2026-02-21 22:19:05 +02:00
Florian Asche 1ae6b18475 Merge branch 'main' into fix/timer-loop-suppress 2026-02-21 21:01:13 +01:00
Florian Asche 7de510cb1f Add version and hash to docker container (#167)
* Add version and git hash to image
* Add version reporting to HA via api
2026-02-21 20:38:46 +01:00
Omar Amin 38c064fc68 Update media player entity volume handling
Set the volume and previous volume for the media player entity based on the current state.
2026-02-21 16:27:06 +02:00
Omar Amin 0d34e67823 Enhance volume management in entity.py
Added initial volume parameter and volume control methods.
2026-02-21 16:26:13 +02:00
Omar Amin ac69618d29 Add volume handling to Preferences and persistence method
Added volume attribute to Preferences and implemented persist_volume method to save normalized media volume.
2026-02-21 16:25:16 +02:00
Omar Amin c91511c93e Initialize volume from preferences on startup
Load initial volume from preferences and constrain it between 0.0 and 1.0. Set volume for music and TTS players based on initial volume.
2026-02-21 16:24:40 +02:00
Ethan Kiczek 3834f51179 Fix timer finished sound not looping
Check if player is actually playing before calling stop(for_replacement=True)
in MpvMediaPlayer.play(). When the player was already idle,
stop(for_replacement=True) would set _suppress_end_event=True with no
end-file event to consume it. The next track's end-file callback would
then be incorrectly suppressed, breaking the timer loop.

- Import PlayerState to check player state
- Only call stop(for_replacement=True) when player is not IDLE
2026-02-18 18:13:51 -05:00
Florian AscheandFlorian Asche 05356acb3e fix bug in network-interface parameter usage
Co-authored-by: Florian Asche <git@florian-asche.de>
2026-02-14 22:14:53 +01:00
Florian Asche 4052daae01 hotfix for mac-detection and various variable names (#139)
* Change Client-Name: The client name inside LVA is not capable of having spaces in the name. Fixed the example.
* Add first version of Docker-Compose for developers
* Add variable for network-interface and auto detection by default
* Added autodetection for the MAC-Address based on the detected or specified network-interface.
* Switched from listening on all IP-Addresses to the IP of the default interface, usually u set the correct network-interface and it will automatically detect the right IP-Address.
* Added missing variables, fixed variables names
* Fixed not working variables for example sound-files.
* Moved the auto-name creation from shell to python. The name is no longer mandatory, it will be generated if no name is given.
2026-02-13 19:50:20 +01:00
Florian Asche f8c7501fa4 Merge branch 'main' into issue_128 2026-02-11 00:34:28 +01:00
Florian Asche d4edbc8333 Merge branch 'main' into feature/add-docker 2026-02-10 21:20:19 +01:00
Omar Amin 72dfc6db35 Merge branch 'main' into issue_128 2026-02-10 20:39:06 +02:00
Philipp Grafe 72c7d4dff4 media_player: handle STOP command correctly (fixes #128)
Home Assistant sends MEDIA_PLAYER_COMMAND_STOP when the queue is cleared.
The MediaPlayer entity did not handle this command, causing playback to
continue without media metadata and leaving the UI in an inconsistent state.

This change adds explicit handling for the STOP command:
- stop playback via the music player
- reset the media player state to IDLE

This aligns the behavior with the original player and Home Assistant’s
expected media player semantics.
2026-02-10 18:58:55 +01:00
Philipp Grafe b2d4ec1413 Fix mpv pause state when loading new media
Prevent IDLE state and done callback on track replacement

mpv emits an end-file event when playback is stopped. During track
replacement this caused the media player to transition to IDLE and
notify Home Assistant even though a new track was already playing.

Introduce a suppression flag to distinguish track replacement from
natural playback end and avoid incorrect state transitions.
2026-02-10 14:27:22 +01:00
Omar Amin c5032a0605 Merge branch 'main' into issue_107 2026-02-09 13:30:27 +02:00
Philipp Grafe 3e893ab44b Fix mpv pause state when loading new media
- added some debug logging
2026-02-09 11:41:40 +01:00
Philipp Grafe f5b76b8921 TTS does not lower mpv music volume while speaking
- Fixes #126
- callback was missing
2026-02-08 18:29:40 +01:00
Florian Asche 761bcea5ac Merge branch 'main' into feature/add-docker 2026-02-08 17:23:39 +01:00
Florian Asche c346617c89 Merge branch 'main' into no-name-for-list 2026-02-08 16:54:47 +01:00
Omar Amin 282aa7ecf0 Handle announcement separately from the media player
Update the announcement handling to just duck the music player volume instead of pausing it.
2026-02-08 16:11:11 +02:00
Florian Asche 80c05fc3f3 Merge branch 'main' into no-name-for-list 2026-02-08 14:07:40 +01:00
Philipp Grafe 9b52f61a9f Fix mpv pause state when loading new media
- unduck() does not seem to be fired bei VA? Doing unduck() in new playback and resume.
2026-02-08 11:29:45 +01:00
Philipp Grafe 5541303d1d Fix mpv pause state when loading new media
- Cleanup and Docstring
2026-02-08 11:00:40 +01:00
Philipp Grafe e4c26a323e Fix mpv pause state when loading new media
- Bugfix for volume setting
- Making duck() unduck() stable
2026-02-08 10:59:56 +01:00
Florian Asche 76cd246029 removed disconnected log message in process_packet function 2026-02-08 04:32:37 +01:00
Philipp Grafe d42abaa2c9 Fix mpv pause state when loading new media
Fixes #107

This fixes an issue where loading a new media URL while the player
was paused would keep playback paused, causing Music Assistant to
show the player as playing while no audio was audible.

The mpv pause state is now always set explicitly when starting playback,
ensuring deterministic behavior
2026-02-03 21:34:57 +01:00
Jamin Hitchcock 4b7242a1d3 Fix some format and linting issues 2026-02-02 04:15:17 +00:00
Florian Asche ebd18dd234 add docker build and compose 2026-02-01 20:20:31 +01:00
Florian Asche b958678f11 improved error message 2026-02-01 20:19:42 +01:00
Omar Amin 8cc7f175a0 Merge branch 'main' into beta 2026-01-27 22:08:15 +02:00
Omar Amin 5567d67305 Check for empty messages and handle thread-safety 2026-01-27 21:54:20 +02:00
Omar Amin 0330fe4e62 Add media player command 2026-01-27 21:52:48 +02:00
Omar Amin 3ddcac6e48 Update satellite.py 2026-01-27 19:03:38 +02:00
Omar Amin 22ea0fa20b Fix the mute method 2026-01-27 18:55:36 +02:00
Omar Amin 5186570bce Fix the switch state
Fix the reverting thinking sound switch when toggling
2026-01-27 01:36:37 +02:00
Omar Amin ed2065423e Update satellite.py 2026-01-24 21:59:24 +02:00
Omar Amin e1f5227174 Update satellite.py
Initialize the self._pipeline_active to fix issue #87
2026-01-24 21:37:07 +02:00