Long time user of Yatse ( since 2013 with 3 donations ).
I recently bought a HiFiBerry Beocreate ( Beocreate | HiFiBerry ), it’s supposed to be used with HiFiBerry OS which as web-app for remote.
Unfortunately HiFiBerry OS is not meant to play video, so I switched to OSMC (Kodi).
Then I noticed that there is a way to make a custom plugin to use in Yatse, how awesome it is !
I forked the plugin repo and tried to make it work, with the help of Android Studio, I got a working APK, unfortunately there is an issue when I load the plugin into the config.
When I uncomment this line, the plugin crash, I guess it’s not how I’m supposed to handle the connection…
Do you have any tips to debug it ?
I made some UnitTest that are working properly to control the Beocreate sound board.
Thanks a lot for this project, I’m looking forward to control my sound system with a custom plugin.
I’m pretty new to kotlin, I understand that it’s not the best way, but it seems to be working for now.
I’ve checked the volume initialization and refresh, it seems good to me.
It retrieves the volume just after the connection, but in the setVolumeLevel, it sends 100.0.
I don’t understand on what this value is based.
2024-02-10 17:54:03.238 15177-15486 SuspendedController tv.yatse.plugin.avreceiver.sample D -- Connected to 192.168.0.4 tv.yatse.plugin.avreceiver.sample.helpers.SigmaTcpController@3bcf26b
2024-02-10 17:54:03.284 15177-15486 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- getVolume 0.25
2024-02-10 17:54:03.286 15177-15177 AVPluginService tv.yatse.plugin.avreceiver.sample D - getVolumeLevel volume:25.0
2024-02-10 17:54:03.286 15177-15177 AVPluginService tv.yatse.plugin.avreceiver.sample D - refresh mVolumePercent:25.0 mIsMuted:true
2024-02-10 17:54:11.499 15177-15481 AVPluginService tv.yatse.plugin.avreceiver.sample D - setVolumeLevel volume:100.0 mVolumePercent:25.0
2024-02-10 17:54:11.501 15177-15486 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- setVolume 1.0
The behaviour seems the same in the sample when I try it, it doesn’t take the mVolumePercent into account.
The called function when pressing physical button shouldn’t be volumePlus & volumeMinus ?
It’s only on the first button pressed that the volume is at 100% after that it’s based on the last value; this value seems to be stored somewhere (or based on the value stored in Kodi ?), because on further calls, it doesn’t retrieve the getVolume value.
Calls from the physical buttons
2024-02-13 11:39:24.115 32364-1419 AVPluginService tv.yatse.plugin.avreceiver.sample D - setVolumeLevel volume:22.0 mVolumePercent:17.0
2024-02-13 11:39:24.117 32364-32407 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- setVolume 0.22
2024-02-13 11:39:24.378 32364-1419 AVPluginService tv.yatse.plugin.avreceiver.sample D - setVolumeLevel volume:27.0 mVolumePercent:22.0
2024-02-13 11:39:24.380 32364-32407 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- setVolume 0.27
Calls from the GUI
2024-02-13 11:42:23.228 32364-1419 AVPluginService tv.yatse.plugin.avreceiver.sample D - getVolumeLevel volume:39.0
2024-02-13 11:42:23.231 32364-32407 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- setVolume 0.4
2024-02-13 11:42:23.389 32364-32407 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- getVolume 0.3999999761581421
2024-02-13 11:42:23.390 32364-1419 AVPluginService tv.yatse.plugin.avreceiver.sample D - getVolumeLevel volume:40.0
2024-02-13 11:42:23.392 32364-32407 SigmaTcpController tv.yatse.plugin.avreceiver.sample D --- setVolume 0.41
As I said, I think the issue is also in the sample, so I retried to get the full log from the sample. Before, I didn’t restarted the application after enabling the debug option, sorry, my bad.
In this new log with the start, I can see that it retrieves the volume before changing it :
2024-02-13 16:36:50.028 Verbose/FirebaseManager: Setup successful.
2024-02-13 16:36:50.044 Verbose/ApiReceiver: API call: tv.yatse.api.LOG_VERBOSE - TAG : AVPluginService
- MESSAGE : Getting volume level: 5.0
2024-02-13 16:36:50.045 Verbose/API-AVPluginService: Getting volume level: 5.0
2024-02-13 16:36:50.056 Verbose/ApiReceiver: API call: tv.yatse.api.LOG_VERBOSE - TAG : AVPluginService
- MESSAGE : Refreshing values from receiver volumePercent:5.0 isMuted:false
...
2024-02-13 16:36:51.493 Verbose/KodiNexus: <-- [544] {"id":35,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}
2024-02-13 16:36:51.494 Verbose/StatusObserver: No Widgets and no UI / Wear / MediaBrowser
2024-02-13 16:36:51.514 Verbose/StatusObserver: UI status changed to true from false
2024-02-13 16:36:52.350 Verbose/VolumeManager: Set plugin volume to: 95
2024-02-13 16:36:52.358 Verbose/ApiReceiver: API call: tv.yatse.api.LOG_VERBOSE - TAG : AVPluginService
- MESSAGE : Setting volume level: 95.0