GioF71 / tidal-connect

Simple script for configuring Tidal Connect with Docker (also on Volumio, moOde, OSMC)
MIT License
83 stars 6 forks source link

How to turn on service? #10

Closed Maverick565 closed 1 year ago

Maverick565 commented 1 year ago

Hi!

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

Maverick565 commented 1 year ago

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 commented 1 year ago

Did you try removing the old library?

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

GioF71 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

GioF71 commented 1 year ago

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 commented 1 year ago

ISP is google in this DNS test.

Maverick565 commented 1 year ago

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 commented 1 year ago

Perfect

Maverick565 commented 1 year ago

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 commented 1 year ago

https://drive.google.com/file/d/19H5VSuK8Hku6z7jdoiLDWjc1K1dDOkjp/view?usp=drivesdk

GioF71 commented 1 year ago

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

Maverick565 commented 1 year ago

user: moode pass:moode

I set ip to DHCP before ripping.

GioF71 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

`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 commented 1 year ago

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 commented 1 year ago

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

GioF71 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Even better

GioF71 commented 1 year ago

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