Blog Stats
  • Posts - 189
  • Articles - 0
  • Comments - 36
  • Trackbacks - 0

 

Friday, February 12, 2016

CloudKit Server To Server


Now this is quite a big deal for me.

I spend most of my time in the land of enterprise apps (as you know).   Most of the effort it with building the infrastructure to have someones device talk back to one of our servers.    I get wrapped up with issues, about connectivity/amount of bandwidth I’ve got and what happens if someone goes offline.     iCloud has been a walled garden up until this point.   Its great for syncing your photos/documents etc.   but its a closed system for us Enterprise folks.  Now I’ve got the ability to use iCloud to also host my enterprise data.   I can pump data into iCloud;  securely.   iOS takes care of the synchronisation for me.

So use case.   I can take a bunch of data, say a price catalogue and some tables to store quotes.   Pump that over to iCloud.    Then my mobile app.  can just auto-magically just see all that data.    I can quickly just build a UI to take customer orders and let iOS just do its thing to make sure all the data just synchronises.      All I have to worry about is getting the data in and out of the iCloud servers.     This is where the pretty comprehensive and secure (well it looks that way) new API comes in.

So you can do this now,   and thanks to some kind help on the Apple Developer Forums,     + I can do this all from (our own walled garden) from c#.

Announcement here

https://developer.apple.com/news/?id=02042016a

 

Code to follow


Monday, February 8, 2016

Album Art On Raspberry Pi


 

So some good progress.    I wrote a bit of python that reads the Meta-Data from Shairport Sync.  This gets me album art,  artist title etc.  

 

I can send this code to you, if you are interested.

Just to make the cabling a little neater,  I needed to make the Pi work upside down,  which resulted in me needing to rotate the album art image by 180 degrees.

The Debian Package ImageMagic takes care of all this.   I ended up with the python script saving the image out to a folder,  I then run the following command every time I get a new image

convert albumart.jpg -rotate 180 albumart.jpg; sudo fbi -T 1 -d /dev/fb0 -noverbose -a -u albumart.jpg > /dev/null 2>&1

 

This rotates the image and then using FBI output’s the jpg to the LCD screen.

IMG_2733

 

So I’m still working on making sure everything is stable,   but all works as described so far…

Thursday, January 28, 2016

£8 of LCD screen for Raspberry Pi w


So I got myself one of these from Ebay.

http://www.ebay.co.uk/itm/311500923289?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Its a 320x480 screen that fits to a Raspberry Pi.

After a bit of digging (and fortunately) a backup of the Pi, pre and post installation, I got it working.

The screen came from China,   in just a bit of bubble wrap.

I’m interested in using the screen to display caller-ID and album-art for what’s play.    So a top word of advice.   When you get a screen like this,  take a photo of the back...

 

The back showed, that my screen was a version 3, of a Kedei 3.5 480 x 320 display.

 

This was the key.     I found that these screens are version dependant.

 

Someone kindly uploaded it and all the information can be found here.  

https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=124961&p=852926

 

This is what I followed to get my display working - 

 

by impshum » Sun Dec 27, 2015 4:11 pm 
I got one the other day and it was a v3. I installed Jessie and used the drivers the seller kindly gave me. I uploaded it here for future use: https://mega.nz/#!hhdCTCDZ!UXyyh17uZo3p0O95mNmkGrWjmCv7NUEaofx9-zqoGj0

Instructions from the seller (not in Engrish) were:

copy over the drivers to your pi (preferably to /home/pi)
unzip LCD35_show_v3.zip
cd LCD35_v3
sudo ./LCD35_v3

What this does is copy over a new kernel and the drivers then reboots.

When you update the system:
sudo apt-mark hold raspberrypi-bootloader
sudo apt-get update
sudo apt-get upgrade

Works a charm.

Friday, January 22, 2016

Thanks Adam


Adam Christianson, picked up on my experimentation with HomeBridge last week.  Much thanks

http://www.maccast.com

Sunday, January 10, 2016

HomeKit in our house


In big news,   I now have Apple HomeKit working at home.    

 

Last night I was able to stand outside my house (outside of our WIFI range) and speak into Apple watch,  and say Hey Siri, Switch Living Room Lights on.      & the correct lights all came on.

This little achievement was due to the fact I had some Phillips Hue Bulbs and the older non HomeKit hub.    However,  I came across this really neat bit of software that works on  the Raspberry Pi.     Called HomeBridge.       

HomeBridge lets you turn HomeKit devices into ones that are compatible with the HomeKit system.   It acts as a bridge,  so HomeKit commands are understood by these devices.     Their is a fair amount of support for things like WeMo switches etc.

 

A guide to setup,  can be found here - 

http://www.automatedhome.co.uk/apple/smartthings-raspberry-pi-homebridge-siri-homekit-controlled-smart-home.html

IMG 2711

 

Essentially,  because of the base work to get Apple File Sharing going on my Pi,   I had the ground-work in place.     Homebrige relies on Avahi,  which provides the Bonjour services for the Pi.

 

To get HomeKit configured and working on your phone.    You need to find yourself a HomeKit compatible app.   with access to the room/house accessory screens.     

This is what I used (Evo App) -

https://itunes.apple.com/gb/app/elgato-eve/id917695792?mt=8

 

The only tricky part of the process was to make HomeBridge start when the Pi, starts-up.    This was more down to my incompetence than hard to follow instructions.

 

So in summary.   I now have a £25 always on Raspberry Pi B.    (i.e the old one),   running - 

** AirPlay Music Streaming,  using ShairPort Sync

Screen Shot 2016 01 10 at 11 17 44

So,  that means I can send any audio from phone’s,  iPad’s, Mac etc.  to an amp and connected speakers.

 

*** I have file sharing for both Windows & Mac working.     I can use the Pi,     as a TimeMachine,  copy files in and out. etc.   Its slow, but it kind of works.

 

 

*** AirPrint, printing driving a label printer and PDF to Dropbox.      I can print from iPads, iPhones with ease.

 

FullSizeRender

Sunday, January 3, 2016

Shairport-Sync


So I’ve just upgraded my raspberry Pi, from Shairport to Shairport-Sync.

So read back a bit, if you don’t know (and I’m sure you do),  Shairport turns Pi, into an Airplay receiver.

 

I’ve got to say,  Shairport-Sync is such a big improvement.   Its stable,  audio actually sounds better.     It doesn’t crash….    I’m just investigating using the meta-data so I can get a LCD screen displaying album art and a description of whats playing...

 

 

Thursday, November 26, 2015

So this is nice....


NewImage

R-PI,  just playing nice with Mac this evening….

 

 

Wednesday, November 25, 2015

Best Post for Configuring Avahi


https://kremalicious.com/ubuntu-as-mac-file-server-and-time-machine-volume/

Tuesday, November 24, 2015

Best Post I've Found... Netatalk 3 setup guide


https://daniel-lange.com/archives/102-Apple-Timemachine-backups-on-Debian-8-Jessie.html

Sunday, November 1, 2015

Raspberry Pi has lead me to this...


So,   I’ve been playing around with various Raspberry Pi projects for a couple of years.

I’ve had a few hits (caller ID,  home automation, audio airplay) and I think only one miss (Time Capsule).

Whats been great, is that its been easy to have Linux machine that doesn’t matter too much if I get things wrong and it breaks,   its not mission critical or anything, and unrelated to what  I have todo with work.    

So I want to try and build a better Mac and PC backup solution,   have a proper continuous integration server for mobile projects and GIT server.   Working for a Microsoft partner, its also great to get a fresh perspective on what else is out there.   

So we’ve had an HP Proliant server (something like a http://news.driversdown.com/Server/200811/27-1061.html ) in our office just doing nothing for a while and I took it upon myself to see what could be done with this box.

 

First step,  as I’m familiar with Debian Linux  ( http://debian.org ) was to install that latest Jessie build.    This required me to burn a complete install DVD.   I needed todo this as the HP server has SCSI DVD and hard-disks,  so to get the necessary driver support thats what was required.

Install took about 15 minutes and I had a machine I could use.      Next step was to lock the machine away out of sight.  I have too many monitors on my desk already so, I needed this machine to just run unobtrusively.   I made sure I could SSH to the machine (which I should admit I called Beasty) away from my desk.

Beasty was just connected to the network and powered.   I needed todo the majority of work out of hours,  so I made sure I could SSH connect to the machine from home over our VPN connection to our office.   All good.   So back to the same sort of Raspberry PI experience; I now have a fast Linux machine that I can connect to out of sight;  we were ready.

I crave as easier life as I can muster (as I’m sure we all do).   The next step was to ensure it was easy to copy files back and forth from Beasty.   I’m using Macs and PCs all the time so I installed Netatalk for Mac file share support and Samba for Windows file sharing.  Netatalk 3 was a little bit of a trauma to get up and running but once done,  I could access my home directory and also using an external hard disk on the server use Beasty as a Time Machine for Mac backup.

I then installed CUPS which let me share to Macs and PC’s a couple of Zebra label printers.   This has the added bonus is that from iPhone, iPad I can now AirPrint Labels.   Lets face it, who doesn’t need that in their life….

 

So moving on from here.   I installed GIT.      This was a breeze.   GIT means I now have source control in Xcode on my Mac with a secured remote repository on Beasty.    I can work locally and then push changes up-to this team server.       I’m not sure if this is the way to go as our company is focused around Microsoft Team Foundation server,  so I am going to try and get GIT integration going with this and compare with the open source alternative.

 

So to recap for free ,I have a Mac/PC/iOS File and print server with cross platform source control solution built in about an hour.    

Right now I’m installing Gnome Window Manager to take me from command line management to something a little bit more 2015.  I’m blogging about all of this while I wait for the install to finish.   

 

I’ll keep you posted...

 

 

 

Copyright © Richard Jones