Display screen for WiiM pro

@cc_rider I have your app running on Raspi 3, with official touchscreen, works just fine., thanks for the work on this. except, now with Roon ready working, it doesn't update images when using Roon.. The Wiim app does, and other sources work (Qubuz, LMS). Perhaps its something on the wiim side and not with your useful addition.

thanks
 
@cc_rider I have your app running on Raspi 3, with official touchscreen, works just fine., thanks for the work on this. except, now with Roon ready working, it doesn't update images when using Roon.. The Wiim app does, and other sources work (Qubuz, LMS). Perhaps its something on the wiim side and not with your useful addition.

thanks
I don't have Roon, but if you could install UPnP Tool app on Android or iOS, then drill down into your WiiM AVTransport -> GetMediaInfo -> CurrentURIMetadata, you will see a long XML string. Long tap on that to see "Copy to Clipboard". You should see this tag:

XML:
<upnp:albumArtURI>https://resources.tidal.com/images/ad64736b/6e00/41e6/80bc/ecc645f7a740/640x640.jpg</upnp:albumArtURI>
Let me know what the URL inside the tag looks like when playing a track from Roon.
 
Last edited:
I don't have Roon, but if you could install UPnP Tool app on Android or iOS, then drill down into your WiiM AVTransport -> GetMediaInfo -> CurrentURIMetadata, you will see a long XML string. Long tap on that to see "Copy to Clipboard". You should see this tag:

XML:
<upnp:albumArtURI>https://resources.tidal.com/images/ad64736b/6e00/41e6/80bc/ecc645f7a740/640x640.jpg</upnp:albumArtURI>
Let me know what the URL inside the tag looks like when playing a track from Roon.
Hi, I get as far as this, but perhaps I'm not using the UpnP Tool correctly, do I specify an instance ID
 

Attachments

  • IMG_0817.PNG
    IMG_0817.PNG
    129 KB · Views: 6
Hi, I get as far as this, but perhaps I'm not using the UpnP Tool correctly, do I specify an instance ID
Yes, enter 0, then click Invoke at top right

Edit: Also, make sure you're connecting directly to the WiiM, not to the virtual WiiM on your LMS server.
 
Last edited:
Last weekend I got the project of retired-guy running.
A bit of a steep learning curve for me on image processing + as Python noob.

Got it working with a Wiim Mini + 7-inch Waveshare display ("1024x600"; rgba565 mode) running on a RPi B model (bullseye).

Now it's working I gonna port the setup to a non-touch 7-inch WS display (with RGB LCD HAT hat) on a RPi ZeroW.
Will result in a more compact solution.
The display using now was a HMDI touchscreen actually bought for another project.

Issues I tackled:
- Kiosk mode to prevent console logging + blinking cursor; now boots 'in black' + no cursor
- async_ssdp_search search_target changed to wiim id because there is another Wiim in my network
- RGBA -> RGB565 image conversion; WS display was out of the box in RGB565 format, didn't know how to change that

Todo: Search for a nice case or build one myself

wswiim_s.jpg
 
Last edited:
Hello,

I followed these instructions, but when calling wiim.py I get this error message:

Code:
Traceback (most recent call last):
  File "./wiim.py", line 477, in <module>
    main()
  File "./wiim.py", line 469, in main
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "./wiim.py", line 455, in async_main
    wiim_description_url = await search()
  File "./wiim.py", line 444, in search
    async_callback=on_response,
TypeError: async_search() got an unexpected keyword argument 'service_type'

How can I fix this?

TIA
 
Hello,

I followed these instructions, but when calling wiim.py I get this error message:

Code:
Traceback (most recent call last):
  File "./wiim.py", line 477, in <module>
    main()
  File "./wiim.py", line 469, in main
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "./wiim.py", line 455, in async_main
    wiim_description_url = await search()
  File "./wiim.py", line 444, in search
    async_callback=on_response,
TypeError: async_search() got an unexpected keyword argument 'service_type'

How can I fix this?

TIA
Try replacing parameter name 'service-type' with 'search_target'
 
done. wiim.py is running, but now I got:

Code:
Traceback (most recent call last):
  File "./wiim.py", line 477, in <module>
    main()
  File "./wiim.py", line 469, in main
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "./wiim.py", line 462, in async_main
    await pollingloop(wiim_description_url, service)
  File "./wiim.py", line 331, in pollingloop
    service = service_from_device(device, service_name)
  File "./wiim.py", line 308, in service_from_device
    if service_name in (service.search_target, part, abbr):
AttributeError: 'UpnpService' object has no attribute 'search_target'

Apparently another customisation needs to be made for my WiiM Pro, wiim.py is looking for a WiiM mini?
 
Ok,

in this line

Code:
if service_name in (service.service_type, part, abbr):

service_type must be maintained.

But then:

....49152/description.xml
seek error: [Errno 28] No space left on device

??

Code:
df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  3.1G   11G  23% /
devtmpfs        447M     0  447M   0% /dev
tmpfs           480M     0  480M   0% /dev/shm
tmpfs           480M   13M  468M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           480M     0  480M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   30M  223M  12% /boot
tmpfs            96M  4.0K   96M   1% /run/user/1000
 
done. wiim.py is running, but now I got:

Code:
Traceback (most recent call last):
  File "./wiim.py", line 477, in <module>
    main()
  File "./wiim.py", line 469, in main
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "./wiim.py", line 462, in async_main
    await pollingloop(wiim_description_url, service)
  File "./wiim.py", line 331, in pollingloop
    service = service_from_device(device, service_name)
  File "./wiim.py", line 308, in service_from_device
    if service_name in (service.search_target, part, abbr):
AttributeError: 'UpnpService' object has no attribute 'search_target'

Apparently another customisation needs to be made for my WiiM Pro, wiim.py is looking for a WiiM mini?

I got:

await async_ssdp_search(
search_target=udn,
source=source,
target=target,
timeout=timeout,
async_callback=on_response,
)

where 'udn' is my wiim id (uuid)
 
Ok,

in this line

Code:
if service_name in (service.service_type, part, abbr):

service_type must be maintained.

But then:

....49152/description.xml
seek error: [Errno 28] No space left on device

??

Code:
df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  3.1G   11G  23% /
devtmpfs        447M     0  447M   0% /dev
tmpfs           480M     0  480M   0% /dev/shm
tmpfs           480M   13M  468M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           480M     0  480M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   30M  223M  12% /boot
tmpfs            96M  4.0K   96M   1% /run/user/1000
 
The 'no space left on device' is probably due to the 1024x600 with linelength of 2048.
When using 'fbdev -i' command you get the screen details + linelength info.

To fix this you need to modify the fb.seek and fb.write command.
Every '4 *' need to be replace with '2 *'.

After that if your display uses RGB565 format you also need to convert the RGBA images to RGB565 format.
'swap_redblue' Is not needed then.
 
Many thanks for your help. :)

I think it helps if I describe my setup a little bit:

I am trying to realise the project on an rpi 3 with the "official" 7"-display using this image: 2021-05-07-raspios-buster-arm64.img. Admittedly, these are not the components used in the project. There may still be some adjustments to be made. I don't know. ;)
 
Many thanks for your help. :)

I think it helps if I describe my setup a little bit:

I am trying to realise the project on an rpi 3 with the "official" 7"-display using this image: 2021-05-07-raspios-buster-arm64.img. Admittedly, these are not the components used in the project. There may still be some adjustments to be made. I don't know. ;)

Ok. I've used the bullseye release on the raspberry pi.
With the Waveshare 7 inch LCD (touch) display via HDMI. Hardware specs should be the same.

Things can be different though regarding to Rpi OS install + config.txt setup.

But that error msg you've got ('no space on device') was the same I got.
Reason for me was that the framebuffer addressed in code is out of bounds: 1024x600, linebuffer 2048 with RGB565.
Please check your cmd 'fbdev -i' output.
 
Hm,

Code:
pi@raspberrypi:~/wiim $ fbdev -i
-bash: fbdev: command not found
pi@raspberrypi:~/wiim $ sudo fbdev -i
sudo: fbdev: command not found

using this image: 2023-12-05-raspios-bullseye-arm64-lite.img
 
Hm,

Code:
pi@raspberrypi:~/wiim $ fbdev -i
-bash: fbdev: command not found
pi@raspberrypi:~/wiim $ sudo fbdev -i
sudo: fbdev: command not found

using this image: 2023-12-05-raspios-bullseye-arm64-lite.img
Sorry my mistake. it must be the ‘fbset’ cmd
 
Many thanks for your help. :)

I think it helps if I describe my setup a little bit:

I am trying to realise the project on an rpi 3 with the "official" 7"-display using this image: 2021-05-07-raspios-buster-arm64.img. Admittedly, these are not the components used in the project. There may still be some adjustments to be made. I don't know. ;)
Now behind a computer helps me more understanding your setup :).

The 'official' Rpi 7" display has indeed other specs than the WS 7" display.

So the 'fbset' should help understanding current settings/config of the display.
There are also options to changing the resolution/config of the display depending on which configurations are available.

My WS displays shows
mode "1024x600"
geometry 1024 600 1024 600 16
timings 0 0 0 0 0 0 0
accel true
rgba 5/11,6/5,5/0,0/0
endmode

Images in the python code are created in full color depth but my WS display is in 16bit color depth (RGB565)
So in my case Image conversion was needed.

Looks like your pi display has a full color depth (RGB888) which shouldn't need a bitmap conversion.
But the 800x600 resolution instead of 1024x600 will need some Image scaling.
 
Ok, let's have a look on it:

Code:
fbset -i

mode "800x480"
    geometry 800 480 800 480 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24
endmode

Frame buffer device information:
    Name        : simple
    Address     : 0x3ea81000
    Size        : 1536000
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 0
    YPanStep    : 0
    YWrapStep   : 0
    LineLength  : 3200
    Accelerator : No

How must these values be used and where?
 
Back
Top