Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to turn on service? #10

Closed
Maverick565 opened this issue Jul 15, 2023 · 76 comments
Closed

How to turn on service? #10

Maverick565 opened this issue Jul 15, 2023 · 76 comments

Comments

@Maverick565
Copy link

Hi!

I was installed this on moode audio 8.3.3 but after install it doesn't showing in tidal apps.

@GioF71
Copy link
Owner

GioF71 commented Jul 15, 2023

Hello, I am not sure I understand your question.
Tidal Connect is a way to transform a RPI into a Tidal endpoint. If Tidal Connect is correctly running, you should be able to select it as the output from the Android App, possibly from the iOS app (I could not test it) and from the Tidal Desktop Application.
Tidal Connect on its own has no interface, it is just the endpoint.

Let me know if this helps.
In case of trouble, you might want to post the application output. You can show the logs with the following command:

docker-compose logs

@Maverick565
Copy link
Author

Maverick565 commented Jul 15, 2023

Edit: Updating id_certificate still won't help. Stopping after 10-30 secs.

@Maverick565
Copy link
Author

Maverick565 commented Jul 15, 2023

I think here is problem with rtc clock or packages. On volumio this script working. I don't know why on Volumio works, but on Moode not.

I'm running on Moode 8.3.3 32 bit on RPI4.

tidal-connect | STARTED TidalConnect services.
tidal-connect | [2023-07-15 17:26:11.699] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect | [2023-07-15 17:26:31.864] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-15 17:26:31.865] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-15 17:26:41.850] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-15 17:26:41.850] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-15 17:26:47.383] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-15 17:26:47.384] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-15 17:26:53.818] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-15 17:26:53.818] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-15 17:26:59.352] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5516 milliseconds
tidal-connect | [2023-07-15 17:26:59.352] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-15 17:27:04.884] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5513 milliseconds
tidal-connect | [2023-07-15 17:27:04.884] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-15 17:27:04.885] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:288] Max connection attempts reached!

@GioF71
Copy link
Owner

GioF71 commented Jul 15, 2023

Hello, from a quick search, I found this link:

https://support.hifiberry.com/hc/en-us/community/posts/360013667717-Tidal-Connect-#comments

One user posted an issue similar to yours. the suggested solution has been to set dns to 8.8.8.8 (google).

I dumped that setting because the container was working for me even without it, but maybe it does depend on how you set your dns on your Pi.

You might add Google DNS on the container or at the host level tuning /etc/resolv.conf.
If this solves the issue I will add the setting to the standard compose file.

Please le me know it this solution works.
I currently don't have the tidal subscription running but I might get one month in case of need. Anyway the catalog is good even if I prefer Qobuz, mostly for not using mqa.

Cheers

@Maverick565
Copy link
Author

I'll try it tomorrow.

@Maverick565
Copy link
Author

Maverick565 commented Jul 16, 2023

I set dns to 8.8.8.8 and 8.8.4.4 by changing in moode settings and etc/resolv/conf but i have still same errors. Even changing dns on router and phone don't help.

https://drive.google.com/file/d/1GI4a-Y13xp27_488VZI5Rf9TrMBbRaTq/view?usp=drivesdk

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Hello, sorry to hear that.

I just renewed my subscription (HiFi) and I am playing songs with no issues.
Maybe there is some other issue with your setup. Can you provide more information?

The device you are using (Pi3, Pi4, etc)

The DAC are you using. Is it a hat like the hifiberry or an usb dac?

Do the other features of Moode play correctly on the same DAC? For example, some radio from their selection.
Is there any chance that other renderers are running (bluetooth, squeeze, mpd itself, upmpdcli) and interfering with Tidal Connect, causing it to stop playing?

Then, maybe a few details about your audio setup as seen from moode's point of view: you might want to post the output of these commands:

cat /proc/asound/cards
aplay -l
aplay -L

Last thing that comes to my mind is system architecture: are you running moode 32 or 64 bit? From a terminal, you can run uname -a

While I am typing, I have played from Tidal to two instances of Tidal Connect, one is a Moode Audio 64 bit on a Pi3 with a Hifiberry DAC+ Pro, the other one is OSMC on a Pi4 on a Topping D10 USB DAC/DDC feeding another dac via coaxial. No issue whatsoever, and I did not set the dns.

About dns, can you post the contents of the /etc/resolv.conf when you tried this change?

Edit: just typos

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Also the contents of the ".env" file on your tidal-connect directory might be useful. And maybe the command you used (the parameters you passed to ./configure.sh).
Also, are you up-to-date with the contents of this repository?
Thanks

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Last thing, are you using wifi or wired?

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Last thing again, check if you are updated with the upstream docker image.
Just run, from the root of the repository:

docker-compose pull

then restart:

docker-compose up -d

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Also sd card size and free space?
Run df -h so we can check.
In any case maybe also post the full log with docker-compose logs or docker-compose logs -f if you want to keep watching.

@Maverick565
Copy link
Author

Maverick565 commented Jul 16, 2023

  1. RPI4 2gb ram
  2. usb dac Fiio K5 Pro
  3. Yes, other features play correct.
  4. Bluetooth,airplay,squeezebox,upnp i have disabled.
  5. I'm running Moode 8.3.3 32 bit.
  6. Wired via ethernet direct to router
  7. Sd card size is 32gb 100/30 mb/s, i have only moode installed on it.
  8. Here is all commands i enter.

@Maverick565
Copy link
Author

Maverick565 commented Jul 16, 2023

resolv

catpr
apl

@Maverick565
Copy link
Author

uname -a
Linux moode 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

@Maverick565
Copy link
Author

Env file:
env

@Maverick565
Copy link
Author

Aplay- L:

moode@moode:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Playback/recording through the PulseAudio sound server
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
audioout
audioout

alsaequal
plug_alsaequal
btstream
camilladsp
crossfeed
plug_bs2b
eqfa12p
plug_eqfa12p
invpolarity
trx_send
hw:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
Direct hardware device without any conversions
plughw:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
Hardware device with all software conversions
sysdefault:CARD=Pro
FiiO K5 Pro, USB Audio
Default Audio Device
front:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
Front output / input
surround21:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Pro,DEV=0
FiiO K5 Pro, USB Audio
Direct sample mixing device
usbstream:CARD=Pro
FiiO K5 Pro
USB Stream Output

@Maverick565
Copy link
Author

Full log:

moode@moode:~/tidal-connect $ docker-compose logs
Attaching to tidal-connect
tidal-connect | FRIENDLY_NAME=Moode Living Aux1
tidal-connect | MODEL_NAME=Raspberry Pi 3b
tidal-connect | MQA_CODEC=false
tidal-connect | MQA_PASSTHROUGH=false
tidal-connect | CARD_NAME=NOT_SET
tidal-connect | CARD_INDEX=1
tidal-connect | Set card_index=[1]
tidal-connect | Creating sound configuration file (card_index=1)...
tidal-connect | Sound configuration file created.
tidal-connect | defaults.pcm.card 1
tidal-connect | pcm.!default {
tidal-connect | type plug
tidal-connect | slave.pcm hw
tidal-connect | }
tidal-connect | Starting Speaker Application in Background (TMUX)
tidal-connect | Sleeping for a while (3 seconds)...
tidal-connect | Starting TIDAL Connect ...
tidal-connect | STARTING TidalConnect services, version: 1.1.3
tidal-connect | Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
tidal-connect | ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
tidal-connect | Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
tidal-connect | Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
tidal-connect | Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
tidal-connect | Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect | Cannot connect to server socket err = No such file or directory
tidal-connect | Cannot connect to server request channel
tidal-connect | jack server is not running or cannot be started
tidal-connect | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect | STARTED TidalConnect services.
tidal-connect | [2023-07-16 18:49:54.312] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect | [2023-07-16 18:50:14.642] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:50:14.642] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:50:20.174] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-16 18:50:20.174] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:50:25.704] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:50:25.704] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:50:25.708] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:288] Max connection attempts reached!
tidal-connect | [2023-07-16 18:54:29] [info] asio async_shutdown error: asio.misc:2 (End of file)
tidal-connect | [2023-07-16 18:54:33.315] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect | [2023-07-16 18:54:55.514] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-16 18:54:55.514] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:55:01.047] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:55:01.047] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:55:09.173] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-16 18:55:09.173] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:55:14.707] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:55:14.707] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:55:20.239] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-16 18:55:20.239] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:55:20.244] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:288] Max connection attempts reached!
tidal-connect | [2023-07-16 18:55:56.013] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:55:56.013] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:56:01.539] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5515 milliseconds
tidal-connect | [2023-07-16 18:56:01.539] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:56:07.065] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:56:07.065] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:56:07.065] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:288] Max connection attempts reached!
tidal-connect | [2023-07-16 18:56:33] [info] asio async_shutdown error: asio.misc:2 (End of file)
tidal-connect | [2023-07-16 18:56:37.688] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect | [2023-07-16 18:57:07.669] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5514 milliseconds
tidal-connect | [2023-07-16 18:57:07.669] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:57:13.201] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5516 milliseconds
tidal-connect | [2023-07-16 18:57:13.201] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:57:18.735] [tisoc] [error] [logger.cpp:25] [operation_curl.cpp:258] curl_easy_perform failed: Timeout was reached - Resolving timed out after 5513 milliseconds
tidal-connect | [2023-07-16 18:57:18.735] [tisoc] [error] [logger.cpp:25] [http_stream_fetcher.cpp:162] Content-Range is missing from response!
tidal-connect | [2023-07-16 18:57:18.736] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:288] Max connection<

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Everything looks ok still tidal connect seems unable to lock the card.

Try this:

watch cat /proc/asound/card1/pcm0p/sub0/hw_params

When Tidal Connect is not playing (moode not selected as tidal output), it should display "closed"
If that is not the case, some other app is trying to use the same card.
Also do a lsusb command, and post the output

Tomorrow I can try a usb dac on moode, and see if I can make it work.

p.s. moode is 64bit same as mine. The difference is that my hat is at index 0, your dac is at index 1.

There is hope I guess, we'll see!

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Edit sorry I see it's a Pi4, so this comment could even be deleted

@Maverick565
Copy link
Author

Maverick565 commented Jul 16, 2023

When tidal connect playing shows this:

format

But after playback stops after some seconds, it showing closed.

@Maverick565
Copy link
Author

Here is lsusb:

lsusnb

@Maverick565
Copy link
Author

Everything looks ok still tidal connect seems unable to lock the card.

Try this:

watch cat /proc/asound/card1/pcm0p/sub0/hw_params

When Tidal Connect is not playing (moode not selected as tidal output), it should display "closed" If that is not the case, some other app is trying to use the same card. Also do a lsusb command, and post the output

Tomorrow I can try a usb dac on moode, and see if I can make it work.

p.s. moode is 64bit same as mine. The difference is that my hat is at index 0, your dac is at index 1.

There is hope I guess, we'll see!

I downloaded from this link so i don't know why it's 64 bit, but upper version 64 bit doesn't work good on my RPI.

moode

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

ok let's see how moode sets up alsa, considering that moode itself works. Can you post the contents of these commands:

cat /etc/alsa/conf.d/_audioout.conf
cat /etc/mpd.conf

Also maybe take a screenshot of moode's Audio settings page... let's see if we can find something

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Does your pi get enough power? You can check with "dmesg -T" and see if there are messages like "Under-voltage detected".

Also you can run

vcgencmd get_throttled

Source this page

@GioF71
Copy link
Owner

GioF71 commented Jul 16, 2023

Had another look at the container output and the lines with "GetExactSampleRate" got my attention.
Maybe your dac (like one of mine) needs 32bit data with. I had this issue with LibreSpot and my Aune S6 DAC.
This might be solved forcing S32_LE.
I will see if I can add an option so this can be forced, might be useful.

@Maverick565
Copy link
Author

Maverick565 commented Jul 16, 2023

Does your pi get enough power? You can check with "dmesg -T" and see if there are messages like "Under-voltage detected".

Also you can run

vcgencmd get_throttled

Source this page

I'm using original raspberry wall adapter 5.1v 3a.

To raspberry usb i have only connected Fiio K5 Pro dac which has its own power supply.

It could even play DSD files from nas server so i don't think the power is problem.

But i will check that tomorrow.

On same raspberry with same power supply but with volumio, this script working. So i think it's something with settings/packages. Volumio natively supports tidal connect and i think it's have a packages for it, which Moode don't. It behaves similiar to situation when id_certificate was outdated.
Old script with old outdated certificate on volumio behaves same as here in moode.

But when i updated certificate it works perfect on volumio. I think there is problem with RTC clock and/or problem with SSL authentication of certificate on Moode. I don't know.

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

Ok if the ptoblem is on the certificate, it might explain why it plays for 30 sec (or so) then stops. Usually the first few seconds are sent unencrypted in order to give some time for buffering or for fast playback start.

Is the time reported by your pi accurate? I see you talk about RTC clock. The raspberry pi does not have a RTC clock and it relies on external NTP (or similar) in order to have the correct time.
Anyway, you can check with

watch date

amd compare with the web page, e.g.

https://time.is/

If the difference is notable, this might be the issue.

I have been having this problem for a while: the pi would not sync to the current time for a long time. Then I tried disabling ipv6 and this solved the issue. Recently instead, I enabled NTP on the router (it's an OpenWRT) and then set the NTP to 192.168.1.1 (the router ip) in the /etc/systemd/timesyncd.conf file.
The operating system is same as mine, the docker image as well same as mine, I can't imagine why my certificate is ok and yours isn't.
Maybe try the Moode 64bit again, it should work perfectly on a Pi4. It works perfectly on weaker Pi3. What was not working for you on the Pi4?

Or, as the last option/doublecheck: can you try with a mint Raspbian install, with docker and tidal connect alone? That would avoid any doubt on Moode and create a simpler (hopefully) scenario.

@Maverick565
Copy link
Author

Ok if the ptoblem is on the certificate, it might explain why it plays for 30 sec (or so) then stops. Usually the first few seconds are sent unencrypted in order to give some time for buffering or for fast playback start.

Is the time reported by your pi accurate? I see you talk about RTC clock. The raspberry pi does not have a RTC clock and it relies on external NTP (or similar) in order to have the correct time. Anyway, you can check with

watch date

amd compare with the web page, e.g.

https://time.is/

If the difference is notable, this might be the issue.

I have been having this problem for a while: the pi would not sync to the current time for a long time. Then I tried disabling ipv6 and this solved the issue. Recently instead, I enabled NTP on the router (it's an OpenWRT) and then set the NTP to 192.168.1.1 (the router ip) in the /etc/systemd/timesyncd.conf file. The operating system is same as mine, the docker image as well same as mine, I can't imagine why my certificate is ok and yours isn't. Maybe try the Moode 64bit again, it should work perfectly on a Pi4. It works perfectly on weaker Pi3. What was not working for you on the Pi4?

Or, as the last option/doublecheck: can you try with a mint Raspbian install, with docker and tidal connect alone? That would avoid any doubt on Moode and create a simpler (hopefully) scenario.

time

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

it's incredible, everything seems to be ok but nothing works...
I just setup tidal connect on another pi3 on the desktop, this time with the HifiBerry Digi+ Pro (the one with digital outputs), and it works flawlessly.
I am only missing to try a Moode with a USB dac, I am about to try.
Would it be possible for you to try a plain raspbian 64bit bullseye?

@Maverick565
Copy link
Author

ok, zobaczmy, jak moode konfiguruje alsę, biorąc pod uwagę, że sam moode działa. Czy możesz opublikować treść tych poleceń:

cat /etc/alsa/conf.d/_audioout.conf cat /etc/mpd.conf

Może też zrób zrzut ekranu strony ustawień audio moode... zobaczmy, czy uda nam się coś znaleźć

moode@moode:~ $ cat /etc/alsa/conf.d/_audioout.conf
pcm._audioout {
type copy
slave.pcm "hw:1,0"
}
moode@moode:~ $ cat /etc/mpd.conf
#########################################

This file is automatically generated

by the MPD configuration page.

#########################################

music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/database"
log_file "/var/log/mpd/log"
pid_file "/var/run/mpd/pid"
state_file "/var/lib/mpd/state"
sticker_file "/var/lib/mpd/sticker.sql"
user "mpd"
group "audio"
bind_to_address "any"
port "6600"
log_level "default"
restore_paused "yes"
auto_update "no"
follow_outside_symlinks "yes"
follow_inside_symlinks "yes"
zeroconf_enabled "no"
zeroconf_name "Moode MPD"
filesystem_charset "UTF-8"
metadata_to_use "+comment"
replaygain "off"
replaygain_preamp "0"
volume_normalization "no"
audio_buffer_size "10240"
max_output_buffer_size "131072"
max_playlist_length "16384"
max_connections "128"

decoder {
plugin "ffmpeg"
enabled "yes"
}

input {
plugin "curl"
}

resampler {
plugin "soxr"
quality "high"
threads "1"
}

audio_output {
type "alsa"
name "ALSA Default"
device "_audioout"
mixer_type "null"
dop "no"
stop_dsd_silence "no"
thesycon_dsd_workaround "no"
}

audio_output {
type "alsa"
name "ALSA Bluetooth"
device "_audioout"
mixer_type "software"
}

audio_output {
type "httpd"
name "HTTP Server"
port "8000"
encoder "flac"
compression "0"
tags "yes"
always_on "yes"
}

moode@moode:~ $

@Maverick565
Copy link
Author

Maverick565 commented Jul 17, 2023

Infact I have this one installed:

pi@moode-desktop:~ $ aptitude search libssl | grep ^i i libssl1.1 - Secure Sockets Layer toolkit - shared libraries

I have this too. There is no hope.

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

Did you try removing the old library?
Also, does the workaround with mConnect satisfy you?

Because alternatively you can stay with raspbian and install mpd, upmpdcli, librespot, squeezelite etc via docker, unless you specifically need the Moode gui
Which services of Moode do you effectively use?

@Maverick565
Copy link
Author

Maverick565 commented Jul 17, 2023

I was trying a one time again with Ifi Zen dac but without success.

Rather that i would back to Volumio where this script working and lirc for IR remote controller has easy installation from plugin shop.

I wanted to switch to Moode because Volumio had trouble playing music from the NAS. And Moode has slightly better sound.

@Maverick565
Copy link
Author

Did you try removing the old library?

I was burn new Moode image, and i'm installed aptitude. I have same libssl version.

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

it's really weird.
Do you have a chance of dumping the sd card and sending to me the file somehow?
That way hopefully I can try and reproduce the issue, and maybe solve it (possibly).

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

I watched the video again, it seems to me that starting tracks is very sluggish at least when you use tidal connect on moode.
It should be almost istantaneous.
Maybe check the functionality of dns on your network:

https://www.lifewire.com/check-dns-settings-5215603

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

I pushed a change to the main branch, you can get it with

git pull

In any case I changed docker-compose.yaml and added google dns, if you want to try

---
version: '3'

services:
  tidal-connect:
    image: edgecrush3r/tidal-connect:latest
    container_name: tidal-connect
    tty: true
    network_mode: host
    devices:
     - /dev/snd
    environment:
     - CARD_NAME=${CARD_NAME}
     - CARD_INDEX=${CARD_INDEX:--1}
     - FRIENDLY_NAME=${FRIENDLY_NAME:-TIDAL connect}
     - MODEL_NAME=${MODEL_NAME:-Audio Streamer}
     - MQA_CODEC=${MQA_CODEC:-false}
     - MQA_PASSTHROUGH=${MQA_PASSTHROUGH:-false}
     - SLEEP_TIME_SEC=${SLEEP_TIME:-3}
    volumes:
      - ./bin/entrypoint.sh:/entrypoint.sh
      - /var/run/dbus:/var/run/dbus
    dns:
      - 8.8.8.8
      - 8.8.4.4
    restart: unless-stopped

Edit:
I forgot to say you need a

docker-compose up -d

after changing the compose file.
A command like:

docker-compose up -d --force-recreate

would unconditionally recreates the container.

Maybe you knew that already, sorry if this is the case

@Maverick565
Copy link
Author

it's really weird. Do you have a chance of dumping the sd card and sending to me the file somehow? That way hopefully I can try and reproduce the issue, and maybe solve it (possibly).

That would be difficult because i have only 32gb cards, and with my internet upload speed this will be very long process and i don't know which hosting site have that much space for free.

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

Well the actual size should be much smaller, the compressed file will be smaller. Empty space will be collpsed to nothing in the final file.
Look at what a command like

df -h

shows for your root (/) partition. That's roughly the maximum size of the resulting file. With compression if should become smaller.

In my moode, here is the situation:

pi@moode-living:~/git/tidal-connect $ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      ext4       15G  4.9G  8.9G  36% /
devtmpfs       devtmpfs  421M     0  421M   0% /dev
tmpfs          tmpfs     455M  4.0K  455M   1% /dev/shm
tmpfs          tmpfs     182M  1.5M  181M   1% /run
tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
/dev/mmcblk0p1 vfat      253M   31M  222M  13% /boot
tmpfs          tmpfs      91M     0   91M   0% /run/user/1000

But I am using additional docker images which are responsible for a size increase:

pi@moode-living:~/git/tidal-connect $ docker image ls
REPOSITORY                      TAG               IMAGE ID       CREATED        SIZE
giof71/upmpdcli                 latest-renderer   1a6b9649db97   10 days ago    159MB
giof71/mpd-subsonic-scrobbler   latest            515e68c1f8a0   7 weeks ago    885MB
giof71/yams                     latest            868bf49e6299   2 months ago   147MB
edgecrush3r/tidal-connect       latest            e9f9e4845e95   5 months ago   558MB

I expect your used space to be less than 4GB before compression, unless you have music store on the microsd (unlikely).

@Maverick565
Copy link
Author

Do you know any windows software which can do it?
I'm using Win32diskimager which making only 32gb images.

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

I am trying Win32diskimager with a 16gb microsd. It is creating an uncompressed file which will be 16GB in size, then you just need to zip it.

@Maverick565
Copy link
Author

ISP is google in this DNS test.

@Maverick565
Copy link
Author

I am trying Win32diskimager with a 16gb microsd. It is creating an uncompressed file which will be 16GB in size, then you just need to zip it.

Ok, i will send it.

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

Perfect

@Maverick565
Copy link
Author

I pushed a change to the main branch, you can get it with

git pull

In any case I changed docker-compose.yaml and added google dns, if you want to try

---
version: '3'

services:
  tidal-connect:
    image: edgecrush3r/tidal-connect:latest
    container_name: tidal-connect
    tty: true
    network_mode: host
    devices:
     - /dev/snd
    environment:
     - CARD_NAME=${CARD_NAME}
     - CARD_INDEX=${CARD_INDEX:--1}
     - FRIENDLY_NAME=${FRIENDLY_NAME:-TIDAL connect}
     - MODEL_NAME=${MODEL_NAME:-Audio Streamer}
     - MQA_CODEC=${MQA_CODEC:-false}
     - MQA_PASSTHROUGH=${MQA_PASSTHROUGH:-false}
     - SLEEP_TIME_SEC=${SLEEP_TIME:-3}
    volumes:
      - ./bin/entrypoint.sh:/entrypoint.sh
      - /var/run/dbus:/var/run/dbus
    dns:
      - 8.8.8.8
      - 8.8.4.4
    restart: unless-stopped

Edit: I forgot to say you need a

docker-compose up -d

after changing the compose file. A command like:

docker-compose up -d --force-recreate

would unconditionally recreates the container.

Maybe you knew that already, sorry if this is the case

This still don't help.

@Maverick565
Copy link
Author

@GioF71
Copy link
Owner

GioF71 commented Jul 17, 2023

OK I downloaded the file and I am flashing the image. I will try it tomorrow. Can you tell me the ssh password?

@Maverick565
Copy link
Author

user: moode
pass:moode

I set ip to DHCP before ripping.

@GioF71
Copy link
Owner

GioF71 commented Jul 18, 2023

Hello, I tried your image yesterday and this morning.
Everything worked flawlessly. The only issue I encountered is when I set the audio output in moode, the dac volume was set to 0. Once raised the volume again, I got sound again.
In the .env file, I only checked that the index was ok (my xmos card is at index 2 currently) and changed the friendly name to avoid confusion.

I would try checking dns.

Install dns utils with

sudo apt install dnsutils

Then try:

time nslookup tidal.com

My output:

moode@moode:~/tidal-connect $ time nslookup tidal.com
Server:		192.168.1.2
Address:	192.168.1.2#53

Non-authoritative answer:
Name:	tidal.com
Address: 108.138.189.73
Name:	tidal.com
Address: 108.138.189.43
Name:	tidal.com
Address: 108.138.189.120
Name:	tidal.com
Address: 108.138.189.66


real	0m0.102s
user	0m0.029s
sys	0m0.038s

Let's see how it works on your side. Maybe you can compare with the result on the Raspian box if it's still available.

@GioF71
Copy link
Owner

GioF71 commented Jul 18, 2023

And may also api.tidal.com

moode@moode:~/tidal-connect $ time nslookup api.tidal.com
Server:		192.168.1.2
Address:	192.168.1.2#53

Non-authoritative answer:
Name:	api.tidal.com
Address: 3.160.212.28
Name:	api.tidal.com
Address: 3.160.212.15
Name:	api.tidal.com
Address: 3.160.212.85
Name:	api.tidal.com
Address: 3.160.212.4


real	0m0.050s
user	0m0.012s
sys	0m0.024s

@Maverick565
Copy link
Author

`moode@moode:~ $ time nslookup tidal.com
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: tidal.com
Address: 18.244.102.15
Name: tidal.com
Address: 18.244.102.122
Name: tidal.com
Address: 18.244.102.93
Name: tidal.com
Address: 18.244.102.119

real 0m0.241s
user 0m0.014s
sys 0m0.027s
moode@moode:~ $ time nslookup api.tidal.com
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: api.tidal.com
Address: 18.66.233.30
Name: api.tidal.com
Address: 18.66.233.59
Name: api.tidal.com
Address: 18.66.233.60
Name: api.tidal.com
Address: 18.66.233.101

real 0m0.146s
user 0m0.026s
sys 0m0.009s
moode@moode:~ $ api.tidal.com
`

@Maverick565
Copy link
Author

Maverick565 commented Jul 18, 2023

This is crazy. I changed DNS in docker-compose.yaml to address of my router and now it's working 😊
My bad that i don't check that before.

@GioF71
Copy link
Owner

GioF71 commented Jul 18, 2023

It's crazy that it's always DNS!!!

@GioF71
Copy link
Owner

GioF71 commented Jul 18, 2023

Can you take a few moments to test a branch of the repo?

Here are the commands:

git reset --hard
git fetch
git checkout 13-feature-allow-user-to-specify-dns-address
./configure.sh -i 2 -f "Moode Pi4" -m "Pi4" -d "192.168.1.2"
docker-compose up -d

Keep in mind that git reset --hard will reset the branch and delete your changes, so save these somewhere else in case you want to try.
About line:

./configure.sh -i 2 -f "Moode Pi4" -m "Pi4" -d "192.168.1.2"

change "192.168.1.2" to the address you used before, might be 192.168.0.1 possibly. Also change friendly and model name to your taste.

Thanks!

@Maverick565
Copy link
Author

Can you take a few moments to test a branch of the repo?

Here are the commands:

git reset --hard
git fetch
git checkout 13-feature-allow-user-to-specify-dns-address
./configure.sh -i 2 -f "Moode Pi4" -m "Pi4" -d "192.168.1.2"
docker-compose up -d

Keep in mind that git reset --hard will reset the branch and delete your changes, so save these somewhere else in case you want to try. About line:

./configure.sh -i 2 -f "Moode Pi4" -m "Pi4" -d "192.168.1.2"

change "192.168.1.2" to the address you used before, might be 192.168.0.1 possibly. Also change friendly and model name to your taste.

Thanks!

I tested it and it works.

Thanks for all your help!

@Maverick565
Copy link
Author

On router i changed from google dns to my ISP dns address and it still works.

So there is no need to change DNS to Google on the router. But only set in Moode as DNS, address of router.

@GioF71
Copy link
Owner

GioF71 commented Jul 18, 2023

Even better

@GioF71
Copy link
Owner

GioF71 commented Jul 18, 2023

So the change is now pushed to the main branch. If you want to switch back to the main branch:

git checkout main
git pull
git branch -D 13-feature-allow-user-to-specify-dns-address

Close the issue is everything is OK. Also if you want, consider starring the repo!
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants