philippe44 / LMS-uPnP

Integrate UPnP players with LogitechMediaServer
108 stars 17 forks source link

LMS-to-uPnP problem with Xiaomi Smart Network Speaker #25

Closed gaetan-dev closed 5 years ago

gaetan-dev commented 6 years ago

Hi,

I have a problem with my Xiaomi Smart Network Speaker, no sound played through my speaker. I following my upnpbridge-log.log:

//----------------------------------------------------- Starting Squeeze2upnp: /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp-armv6hf-static -Z -I -f /var/log/squeezeboxserver/upnpbridge.log -x /var/lib/squeezeboxserver/prefs/upnpbridge.xml [00:06:51.998149] main:1484 Starting squeeze2upnp version: v0.3.0.7 (May 27 2018 @ 13:04:47) [00:06:52.001068] Start:1262 Binding to 192.168.1.10:49154 [00:06:52.270137] AddMRDevice:1158 [0x1699a8]: adding renderer (小米互联网音箱(580153617)) [00:06:52.284195] MasterHandler:847 [0x1699a8]: subscribe success [00:06:52.285689] slimproto:951 squeezelite [0xf1930] <=> player [0x1699a8] [00:06:52.286102] slimproto:952 [0xf1930] connecting to 192.168.1.10:3483 [00:06:52.286613] slimproto:983 [0xf1930] connected [00:06:52.286756] sendHELO:124 [0xf1930] cap: Model=squeezelite,ModelName=SqueezeLite,AccuratePlayPoints=0,HasDigitalOut=1,MaxSampleRate=48000,pcm,flc,mp3 [00:06:52.355839] process_strm:226 [0xf1930] strm command s [00:06:52.356059] process_strm:298 [0xf1930], strm s autostart: 1 transition period: 10 transition type: 0 codec: p [00:06:52.356144] sendSTAT:157 [0xf1930]: STAT:[STMf] msplayed 0 [00:06:52.390843] bind_socket:535 cannot bind socket 10 [00:06:52.391109] bind_socket:535 cannot bind socket 10 [00:06:52.391597] process_strm:378 [0xf1930]: codec:p, ch:2, s:16, r:44100 [00:06:52.392289] sendSTAT:157 [0xf1930]: STAT:[STMc] msplayed 0 [00:06:52.392562] sendSTAT:157 [0xf1930]: STAT:[STMn] msplayed 0 [00:06:52.492462] output_thread:264 [0xf1930]: completed: 0 bytes (gap 0) [00:06:52.492916] output_flush:329 [0xf1930]: terminating output thread [00:06:52.493192] sendSTAT:157 [0xf1930]: STAT:[STMf] msplayed 0 [00:06:52.493513] AVTStop:217 [0x1699a8]: uPNP stop (cookie (nil)) [00:06:52.510379] process_strm:226 [0xf1930] strm command s [00:06:52.510628] process_strm:298 [0xf1930], strm s autostart: 1 transition period: 10 transition type: 0 codec: p [00:06:52.510731] sendSTAT:157 [0xf1930]: STAT:[STMf] msplayed 0 [00:06:52.548726] bind_socket:535 cannot bind socket 10 [00:06:52.548997] bind_socket:535 cannot bind socket 10 [00:06:52.549317] sq_callback:288 [0x1699a8]: artist:Jeezy album:Let's Get It: Thug Motivation 101 (Explicit Version) title:Trap Star genre:[no genre] duration:232.106 size:0 cover:https://i.scdn.co/image/0a17954db112e89e304231d12d6828a5bced571e [00:06:52.549489] sq_callback:315 [0x1699a8]: current URI set http://192.168.1.10:49155/bridge-2.wav [00:06:52.549811] AVTSetURI:91 [0x1699a8]: uPNP setURI http://192.168.1.10:49155/bridge-2.wav (cookie 0x1) [00:06:52.550638] process_strm:378 [0xf1930]: codec:p, ch:2, s:16, r:44100 [00:06:52.551210] sendSTAT:157 [0xf1930]: STAT:[STMc] msplayed 0 [00:06:53.552162] AVTSetPlayMode:167 [0x1699a8]: uPNP set play mode (cookie 0x2) [00:06:53.552765] AVTPlay:151 [0x1699a8]: uPNP play (cookie 0x3) [00:06:53.552990] CtrlSetMute:282 [0x1699a8]: uPNP mute 0 (cookie 0x3) [00:06:53.553433] CtrlSetVolume:253 [0x1699a8]: uPNP volume 30 (cookie 0x4) [00:06:53.662223] output_thread:78 [0xf1930]: got HTTP connection 14 [00:06:53.665812] handle_http:372 [0xf1930]: received GET /bridge-2.wav HTTP/1.1 [00:06:53.666058] handle_http:375 [0xf1930]: HTTP headers Host: 192.168.1.10:49155 User-Agent: VLC/2.2.0-git LibVLC/2.2.0-git Range: bytes=0- Connection: close Cookie: (null) Icy-MetaData: 1

HTTP/1.1 200 OK Server: squeezebox-bridge Connection: close Content-Type: audio/wav Transfer-Encoding: chunked

[00:06:53.684395] read_line:675 fd: 14 read error: Connection reset by peer [00:06:53.684680] http_parse:599 cannot read method [00:06:53.684766] handle_http:367 [0xf1930]: http parsing error (null) [00:06:53.684832] output_thread:129 [0xf1930]: HTTP close 14 (bytes 87776) (n:2 res:0) [00:06:53.690481] output_thread:78 [0xf1930]: got HTTP connection 14 [00:06:53.693442] handle_http:372 [0xf1930]: received GET /bridge-2.wav HTTP/1.1 [00:06:53.693784] handle_http:375 [0xf1930]: HTTP headers Host: 192.168.1.10:49155 User-Agent: VLC/2.2.0-git LibVLC/2.2.0-git Range: bytes=40943540- Connection: close Cookie: (null) Icy-MetaData: 1

HTTP/1.1 206 Partial Content Server: squeezebox-bridge Connection: close Content-Type: audio/wav Transfer-Encoding: chunked

[00:06:53.694342] output_thread:122 [0xf1930]: tail pos 40943540 (need -40855764) [00:06:53.694412] output_thread:129 [0xf1930]: HTTP close 14 (bytes 87776) (n:1 res:0) [00:06:53.700168] output_thread:78 [0xf1930]: got HTTP connection 14 [00:06:53.702394] handle_http:372 [0xf1930]: received GET /bridge-2.wav HTTP/1.1 [00:06:53.702611] handle_http:375 [0xf1930]: HTTP headers Host: 192.168.1.10:49155 User-Agent: VLC/2.2.0-git LibVLC/2.2.0-git Range: bytes=32981- Connection: close Cookie: (null) Icy-MetaData: 1

HTTP/1.1 206 Partial Content Server: squeezebox-bridge Connection: close Content-Type: audio/wav Transfer-Encoding: chunked

[00:06:53.703033] output_thread:122 [0xf1930]: tail pos 32981 (need 54795) [00:06:53.797804] _SyncNotifState:475 [0x1699a8]: uPNP transition [00:07:05.744277] handle_http:367 [0xf1930]: http parsing error (null) [00:07:05.744500] output_thread:129 [0xf1930]: HTTP close 14 (bytes 87776) (n:2 res:0) [00:07:05.746115] output_thread:78 [0xf1930]: got HTTP connection 14 [00:07:05.749477] handle_http:372 [0xf1930]: received GET /bridge-2.wav HTTP/1.1 [00:07:05.749576] handle_http:375 [0xf1930]: HTTP headers Host: 192.168.1.10:49155 User-Agent: VLC/2.2.0-git LibVLC/2.2.0-git Range: bytes=32981- Connection: close Cookie: (null) Icy-MetaData: 1

HTTP/1.1 206 Partial Content Server: squeezebox-bridge Connection: close Content-Type: audio/wav Transfer-Encoding: chunked //-----------------------------------------------------

My config:

Thank you in advance for your answer.

philippe44 commented 6 years ago

Can't rememeber if I answered you somewhere else :-) but probably you need to set HTTP mode to "no length"

philippe44 commented 6 years ago

Closed for inactivity

fabdav6 commented 6 years ago

Hi philippe44, I have the same problem with my Xiaomi Smart Network Speaker. My speaker is connected with LMS but there are no sound. I can't set HTTP mode "no length", it's empty.

My Config LMS on Synology : 7.9.0 Thank you in advance for your answer.

philippe44 commented 6 years ago

I need to know a bit more: what file are you trying to send: local, remote, format. Then I need a log as above

fabdav6 commented 6 years ago

Hi, MP3 Music is on my Synology server and I use my phone with Squeezer to play. This log when I restart service : [21:40:04.005155] sendSTAT:160 [0x82c8f40]: STAT:[STMt] msplayed 15000 [21:40:05.007139] sendSTAT:160 [0x82c8f40]: STAT:[STMt] msplayed 15000 [21:40:05.659564] UpdateThread:974 [0x83454c0] UPnP keep alive: Chambre Mathis [21:40:05.939855] Stop:1294 stopping squeezelite devices ... [21:40:05.939944] slimproto_close:931 [0x82c8f40] slimproto stop for Chambre Mathis [21:40:06.055283] shutdown_socket:383 closed socket 11 [21:40:06.055365] output_http_thread:374 [0x82c8f40]: end thread 0 (64801 bytes) [21:40:06.056199] output_flush:458 [0x82c8f40]: flush output buffer [21:40:06.056262] output_close:508 [0x82c8f40] close media renderer [21:40:06.056272] decode_close:187 close decode [21:40:06.063304] stream_close:337 [0x82c8f40] close stream [21:40:06.109512] Stop:1298 terminate update thread ... [21:40:06.109786] Stop:1303 terminate main thread ... [21:40:06.109934] Stop:1307 stopping UPnP devices ... [21:40:06.109947] AVTStop:217 [0x83454c0]: uPNP stop (cookie 0x8c) [21:40:06.157616] CheckAndLock:241 device is NULL [21:40:06.553228] Stop:1310 un-register libupnp callbacks ... [21:40:06.553434] Stop:1312 end libupnp ...

Starting Squeeze2upnp: /volume1/@appstore/SqueezeCenter/Cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp-x86 -Z -I -f /volume1/@appstore/SqueezeCenter/Logs/upnpbridge.log -d all=debug -x /volume1/@appstore/SqueezeCenter/prefs/upnpbridge.xml

Retarting Squeeze2upnp after crash: /volume1/@appstore/SqueezeCenter/Cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp-x86-static -Z -I -f /volume1/@appstore/SqueezeCenter/Logs/upnpbridge.log -d all=debug -x /volume1/@appstore/SqueezeCenter/prefs/upnpbridge.xml [21:40:16.872749] main:1492 Starting squeeze2upnp version: v1.0.0 (Aug 2 2018 @ 19:04:20) [21:40:16.874169] register_mad:430 using mad to decode mp3 [21:40:16.874208] register_faad:641 using faad to decode aac [21:40:16.874217] register_vorbis:344 using vorbis to decode ogg [21:40:16.874226] register_pcm:274 using pcm [21:40:16.874234] register_flac:287 using flac to decode flc [21:40:16.874242] register_flac_thru:247 using flac [21:40:16.874249] register_thru:106 using thru [21:40:16.874257] register_soxr:394 using soxr for resampling [21:40:16.874265] Start:1271 Binding to 192.168.0.10:49152 [21:40:23.420935] AddMRDevice:1167 [0x83454c0]: adding renderer (Chambre Mathis) [21:40:23.420995] GetProtocolInfo:337 [0x83454c0]: uPNP GetProtocolInfo [21:40:23.442661] GetProtocolInfo:348 [0x83454c0]: ProtocolInfo http-get::audio/dsd:,http-get::audio/wav:,http-get::audio/wave:,http-get::audio/x-wav:,http-get::audio/x-aiff:,http-get::audio/mpeg:,http-get::audio/mpegurl:,http-get::audio/x-mpeg:,http-get::audio/mp1:,http-get::audio/aac:,http-get::audio/flac:,http-get::audio/x-flac:,http-get::audio/m4a:,http-get::audio/mp4:,http-get::audio/x-m4a:,http-get::audio/vorbis:,http-get::audio/ogg:,http-get::audio/x-ogg:,http-get::audio/x-scpls: [21:40:23.442929] stream_thread_init:307 [0x82c8f40] streambuf size: 524288 [21:40:23.443318] output_init:463 [0x82c8f40] init output media renderer [21:40:23.443348] decode_thread_init:162 [0x82c8f40]: init decode [21:40:23.443387] resample_init:345 [0x82c8f40]: resampling sync recipe: 0x00, flags: 0x00, scale: 0.89, precision: 0.0, passband_end: 0.00000, stopband_begin: 0.00000, phase_response: -1.0 [21:40:23.443434] discover_server:809 [0x82c8f40] sending discovery [21:40:23.443439] UpdateThread:1028 Updating configuration /volume1/@appstore/SqueezeCenter/prefs/upnpbridge.xml [21:40:23.443999] discover_server:838 [0x82c8f40] got response from: 192.168.0.10:3483 [21:40:23.444025] slimproto:861 squeezelite [0x82c8f40] <=> player [0x83454c0] [21:40:23.444034] slimproto:862 [0x82c8f40] connecting to 192.168.0.10:3483 [21:40:23.444244] slimproto:893 [0x82c8f40] connected [21:40:23.444259] sendHELO:126 [0x82c8f40] mac: bb:bb:c8:f3:47:f1 [21:40:23.444268] sendHELO:127 [0x82c8f40] cap: Model=squeezelite,ModelName=SqueezeLite,AccuratePlayPoints=0,HasDigitalOut=1,MaxSampleRate=48000,flc,aif,pcm,mp3 [21:40:23.445847] process:491 [0x82c8f40] strm [21:40:23.445945] process_strm:232 [0x82c8f40] strm command q [21:40:23.445954] decode_flush:202 [0x82c8f40]: decode flush [21:40:23.445961] output_flush:458 [0x82c8f40]: flush output buffer [21:40:23.445970] sq_callback:273 [0x83454c0]: device off or not controlled by LMS [21:40:23.446297] process:491 [0x82c8f40] strm [21:40:23.446313] process_strm:232 [0x82c8f40] strm command q [21:40:23.446319] decode_flush:202 [0x82c8f40]: decode flush [21:40:23.446326] output_flush:458 [0x82c8f40]: flush output buffer [21:40:23.446553] process:491 [0x82c8f40] setd [21:40:23.446603] sendSETDName:218 [9]: set playername: Chambre Mathis [21:40:23.446659] process:491 [0x82c8f40] setd [21:40:23.446672] process:491 [0x82c8f40] aude [21:40:23.446679] process_aude:383 [0x82c8f40] on/off using aude 0 [21:40:23.446688] sq_callback:269 [0x83454c0]: device set on/off 0 [21:40:23.446696] sq_callback:273 [0x83454c0]: device off or not controlled by LMS [21:40:23.446762] process:491 [0x82c8f40] audg [21:40:23.446771] process_audg:397 [0x82c8f40] (old) audg gainL: 0 gainR: 0 [21:40:23.446778] sq_callback:273 [0x83454c0]: device off or not controlled by LMS [21:40:23.462564] MasterHandler:856 [0x83454c0]: subscribe success [21:40:25.435951] UpdateThread:974 [0x83454c0] UPnP keep alive: Chambre Mathis [21:40:28.002839] process:491 [0x82c8f40] strm [21:40:28.002904] process_strm:232 [0x82c8f40] strm command t [21:40:28.002913] sendSTAT:160 [0x82c8f40]: STAT:[STMt] msplayed 0 [21:40:33.004739] process:491 [0x82c8f40] strm [21:40:33.004833] process_strm:232 [0x82c8f40] strm command t [21:40:33.004842] sendSTAT:160 [0x82c8f40]: STAT:[STMt] msplayed 0 [21:40:36.001277] UpdateThread:912 Presence checking [21:40:38.002838] process:491 [0x82c8f40] strm [21:40:38.002906] process_strm:232 [0x82c8f40] strm command t [21:40:38.002915] sendSTAT:160 [0x82c8f40]: STAT:[STMt] msplayed 0

philippe44 commented 6 years ago

Don't set extra debug info, that's too much for now and I miss the important logs. I need to see what's happenign when you try to play something

fabdav6 commented 6 years ago

Starting Squeeze2upnp: /volume1/@appstore/SqueezeCenter/Cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp-x86-static -Z -I -f /volume1/@appstore/SqueezeCenter/Logs/upnpbridge.log -x /volume1/@appstore/SqueezeCenter/prefs/upnpbridge.xml [08:53:09.767731] main:1492 Starting squeeze2upnp version: v1.0.0 (Aug 2 2018 @ 19:04:20) [08:53:09.773516] Start:1271 Binding to 192.168.0.10:49153 [08:53:12.328101] AddMRDevice:1167 [0x83454c0]: adding renderer (Chambre Mathis) [08:53:12.354688] slimproto:861 squeezelite [0x82c8f40] <=> player [0x83454c0] [08:53:12.354926] slimproto:862 [0x82c8f40] connecting to 192.168.0.10:3483 [08:53:12.355040] slimproto:893 [0x82c8f40] connected [08:53:12.355137] sendHELO:127 [0x82c8f40] cap: Model=squeezelite,ModelName=SqueezeLite,AccuratePlayPoints=0,HasDigitalOut=1,MaxSampleRate=48000,flc,aif,pcm,mp3 [08:53:12.370453] MasterHandler:856 [0x83454c0]: subscribe success [08:53:31.784590] AVTStop:217 [0x83454c0]: uPNP stop (cookie (nil)) [08:53:31.921274] process_strm:229 [0x82c8f40] strm command s [08:53:31.921340] process_strm:298 [0x82c8f40], strm s autostart: 1 transition period: 10 transition type: 0 codec: m [08:53:31.921350] sendSTAT:160 [0x82c8f40]: STAT:[STMf] msplayed 0 [08:53:31.943347] sq_get_metadata:393 [0x82c8f40]: cannot get metadata [08:53:31.943443] bind_socket:358 cannot bind socket 10 [08:53:31.943465] output_start:80 [0x82c8f40]: start thread 0 [08:53:31.943505] sq_callback:297 [0x83454c0]: artist: album: title:Streaming from LMS genre: duration:0.000 size:0 cover: offset:0 [08:53:31.943522] sq_callback:324 [0x83454c0]: current URI set http://192.168.0.10:49154/bridge-1.mp3 [08:53:31.943584] AVTSetURI:91 [0x83454c0]: uPNP setURI http://192.168.0.10:49154/bridge-1.mp3 (cookie 0x1) [08:53:31.943784] process_start:1146 [0x82c8f40]: codec:*, ch:0, s:0, r:0 [08:53:31.943874] sendSTAT:160 [0x82c8f40]: STAT:[STMc] msplayed 0 [08:53:31.997517] AVTSetPlayMode:167 [0x83454c0]: uPNP set play mode (cookie 0x2) [08:53:31.997671] AVTPlay:151 [0x83454c0]: uPNP play (cookie 0x3) [08:53:31.997703] CtrlSetMute:282 [0x83454c0]: uPNP mute 0 (cookie 0x3) [08:53:31.997780] CtrlSetVolume:253 [0x83454c0]: uPNP volume 11 (cookie 0x4) [08:53:32.241616] output_http_thread:133 [0x82c8f40]: got HTTP connection 20 [08:53:32.241703] output_http_thread:175 [0x82c8f40]: drain is 131072 (waited 297) [08:53:32.249274] handle_http:403 [0x82c8f40]: received GET /bridge-1.mp3 HTTP/1.1 [08:53:32.249349] handle_http:406 [0x82c8f40]: HTTP headers Host: 192.168.0.10:49154 User-Agent: VLC/2.2.0-git LibVLC/2.2.0-git Range: bytes=0- Connection: close Cookie: (null) Icy-MetaData: 1

HTTP/1.1 200 OK Server: squeezebox-bridge Connection: close icy-metaint: 32000 Content-Type: audio/mpeg Transfer-Encoding: chunked

[08:53:32.258273] read_line:550 fd: 20 read error: Connection reset by peer [08:53:32.258332] http_parse:474 cannot read method [08:53:32.258340] handle_http:398 [0x82c8f40]: http parsing error (null) [08:53:32.258347] output_http_thread:197 [0x82c8f40]: HTTP close 20 (bytes 15922) (n:2 res:0) [08:53:33.000237] sq_get_metadata:393 [0x82c8f40]: cannot get metadata [08:53:38.002582] send_packet:103 failed writing to socket: 32, Broken pipe [08:53:38.002646] sq_get_metadata:393 [0x82c8f40]: cannot get metadata [08:53:43.003529] send_packet:103 failed writing to socket: 32, Broken pipe [08:53:43.003605] sq_get_metadata:393 [0x82c8f40]: cannot get metadata

philippe44 commented 6 years ago

Do you have a password on LMS? There are a lot of issues with my bridge when it cannot access to LMS control interface.

Do you have the same issue when you play flac instead of mp3? If not, you can try to disable icy metadata. There is as potential problem with this "sort" of speakers and mp3+icymetadata. I'm working and this one and hope to have a solution in the coming days

See as well https://forums.slimdevices.com/showthread.php?103728-Announce-UPnPBridge-integrate-UPnP-DLNA-players-with-LMS-(squeeze2upnp)&p=918318&viewfull=1#post918318

fabdav6 commented 6 years ago

Hi, thank you very much. I disable metadata and now it works ! Thanks

philippe44 commented 6 years ago

Good - can you give me the exact reference of that speaker so I can get one and understand what’s happening?

fabdav6 commented 6 years ago

Hi, it's a Xiaomi Mi Wifi Smart Network. Link Gearbest

philippe44 commented 5 years ago

Closed for inactivity

fthc59 commented 5 years ago

bonjour, voilà j'utilisais trois enceintes xiaomi network speaker avec votre plugin, jamais aucun soucis, merci pour votre travail. mais depuis que j'ai mis à jour deux d'entre elles (oui je n'aurais pas dû) celles-ci même si elles sont visibles par le bridge, incapable d'envoyer une musique dessus, j'ai modifié le http type en "no lenght" et retiré le send ICY metadata comme préconisé mais rien à faire. Pourtant en utilisant une application android sur mon smartphone pour tester (mediaHouse Upnp/DLNA) celles-ci fonctionne avec . Du coup je n'ai plus qu'une enceinte de fontionnelle sur les trois, j'ai testé tous les modèles du plugin mais aucune config ne semble marcher. avaez vous une idée ? merci par avance