Limych / media_player.linkplay

Deprecated. Please, use https://github.com/nagyrobi/home-assistant-custom-components-linkplay
MIT License
30 stars 55 forks source link

IEAST M5 #11

Open Sonusss opened 4 years ago

Sonusss commented 4 years ago

Hi, I have 3 IEAST M5 media player and have some issues. I can control them but cannot get proper status. From the start the state is "Unknown" as soon as I change the volume I get some status like audio source, volume level, but no audio title or others. I can plays/pause but the button icon does not change and get a banner in HA telling "Failed to call service media-player/media_play_pause. 'NoneType' oblect is not iterable" I'm running HA 0.94.3

How to go further debugging ?

Sonusss commented 4 years ago

Some more info HTTP command return (I guess something is formatted differently):

httpapi.asp?command=getPlayerStatus {"type":"0","ch":"0","mode":"10","loop":"0","eq":"0","status":"play","curpos":"17851920","offset_pts":"17851920","totlen":"0","Title":"464950204175746F7572204475204D6F6E6465","Artist":"7654756E6572","Album":"4672616E6365","alarmflag":"0","plicount":"1","plicurr":"1","vol":"66","mute":"0","iuri":"687474703A2F2F7579657365652E7674756E65722E636F6D2F73657475706170702F7579657365652F6173702F66756E632F64796E616D4F442E6173703F65783435763D353265643137666431656162323439356161646333653338663739323139376135326564313766643165616232343935616164633365333866373932313937612669643D3739353631","uri":"687474703A2F2F7579657365652E7674756E65722E636F6D2F73657475706170702F7579657365652F6173702F66756E632F64796E616D4F442E6173703F65783435763D353265643137666431656162323439356161646333653338663739323139376135326564313766643165616232343935616164633365333866373932313937612669643D3739353631"}

httpapi.asp?command=getStatus { "language": "en_us", "ssid": "AudioCast_9190", "hideSSID": "1", "SSIDStrategy": "2", "firmware": "3.8.6030", "build": "release", "project": "iEAST-02", "priv_prj": "iEAST-02", "Release": "20180830", "branch": "stable\/wiimu-3.8", "group": "0", "expired": "0", "internet": "1", "uuid": "FF310001A06CC39BFFFC81C3", "MAC": "00:22:6C:F0:91:90", "STA_MAC": "00:22:6C:F0:91:92", "date": "2019:11:29", "time": "15:09:03", "tz": "1.000000", "netstat": "2", "essid": "564F4F2D303133383231", "apcli0": "192.168.1.61", "eth2": "0.0.0.0", "eth_dhcp": "1", "hardware": "A31", "VersionUpdate": "0", "NewVer": "0", "mcu_ver": "0", "mcu_ver_new": "0", "dsp_ver_new": "0", "ra0": "10.10.10.254", "temp_uuid": "1637BACAC3702E3D", "cap1": "0x80400", "capability": "0x6008c0", "languages": "0xe", "dsp_ver": "", "streams_all": "0x7ffffffe", "streams": "0x7ffffffe", "region": "unknown", "external": "0x0", "preset_key": "6", "plm_support": "0x0", "spotify_active": "0", "WifiChannel": "4", "RSSI": "-62", "battery": "0", "battery_percent": "0", "securemode": "0", "upnp_version": "1004", "upnp_uuid": "uuid:FF310001-A06C-C39B-FFFC-81C3FF310001", "uart_pass_port": "8899", "communication_port": "8819", "web_firmware_update_hide": "0", "web_login_result": "-1", "ignore_talkstart": "0", "silenceOTATime": "", "ignore_silenceOTATime": "1", "iheartradio_new": "1", "privacy_mode": "0", "user1": "311:524", "user2": "5935:6291", "DeviceName": "Bureau", "GroupName": "Bureau" }

Limych commented 4 years ago

Good day. Unfortunately, it’s hard for me to help you now - at the moment I also don’t understand much in the logic of this component. I'll try to come up with something.

Sonusss commented 4 years ago

Hi, I made extra digging in the problem during the WE and I found that your module isn't using http commands but upnp which is harder to track/debug ...

smgt commented 4 years ago

@Sonusss Yes and no, the component uses upnp to discover the device and to get currently playing media. Then it uses HTTP get status and control it. If the component has problems with HTTP requests it should output the errors in the HA log. Does it output any errors?

nagyrobi commented 4 years ago

Upnp is only used to retrieve metadata while playing from Spotify.