Category: Blog
Raspberry Pi Whole Home Audio ā The Conclusion?
Welcome to what is possibly the concluding post in my Raspberry Whole Home
Audio Project series of postsā¦ or possibly not.
At the start of this journey I had a plan to install mopidy on one of my Raspberry Pis and use pulse
audio to stream the output to the others. Along the way I ran into some challenges
stemming from me buying the cheapest peripherals I could (and subsequently needing
to upgrade the WiFi adapters and power cables I first bought to better ones),
and my vision evolved as things progressed.
Instead of using mopidy, I switched to installing Kodi on each of the Pis thanks to the OpenElec linux distribution thatās available for
several types of hardware, the Pi included.
Kodi, as a full-blown media centre system, might seem like a
bit of an odd choice for a headless device (i.e. something with no attached
display), but itās the right choice for me for a couple of reasons.
- I already have it installed on a couple of PCs
in the house, attached to the TVs in the living room and the bedroom - I already have a remote
control app for it on my phone - There are plugins for a bunch of stuff, such as this one for my favourite music streaming service. Well written
plugins integrate perfectly with the system, and the remote control app. - It has built-in support for acting as an airplay
receiver
For me, these things combine to provide me with the best of
both worlds. If I just want to play music from my library or from an internet
streaming service on one set of speakers, then I fire up the remote app and
target the particular device I want to output from.
If I want to play the same thing on several (or all) the
devices at the same time, then I fire up TuneBlade
on my laptop and any sounds that would usually come out of its speakers get
redirected to all the airplay receivers.
When it works, itās glorious. Having the same music playing
in sync on all the speakers in the apartment is awesome.
The problem is that it doesnāt always work. TuneBlade
includes a setting that lets you set how much of a buffer you want. If you set
it too high the devices wonāt synchronize because it will take a slightly
different amount of time to fill the buffer on each of them. I have it set to
zero, which works amazingly well most of the time but leaves me especially
prone to blips in network connectivity and bandwidth. When these occur, things
get out of sync (which sounds terrible, because each set of speakers is not all
that far away from its neighbours), and it canāt seem to automatically recover ā
I have to manually disconnect and reconnect the affected player to get it back
in sync with its peers.
The bottom line then is that my setup is good, but not
perfect. Itās no Sonos.
The search for a perfect system will likely continue, but
for the time being Iām pretty content. I spent less than $100, and I have a
setup that would have cost me $5,000 from them.
How do I join two subnets without the ability to change the default gateway?
Anybody
know some stuff about Linux and Windows networking and routing and want to help me out?
How do I join two subnets without the ability to change the default gateway?
The Golden Ratio: Design’s Biggest Myth
The other day I watched a Criminal Minds episode where the BAUĀ rescued some potential victims of a serial killer mathematician by using the golden ratio and the related Fibonacci sequence (or rather, by identifying and understanding the killerās use of them).
It was an interesting episode. When I decided I wanted to read a little more about the golden ratio I found the article linked above, and that was an interesting read too.
Iāve used the golden ratio in design (indeed, if youāre reading this by visiting my site on a large-screened device then the proportions of the left and right columns match the golden ratio).
Is it more aesthetically pleasing than different proportions would be? Thatās the problem with things like this that are said to impact us at a subconscious level, my conscious mind doesnāt know.
I posted this to shrapnel last weekend as part of my recurring late night links series, but itās worthy of inclusion here too.
Happy Friday, everyone!
(Source)
I posted this to shrapnel last weekend as part of my recurring late night links series, but itās worthy of inclusion here too.
Happy Friday, everyone!
(Source)
WebDAV Woes with Nginx, Sabre/Dav
Iām in the process of moving my hosting to a new server,
because I wanted one that offers me more flexibility, and the ability to grow
the server and add resources to it during spikes in demand. Iāve chosen to go
with Vultr (I recorded
a screencast about six weeks ago showing how easy it is to set up a new
server on their platform). Iāve also moved some non-essential hosting duties to
another provider altogether, CloudAtCost.
Anyway, this is not really my point.
One of the things on the server Iām going to be decommissioning
is a private WebDAV store. I donāt use it for much, just moving the occasional
file between computers and āpublishingā my work Outlook calendar so that I can subsequently
synchronize it back to my Google calendar and get notifications
on my wrist. Itās the WebDAV server that Iāve been setting up this week.
Most of the stuff that Iām moving to new servers is being
moved as-is: this is not an exercise in updating stuff, itās about making sure
Iām done with the old server by the time my lease on it expires, but there were
some things about the WebDAV share that I really wanted to update, so I took
the opportunity.
The main thing I wanted to achieve was to use my Windows
domain username and password on the site. Most of my password-protected web
tools are already set up that way, but the WebDAV share was lagging behind.
Since this means I have to use ābasicā
authentication instead of the ādigestā authentication I previously had set
up this posed another problem. Windowsā built-in WebDAV client doesnāt allow
basic authentication on unencrypted connections (because that means the
password is sent in the clear), so I had an SSL certificate issued. Then I
found out that the Windows WebDAV client doesnāt support server name
identification, which meant some additional reconfiguration, and since I
was doing that I figured I may as well take the opportunity to update to the
latest version of sabre/dav, which is the
PHP-based WebDAV server I use (I find it much easier to set this up than to use
the built-in WebDAV functionality on web server software, which Iāve never been
able to get working no matter which server software Iām using).
I set all this up this week, tested it out by adding
it as a network location on my personal and work laptops, and, once I was
satisfied it was all working well, pointed the domain name at the new server
and deleted the files from the old one.
Then I fired up Outlook, and hit the button to publish my
calendar.
It didnāt work.
It ended up creating a file with the right name, but a size
of zero bytes. A quick google search revealed there could be many reasons for this, and since Iād
made the rookie mistake of changing everything
I really didnāt know where to start, not to mention that by this time Iād
deleted the original files and so I couldnāt go backward. I tried everything,
with no success. I spent a good chunk of my day on Tuesday troubleshooting.
All along Iād been convinced that the issue was with sabre/dav.
After all, all the other server functionality was working, so what other
explanation could there be for the one bit of it that sabre/dav was responsible
for being non-functional?
After a few hours though I was pretty sure that I had it set
up correctly, and I was convinced that Iād either found a bug in sabre/dav or nginx. I checked the nginx logs.
2015/06/23 16:24:41 [error] 18736#0: *33 client intended to send too large body: 1945486 bytes, client: 75.159.xxx.xxx, server: xxxxxx.jnf.me, request: "PUT /Calendars/Williams_Jason_Calendar.ics HTTP/1.1", host: "xxxxxx.jnf.me"
Dāoh.
All the files Iād tested the share with were very small, but
my published calendar with 30 days history and 60 days of future events was
1.85mb. The server was configured to accept uploads with a maximum size of 1mb.
I added a single line to my nginx server configuration:
client_max_body_size 100m;
Done! Itās so obvious when you know how.
Goodnight, first ever VPS.
Youāve served me well, but itās time to move on to something more powerful and scalable.
Sleep well.
Goodnight, first ever VPS.
Youāve served me well, but itās time to move on to something more powerful and scalable.
Sleep well.