Big Rock

A short but memorable visit to the Casa da Música in Porto.

Farewell, iTunes, Almost

For the past seven years or so, and despite Apple‘s continued neglect of Home Sharing, all our home media was served by iTunes running on a dynasty of Mac minis sitting in a closet (the last being a 2008 Core Duo running Lion). A few months ago I decided to put an end to that and started trying out Plex on a Raspberry Pi 3, belatedly realizing what I’ve been missing out on all these years.

My setup is trivial: The Synology NAS holds all the media, and I get to it via a front-end machine running Plex, which handles all the indexing, transcoding and navigation.

This weekend I replaced the Pi I have been using with something a little beefier: I got a white-label Z83ii mini-PC from eBay, which sports an Intel Atom x5-Z8350–a CPU rather ironically pitched as being for “next generation IoT Edge Devices”.

The Pi 3 sitting on top of the Z83ii

For less than $70 (which is, all things considered, less than twice the cost of a Pi 3 plus a nice box and 2A PSU), I get what is an effective 2x speedup when compared to the Pi 3, which translates into much smoother media transcoding for the Chromecast dongles I’m using at the moment (and the ability to use more than one at a time).

I picked it because it It comes with 32GB of EMMC storage, 2GB of RAM, and a fair selection of IO ports that make it ideal for stuff like digital signage. The Intel 400 integrated graphics are serviceable, but in truth I’m not likely to make much use of anything else except the Gigabit Ethernet port.

Wi-Fi and Bluetooth

Well, almost. I’d love to be able to use Wi-Fi and Bluetooth on this as well, but they’re not detected by the current mainline kernel and reading up on other cheap z83-like machines that use the AP6234 chipset (which is what it’s supposed to have), I surmise the devices’ power_state defaults to off.

In a typical approach of low-end Chinese knock-offs, the BIOS lists two other Broadcom combo chipsets (AP6255 as the default and AP6212 as a second option), but neither comes up in lspci and dmesg isn’t very helpful, although these entries intrigue me:

# dmesg | grep ACPI | grep mmc
[    2.736805] mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
[    2.741507] mmc1: SDHCI controller on ACPI [80860F14:01] using ADMA
[    2.747434] mmc2: SDHCI controller on ACPI [80860F14:03] using ADMA

I’ll keep poking at this, mostly because I’m interested in getting Bluetooth audio to work, but the gist of this setup is doing transcoding, so let’s get to it.

Docker All The Things

The Z83ii shipped with Windows 10 Home (which was actually rather nice), but I hit F7 upon boot and re-imaged it from a USB key with Ubuntu Server 16.04.3, which can deal with the UEFI peculiarities of this box. I then set the BIOS to power it on automatically, and was good to go.

As a side benefit from switching to Intel, I no longer need to use my custom Plex container–I just built a docker-compose file to run the official container image along with a DAAP server for non-UPnP clients, pointed the whole thing at my NAS via SMB, and called it a day:

version: '3'

    image: plexinc/pms-docker:latest
    container_name: plex
    restart: always
    network_mode: "host"
      - ADVERTISE_IP="http://${HOSTNAME}:32400/"
      - PLEX_UID=${USER_ID}
      - PLEX_GID=${GROUP_ID}
      - /etc/localtime:/etc/localtime:ro
      - /dev/rtc:/dev/rtc:ro
      - ./config/plex:/config
      - /tmp/transcode/:/transcode
      - data:/rw/media
      - video:/ro/video
      - music:/ro/music

    image: linuxserver/daapd:latest
    container_name: daapd
    restart: always
    network_mode: "host"
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
      - /etc/localtime:/etc/localtime:ro
      - ./config/daapd:/config
      - music:/music

    driver: local
      type: none
      device: /mnt/plex-data
      o: bind
    driver: local
      type: none
      device: /mnt/music
      o: bind
    driver: local
      type: none
      device: /mnt/video
      o: bind

Incidentally, the above is a decent enough sample of using the Docker local volume driver under compose, which isn’t well covered in the docs right now.

I didn’t run any extensive benchmarks, but Plex now responds instantly regardless of the device(s) used to access it, and all that remains now is sort out the usual kinks where it regards remotes, music streaming and whatnot (which, truth be told, has more to deal with furniture and speakers than anything else).

Home Sharing, Done Right

I know this is atypical in this age of streaming music, but I prefer listening to my own CD collection, and I can finally do it properly again–much to my surprise, forked-daapd can also pair with the Remote app on iOS, through which I can redirect playback to any endpoint, including Chromecasts.

Apple completely broke iOS access to personal libraries when they decided Home Sharing was the future (and then promptly forgot all about it), but with this setup and some experimentation with other services (both Google Play Music and Groove let me access my favorite albums on the go) I suspect I’ll soon be opting out of iCloud Music Library (which I only keep using out of inertia, really).

Ironically, all that’s missing now is a suitable iTunes replacement for the Mac. I’m trying to get used to the Plex Mac app, but in that context I really only want the music bits.

I’d rather the app were fully native rather than a somewhat brittle shell around the Web UI (it takes up too much screen real estate and lacks hotkeys), but I guess I can give iTunes a little more time.

A Long-Term Review of the BQ Prusa i3 Hephestos

Rainy days make for excellent times to revisit hobbies, and yesterday I took the time to do some more hardware stuff–but this time, it was a bit more physical, since I decided to tweak my 3D printing setup a bit and print out a couple of pieces I needed.


The Smallest Azure IoT Hub Client Ever

A few weekends ago I decided to do some hardware stuff, both because I have been wanting to get into HomeKit in earnest (more on that later) but also because I have been working with Azure IoT Hub in a number of engagements and needed a portable setup that made it plain how simple (and cheap) it is to build cloud-enabled sensors.


Eternal September

It's nearly November and it's still summertime for all intents and purposes.

Early Departure

Leaving for Oporto again, in the wee hours.

Steady Hands

Visual inspection of some soldering I did on an ESP-01
Shunting XPD_DCDC and RST lets me put the ESP8266 into "deep sleep", lowering idle consumption to microamperes.