LinkPlay Binding

Hi,

HDMI is present :slight_smile: Also Wifi signal :slight_smile:

I made some tests and have some suggestions:

  • channel for Album Name is missing
  • could you add channel for showing application ? (Tidal, Spotify…)
  • maybe change formating of Position and Duration channels to %1$tH:%1$tM:%1$tS and formatting of Wifi Signal to 0-100% instead 0-1?
    Thanks for binding !

Album Name should already be there - please check. The Mode channel should show Tidal/Spotify. I copied what other bindings do for time - most are just in seconds - easy to convert as needed. I’ll look into the WiFi.

Thank you for testing.

Hi,

The album channel is not available, it was available on first version, but now is not. In trace log I have:

2025-02-16 10:49:21.409 [DEBUG] [nternal.handler.LinkPlayThingHandler] - Channel not found with group prefix: playback#album

Strange - here is my Album item. Maybe delete the thing and try again? Confirm you are using the right channel (note: I had to change the XML for the channel).

Hi, I deleted all items, deleted thing, remove jar file, reboot openhab, add jar file again and add thing again and Album channel is missing.

I deleted all Things, removed old jar, rebooted, added new jar and rebooted. All Things rediscovered and automatically linked back to Items.

The issues I had in the previous version are nearly all gone. Great job!

Remaining are only that MasterIP and GroupName are blank.

But the Album channel is missing also for me in this version.

From a browser, try the getStatusEX endpoint and show me the output here -see

eg. https://xxx.xxx.xxx.xxx/httpapi.asp?command=getStatusEx

This is what I get:

{ "uuid": "FF2800148EBC4D113E9ABF0A", "DeviceName": "Utomhus", "GroupName": "Utomhus", "ssid": "AudioPro_LINK1_F336FC", "language": "en_us", "firmware": "4.6.338249", "hardware": "A28", "build": "release", "project": "AudioPro_LINK1", "priv_prj": "AudioPro_LINK1", "project_build_name": "AudioPro_LINK1", "Release": "20211210", "temp_uuid": "9DEA2E5C7B9ACC12", "hideSSID": "1", "SSIDStrategy": "2", "branch": "A31_stable_4.6", "group": "0", "wmrm_version": "4.2", "internet": "1", "MAC": "00:22:6C:F3:36:FC", "STA_MAC": "00:00:00:00:00:00", "CountryCode": "CN", "CountryRegion": "1", "netstat": "3", "essid": "426967426172645F3247", "apcli0": "", "eth2": "192.168.1.170", "ra0": "10.10.10.254", "eth_dhcp": "1", "VersionUpdate": "0", "NewVer": "0", "set_dns_enable": "1", "mcu_ver": "0", "mcu_ver_new": "0", "dsp_ver": "0", "dsp_ver_new": "0", "date": "2025:02:17", "time": "15:49:48", "tz": "1.0000", "dst_enable": "1", "region": "unknown", "prompt_status": "1", "alexa_ver": "20180604", "iot_ver": "1.0.0", "upnp_version": "1005", "cap1": "0x80500", "capability": "0x20614800", "languages": "0x204", "streams_all": "0x7fff33fd", "streams": "0x7f9831fd", "external": "0x0", "plm_support": "0x0", "preset_key": "6", "spotify_active": "1", "lbc_support": "0", "privacy_mode": "0", "WifiChannel": "11", "RSSI": "0", "BSSID": "", "battery": "0", "battery_percent": "0", "securemode": "0", "auth": "OPEN", "encry": "NONE", "upnp_uuid": "uuid:FF280014-8EBC-4D11-3E9A-BF0AFF280014", "uart_pass_port": "8899", "communication_port": "8819", "web_firmware_update_hide": "0", "ignore_talkstart": "0", "web_login_result": "-1", "silenceOTATime": "", "ignore_silenceOTATime": "1", "new_tunein_preset_and_alarm": "1", "iheartradio_new": "1", "new_iheart_podcast": "1", "tidal_version": "2.0", "service_version": "1.0", "ETH_MAC": "00:00:00:00:00:00", "security": "https\/2.0", "security_version": "2.0" }

@mjcumming

Hi,

Until know I’m using http binding for managing Wiim Amp and I have 2 suggestions:

  1. to get Album name I use: base url: https://xxx.xxx.xxx.xxx/httpapi.asp? , state transformation: JSONPATH:$.metaData.album , state url extension: command=getMetaInfo

  2. To get Album url: state transformation: JSONPATH:$.metaData.albumArtURI , state url extension: command=getMetaInfo - I think that this way can be better for example in case when you are using apps with audiobooks and so on.

Interesting - that endpoint is not documented in the Arylic HTTP protocol but I found it in the Wiim documentation. I wonder if it’s Wiim specific?

MasterIP is blank when the device is not a slave - also, the group name doesn’t populate in that case. I cannot see why the Album is not populating - it’s working here - turn on the debug logging and show me the output when the getPlayerStatus endpoint is called. New JAR uploaded for testing.

I added that endpoint to get the albumart URL - give it a try.

Hi,

Album channel still not present. Some logs below:

2025-02-18 13:29:22.085 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:media-album


2025-02-18 13:34:22.904 [DEBUG] [nternal.handler.LinkPlayThingHandler] - Channel not found with group prefix: playback#album
2025-02-18 13:34:22.907 [DEBUG] [ding.linkplay.internal.DeviceManager] - [WiiM Amp] Raw player status: {"type":"0","ch":"0","mode":"32","loop":"4","eq":"0","vendor":"Tidal","status":"play","curpos":"133346","offset_pts":"311689","totlen":"301000","Title":"42726F746865727320496E2041726D73","Artist":"47656F726720576164656E6975732C204E696E612050657273736F6E","Album":"5265636F6E6E656374696F6E","alarmflag":"0","plicount":"0","plicurr":"0","vol":"8","mute":"0"}

The Wifi signal is again Null…

Ok, I tried another tweak on the album name - if not success, turn on the trace logging for the binding and include the output here. I do not use wifi here so the changes I make are guesses. The debug logs might help. Use the link above to download. Thanks again for testing.

Hi,

The Album Name is working now :slight_smile:

Wifi SIgnal is still null. Some trace logs below:

2025-02-19 08:48:32.915 [TRACE] [.internal.transport.http.HttpManager] - [WiiM Amp] Polling device status
2025-02-19 08:48:32.916 [TRACE] [al.transport.http.LinkPlayHttpClient] - Attempting HTTPS request to 192.168.1.101: https://192.168.1.101:443/httpapi.asp?command=getStatusEx
2025-02-19 08:48:32.987 [TRACE] [.internal.transport.http.HttpManager] - [WiiM Amp] Polling player status
2025-02-19 08:48:32.988 [TRACE] [al.transport.http.LinkPlayHttpClient] - Attempting HTTPS request to 192.168.1.101: https://192.168.1.101:443/httpapi.asp?command=getPlayerStatus
2025-02-19 08:48:32.999 [DEBUG] [play.internal.multiroom.GroupManager] - [WiiM Amp] Device status: grouped=false
2025-02-19 08:48:33.000 [DEBUG] [ding.linkplay.internal.DeviceManager] - [WiiM Amp] Got device name from API: 'WiiM Amp'
2025-02-19 08:48:33.000 [TRACE] [al.transport.http.LinkPlayHttpClient] - Attempting HTTPS request to 192.168.1.101: https://192.168.1.101:443/httpapi.asp?command=multiroom%3AgetSlaveList
2025-02-19 08:48:33.001 [DEBUG] [ding.linkplay.internal.DeviceManager] - [WiiM Amp] RSSI: -39
2025-02-19 08:48:33.026 [DEBUG] [ding.linkplay.internal.DeviceManager] - [WiiM Amp] Raw player status: {"type":"0","ch":"0","mode":"32","loop":"4","eq":"0","vendor":"Tidal","status":"play","curpos":"48625","offset_pts":"311689","totlen":"274000","Title":"4920576173204D61646520666F72204C6F76696E6720596F75","Artist":"4D61726961204D656E61","Album":"436175736520616E6420456666656374","alarmflag":"0","plicount":"0","plicurr":"0","vol":"2","mute":"0"}
2025-02-19 08:48:33.027 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel playback#position to 48 s
2025-02-19 08:48:33.101 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel multiroom#role to standalone
2025-02-19 08:48:33.101 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel multiroom#masterIP to
2025-02-19 08:48:33.102 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel multiroom#slaveIPs to
2025-02-19 08:48:33.103 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel multiroom#groupName to
2025-02-19 08:48:33.103 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel multiroom#groupVolume to 0
2025-02-19 08:48:33.104 [TRACE] [nternal.handler.LinkPlayThingHandler] - Updating state for channel multiroom#groupMute to OFF

1 Like

I guess this was a response to me. Sorry, showed the master device. But the slave device doesn’t show any values for MasterIP or GroupName. This is the getStatusEX for it:

{ "uuid": "FF28001286AD290976301FD7", "DeviceName": "Bibliotek", "GroupName": "Bibliotek", "ssid": "AudioPro_A10_00E22A", "language": "en_us", "firmware": "4.6.335260", "hardware": "A28", "build": "release", "project": "AudioPro_A10", "priv_prj": "AudioPro_A10", "project_build_name": "a28audiopro", "Release": "20211111", "temp_uuid": "9AFCEF1E422DAD2E", "hideSSID": "1", "SSIDStrategy": "2", "branch": "A31_stable_4.6", "group": "1", "master_uuid": "FF2800148EBC4D113E9ABF0A", "slave_mask": "0", "wmrm_version": "4.2", "internet": "1", "MAC": "00:22:6C:00:E2:2A", "STA_MAC": "00:22:6C:00:E2:2C", "ETH_MAC": "00:00:00:00:00:00", "CountryCode": "CN", "CountryRegion": "1", "netstat": "2", "essid": "426967426172645F3247", "apcli0": "192.168.1.210", "eth2": "", "ra0": "10.10.10.254", "eth_dhcp": "1", "VersionUpdate": "0", "NewVer": "0", "set_dns_enable": "1", "mcu_ver": "115", "mcu_ver_new": "0", "dsp_ver": "", "dsp_ver_new": "0", "date": "2025:02:19", "time": "13:21:25", "tz": "1.0000", "dst_enable": "1", "region": "unknown", "prompt_status": "1", "alexa_ver": "20180604", "iot_ver": "1.0.0", "upnp_version": "1005", "cap1": "0x8001600", "capability": "0x20494800", "languages": "0x204", "streams_all": "0x7fff33fd", "streams": "0x7f9831fd", "external": "0x0", "plm_support": "0x6", "preset_key": "4", "spotify_active": "0", "lbc_support": "0", "privacy_mode": "1", "WifiChannel": "6", "RSSI": "-63", "BSSID": "26:5A:4C:11:F8:69", "battery": "0", "battery_percent": "0", "securemode": "1", "auth": "WPAPSKWPA2PSK", "encry": "AES", "upnp_uuid": "uuid:FF280012-86AD-2909-7630-1FD7FF280012", "uart_pass_port": "8899", "communication_port": "0", "web_firmware_update_hide": "0", "ignore_talkstart": "0", "web_login_result": "-1", "silenceOTATime": "", "ignore_silenceOTATime": "1", "new_tunein_preset_and_alarm": "1", "iheartradio_new": "1", "new_iheart_podcast": "1", "tidal_version": "2.0", "service_version": "1.0", "security": "https\/2.0", "security_version": "2.0" }

With the latest version (Feb 19th) I get the Album channel data. I also get WiFi Signal data, but it is slightly higher than what the app and httpappi shows (0 → 1%, 65% → 72%).

This looks right - I pulled the code for getting masterip when redoing the group membership logic - the getStatusEx doesn’t explicitly tell you that a device is standalone or master - just that it isn’t a slave. So,I have been playing with different ways of determining this - is the Group Role channel being populated correctly?

The Group Role channel is populated correctly for the master, but with “standalone” for the slave.

I can see two ways to get the Master IP, both a bit complicated.

  • from getStatusEX of the slave, using master_uuid and matching it to the master device
  • from multiroom:getSlaveList of the master, matching each slave IP with the respective devices

That was the prior logic - there are edge cases with timing etc, that can make this tricky. So, I pulled that logic out for getting simple polling the endpoints for now - and will work the prior logic to lookup a device via UID to get the IP once I am confident the basic polling works. I am concerned about the slave device not being properly identified as that is the one thing the getStatusEx endpoint should tell us - can you show the output when the device is standalone, slave, master?

Standalone

{ "uuid": "FF2800148EBC4D113E9ABF0A", "DeviceName": "Utomhus", "GroupName": "Utomhus", "ssid": "AudioPro_LINK1_F336FC", "language": "en_us", "firmware": "4.6.338249", "hardware": "A28", "build": "release", "project": "AudioPro_LINK1", "priv_prj": "AudioPro_LINK1", "project_build_name": "AudioPro_LINK1", "Release": "20211210", "temp_uuid": "AE1506B80A8DF674", "hideSSID": "1", "SSIDStrategy": "2", "branch": "A31_stable_4.6", "group": "0", "wmrm_version": "4.2", "internet": "1", "MAC": "00:22:6C:F3:36:FC", "STA_MAC": "00:00:00:00:00:00", "CountryCode": "CN", "CountryRegion": "1", "netstat": "3", "essid": "426967426172645F3247", "apcli0": "", "eth2": "192.168.1.170", "ra0": "10.10.10.254", "eth_dhcp": "1", "VersionUpdate": "0", "NewVer": "0", "set_dns_enable": "1", "mcu_ver": "0", "mcu_ver_new": "0", "dsp_ver": "0", "dsp_ver_new": "0", "date": "2025:02:20", "time": "13:47:45", "tz": "1.0000", "dst_enable": "1", "region": "unknown", "prompt_status": "1", "alexa_ver": "20180604", "iot_ver": "1.0.0", "upnp_version": "1005", "cap1": "0x80500", "capability": "0x20614800", "languages": "0x204", "streams_all": "0x7fff33fd", "streams": "0x7f9831fd", "external": "0x0", "plm_support": "0x0", "preset_key": "6", "spotify_active": "1", "lbc_support": "0", "privacy_mode": "0", "WifiChannel": "11", "RSSI": "0", "BSSID": "", "battery": "0", "battery_percent": "0", "securemode": "0", "auth": "OPEN", "encry": "NONE", "upnp_uuid": "uuid:FF280014-8EBC-4D11-3E9A-BF0AFF280014", "uart_pass_port": "8899", "communication_port": "8819", "web_firmware_update_hide": "0", "ignore_talkstart": "0", "web_login_result": "-1", "silenceOTATime": "", "ignore_silenceOTATime": "1", "new_tunein_preset_and_alarm": "1", "iheartradio_new": "1", "new_iheart_podcast": "1", "tidal_version": "2.0", "service_version": "1.0", "ETH_MAC": "00:00:00:00:00:00", "security": "https\/2.0", "security_version": "2.0" } code goes here

Master

{ "uuid": "FF2800148EBC4D113E9ABF0A", "DeviceName": "Utomhus", "GroupName": "Utomhus", "ssid": "AudioPro_LINK1_F336FC", "language": "en_us", "firmware": "4.6.338249", "hardware": "A28", "build": "release", "project": "AudioPro_LINK1", "priv_prj": "AudioPro_LINK1", "project_build_name": "AudioPro_LINK1", "Release": "20211210", "temp_uuid": "AE1506B80A8DF674", "hideSSID": "1", "SSIDStrategy": "2", "branch": "A31_stable_4.6", "group": "0", "wmrm_version": "4.2", "internet": "1", "MAC": "00:22:6C:F3:36:FC", "STA_MAC": "00:00:00:00:00:00", "CountryCode": "CN", "CountryRegion": "1", "netstat": "3", "essid": "426967426172645F3247", "apcli0": "", "eth2": "192.168.1.170", "ra0": "10.10.10.254", "eth_dhcp": "1", "VersionUpdate": "0", "NewVer": "0", "set_dns_enable": "1", "mcu_ver": "0", "mcu_ver_new": "0", "dsp_ver": "0", "dsp_ver_new": "0", "date": "2025:02:20", "time": "13:48:22", "tz": "1.0000", "dst_enable": "1", "region": "unknown", "prompt_status": "1", "alexa_ver": "20180604", "iot_ver": "1.0.0", "upnp_version": "1005", "cap1": "0x80500", "capability": "0x20614800", "languages": "0x204", "streams_all": "0x7fff33fd", "streams": "0x7f9831fd", "external": "0x0", "plm_support": "0x0", "preset_key": "6", "spotify_active": "1", "lbc_support": "0", "privacy_mode": "0", "WifiChannel": "11", "RSSI": "0", "BSSID": "", "battery": "0", "battery_percent": "0", "securemode": "0", "auth": "OPEN", "encry": "NONE", "upnp_uuid": "uuid:FF280014-8EBC-4D11-3E9A-BF0AFF280014", "uart_pass_port": "8899", "communication_port": "8819", "web_firmware_update_hide": "0", "ignore_talkstart": "0", "web_login_result": "-1", "silenceOTATime": "", "ignore_silenceOTATime": "1", "new_tunein_preset_and_alarm": "1", "iheartradio_new": "1", "new_iheart_podcast": "1", "tidal_version": "2.0", "service_version": "1.0", "ETH_MAC": "00:00:00:00:00:00", "security": "https\/2.0", "security_version": "2.0" }

Slave

{ "uuid": "FF2800148EBC4D113E9ABF0A", "DeviceName": "Utomhus", "GroupName": "Utomhus", "ssid": "AudioPro_LINK1_F336FC", "language": "en_us", "firmware": "4.6.338249", "hardware": "A28", "build": "release", "project": "AudioPro_LINK1", "priv_prj": "AudioPro_LINK1", "project_build_name": "AudioPro_LINK1", "Release": "20211210", "temp_uuid": "AE1506B80A8DF674", "hideSSID": "1", "SSIDStrategy": "2", "branch": "A31_stable_4.6", "group": "1", "master_uuid": "FF28001286AD290976301FD7", "slave_mask": "0", "wmrm_version": "4.2", "internet": "1", "MAC": "00:22:6C:F3:36:FC", "STA_MAC": "00:00:00:00:00:00", "CountryCode": "CN", "CountryRegion": "1", "netstat": "3", "essid": "426967426172645F3247", "apcli0": "", "eth2": "192.168.1.170", "ra0": "10.10.10.254", "eth_dhcp": "1", "VersionUpdate": "0", "NewVer": "0", "set_dns_enable": "1", "mcu_ver": "0", "mcu_ver_new": "0", "dsp_ver": "0", "dsp_ver_new": "0", "date": "2025:02:20", "time": "13:49:55", "tz": "1.0000", "dst_enable": "1", "region": "unknown", "prompt_status": "1", "alexa_ver": "20180604", "iot_ver": "1.0.0", "upnp_version": "1005", "cap1": "0x80500", "capability": "0x20614800", "languages": "0x204", "streams_all": "0x7fff33fd", "streams": "0x7f9831fd", "external": "0x0", "plm_support": "0x0", "preset_key": "6", "spotify_active": "1", "lbc_support": "0", "privacy_mode": "0", "WifiChannel": "11", "RSSI": "0", "BSSID": "", "battery": "0", "battery_percent": "0", "securemode": "0", "auth": "OPEN", "encry": "NONE", "upnp_uuid": "uuid:FF280014-8EBC-4D11-3E9A-BF0AFF280014", "uart_pass_port": "8899", "communication_port": "8819", "web_firmware_update_hide": "0", "ignore_talkstart": "0", "web_login_result": "-1", "silenceOTATime": "", "ignore_silenceOTATime": "1", "new_tunein_preset_and_alarm": "1", "iheartradio_new": "1", "new_iheart_podcast": "1", "tidal_version": "2.0", "service_version": "1.0", "ETH_MAC": "00:00:00:00:00:00", "security": "https\/2.0", "security_version": "2.0" }

The only difference I can see is the added fields in slave (group, master_uuid, slave_mask).