wizmo2 / zidoo-player

Home-assistant custom component and api wrapper for Zidoo Media Players
20 stars 4 forks source link

Zidoo Eversolo DMP-A6 #17

Open tzeryin1981 opened 11 months ago

tzeryin1981 commented 11 months ago

Possible to add this new device?

wizmo2 commented 11 months ago

Had a quick look on the website and forum, as I am not familiar with the Eversolo products.

Based on this link, it appears that the API is different, at least for the Music player. As there does not seem to be a published API yet, I would need access to a unit to get started.

tzeryin1981 commented 11 months ago

Any chance I can help from my side? How to get the API in the unit?

On Wed, 2 Aug 2023, 15:32 wizmo2, @.***> wrote:

Had a quick look on the website and forum, as I am not familiar with the Eversolo products.

Based on this link http://forum.zidoo.tv/index.php?threads/ip-control-for-dmp-a6.95676/, it appears that the API is different, at least for the Music player. As there does not seem to be a published API yet, I would need access to a unit to get started.

— Reply to this email directly, view it on GitHub https://github.com/wizmo2/zidoo-player/issues/17#issuecomment-1661661208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6IZQU3HB2O2REQCNDNUETXTH7BXANCNFSM6AAAAAA3AVENTM . You are receiving this because you authored the thread.Message ID: @.***>

wizmo2 commented 11 months ago

For reverse engineering, I use an android app called 'PCAP Remote'. It can capture the network traffic to and from the Eversolo app and saves it in wireshark format.

If you wanted to give it a try, I could look to see what's involved. You basically, start PCAP, press the 1> button and select the Eversolo app. Then open the Eversolo app (so I can see initialization commands) and press some buttons. When your finished, go back to the PCAP app, Press the [] button and save the data to the phone. You would then need to upload the file to somewhere I can get to it.

tzeryin1981 commented 11 months ago

Let me if this is what you are looking for.

On Wed, 2 Aug 2023, 15:48 wizmo2, @.***> wrote:

For reverse engineering, I use an android app called 'PCAP Remote'. It can capture the network traffic to and from the Eversolo app and saves it in wireshark format.

If you wanted to give it a try, I could look to see what's involved. You basically, start PCAP, press the 1> button and select the Eversolo app. Then open the Eversolo app (so I can see initialization commands) and press some buttons. When your finished, go back to the PCAP app, Press the [] button and save the data to the phone. You would then need to upload the file to somewhere I can get to it.

— Reply to this email directly, view it on GitHub https://github.com/wizmo2/zidoo-player/issues/17#issuecomment-1661686050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6IZQSPBNBNGXJWDJL4KU3XTIA4VANCNFSM6AAAAAA3AVENTM . You are receiving this because you authored the thread.Message ID: @.***>

tzeryin1981 commented 11 months ago

Sorry i using VPN connection, because i am at outstaion now,

On Thu, Aug 3, 2023 at 3:52 PM Jason Toh @.***> wrote:

Let me if this is what you are looking for.

On Wed, 2 Aug 2023, 15:48 wizmo2, @.***> wrote:

For reverse engineering, I use an android app called 'PCAP Remote'. It can capture the network traffic to and from the Eversolo app and saves it in wireshark format.

If you wanted to give it a try, I could look to see what's involved. You basically, start PCAP, press the 1> button and select the Eversolo app. Then open the Eversolo app (so I can see initialization commands) and press some buttons. When your finished, go back to the PCAP app, Press the [] button and save the data to the phone. You would then need to upload the file to somewhere I can get to it.

— Reply to this email directly, view it on GitHub https://github.com/wizmo2/zidoo-player/issues/17#issuecomment-1661686050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6IZQSPBNBNGXJWDJL4KU3XTIA4VANCNFSM6AAAAAA3AVENTM . You are receiving this because you authored the thread.Message ID: @.***>

-- Best Regards,

Toh Tzer Yin

MichaelSGreen commented 11 months ago

The basic functionality APIs for the music player is located here: http://apidoc.zidoo.tv/s/98365225/Gmwqxawu/0XYbQBma Under music player. Testing them on my DMP-A6 works. Slight difference in URI: http://192.168.1.1:9529/ZidooMusicControl/v2/getInputAndOutputList In the documentation, it has the domain as MusicControl and doesn't mention the port.

There are additional things not mentioned in the documentation, like changing the VU Meter visualization: /ZidooMusicControl/v2/changVUDisplay

Looking through them and will add them here. Let me know if you have a preference on documentation method or questions.

Thanks for all the hard work!!!

wizmo2 commented 11 months ago

The new 1.4.0 integration uses the standard ZidooMusicControl API for the Music features, although it is currently a mix of original and v2 (from the documentation you have referenced).

On the Zidoo Players, this new version allows

  1. Allow access to the Music Library (after you have enabled MUSIC,ARTIST,ALBUMS,PLAYLIST SHORTCUTS in the device configuration settings) through the HA Media Browser [mostly v2]
  2. Play Music in the media_player, displays status/track information and album art. [mix v1 and v2]
  3. Allow remote control using Next, Last, Play/Pause, and Stop. [uses v2].
  4. Searches the Music library, using the new Custom Card interface. [uses v2]

Have you tried these features on the DMP? Can you let me know if any thing works? It is possible I just need to migrate to all 'v2' API commands.

On the DMP specific commands, To start, I would need to see the json response (You can normally use a standard browser to send the request and copy/paste the response)

MichaelSGreen commented 11 months ago

It looks like it provides the current playing song title and artist. That is about it. Volume, mute, rew, pause, fwd work. No album art, time, etc... no music. Card works, but nothing seen in the library.

Here is a start on the other functionality. Will do a more through job on them, but this is what I have already.

getSupportServer.md getSystemSettings.md getWebServerFileInfoList.md playAirAbleServerMusicList.md playNext.md seekTo.md changVUDisplay.md EverSolo.md getDeviceSupportedFeatures.md getFiles.md getInputAndOutputList.md getMusicPlayerMyPageInfo.md getState.md

wizmo2 commented 11 months ago

I've created a new eversolo branch for documentation and testing purposes.

There is a copy of the zidoorc.py api module in the eversolo folder which I will use to test. I already included a get_file_list2 which uses the v2 getFiles call (The existing one uses various v1 api calls that may not have been migrated to the DMR)

Not sure what you competence is with python, but there is a zidoorc_test.py script that calls the standard functions used in the integration. If you could run this (with the zidoorc.py module in the same folder), it will print responses from the standard calls used in the integration. NOTE: You may need to manually install some modules through pip. For example json and requests

!PLEASE REVIEW THE OUTPUT BEFORE YOU POST, TO REMOVE ANY USERNAME AND PASSWORD REFERENCES!

If its an issue, I'll look at making a beta release with some diagnostic built in.

wizmo2 commented 11 months ago

@MichaelSGreen , is there a call to set the volume level? This is lacking on the Zidoo, but I see getState on the Eversolo has volumeData

MichaelSGreen commented 11 months ago

Good call. I have it on passthrough, so didn't catch it in my initial survey.

I'll try out the test script and let you know.

setVolumePassthrough.md setEOSEngine.md setDevicesVolume.md

MichaelSGreen commented 11 months ago

@wizmo2 Test is up and running. Here is the current output. Zidoorc_test_output.md

wizmo2 commented 11 months ago

Excellent. I'll have a look at making a start on migrating the status to 'getState' for better compatibility media info and album_art links.

For media browsing, the zidoo systems use the Music Player local mp3 library as the source of music, album, artist lists, and artwork. Does the eversolo have something like this? Do you have a local library setup on that system?

I notice, that you are using streaming sources. How do you launch these on the DMR? Are there shortcuts on the device somwhere? ZidooRC does has a play_stream command. For an audio stream it should be

play_stream(<url>, media_type=1)

Its a bit of a hack as the zidoo does not really support streaming. I found that I could use the 'FileControl' to open a `upnp://' link. The media_type parameter specifies the app to play the stream. On the zidoo, I had to use the VideoPlayer(media_type=2) to launch audio streams, as the standard MusicPlayer (media_type=1) did not work. Could you try adding something to the script to see if it works with any media_type (0-9)?

Re.

getFiles:
'ZidooRC' object has no attribute 'get_file_list2'

can you try copying the zidooprc.py file from the eversolo folder and rerunning? The get_file_list2 is in this version only. It appears the device_list on the eversolo is not fully implemented. Hoping there is more to see here.

MichaelSGreen commented 11 months ago

@wizmo2

For media browsing, the zidoo systems use the Music Player local mp3 library as the source of music, album, artist lists, and artwork. Does the eversolo have something like this? Do you have a local library setup on that system?

I notice, that you are using streaming sources. How do you launch these on the DMR? Are there shortcuts on the device somwhere?

  1. getSupportSystem() This provides the available services. (Provided an example previously)
  2. Calls Host #####.airable.io This looks like a call to manage their workflow to get the link to Qobuz. Encrypted body
  3. Calls https://assets.airable.io I would guess a pass from Eversolo explicit host to a general one to provide the link. Encrypted body
  4. Calls https://static.qobuz.com I would guess that is the information from Qobuz backend to the android app in Eversolo. (Encrypted).
  5. playAirAbleServerMusicList This plays the song I selected. (Provided an example previously)

So my guess is that the Eversolo apps supply a front end, negotiate the front end's connection with AiraAble, and use the service's APIs as their backend. The only thing they have to consume is the URL they services provide when it goes to play.

This is explicitly playing from the internal Qobuz app. Other internal apps work the same.

Casting from another app to Eversolo works like you would expect. A broadcast to all listing devices is made and a pipeline is connected.

I would guess that you UPNP call essentially does what you are already doing. Calling out to UPNP with the app envokes "getWebServerFileInfoList" which will contact the server for the resources for the user to select. At that point, its just the UPNP protocol. At least that is my guess, not an area I have looked at before.


Will try your test and respond