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
Feature: Add TIDAL support #87
Comments
It looks like the most up to date Linux Tidal support is from https://github.com/seniorgod/ifi-tidal-release (HiTide is based on this). Looking into this a little closer at ifi-tidal, Tidal support looks fairly easy to implement with that implementation. Here's what their command line interface looks like:
It should be rather easy to launch this, changing the playback device to ch0-ch3 and the model name to the specific stream's configuration. We have not tested this yet because it requires a Tidal account. @mwbrink I assume you have a Tidal account. Would you be willing to help us test this? One thing to note is the underlying tidal_connect_application is only in closed source binary form, so this will need to be optionally downloaded and installed like a plugin. |
Here are a list of steps that are needed to integrate TIDAL:
|
I will do what I can to help. |
I would be interested in Tidal support also |
Cool are either of you guys able to try out the |
Is there anyone with a Tidal subscription than can help us move forward on this? |
Okay, I've received my amplipi. I would like to have a go ath this, but need a little push to figure this out. I can ssh into the system. how do I best install the binaries? |
The easiest way to start playing with it would be to use the HiTide installer that installs ifi-tidal-release and uses it in the HiTide service.
Then you should probably disable the service so you can play with with command line:
Looking at the service, its being run with the following comand line args:
For now it looks like sources 2, 3, 4 (named 'ch1', 'ch2', 'ch3' respectively) can be used to playback audio. Source 1 is not being detected initially. Also it looks like the connect application is failing to create a socket on some unknown already used port. To test on source 2 go to the the '2' tab in the app and select the blank input. This will configure the AmpliPi to use its Digital 2 input. Any zones connected to source 2 will play whatever TiDal is playing. |
it worked! |
On song change it spit out this error: |
it's still playing |
Can you try launching TiDAL on 2 different sources? Maybe ch1 and ch2? I'm assuming TiDAL allows multiple concurrent streams... |
I don't have a family account, thus I'm limited to one stream. I restarted the unit to add an extender. do I simply start the service or am I going to have to stop and disable the service? |
I tried running a second instance, but it didn't work. My linux is poor, here is what I did: pi@amplipi:~ $ /usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat --netif-for-deviceid eth0 -f AmpliPi-TiDAL-ch2 --codec-mpegh true --codec-mqa fal |
Hmm looks like a duplicate name conflict: Can you try the following in 2 separate ssh sessions. The commands use different names and outputs: session1:
session 2:
Verify that you can play to each of these, switching between them. No need to try simultaneous playback yet. |
The second command ran, always errors and aborts. in this case session1 command was run second and output this: pi@amplipi:~ $ /usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat --netif-for-deviceid eth0 -f AmpliPi-TiDAL1 --codec-mpegh true --codec-mqa false --model-name Pi-Streamer --disable-app-security false --disable-web-security false --enable-mqa-passthrough false --playback-device ch2 --log-level 3 Both commands seem to work on their own, but not together. |
I have a Tidal subscription and would be happy to help validate — is there something that'd be helpful for me to try? I can't quite tell if there was conclusion from the experiment above. (There's also a 30 day trial if being able to try things yourself would be easier.) |
I think this integration just fell off our radar and it didn't help that is was using a closed source binary that didn't allow us to gain any insight. Would you mind testing this a little bit to try to see if there are any ways to get multiple TIDAL streams working at once? If you are testing on AmpliPi it has 4 strereo outputs you can play with: When you are testing TIDAL and want to verify audio playback set the input the blank input, that will configure it to play whatever is being played out the selected stereo output. Try using this command to play out Source 3:
I hope this helps! |
The problem I had was my Tidal sub only allows 1 stream at a time, forbidding me to test concurrent streams. |
Also I don't remember did anyone look into how feasible it was to get album art? |
Unix socket /tmp/tisoc-controller has everything we need. It supplies all the now playing information and seems to control Tidal Connect. I can't use it without breaking the Tidal Service requiring a restart, though. I'm no expert in using sockets, maybe someone else knows what's going on? If I try to use Tidal AFTER I run my socket sniffing script, it hangs and this is the most I can get out of it: /bin/python /root/anotherAttempt.pyb'\xff\x02\x00`{"appInfo": {"appId": "tidal", "appName": "TIDAL"}, "command": "notifySessionState", "state": 1}\xff\x03' But if you connect your phone first and then run the script to intercept messages: /bin/python /root/anotherAttempt.pyb'\xff\x02\x00k{"command": "notifyPlayerStatusChanged", "duration": 310000, "playerState": "BUFFERING", "progress": 82198}\xff\x03' Information we can use for metadata! It appears to have 4 header bytes, a message, and 2 trailing bytes. |
That metadata looks very promising |
Indeed it is. I forgot to mention that the speaker_controller_application that's included with these binaries also uses the same socket because that also completely breaks when you connect to it. |
I'd like to bump this thread and let everyone know that we're actively working on this now, hopefully we'll see this in an upcoming release in a reasonably short timeframe. In the meantime, have any of you had luck continuing to use your custom implementations personally? I'm having troubles with that ifi-tidal-release repo, seems a few of the apt dependencies are deprecated and I may have to bark up a different tree. |
Would be great if Tidal could be added with HiTide.
https://github.com/shawaj/HiTide
The text was updated successfully, but these errors were encountered: