Open xfiber opened 1 year ago
I'm sorry, but my component is going to work only with WiiM Mini (and Pro probably). I've no idea if it can work with other Linkplay modules and I have no way to test it. Does your device need http or https communication?
Seems like device needs https communication (but not sure 100%) When ever I try to call a service I get this error about Client OS. However, when I start a live stream from 4Stream app it updates properly on HA. See below.
Does it respond to that:
https://
when executed in the web browser?
This is an output from curl:
curl -vk "https://192.168.88.70/httpapi.asp?command=getStatusEx"
* Trying 192.168.88.70:443...
* Connected to 192.168.88.70 (192.168.88.70) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Request CERT (13):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Certificate (11):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: C=CN; ST=Shanghai; L=Shanghai; O=linkplay; OU=linkplay; CN=www.linkplay.com; emailAddress=mail@linkplay.com
* start date: Nov 14 12:24:18 2018 GMT
* expire date: Nov 11 12:24:18 2028 GMT
* issuer: C=CN; ST=Shanghai; L=Shanghai; O=linkplay; OU=linkplay; CN=www.linkplay.com; emailAddress=mail@linkplay.com
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /httpapi.asp?command=getStatusEx HTTP/1.1
> Host: 192.168.88.70
> User-Agent: curl/7.84.0
> Accept: */*
>
* LibreSSL SSL_read: error:1404C45C:SSL routines:ST_OK:reason(1116), errno 0
* Closing connection 0
curl: (56) LibreSSL SSL_read: error:1404C45C:SSL routines:ST_OK:reason(1116), errno 0
So it seems to listen on 443 port just like Mini.
Can you verify if those commands are working with your device?
https://www.wiimhome.com/pdf/HTTP%20API%20for%20WiiM%20Mini.pdf
And even more important here, what about that
http://192.168.88.70:49152/description.xml
?
All of them are ending up with the same error:
*** Trying 192.168.88.70:443...
* Connected to 192.168.88.70 (192.168.88.70) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Request CERT (13):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Certificate (11):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: C=CN; ST=Shanghai; L=Shanghai; O=linkplay; OU=linkplay; CN=www.linkplay.com; emailAddress=mail@linkplay.com
* start date: Nov 14 12:24:18 2018 GMT
* expire date: Nov 11 12:24:18 2028 GMT
* issuer: C=CN; ST=Shanghai; L=Shanghai; O=linkplay; OU=linkplay; CN=www.linkplay.com; emailAddress=mail@linkplay.com
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /httpapi.asp?command=EQGetStat HTTP/1.1
> Host: 192.168.88.70
> User-Agent: curl/7.84.0
> Accept: */*
>
*** LibreSSL SSL_read: error:1404C45C:SSL routines:ST_OK:reason(1116), errno 0**
* Closing connection 0
curl: (56) LibreSSL SSL_read: error:1404C45C:SSL routines:ST_OK:reason(1116), errno 0**
It will not work if those command are not accepted, sorry...
What about similar commands but on http / 80 port?
Unfortunately port 80 is refused. Such a pity it will not work :(
curl -vk "http://192.168.88.70/httpapi.asp?command=getPlayerStatus"
* Trying 192.168.88.70:80...
* connect to 192.168.88.70 port 80 failed: Connection refused
* Failed to connect to 192.168.88.70 port 80 after 12 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 192.168.88.70 port 80 after 12 ms: Connection refused
Found something on arylic forum, indeed it does not support any http(s) apis. Only upnp is supported. https://forum.arylic.com/t/up2stream-hd-dac-http-get/1703?replies_to_post_number=3
So it won't work with nagyrobi's Linkplay module at all, but can be partially controlled by my module. Does it respond to player commands from HA interface? Does it reflect your streamer status when you play audio files?
It does not respond to Stop/start. I've only tried calling service.
So no public httpapi support indeed. A beta version of my module should handle your device a bit better as it uses upnp purely to get the current player status, but still no control is possible. I do not have plans to move completely from httpapi to upnp, sorry.
I've installed latest beta version and indeed I get current player status. No problem. I will most likely switch to older Arylic devices to make my integration work. Arylic even does not give any info about upnp inegration at this time. https://developer.arylic.com/docs/
Hi, I am trying to use your integration with Arylic Up2Stream HD DAC. Firmware: 4.6.414645.35
When ever I am calling:
service: wiim_custom.play_url data: entity_id: media_player.living_room url: http://radiostream.pl/tuba10-1.mp3
I get this error originated from a custom integration:
Logger: custom_components.wiim_custom.media_player Source: custom_components/wiim_custom/media_player.py:393 Integration: WiiM (documentation, issues) First occurred: 18:49:56 (465 occurrences) Last logged: 20:05:06
Failed communicating with WiiM (httpapi) 'Living Room': <class 'aiohttp.client_exceptions.ClientOSError'>
Do we need to "fake" client OS ?
Best regards, Bartek