Tech Cape Town

Everything about technology from Cape Town

Tag: ftth

My Infinity Project – Building The Best Media Centre

For my day job I’m a developer. That entails learning new technologies all the time. Time after time I’ve battled to keep interest making “To do” list apps and “Hello World” programs. A few years back a needed to learn PHP. Not just the basics, I needed to learn it well enough to make a production system for a client.

At the time I lived with my parents and our internet was poor to say the least. I used the internet at work to download things at night. I needed a way to manage these downloads remotely. I started looking at APIs and remote access. I decided setting up a simple PHP site pulling from APIs would be the best option. And so started my media centre infinity project.

I have to thank Johann Du Toit for the term “Infinity Project.” He introduced me to the term as an individual project that never ends. You keep evolving it over and over again making it better and better as you learn along the way.

I started with a basic page that showed downloads, their progress and I kept track of upcoming episodes of the series I liked to watch. I ran if off a RaspberryPi. Soon I updated an old laptop with some extra hard drive space and I put the extra power to good use.

Fast forward a few months and we had uncapped internet at home. I installed Kodi (then XBMC) and left the laptop plugged into my TV. Soon I stumbled across SickBeard and CouchPotato and started automating movie and TV show downloads. My basic PHP script got a make over and pulled from those APIs.

Soon my site was getting too large to manage so I rebuilt it from the ground up using CodeIgniter. I chose CodeIgniter because the learning curve wasn’t big at all. I got a lot of functionality out in a very short space of time. I was well on my way to “productising” my media centre manager. I made the mistake of using a Bootstrap based but paid admin theme. It seemed like a very good idea at the time, but without it being open source I couldn’t release any of my code. By this time I had moved to Cape Town and my media centre was my primary source of entertainment. I also had much better internet.

Web technologies are always evolving and recently I decided it would be a good idea to learn AngularJS. That way I would be able to make web based apps for iOS and Android as well as it being a stepping stone to really learning Swift properly. I saw this as the perfect opportunity to update my media centre.

I started with a few tutorials online and soon I had the basics down. I’ve always battled with markup. It wasn’t that I couldn’t do it, I just didn’t enjoy it. I found AngularMaterial. I started over and soon I had a really good base to work from. I refactored my old code into an API with a REST library I wrote for CodeIgniter. (Based on this one but heavily updated for performance.) I learned about JSON Web Tokens along the way as a good way to authenticate requests.

Some of you may have noticed me being a little missing in action over the past few weeks. I’ve been focussing on work, some freelance work and helping build an Uber Style App for a startup. On top of all of this I managed to get my media centre into a presentable form.

So this is what I’ve come up with so far:

I made everything responsive as I use it on my phone the most often. I linked it to the Kodi API so I have “Play Now” buttons on the movies and series. I also have the “Now Playing” remote. This pulls whatever is playing from Kodi and the progress. I added in some play/pause and stop buttons. The side effect of having this available over the internet is that I can troll my girlfriend and pause whatever she is watching when I’m at work.

This project is far from over, I will keep updating it. As and when I learn new technologies. I’m hoping an iOS app can be next. Currently I’m running this off of a Mac Mini with OS X Server on it connected to a 4K TV. I’ve moved from SickBeard to SickRage as it is much more actively developed. I can run 4K movies and series at 30fps. (More than enough for video) I serve it to the world over my Telkom Fibre line. This is more than sufficient for my personal needs.

I look forward to your ideas and feedback, please leave them in the comments below or give me a shout on Facebook or Twitter. I’ll look into releasing what I’ve done on GitHub when I’m properly using environment variables and remove a few hard coded hacks. I hope you guys enjoyed this little write up.

Review: Telkom FTTH, One Month In

I have had Telkom FTTH since the 20th of May 2015. That makes June my first full month testing it out. You can read about the installation here.

I got the 50GB soft cap package from TelkomSA. This made my total cost R999.00 per month, discounted to R499.00 for the first three months. As this is a 24 month contract it included a modem/router and a DSTV Explora along with the DSTV Explora wifi adapter. It also included free installation.

Very rarely do we get to compliment a service provider in South Africa, let alone Telkom but they have done a wonderful job. My internet has not dropped once since it was installed. It is very stable and speed tests are consistent even to Europe and the US. I have included a whole selection of screen shots below from different times to different servers to show you how stable this connection is.

No matter what time of the day or night I get full line speed even on P2P downloads. This would indicate that Telkom is not shaping or throttling their capped accounts.

Continue reading

Quick Update

Hi,

Sorry for the lack of posts this week. I have been very busy at work and been playing the role of hacker in my spare time.

I have learnt Python and made my first Kodi (XBMC) add-on this week and I’m also making my first Mac App. Both of these are custom video streaming apps. Thanks to my new found bandwidth streaming works very well. I doubt my reverse engineering of what I am trying to stream is legal, even though I have a paid subscription so neither the Mac App nor the Kodi add-on will ever be released. I may however decide to publicly document them at some point.

I have also been investigating ways of becoming my own mini ISP to share my internet with neighbours. The simple fact is that FTTH is very expensive and most people won’t pay for it. I want to upgrade my line to 100mbps and then split the cost with a few neighbours. If you followed my FTTH posts, you’ll know that running cables in my building is almost impossible. I am now investigating how to create a secure data network with PPPoE passthrough across my entire building with minimal effort or cost. So far power line network adapters have been working very well. I will keep you guys posted and also do a review of those cool little adapters.

If you have any questions or suggestion, please feel free to contact me here.

Cool Shit: Telkom FTTH

I am very busy today trying to co-ordinate everything. The Telkom guys are here (exactly when they said they would be) and have started running my fibre.

If anyone has any questions, direct them to me on twitter and I’ll try and answer them or get an answer from the installers.

I will run speed tests and traceroutes when it is all up and running. That will make a much better post than this one!

Continue reading

Opinion: Why the Internet is so Shit in South Africa

I have had many ups and downs with the internet in South Africa. Some of the positives included 500MB of data included with my Cell C contract back in the day. That was a massive amount back then and I made full use of it. Another one was realising I lived in a 20mbps VDSL coverage area and upgrading immediately.

On the negative side, there are many many more memories. When I lived with my parents in Benoni, our ADSL dropped at the slightest sniff of rain. If rain was forecast, the internet was down. All we got from Telkom were the classic lines “ADSL is a best effort service” and “you live too far from the exchange.” There was Cell C refusing to upgrade their backhaul infrastructure so even when I had full 3G coverage I couldn’t use all 500MB of my data in a full month.

So, I pose the question: Why? Why is our internet so bad and so far behind the curve?

First of all, I think it has to do with Telkom’s monopoly. Back in the bad old days access to information was strictly controlled by the government. TV broadcasts were done by the SABC, and telephones were covered by Telkom. That was the extent of things back then. No company was willing to invest in infrastructure to supply telephone or cable TV services as the government could rip the carpet out from underneath them at any minute. Naspers (Multichoice) took a bit of a chance but opted for broadcast television in the shape of M-Net to limit the initial capital outlay, reducing the risk to their business in case the government decided to pull the plug at any time.

The leads on to freedom and the new South Africa. When the rest of the (First) world had cable TV and competing telephone companies we had Telkom and the SABC. Multichoice was eager to expand their TV offering but by this time it was far too late to go and install cabling all over the country for TV services. They opted for satellite based TV (DSTV) and it has worked very well for them. (Funny how blasting a satellite into space was cheaper than digging some holes for cabling.) Moving into the internet age with very poor last-mile infrastructure did not treat South Africa well. In the age of dial-up internet, we were already behind the curve. When America had 56k dial up we battled to get 14.4k and then (still monopoly) Telkom still opted to charge for the time on the call leading to VERY limited internet for most of the population. With no competition, it became a take it or leave it option.

The age of Broadband (and Mobile): In a similar way to the Multichoice expansion with DSTV, new phone providers opted for “the easy option” of wireless. Not having to run a cable to every single house made things a lot easier and cheaper. It also left our cable infrastructure in dire straits. When the UK and America are getting T1 lines, here we are STILL on 28.8k dial up and if you’re very lucky 128k ISDN or 384k ADSL. Mobile data is very expensive and not much faster. Telkom’s ageing copper cable infrastructure is corroding away, and what are we to do?

Mobile networks took up the challenge and offered “3G” internet. This was (and still is) notoriously unreliable. We also have LTE now, which isn’t quite 4G for reasons I won’t go into because it doesn’t matter. Vodacom 4G is no faster than Vodacom 3G because the backhaul internet supply to the tower is the limiting factor, not the mobile technology.

In response to 3G, Telkom slowly but surely upped their ADSL speeds. They claimed it was a cautious, calculated roll out. Anyone who has ever had their speed increased only to realise it runs slower than before, knows this is not true. The poor, ageing infrastructure battling to keep up, no real competition to incentivise upgrading anything or lowering prices. Telkom has done the bare minimum for the last 20 years and it has gotten away with it because no one else has stepped up to do a better job. Where other countries had cable TV companies with last-mile infrastructure to provide competition, we just had shitty old Telkom.

Many neighbourhoods have now put out requests for tenders to provide world class fibre internet in South Africa. These are very limited projects in very limited (and wealthy) areas. Once again in an effort to keep just behind the curve, Telkom is rolling out fibre to the home (ftth) in even fewer areas. In their never ending bid to discourage competition, they are avoiding the areas that have indicated they are interested in their own private fibre.

I don’t expect the government to step in and “fix” anything. Our own roll out of digital TV shows that the constant merry-go-round of ministers just achieves nothing as no one is in the job long enough to be held accountable.

So there are many factors that have been involved in us having shitty internet. The base was the discouragement of innovation and competition by the Apartheid government. That lead onto private companies taking the easier options (why wouldn’t they?) to offer their non-internet (telephone and TV services) services. That lead to very little investment in actual cable last mile infrastructure. That lead to shitty internet. Fantastic! We can blame Apartheid, The SABC, Telkom, Naspers, our current government, and many other private companies.

But, that is all just an excuse. Easy to blame Apartheid isn’t it? A lot of countries out there have fibre internet. Technology that wasn’t used and deployed to homes in the late 90s and early 2000s. They have replaced their infrastructure, why couldn’t we? Surely because our last mile cabling was so poor it should have been replaced earlier? If in the early 2000s companies realised that the copper infrastructure was crumbling and installed fibre then, we would have been ahead of the curve! Fast forward a decade and only now are last mile fibre connections becoming available.

That is great news! For the select few who have coverage and are willing to pay the premium to have good internet. I am one of those lucky people who lives in a fibre to the home coverage area. The fibre is 30m from my front door, connected to THE SAME building I live in. I am willing to pay the R1000 a month base price for the slowest fibre and smallest cap. Yet, I still can’t have it! Why? Because the building I live in has an “all or nothing” policy. Telkom wants conduit to run the fibre in. I can’t install the conduit without body corporate permission. The body corporate won’t install conduit for just me. Not enough people are willing to pay the price for fibre in my building to pressure the body corporate into installing the conduit.

Now who is stopping us from having world class internet? Well it is actually my neighbours, the body corporate members. The very same people that jump on Twitter and Facebook and bitch and moan about our shitty internet. The very same people who can’t Skype their family overseas. It is about time we took responsibility for ourselves. If we hold people accountable for their mistakes,  demand the very best, accept nothing less and lastly, take responsibility. If we do all that, then maybe just maybe, in a decade or two, we might just have some decent internet, half a decade after the rest of the first world.

PS: I am working on the whole body corporate conduit issue, I no longer have 20mbps VDSL as I moved house, I have 2mbps ADSL that runs at about 0.1mbps due to exchange congestion and crumbling copper cabling. If I ever come right with the fibre, I will post a review. Yes, I consider South Africa to be First World.

© 2017 Tech Cape Town

Theme by Anders NorenUp ↑