LinkPlay Integration


#1

Is anyone else besides myself interested in a component for LinkPlay audio systems integration? I don’t have much information on it but it seems like a good fit for a future addition to Home Assistant.

Here is the website for the service http://linkplay.com/

They are a little light on specific details even on their own website but I think the SoC concept behind it (much like Google’s Chromecast audio) is in high demand right now.


Audiocast Media Device/Player HA
iEAST Multiroom Home Audio -Look for integration
#2

Yes, very!

Linkplay seems to be everywhere, this page http://linkplay.com/featured-products/ doesn’t even include the two speakers I have… My lovely Audio Pro https://www.whathifi.com/audio-pro/addon-c5/review and the dirt cheap from kjell… https://www.kjell.com/se/sortiment/dator-natverk/hogtalare-headset/tradlosa-hogtalare/roxcore-stream-1-multiroom-hogtalare-vit-p23484. They work perfect together though.

I have no clue how hard it is to implement, but there seems to be some work done? https://github.com/AndersFluur/IEastMediaRoom

Kind regards,
/Johan


#3

Yep, the work

made works great!
/Johan


#4

Sorry to ramble…

I guess basically everything could be done with what already exists.

switch:
platform: rest
resource: http://192.168.1.27/httpapi.asp?command=setPlayerCmd:play:http://sverigesradio.se/topsy/direkt/164-lo-aac.pls
will put a switch in the frontend that when triggered plays the Swedish radio in my kitchen.
A Linkplay platform would be fantastic though!
Will be quiet for a while now.


#5

The concept of this player is interesting.
The LinkPlay ( WiiMu ) company manufactures Audio WiFi modules that are used in the innumerable equipment of such companies as:
iEast
AudioCast
Audio Pro
SoundBot
iLuv
iDea USA

Description of control: https://github.com/AndersFluur/IEastMediaRoom

Is there anyone who could write a home assistant component


#6

It would be awesome to have a component for this!


#7

As it is a DLNA compatible device, you can try using the dlna_dmr component. I am currently setting this up for my Venztech A5.


#8

Hi!

I would really like some help in testing out a new HA component for Linkplay based devices that I’ve been working on. It’s my first HA component and I’m quite novice when it comes to Python so expect issues :slight_smile:

If you’re willing to try it out, it’s located here: https://github.com/nicjo814/home-assistant/blob/dev/homeassistant/components/media_player/linkplay.py . Copy the file into the custom_components/media_player folder in your HA config folder.

Documentation for the component is available (in markup) here: https://github.com/nicjo814/home-assistant.io/blob/next/source/_components/media_player.linkplay.markdown

Basic player control should work. I have some issues with source selection and media info display but hope to get that sorted if I can get some help from people with other devices. Since I only have one Linkplay based device at home there is no multiroom support…

Let me know how it works :slight_smile:


#9

The component uses eyeD3 to get media info from mp3 files, and it effectively fills the /tmp partition very quickly… Will see if I can get around that somehow :slight_smile:


#10

I will give your add-on a go after Christmas (when the family gives me some spare time😂) I use audio-pro devices.


#11

That’s great!

I just bought myself a second Audio Pro C5 device so now I’ve been able to play around with multiroom configurations :slight_smile:

I hope to “finalize” multiroom support for the component either tomorrow or the day after.


#12

I took my self some time today allready :smile:
Something is not working thou:

018-12-19 21:40:23 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform linkplay
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/media_player/linkplay.py”, line 111, in setup_platform
if linkplay.update() is False:
File “/config/custom_components/media_player/linkplay.py”, line 492, in update
self._update_via_upnp()
File “/config/custom_components/media_player/linkplay.py”, line 376, in _update_via_upnp
media_info = self._upnp_device.AVTransport.GetMediaInfo(InstanceID=0)
AttributeError: ‘NoneType’ object has no attribute ‘AVTransport’
2018-12-19 21:40:30 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/waze_travel_time.py”, line 74, in
EVENT_HOMEASSISTANT_START, lambda _: sensor.update())
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/waze_travel_time.py”, line 204, in update
routes = params.calc_all_routes_info(real_time=self._realtime)
File “/usr/local/lib/python3.6/site-packages/WazeRouteCalculator/WazeRouteCalculator.py”, line 145, in calc_all_routes_info
routes = self.get_route(npaths, time_delta)
File “/usr/local/lib/python3.6/site-packages/WazeRouteCalculator/WazeRouteCalculator.py”, line 95, in get_route
response_json = response.json()
File “/usr/local/lib/python3.6/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/local/lib/python3.6/site-packages/simplejson/init.py”, line 518, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.6/site-packages/simplejson/decoder.py”, line 370, in decode
obj, end = self.raw_decode(s)
File “/usr/local/lib/python3.6/site-packages/simplejson/decoder.py”, line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


#13

This in from my yaml file:

media_player:
  • platform: spotify
    client_id: !secret spotifyid
    client_secret: !secret spotifysecret
  • platform: linkplay
    host: 192.168.99.6

#14

I think I know what the problem is. I had to make some changes regarding the UPNP commuincation and as part of this it’s important that the name of the device is specified in the configuration.yaml exactly as it’s specified in the Audio Pro mobile app.

Also make sure that you are not using multiroom, because then it will crash very hard :slight_smile:

I’ll spend tomorrow stabilizing the code…


#15

ahh… so not IP then. Does it handle non latin characters? I have swedish ö in my unit name.
I need to split the multiroom also :slight_smile:


#16

setting host: Köket did not solve it:

018-12-19 22:42:26 ERROR (SyncWorker_13) [custom_components.media_player.linkplay] Error fetching data: <PreparedRequest [GET]> from http://köket/httpapi.asp?command=getPlayerStatus failed with HTTPConnectionPool(host=‘xn–kket-5qa’, port=80): Max retries exceeded with url: /httpapi.asp?command=getPlayerStatus (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x6d55d3d0>: Failed to establish a new connection: [Errno -2] Name does not resolve’,))


#17

Sorry host should be IP, but the “name” property should be ‘Köket’ in your case.

host: 192.168.99.6
name:Köket


#18

I haven’t tested with swedish characters myself, but I’ll do some tests with that tomorrow.


#19

i´m rebooting right now so i will have the answer for you soon :slight_smile:


#20

Awesome! I can’t test right now myself since one of the devices is in the kids room :slight_smile: