<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geekery &#8211; Random Insanity</title>
	<atom:link href="https://randominsanity.net.nz/category/general/geekery/feed/" rel="self" type="application/rss+xml" />
	<link>https://randominsanity.net.nz</link>
	<description>Random Insanity since 1981</description>
	<lastBuildDate>Thu, 03 Sep 2020 22:32:43 +0000</lastBuildDate>
	<language>en-NZ</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.6</generator>
	<item>
		<title>Automating Letsencrypt renewals with DNS-01 challenges</title>
		<link>https://randominsanity.net.nz/2018/03/automating-letsencrypt-renewals-with-dns-01-challenges/</link>
					<comments>https://randominsanity.net.nz/2018/03/automating-letsencrypt-renewals-with-dns-01-challenges/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Sat, 24 Mar 2018 22:48:47 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Certbot]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DNS-01]]></category>
		<category><![CDATA[Letsencrypt]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[SysOps]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1746</guid>

					<description><![CDATA[<p>Letsencrypt and certbot are great for getting SSL certificates, however, if you're using DNS-01 it's not easy to automate renewals. I decided to fix that, at least for my use case with CloudFlare.</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2018/03/automating-letsencrypt-renewals-with-dns-01-challenges/">Automating Letsencrypt renewals with DNS-01 challenges</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Preface</h2>
<p>When researching options before writing the code referred to in this article, I came across a comment from someone I understand to be involved in the admin/author side of certbot. While I can&#8217;t find the link any more, they basically replied to someone stating that certbot would never provide plugins for DNS providers, which made sense since there are so many. However, shortly after finishing off this software, I came across the shiny new release of certbot, which  has some pre-written plugins for, you guessed it, DNS providers.</p>
<p>These plugins are not yet packaged for Ubuntu, so while I tried to do a quick test, I ended up still using my new script. If you&#8217;re starting out with certbot 0.22.0 or higher and get their plugins, they are probably a better option however this stuff will still work and is an option for you. And I&#8217;ll keep the code live for anyone who wants it, if for no other reason than it&#8217;s something else others can pick as an example to learn things from.</p>
<h2>Introduction</h2>
<p>Many of you will have heard of <a href="https://letsencrypt.org/">Letsencrypt</a>, a service that enables creation of SSL certificates for use on websites (and anywhere else technically) for free; cost being one of the barriers to wider adoption of secured websites. I use this service for several sites, including this one.</p>
<p><img loading="lazy" class="alignright size-thumbnail wp-image-1748" src="https://randominsanity.net.nz/wp-content/uploads/certbot-logo-1A_large-150x55.jpg" alt="" width="150" height="55" srcset="https://randominsanity.net.nz/wp-content/uploads/certbot-logo-1A_large-150x55.jpg 150w, https://randominsanity.net.nz/wp-content/uploads/certbot-logo-1A_large-300x110.jpg 300w, https://randominsanity.net.nz/wp-content/uploads/certbot-logo-1A_large.jpg 630w" sizes="(max-width: 150px) 100vw, 150px" />I had a particular issue when it came to certificate renewal time that wasn&#8217;t supported automatically. In this post, I&#8217;ll explain a little about Letsencrypt and its client application certbot, and about &#8220;<a href="https://certbot.eff.org/docs/challenges.html">challenges</a>&#8221; which are how Letsencrypt verifies you should be given a certificate you ask for. I&#8217;ll only be dealing with the authentication side of certbot: while it and a number of other clients are able to install the certificates for you as well, I did this part manually to fit within my Nginx configuration the way I wanted, but there is plenty of information out there if you want to learn more about that side.</p>
<h2>My Setup</h2>
<p>If you&#8217;ve read my previous posts you&#8217;ll likely have an idea of this already, but a simple overview for those who haven&#8217;t.</p>
<p>I run my domains on servers hosted in AWS on Ubuntu servers. I use <a href="https://www.nginx.com/">Nginx</a> (Open Source Version) as a hosting and proxying platform. My websites are, for the most part, exposed via <a href="https://www.cloudflare.com/">CloudFlare</a> (Free Tier).</p>
<p>For me, these certificates are securing the leg between CloudFlare and my server so users don&#8217;t normally see them, but they form one leg of the end-to-end security chain..</p>
<h2>Letsencrypt</h2>
<p><img loading="lazy" class="alignright size-thumbnail wp-image-1772" src="https://randominsanity.net.nz/wp-content/uploads/78ccd985-50e6-4e20-9e2b-d6ae61814704-150x39.png" alt="Letsencrypt Logo" width="150" height="39" srcset="https://randominsanity.net.nz/wp-content/uploads/78ccd985-50e6-4e20-9e2b-d6ae61814704-150x39.png 150w, https://randominsanity.net.nz/wp-content/uploads/78ccd985-50e6-4e20-9e2b-d6ae61814704-300x77.png 300w, https://randominsanity.net.nz/wp-content/uploads/78ccd985-50e6-4e20-9e2b-d6ae61814704.png 700w" sizes="(max-width: 150px) 100vw, 150px" />Letsencrypt can be managed by a number of software clients, however, the main one and the one I use is called <a href="https://certbot.eff.org/">certbot</a>. Certbot allows the issuing of new certificates and the renewal of existing ones; renewal being important because the main caveat of these certificates is that they are only valid for 90 days. And the key part of this process is validating ownership in a challenge/response style setup, which can be done 3 different challenge methods.</p>
<h3>HTTP-01</h3>
<p>Probably the most common or most easily achieved method of validating your domain is HTTP-01. It involves posting a specified file in a specified location on the website. There are plugins for certbot that make this really easy for a number of hosting setups, including Nginx which I run.</p>
<p>For me, this wasn&#8217;t so practical. As I mentioned the DNS wasn&#8217;t pointing to the new server yet, and I didn&#8217;t want to mess around putting stuff on the old servers. Also, I had an additional site that I wanted a certificate for but I wasn&#8217;t able to modify the content to support this method.</p>
<h3>TLS-SNI-01</h3>
<p>I haven&#8217;t actually heard of anyone using this in the wild, and I haven&#8217;t tried it as it&#8217;s not functional when using CDN in front of your servers.</p>
<h3>DNS-01</h3>
<p>So this is the one I chose. DNS-01 involves adding a TXT record to your DNS with the specified value. For me this was great, it didn&#8217;t matter where my website was pointed yet, or if I could modify files. Because I could edit the DNS this way I was able to ensure zero downtime getting the certificates issued and in place before I did the cutover.</p>
<h2>The downside to DNS-01</h2>
<p>DNS-01 got me going well, however, when it comes to renewal time it&#8217;s not something that can be automatically supported. HTTP-01 has various options and settings to dump files in a specified location to automate that, but DNS is much more diverse and not all providers even offer an API. I gave it some thought and confirmed for my self that I couldn&#8217;t change to HTTP-01, mainly as I had this system issue certificates for domains that didn&#8217;t point to this server still (yeah maybe I&#8217;m a special case, but it is what it is).</p>
<p>Certbot has hooks to do things before and after any validation steps, so I decided I&#8217;d make it automated myself!</p>
<h2>Automating DNS-01 challenges with CloudFlare</h2>
<p>CloudFlare offers a great API, even on its free tier, so I decided to write a hook to automate the necessary updates. Since I&#8217;m that way inclined too, I&#8217;ve made it freely available, hosted <a href="https://bitbucket.org/logicalroute/certbot-cloudflare-dns-hook/">here</a>.</p>
<p>Basically, it&#8217;s a NodeJS script that runs through the following logic:</p>
<ul>
<li>Given a domain and a validation code</li>
<li>Get a list of the users&#8217; domain zones from CloudFlare and find which one is appropriate for this domain</li>
<li>Check that zone to see if we already have an &#8216;_acme-challenge&#8217; TXT record for the domain</li>
<li>If we don&#8217;t create it. If we do, update it. In both cases, set it to the validation code provided.</li>
<li>Query DNS and see if it&#8217;s updated yet and if not, look at the TTL for the query and wait that long plus a 10-second buffer and try again up to a configurable number of times until it is updated.</li>
<li>Done.</li>
</ul>
<p>This basically sets up the new validation information and waits until it is deployed, then returns allowing certbot to do it&#8217;s check and provided that succeeds, get the newly issued certificates. Now, of course, I&#8217;m simplifying a few things. It&#8217;s not certbot doing ALL the validation etc, but between certbot and the server they work it out; the finer detail isn&#8217;t too important for us just here.</p>
<p>What you get in the end is the ability to run a command like the following, and have it automatically manage the DNS-01 challenge setups required, which means it can be put into a cron job and not require manual intervention every couple of months!</p>
<pre>sudo certbot renew --manual --manual-auth-hook "/path/to/node /path/to/hook.js"</pre>
<p>As it turns out, the hook can also be used for certonly certificate issuing; it creates and manages validation just as well as the renew does. There is more detail and examples for installation and usage in the <a href="https://bitbucket.org/logicalroute/certbot-cloudflare-dns-hook/src/master/README.md">readme</a> file in the code repository so if you want to check it out that&#8217;s a good next place to look.</p>
<h2>Summary</h2>
<p>Wow, that was a lot longer way of saying &#8220;I made a script to support DNS-01 challenge automation on certbot manual renewals&#8221; than I expected&#8230;</p>
<p>Anyway, please feel free to check it out, have a look at the <a href="https://bitbucket.org/logicalroute/certbot-cloudflare-dns-hook/src/master/README.md">readme</a> which has some helpful info on getting it going, and I&#8217;ll try to address any questions or issues that come up. It&#8217;s far from perfect, but it works well for me so for now, it&#8217;ll do. Perhaps in the future I&#8217;ll try and improve any error handling etc. but no doubt that&#8217;ll come if I start seeing more errors I need to handle!</p>
<p>If you manage a website and you don&#8217;t have it secured with SSL, <strong>DO IT</strong>!!! There really is no good reason not to anymore.</p>
<p>Thanks for reading!</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2018%2F03%2Fautomating-letsencrypt-renewals-with-dns-01-challenges%2F&amp;linkname=Automating%20Letsencrypt%20renewals%20with%20DNS-01%20challenges" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2018%2F03%2Fautomating-letsencrypt-renewals-with-dns-01-challenges%2F&amp;linkname=Automating%20Letsencrypt%20renewals%20with%20DNS-01%20challenges" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2018%2F03%2Fautomating-letsencrypt-renewals-with-dns-01-challenges%2F&amp;linkname=Automating%20Letsencrypt%20renewals%20with%20DNS-01%20challenges" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2018%2F03%2Fautomating-letsencrypt-renewals-with-dns-01-challenges%2F&amp;linkname=Automating%20Letsencrypt%20renewals%20with%20DNS-01%20challenges" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2018%2F03%2Fautomating-letsencrypt-renewals-with-dns-01-challenges%2F&#038;title=Automating%20Letsencrypt%20renewals%20with%20DNS-01%20challenges" data-a2a-url="https://randominsanity.net.nz/2018/03/automating-letsencrypt-renewals-with-dns-01-challenges/" data-a2a-title="Automating Letsencrypt renewals with DNS-01 challenges"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2018/03/automating-letsencrypt-renewals-with-dns-01-challenges/">Automating Letsencrypt renewals with DNS-01 challenges</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2018/03/automating-letsencrypt-renewals-with-dns-01-challenges/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Migrating WordPress to AWS Lightsail (and other related changes) – Part 2</title>
		<link>https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2/</link>
					<comments>https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Thu, 28 Dec 2017 08:14:09 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SysOps]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1735</guid>

					<description><![CDATA[<p>In part 1 I gave a bit of background and discussed moving the website hosting for two of my sites. In part 2 I&#8217;ll discuss domains&#8230; Thrilling stuff!&#60;/sarcasm&#62; Domains I thought domains would be easy. I have a pretty good understanding of domain registration and DNS, having worked with them for years so I went&#8230;</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2/">Migrating WordPress to AWS Lightsail (and other related changes) – Part 2</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In <a href="https://randominsanity.net.nz/?p=1730">part 1</a> I gave a bit of background and discussed moving the website hosting for two of my sites. In part 2 I&#8217;ll discuss domains&#8230; Thrilling stuff!&lt;/sarcasm&gt;<span id="more-1735"></span></p>
<h3>Domains</h3>
<p>I thought domains would be easy. I have a pretty good understanding of domain registration and DNS, having worked with them for years so I went looking for a new registrar. I needed to relocate registration and hosting of both domains, and my main requirements looking around were ease of management and price.</p>
<p>As I mentioned in my previous post, I&#8217;d already settled on Amazon Lightsail for my site hosting, so Amazon seemed a good option for DNS to keep it all together also.</p>
<p>While the web hosting was basically identical for the 2 sites, the domain portion has a little (only a little) variety.</p>
<h4>RandomInsanity.net.nz</h4>
<p>As the first of the 2 sites I moved, I jumped into AWS Route53 and set up my DNS settings. Quite easy, and as best I can tell, will at worst cost me a couple of bucks a month if there are lots of requests (I&#8217;m thinking spamming etc; I don&#8217;t expect my readership to be that large!).</p>
<p>I also used Route53 and transferred my domain hosting over. Pretty easy, although it gave me some messages about my current provider having to approve it etc. which in the end I suspect is a just half generic warning for some other registries that require that. Route53 wasn&#8217;t the cheapest registrar I&#8217;d found here, but for ease of management, I thought I&#8217;d just keep it all together.</p>
<p>The one thing I&#8217;ll note is to keep an eye on your email. They send you info and anything you need to do which may not always be obvious on the console.</p>
<h4>SaferHomes.nz</h4>
<p>After randominsanity.net.nz being so easy, I planned to so saferhomes.nz the same way. And then I hit the real world.</p>
<p>The easier part first: instead of the Route53 hosting of the domain records, I used the inbuilt DNS part of Lightsail which as best I can tell has no particular additional charge beyond the Lightsail plan I was on. Same general result but different management location. Cool, done.</p>
<p>And then I went to transfer the domain.</p>
<p>Despite <strong>.nz</strong> having been commonplace for New Zealand for a couple of years now, it seems Route53 does not support this top-level domain (the support .co.nz, .org.nz, .net.nz, but plain old .nz). <a href="http://gandi.net/">Gandi</a>, the registrar AWS state they use supports it, but AWS themselves don&#8217;t. Bugger.</p>
<p>At first, I thought I must be doing something wrong, but after a while, I&#8217;d found numerous forum posts asking AWS when they would support it, right back from when it first became available, with no commitment beyond &#8220;it&#8217;s on our backlog&#8221;. Amazon&#8217;s own documentation, when you dig deep enough, has a list of the TLD&#8217;s (Top Level Domains) that they support and .nz is not listed.</p>
<p>So, there goes my plan of keeping it all together. In the end, I have moved the registration to <a href="https://www.domains4less.co.nz">Domains4Less</a> and then just entered the AWS name servers for the domain into the records. Not ideal, but it seems to be working well.</p>
<h3>Email</h3>
<p>The email was much easier in the end. I actually had saferhomes.nz using Google&#8217;s GSuite already so I left it where it was.</p>
<p>For randominsanity.net.nz, my initial thought was that I would just find a way to forward it all to a Gmail account I currently tie my personal address in with. However, until now, I&#8217;d been basically using a full email account on my ISP network, with Gmail just grabbing email using POP and sending to that user using SMTP. Given I wanted to kill that mailbox, that wasn&#8217;t going to work.</p>
<p>I probably spent a couple of hours looking at solutions. Ideally just finding somewhere that&#8217;d charge me bugger all to do a blind mail relay for my domain, but that wasn&#8217;t really a service in wide supply. I looked at Amazon services, using their Simple Email Service which short of using a lot of work (S3 buckets and Lambda functions) probably wasn&#8217;t going to do what I wanted nicely anyway.</p>
<p>In the end, I just bit the bullet and setup another GSuite account for it. It costs me $5 to have my mailbox. I could have used Amazon&#8217;s WorkMail feature for a similar price but it didn&#8217;t look as polished as Gmail/GSuite so I erred on staying with the option I was familiar with since I had no intention of moving the saferhomes email.</p>
<h2>Summary</h2>
<p>Well, that&#8217;s really it at present. Maybe there won&#8217;t be a part 3&#8230;</p>
<p>In short, this is what I&#8217;ve ended up with:</p>
<h4>RandomInsanity.net.nz</h4>
<ul>
<li>Domain Registration: Amazon Route53</li>
<li>Domain Hosting: Amazon Route53</li>
<li>Website Hosting: Amazon Lightsail</li>
<li>Email Hosting: Google GSuite</li>
</ul>
<h4>SaferHomes.nz</h4>
<ul>
<li>Domain Registration: Domains4Less</li>
<li>Domain Hosting: Amazon Lightsail</li>
<li>Website Hosting: Amazon Lightsail</li>
<li>Email Hosting: Google GSuite</li>
</ul>
<p>SSL was a bit of a mission, and I can&#8217;t say I&#8217;m 100% on exactly which bit resolved it but it can be done. Basically following various Bitnami documentation.</p>
<p>Outbound email required configuration of SMTP credentials in WordPress but once that was done it worked fine, for what I needed anyway.</p>
<p>Hopefully, someone might find this something resembling interesting, and maybe even helpful. I&#8217;ll try to provide updates as the journey continues or as my setup evolves (I may still try moving everything to a more home-grown EC2/RDS type setup, but we&#8217;ll see how we go).</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%202" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%202" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%202" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%202" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2%2F&#038;title=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%202" data-a2a-url="https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2/" data-a2a-title="Migrating WordPress to AWS Lightsail (and other related changes) – Part 2"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2/">Migrating WordPress to AWS Lightsail (and other related changes) – Part 2</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Migrating WordPress to AWS Lightsail (and other related changes) &#8211; Part 1</title>
		<link>https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1/</link>
					<comments>https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1/#comments</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Thu, 28 Dec 2017 08:07:12 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SysOps]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1730</guid>

					<description><![CDATA[<p>As some of you will know, my position with my current employer has recently been &#8220;disestablished&#8221;. I won&#8217;t go into the story around that, at least at this point, however as part of my preparing to leave I&#8217;ve been working on moving all my services away from said employer (an ISP). Besides the obvious Broadband,&#8230;</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1/">Migrating WordPress to AWS Lightsail (and other related changes) &#8211; Part 1</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As some of you will know, my position with my current employer has recently been &#8220;disestablished&#8221;. I won&#8217;t go into the story around that, at least at this point, however as part of my preparing to leave I&#8217;ve been working on moving all my services away from said employer (an ISP).<span id="more-1730"></span></p>
<p>Besides the obvious Broadband, I&#8217;ve got 2 websites (well, more than 2 but only 2 I&#8217;m going to keep alive) and a number of domains, as well as some email hosting. Moving all this has been a bit of a mixed journey and although it&#8217;s still going on, I thought I&#8217;d start putting together a bit of the story, challenges, lessons, solutions etc. for anyone else who is looking at moving such things for themselves.</p>
<p><em>After getting part way through this article, I realised how long it was getting, so I&#8217;m going to break it down into parts. Part 1 will be websites, <a href="https://randominsanity.net.nz/?p=1735">part 2</a> will cover the rest.</em></p>
<h2>TL;DR</h2>
<p>I moved 2 WordPress sites to Amazon Lightsail, mail to Google GSuite, and domains are still a work in progress with domain hosting being a mix of AWS Route53 and Lightsail, and domain registration being AWS Route53 and Domains4Less. Do you want to know why? Read!</p>
<h2>The story</h2>
<p>After 11 years at my current work, I&#8217;d just tended to keep all the things I could in our systems. Partially because I built said systems so had great control/flexibility/etc. and partially because, for the most part, it cost me nothing. So as part of leaving, rather than keeping everything in place and paying their advertised rates, I decided a move was necessary!</p>
<p>For the purpose of this post, I&#8217;ll concentrate on 2 domains. The first one &#8220;randominsanity.net.nz&#8221; (AKA, this site) is my personal stuff, blog, email, basic. The second is a business domain &#8220;saferhomes.nz&#8221; (A company I&#8217;m a co-founder of). For both, we&#8217;ll look at domain, website and email (not necessarily in that order mind you).</p>
<h3>Websites</h3>
<p>As the generally larger part of the project, I started looking for a new web host first off. Both the sites I&#8217;m dealing with are WordPress, currently hosted using Plesk on my employers&#8217; web server.</p>
<p>I looked at various locations, both web hosting and straight out VPS, with varying cost and resources. I liked the VPS idea in that I could probably just run both sites (they are pretty low traffic) on one server; I&#8217;ve certainly got the sysadmin skills to run the server and manage all that so why pay for someone else doing that stuff! In the end VPS still looked like it would end up more expensive than just outright hosting in many instances.</p>
<p>Due to already evaluating <a href="http://aws.amazon.com">AWS</a> for another project recently, this was one of the places I looked, almost out of pure curiosity more than serious intent. While the pricing on AWS can be quite hard to piece together, best I could tell I could probably do what I needed within their free tier (at least for the first year) and costs wouldn&#8217;t be tooooo huge beyond that.</p>
<p>So, I could setup a server on EC2, run a MySQL database on RDS, and even do a bunch of my DNS on Route53 (we&#8217;ll talk more about DNS soon). Appealing, not overly difficult concept, and just enough new stuff to make it an interesting challenge. However, as one might imagine, with less than 4 weeks of employment left, a job hunt in the works, a mortgage and all the other bills one acquires as part of being an adult, I came to the conclusion that I wanted something a little faster and easier, with less thinking.</p>
<p>Still, AWS had strong appeal as I wanted to do more there in future. Then I spotted Amazon Lightsail. Almost a sub-service of AWS, accounts linked but designed to be nicely functional for those not dealing with the normal AWS console. Lightsail touts a low-end plan of $5 (US) per month and the ability to deploy a pre-configured WordPress site, which I took an educated guess I&#8217;d be able to migrate my current sites overtop of without too much effort.</p>
<p>So Lightsail it was.</p>
<p>I started with my personal domain as a guinea pig first (experiments are rarely good on business domains). A new AWS account was easy to setup, and jumping over to Lightsail I had a generic WordPress site going in about 5 minutes flat.</p>
<p>Lightsail gives you a dedicated IP address for your container (I consider their deployed site/server as a container &#8211; maybe I&#8217;ve just been playing in the docker space for too long) which you can use to access your website before sorting any DNS; a nice way to be able to prep the site before migration.</p>
<p>The first gotcha I realised in Lightsail is that although you get a public IP, it&#8217;s my understanding (from reading rather than having his the issue) is that the IP they allocate is dynamic, which I assume means either that a new IP may get allocated of you restart the container, or (and this is probably more likely) that it&#8217;s a little like EC2 where you could kill and redeploy the container but you&#8217;d lose the ability to get the same IP again. While the latter wasn&#8217;t a major likelihood for me, in case it was the former, I made use of the easy spot in Lightsail to create a Static IP which I can then point to my container and use henceforth. A quick note for young players, while the Static IP is free (for up to 5), it will get charged if you don&#8217;t have it attached to a container!!</p>
<p>Okay, so I have WordPress running and accessible&#8230; now how to get all my content across?</p>
<p>I had a quick go with WordPress&#8217;s inbuilt export/import. That moved all my posts across just fine, but then the theme I was using no longer seemed to be available from WordPress. Cool, copy the theme directory over&#8230; nope, seems I&#8217;d done some customisation of the theme which I couldn&#8217;t recall, so the theme looked quite different out of the box.</p>
<p>Right, plan B (there&#8217;s always a plan B, and as is often the case, it was Google). Rather than reinvent the wheel, a quick Google confirmed I wasn&#8217;t the first to have this mission (Shock!), nor the first to document a little of the journey for the benefit of others. You can find the article I read <a href="https://worstwriter.com/2016/02/09/a-very-beginners-guide-to-migrating-hosting-wordpress-on-aws/">here</a>, but basically there is lovely plugin for WordPress (All-in-One WP Migration &#8211; love the creative naming) that does a really good and complete site export/import. Install the plugin at each end and follow your nose!</p>
<p>The one trick I did find during export was that since I was keeping the same domain, under the advanced options on the export screen I selected &#8220;Do not replace the email domain&#8221; as well as &#8220;Do not export spam comments&#8221;. Other than that it was plain sailing!!</p>
<p>Saferhomes.nz was pretty much identical. Although, while I chose the advanced export options on my first site, when it came to the saferhomes domain I forgot them and it caused a sufficient headache on the other end that I actually went back and re-did the export with them selected. If you&#8217;re changing domain I don&#8217;t expect it&#8217;ll be such an issue but it certainly helped for just moving the domain to another).</p>
<p>With saferhomes.nz though I have an additional challenge. Under Plesk I had it using <a href="https://letsencrypt.org">Letsencrypt</a> to automatically get and keep an SSL certificate up-to-date. Lightsail&#8217;s WordPress has no such easy feature, and it uses a custom server setup for WordPress and Apache from Bitnami. SSL is a must on this site, so I&#8217;m currently working on getting Letsencrypt running in this new landscape. It&#8217;s a work in progress, but I&#8217;ll ether make a new post on how I succeeded (yes, I&#8217;m backing myself to crack it) once I finish.</p>
<p>Other than that, 2 websites running on Lightsail and accessible via IP!</p>
<p>Wow, that&#8217;s a lot. Stay tuned (or go look) for <a href="https://randominsanity.net.nz/?p=1735">parts 2</a> and probably 3 in due course.</p>
<p>&nbsp;</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%201" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%201" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%201" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1%2F&amp;linkname=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%201" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2017%2F12%2Fmigrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1%2F&#038;title=Migrating%20WordPress%20to%20AWS%20Lightsail%20%28and%20other%20related%20changes%29%20%E2%80%93%20Part%201" data-a2a-url="https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1/" data-a2a-title="Migrating WordPress to AWS Lightsail (and other related changes) – Part 1"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1/">Migrating WordPress to AWS Lightsail (and other related changes) &#8211; Part 1</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2017/12/migrating-wordpress-to-aws-lightsail-and-other-related-changes-part-1/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Payoneer – An internet payment journey – Part 3</title>
		<link>https://randominsanity.net.nz/2016/03/payoneer-an-internet-payment-journey-part-3/</link>
					<comments>https://randominsanity.net.nz/2016/03/payoneer-an-internet-payment-journey-part-3/#comments</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Tue, 08 Mar 2016 02:10:13 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Entropay]]></category>
		<category><![CDATA[Hulu]]></category>
		<category><![CDATA[Payoneer]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1725</guid>

					<description><![CDATA[<p>In part&#8217;s 1 and 2 I went through the beginning of the process of acquiring a US-based credit card (if you haven&#8217;t read them, this post probably won&#8217;t mean much so they are a better place to start) and left you, dear reader, waiting with baited breath (Yeah yeah I know, you&#8217;d almost forgotten really)&#8230;</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2016/03/payoneer-an-internet-payment-journey-part-3/">Payoneer – An internet payment journey – Part 3</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In part&#8217;s <a href="https://randominsanity.net.nz/?p=1715" target="_blank" rel="noopener">1</a> and <a href="https://randominsanity.net.nz/?p=1721" target="_blank" rel="noopener">2</a> I went through the beginning of the process of acquiring a US-based credit card (if you haven&#8217;t read them, this post probably won&#8217;t mean much so they are a better place to start) and left you, dear reader, waiting with baited breath (Yeah yeah I know, you&#8217;d almost forgotten really) for the outcome. Well, the card arrived somewhere around the 20th of last month, so it good time compared to estimates.<span id="more-1725"></span></p>
<p>That&#8217;s when the real fun started. Well, fun being a fairly loose term here&#8230;</p>
<p>Once activated, the card made the funds I&#8217;d already credited available. However, when I went to load it to Hulu (the whole reason I started down that path) it wouldn&#8217;t work. Eeek!!</p>
<p>I tried it out on US iTunes also, with no luck. Slightly off topic however, I found the option (which I&#8217;d probably just missed perviously) to continue with the iTunes account without a funds source loaded. With that job done, I&#8217;ve successfully been downloading free apps from the US store to my AppleTV (Gen4) and iPhone/iPad. There is a little overhead switching between NZ and US stores but thus far it&#8217;s meeting a need.</p>
<p>But back to Hulu. Plan B (or maybe that was Plan F+) turned into setting up a US PayPal account. This fortunately worked, and my new card is setup as a funding source to it. I then used the PayPal account as the funding source for Hulu. A very round about way, and not yet confirmed to be functional long-term however next billing date, in theory, Hulu will bill my PayPal account which will in turn use my card to fund it. We&#8217;ll of course see how well that works.</p>
<p>So the question as to why it didn&#8217;t work. Here, 3 things are worth noting:</p>
<ol>
<li>Details on iTunes suggests that it&#8217;s failing there as Apple can actually compare some part of the billing address loaded against the card to details you give. So even if you tell it all the right details, and it&#8217;s a US issued card, it can still pick stuff isn&#8217;t matching.</li>
<li>Hulu doesn&#8217;t ask for anything more address wise than an area code. But, I found amongst some forum a note that Payoneer cards are issued from somewhere in Central America. So perhaps it&#8217;s looking more specifically for North America issuance. Anyway, as yet I haven&#8217;t been able to confirm.</li>
<li>I tried a couple of other sites that require US cards and that hadn&#8217;t worked with either my NZ Visa Debit or the Entropay card, and they worked. So there are numerous factors at work. As yet I can&#8217;t even begin to speculate all the variables and which is impacting where.</li>
</ol>
<p>What&#8217;s next you may ask? Well, in due course I might setup another card and get it sent to a US address that will forward it on as mail, meaning there is a US address loaded against the card. Other than that, I&#8217;ll probably test a few more services over time; I&#8217;ve specifically been asked about some geo-restricted Amazon media services.</p>
<p>Other than that it&#8217;s been both a success and to a smaller extent a failure of an experiment. Well, some things I&#8217;d wanted to work didn&#8217;t work the way I wanted; you could argue that as a failure, or perhaps since it was all an experiment you could say it was a success that you got a result from said test.</p>
<p>And on that note I shall leave you to ponder experiments for yourself. Feel free to ask questions, I&#8217;ll answer any I can! =P</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F03%2Fpayoneer-an-internet-payment-journey-part-3%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%203" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F03%2Fpayoneer-an-internet-payment-journey-part-3%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%203" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F03%2Fpayoneer-an-internet-payment-journey-part-3%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%203" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F03%2Fpayoneer-an-internet-payment-journey-part-3%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%203" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F03%2Fpayoneer-an-internet-payment-journey-part-3%2F&#038;title=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%203" data-a2a-url="https://randominsanity.net.nz/2016/03/payoneer-an-internet-payment-journey-part-3/" data-a2a-title="Payoneer – An internet payment journey – Part 3"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2016/03/payoneer-an-internet-payment-journey-part-3/">Payoneer – An internet payment journey – Part 3</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2016/03/payoneer-an-internet-payment-journey-part-3/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Payoneer &#8211; An internet payment journey &#8211; Part 1</title>
		<link>https://randominsanity.net.nz/2016/02/payoneer-an-internet-payment-journey-part-1/</link>
					<comments>https://randominsanity.net.nz/2016/02/payoneer-an-internet-payment-journey-part-1/#comments</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Thu, 11 Feb 2016 02:20:28 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Random]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1715</guid>

					<description><![CDATA[<p>Well, "journey" might be overselling it a little, but I'm not yet at the end so who knows! Basically I'm setting myself up with a CreditCard via Payoneer; here lies the story of what I had to do and how it all worked out...</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2016/02/payoneer-an-internet-payment-journey-part-1/">Payoneer &#8211; An internet payment journey &#8211; Part 1</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Well, &#8220;journey&#8221; might be overselling it a little, but I&#8217;m not yet at the end so who knows!</p>
<p><img loading="lazy" class="alignright size-medium wp-image-1719" src="https://randominsanity.net.nz/wp-content/uploads/payoneer_card_keyboard-300x138.jpg" alt="Payoneer Mastercard" width="300" height="138" srcset="https://randominsanity.net.nz/wp-content/uploads/payoneer_card_keyboard-300x138.jpg 300w, https://randominsanity.net.nz/wp-content/uploads/payoneer_card_keyboard-150x69.jpg 150w, https://randominsanity.net.nz/wp-content/uploads/payoneer_card_keyboard.jpg 700w" sizes="(max-width: 300px) 100vw, 300px" />Basically, as some of you who know me or have read other bits of my blog will know, I subscribe to Hulu (among other services) which is a geo-restricted service locked down to the US.</p>
<p>Geo-restriction is pretty easy to overcome. As I mention in <a href="https://randominsanity.net.nz/?p=1571" target="_blank">another article</a>, there are a bunch of services out there to assist. I&#8217;ve used Unblock-US in the past but currently use MediaHint. It works great and has a browser plugin that helps when on the go (not at home with my permanent setup). However, Hulu requires a little more than looking like you&#8217;re accessing it from the US; it requires a US credit card also!</p>
<p>For around a year now I&#8217;ve been using Entropay, which gives you a virtual US credit card to run pre-pay. It also worked great for the last year (with the exception that my NZ based bank requires disabling some security to top it up as they deem it a suspicious site), however, the card has now hit its expiry date so I&#8217;ve gone to Hulu to update the card info&#8230; only to find it no longer accepts it! I&#8217;ve recently also had a go at setting up a US iTunes account with the same issue that iTunes wouldn&#8217;t accept the Entropay card as US based. I&#8217;ve no idea why, or what they use to determine such things, but it just didn&#8217;t work!</p>
<p>So, I&#8217;ve done some looking around to see what other services are out there. <a href="http://tech-vise.com/vise-review-best-virtual-debit-cards/" target="_blank">The list</a> has certainly grown since I first looked! This time, I&#8217;m having a go at <a href="https://www.payoneer.com/products/prepaid-mastercard/" target="_blank">Payoneer</a>. I decided I&#8217;d document a little of how it goes to help other people evaluating it also.</p>
<h3>Thursday 11 &#8211; Morning</h3>
<p>So far I&#8217;ve signed up on the Payoneer site and handed over a bunch of detail. It expects that you&#8217;re not in the US so you don&#8217;t have to fudge details for any of that, and apparently, they are now sending me a <strong>physical</strong> US issued MasterCard! They offer a service to help people receive payments from all over the world, and have a couple of options on how to make use of received funds &#8211; and this is one of them.</p>
<p>They ask for some &#8220;government issued ID&#8221; &#8211; I&#8217;ve given them a drivers licence. Although they took this detail and rapidly approved my account request, after I topped up the card (basically by requesting a payment from myself for some fictional service) I got another email asking for info on my business (service or product based, refund policy, website etc.) as well as a scanned copy of my licence. If I hadn&#8217;t heard enough good stuff about this place I&#8217;d be a little dubious already, but I&#8217;m confident enough that it&#8217;s legit that I&#8217;ve provided the necessary detail and am awaiting the deposit of my &#8220;received funds&#8221; in my US account.</p>
<p>I requested a payment of $20USD as the &#8220;seller&#8221;, and as the &#8220;buyer&#8221;, I had the option to either pay the transaction fee myself on top of the $20 or deduct it from the seller&#8217;s payment. I chose the former as it doesn&#8217;t really matter given I&#8217;m both parties, but for reference it was $0.62 fee, which I assume is some percentage calculation of the payment amount.</p>
<p>That&#8217;s as far as I&#8217;ve gotten so far. Now we wait&#8230; Or I wait anyway because you probably don&#8217;t care THAT much!</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F02%2Fpayoneer-an-internet-payment-journey-part-1%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%201" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F02%2Fpayoneer-an-internet-payment-journey-part-1%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%201" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F02%2Fpayoneer-an-internet-payment-journey-part-1%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%201" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F02%2Fpayoneer-an-internet-payment-journey-part-1%2F&amp;linkname=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%201" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2016%2F02%2Fpayoneer-an-internet-payment-journey-part-1%2F&#038;title=Payoneer%20%E2%80%93%20An%20internet%20payment%20journey%20%E2%80%93%20Part%201" data-a2a-url="https://randominsanity.net.nz/2016/02/payoneer-an-internet-payment-journey-part-1/" data-a2a-title="Payoneer – An internet payment journey – Part 1"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2016/02/payoneer-an-internet-payment-journey-part-1/">Payoneer &#8211; An internet payment journey &#8211; Part 1</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2016/02/payoneer-an-internet-payment-journey-part-1/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Home Automation, OpenHAB, Z-Wave</title>
		<link>https://randominsanity.net.nz/2014/10/home-automation-openhab-z-wave/</link>
					<comments>https://randominsanity.net.nz/2014/10/home-automation-openhab-z-wave/#comments</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Sat, 11 Oct 2014 00:45:14 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[IoT]]></category>
		<category><![CDATA[OpenHAB]]></category>
		<category><![CDATA[Z-Wave]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1687</guid>

					<description><![CDATA[<p>Home Automation and "The Internet of Things" are common terms these days. This is the start of my journey down that path... starting with OpenHAB and Z-Wave.</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2014/10/home-automation-openhab-z-wave/">Home Automation, OpenHAB, Z-Wave</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Some time last year, one of the guys at work and I came across a KickStarter project called <a title="NinjaBlocks" href="http://shop.ninjablocks.com/collections/ninja-blocks">NinjaBlocks</a><a href="#ref1"><sup>[1]</sup></a> (I&#8217;m lazy so I&#8217;ll refer to this unit as NB). The options were limitless&#8230; or at least varied enough to make it interesting. Both of us put in an order and a month or so later we had some new goodies to play with.</p>
<p>One of the greatest draw-cards for me was that it could control other devices that use 433MHz, which while it may not sound impressive, included some readily available &#8220;remote-control&#8221; power sockets. These sockets came with a remote control with a series of 4 on/off buttons &#8211; basically you plugged these into your wall socket, then something into them and you could use the remote to flick the switch on and off without going near it. This instantly appealed to me, and my plan was to put the lights of my 2 aquariums onto them, and use the NB rule capability to simply turn the lights on and off on a schedule!</p>
<p>This was a very meagre requirement and setup without any significant problems. But over time a few issues cropped up. The main one being that the NB device interacted with some cloud hosted brains to provide the management interface, and obviously some of the actuators as when the internet connection was down, it wouldn&#8217;t trigger anything. It also had an issue that (at least using its wireless connection which was necessary to get it close enough to the devices that needed to be controlled) if the connection dropped to the NB for any reason, it seemed to need to be rebooted to get it to reconnect.</p>
<p>The other real issue is no fault of NB but more a function of the communication style of 433MHz devices &#8211; sometimes the NB would tell the socket to turn on or off, but the socket for whatever reason wouldn&#8217;t get the hint. The NB had no idea if its command was followed or not; it was a fire-and-forget sort of communication.</p>
<p>Those issues aside, it ticked along for a fair while being my overpriced power timer (I should mention that before the NB I had 2 analogue power timers that did the job fine, they were just a little noisy and if the power was out for a period I had to manually readjust them so their view on time wasn&#8217;t offset). It was a geeky, lazy solution and conceptually I loved it.</p>
<p>Then it died.</p>
<p>A couple of months or so ago, the NB stopped doing anything. It wouldn&#8217;t even acquire an IP address from the network. And at the time I didn&#8217;t have the correct adapter to get a monitor on it to confirm my suspicion that it was just bricked. But I ignored it for a while and just started using the original remote for the sockets, which worked fine but meant that the on and off time for the lights was a little less scheduled, and if I went away, they got no lights (not a huge issue but I liked the idea of a stable rhythm for them!).</p>
<p>At some point along the timeline, I&#8217;d played a little attention to some other things in the wild around home automation, initially with the thought I could find something that wasn&#8217;t so reliant on internet connection to actually be able to control the thing right next to it.</p>
<p>In this process I got and played with a RaspberryPi (actually the Pi was inspired as an alternative to a computer to display an web based dashboard on a big screen TV for work) and liked it but found it had some limitations in its processing ability (it got bogged down easily). This led me to the <a title="BeagleBone Black" href="http://beagleboard.org/Products/BeagleBone+Black">BeagleBone Black</a> (BB) &#8211; same concept but with a little more grunt, and coincidentally the board that the NB was built on top of. So I got a BB and it sat doing very little for a few weeks until I came across <a title="OpenHAB" href="http://www.openhab.org/">OpenHAB</a>!</p>
<p>The remainder of this post will be about my journey with the BB and OpenHAB, where I am today with it and some of the fun I had along the way that might even help someone else!</p>
<p>I should mention that I&#8217;m terrible when it comes to research on these things too. A number of articles I found online that helped me with bits, probably held the answers to the questions I came up with along the way, but due to a terrible habit of skim reading along with a tendency to quickly locate just the bit I need at a point in time then lose track of the rest of the content by the time I hit my next hurdle, a review of some of them leads me to realise there were a bunch of hints that I&#8217;d just overlooked. Actually, a bunch of the things that I had read that just really made no sense to me at the time (mainly thanks to some specific terminology) now make perfect sense and show themselves to be answers &#8211; I was just to dumb to see it and ended up with a lot of trial and error to realise what they were actually saying.</p>
<p>Right, so OpenHAB is an open source home automation system basically. It&#8217;s software that can run on probably endless devices (Java based) and has the ability to interact with a whole raft of devices.</p>
<p>Today, I have it talking to my Philips Hue bulbs, as well as 2 Z-Wave power socket controllers, and a <a title="Fibaro Motion Sensor FGMS-001" href="www.smartthingsnz.co.nz/store/product/fibaro-motion-sensor/">Fibaro motion sensor</a> (which actually does motion, temperature, light metering and an accelerometer). All these along with the <a title="Aeon Labs Z-Stick" href="www.smartthingsnz.co.nz/store/product/aeon-labs-z-stick/">control stick</a> required for the Z-Wave were sourced from <a href="http://www.smartthingsnz.co.nz/store/">Smart Things NZ</a>, a Christchurch based supplier of lots of cool home automation stuff run by an extremely helpful guy called Ben Jones.</p>
<p>Some credit to Ben here. After a very disjointed email to him late one night, a conversation started and I found Ben to not just be a sales guy, but a real enthusiast, strong member of the home automation / OpenHAB community who was great with suggestions and eager to help. In fact I was led to his site by links to him from other people whom he&#8217;d helped in the past. He even happens to have written some of the bindings for OpenHAB that I was planning to use so overall helped me validate that the concept in my mind actually had some realism in its ability to happen in real life too.</p>
<p>Initially I set up my BB using the default operating system, and got OpenHAB running on it. I set it up with my Hue bulbs and had a play. Great, that&#8217;s fun, but I didn&#8217;t get much past that. When I tried to install a program called mosquitto to act as an MQTT server (for an iPhone app OwnTracks), I spent hours bashing my head against a brick wall. It was around this time that I started talking to Ben and he mentioned he used MQTT a lot in his setup, and he was running on Ubuntu. I&#8217;m pretty used to Debian and not to bad with the quite similar Ubuntu, and the BB can support either of these distros so I went with Ubuntu and flashed my BB, starting from scratch.</p>
<p>With that done, mosquitto was a 30 second apt-get install away and I had OpenTracks talking to it minutes after that.</p>
<p>Then my Z-Wave toys arrived. I concentrated on the power sockets first as getting the timed light control on my fish tanks was the main thing I knew I wanted to achieve. I had to reinstall OpenHAB, which went fine, then plugged in the Z-Stick, put the Z-Wave addons in the right directory and fired up OpenHAB.</p>
<p>Joining the sockets (the actual term for this is &#8216;including&#8217;, but I tend to call it pairing but it&#8217;s all the same thing) was as easy as a press on the Z-Stick (although I found that this does need to be done with the Z-Stick unplugged from the USB. Putting it into learn mode while plugged in was technically doable but disconnected it from the BB requiring a reboot). The doco for the Z-Stick actually gives a description of taking the Z-Stick to where you want the new device to be and pair it in there which made more sense to me after I&#8217;d got everything setup overall. The manuals with both the Z-Stick and the sockets had some good information even if some of it meant nothing to me at the time, but it was certainly enough to get started.</p>
<p>Anyway, I ramble&#8230;</p>
<p>Next, I added these devices into OpenHAB as items. This is pretty much where you define all the things you interact with; all your endpoints of sorts. Getting the Hue bulbs going in the first round had dragged me through the doco for these &#8211; the OpenHAB site has some good info on the basics and the doco for most bindings gives good detail and examples.</p>
<p>Problem&#8230; How the hell do I define the sockets as items? The Z-Wave binding (actually I think that might be another one of Ben&#8217;s) had great doco, so after reading that and another article<a href="#ref2"><sup>[2]</sup></a> (actually where I first found mention of Ben) I ended up stealing some code from Jan-Piet Mens&#8217; article and turned it into this:</p>
<pre>Switch Z_Socket1
   "Big Tank"
   (Lights)
   {zwave="3:1:command=SWITCH_BINARY"}

Switch Z_Socket2
   "Small Tank"
   (Lights)
   {zwave="4:1:command=SWITCH_BINARY"}
</pre>
<p>At this point, I was really just guessing which device was which (the 3 and 4 in those Z-Wave lines identifies which device it is), but during the OpenHAB bootup, I noticed it said there were 4 Z-Wave devices (I&#8217;d actually already paired the motion sensor at this point but I&#8217;ll detail that later) so I did some trial and error. For the trial and error bit, I had to get them on the sitemap so that I could actually do something with them. My initial sitemap was something like&#8230;</p>
<pre>sitemap morse label="Main Menu" {
   Frame label="Fish tank lights" {
      Switch item=Z_Socket1 label="Big tank (900L)" icon="switch"
      Switch item=Z_Socket2 label="Small tank (215L)" icon="switch"
   }
}
</pre>
<p>W00t! It works. I can reliably switch them on and off, and if I do it using the button locally on the actual socket, when I reload the phone app, it shows the correctly updated state. The last bit to get these doing what I wanted was actually done after a munch of frigging around with the motion sensor (I&#8217;d thought, that was easy, I&#8217;ll just do the same for this and then it&#8217;s all in! &#8211; boy was I wrong). Here my first &#8220;rule&#8221; was born. The first one was simply, turn the two sockets (and hence the fish tank lights) on at 7am each day. Not too complex, no multiple criteria or anything like that. A little code acquisition from other examples ended up as:</p>
<pre>rule "Switch fishtank lights on at 7am"
when
   Time cron "0 0 7 * * ?"
then
   sendCommand(Z_LightsTank1, ON)
   sendCommand(Z_LightsTank2, ON)
end
</pre>
<p>And what do you know? 7am the next morning, the lights came on. Easy as!! The lights off rule looks almost identical:</p>
<pre>rule "Switch fishtank lights off at 8pm"
when
   Time cron "0 0 20 * * ?"
then
   sendCommand(Z_Socket1, OFF)
   sendCommand(Z_Socket2, OFF)
end
</pre>
<p>I&#8217;m still not 100% sure I&#8217;ve got the metering working for the feedback from the switches, but an example of my item for one for now is:</p>
<pre>Number Z_Socket1_Power
   "Big Tank Lights [%.1f kWh]"
   (zPower)
   { zwave="3:1:command=METER,meter_scale=E_KWh,refresh_interval=600" }
</pre>
<p><a href="https://randominsanity.net.nz/wp-content/uploads/openhab-automation-rules.jpg"><img loading="lazy" class="alignright size-thumbnail wp-image-1699" src="https://randominsanity.net.nz/wp-content/uploads/openhab-automation-rules-150x99.jpg" alt="openhab-automation-rules" width="150" height="99" srcset="https://randominsanity.net.nz/wp-content/uploads/openhab-automation-rules-150x99.jpg 150w, https://randominsanity.net.nz/wp-content/uploads/openhab-automation-rules-300x199.jpg 300w, https://randominsanity.net.nz/wp-content/uploads/openhab-automation-rules.jpg 500w" sizes="(max-width: 150px) 100vw, 150px" /></a>Nothing to it! Then it was time to come back to the motion sensor. After a couple of evenings of frustration and large quantities of googling (I was determined to work it out without actually having to ask someone like Ben &#8211; I&#8217;m stubborn like that!) I worked out a couple of key things (these realisations came from reading a number of articles and forums, I&#8217;ll put a list of links that I found helpful at the end of the article as all of them added random bits to various pieces of the puzzle)</p>
<ul>
<li>Getting the motion sensor &#8220;included&#8221; is easy. But it&#8217;d different in that what it does automatically isn&#8217;t enough to get the information flowing back. I&#8217;ll give some more detail on that shortly.</li>
<li>HABMin is a great addon to OpenHAB, and one I ended up using. But on the BB, it KILLS CPU, makes everything lag, causes messages to drop (which I was watching in the log) and actually made me think that the BB wasn&#8217;t going to be grunty enough! In the end, when I wasn&#8217;t accessing HABMin, CPU usage died down and everything was happy, so if you&#8217;re using a BB or other limited resource computer, try not to use HABMin when you don&#8217;t have to (Actually having it open in a webpage is all it takes! Having it installed is fine, just don&#8217;t open the page too often)</li>
<li>Battery powered devices work a little differently &#8211; you need to be patient.</li>
</ul>
<p><a href="https://randominsanity.net.nz/wp-content/uploads/motion_sensor_02.png"><img loading="lazy" class="alignright size-thumbnail wp-image-1698" src="https://randominsanity.net.nz/wp-content/uploads/motion_sensor_02-150x136.png" alt="Fibaro Motion Sensor" width="150" height="136" srcset="https://randominsanity.net.nz/wp-content/uploads/motion_sensor_02-150x136.png 150w, https://randominsanity.net.nz/wp-content/uploads/motion_sensor_02-300x272.png 300w, https://randominsanity.net.nz/wp-content/uploads/motion_sensor_02.png 482w" sizes="(max-width: 150px) 100vw, 150px" /></a>Patience was not my strong point. I ended up on the right track but got there too early first time around. Battery powered devices spend a bunch of their time sleeping. When they wake up (the motion sensor default was 7200 seconds), the check the queue for messages and then go back to sleep; a little like me on a Sunday. The outcome of this is that it wasn&#8217;t until I&#8217;d left it overnight that (as far as I can tell) it properly finished the inclusion and I could actually find the bits I thought I was looking for (the next paragraph) so if you&#8217;re having trouble, sleep on it! You can hurry it up a bit by &#8220;waking up&#8221; the device but I obviously hadn&#8217;t done that enough so I still suggest the overnight to sort things out. =P</p>
<p>As well as inclusion, the motion sensor requires you to manually sort out some association. Now that&#8217;s the term I didn&#8217;t understand totally at first when I read it which meant I skipped over that stuff and kept looking &#8211; right past the answer! So yes, you need to change the association, basically telling the motion sensor to send info back to the Z-Stick. To do this, you can use a number of apps (apparently) but I used HABMin for it. So, loading up HABMin, I&#8230; Chose Configuration along the top -&gt; Chose Bindings down the bottom left side -&gt; Click on the Z-Wave one -&gt; Chose Devices from the stuff that loads up. This gives you (hopefully) a list of all the Z-Wave nodes you have (this would have saved me guessing about the switches) &#8211; 3 had a green light, but the motion sensor had a grey light. Expanding the one for the motion sensor, you will find something about Association Groups, and under that you&#8217;ll find Controller Updates. Now here&#8217;s another bit that after all the reading I was still confused about &#8211; some say you have to change all the things you see under Association, others say all under controller updates, and finally I found someone who mentioned the controller &#8211; of course, the one you need to update is whatever node your controller (the Z-Stick) is (probably node 1). So, change Node 1 from Non-Member to Member. Make sure it&#8217;s taken (I reloaded HABMin to double-check) and then close HABMin go sleep on it again. HABMin has no part in it after this and I suspect the load it was putting on things actually slowed the process down just because I had the page open.</p>
<p>The next day, I opened HABMin again and found a green light where the gray one had been. I think that rated as success. So, closing HABMin again, I mashed together some of the examples I&#8217;d found and ended up with this (note, due to me redoing the inclusion a couple of times, instead of its original Node 2, the motion sensor is Node 6):</p>
<pre>Number FibEye1_Motion
   "Lounge Movement: [MAP(movement.map):%s]" (Fibaro,Motion)
   { zwave="6:1:command=sensor_binary,refresh_interval=600" }

Number FibEye1_Alarm
   "Lounge Alarm: [MAP(earthquake.map):%s]" (Fibaro,Alarm)
   { zwave="6:1:command=sensor_alarm,refresh_interval=600" }

Number FibEye1_Lux
   "Lounge Light: [%.2f Lux]" (Fibaro,Lux)
   { zwave="6:1:command=sensor_multilevel,sensor_type=3,refresh_interval=600" }

Number FibEye1_Battery
   "Fibaro Motion Sensor 1: [%d %%]" (Fibaro,Battery)
   { zwave="6:1:command=battery,refresh_interval=86400" }

Number FibEye1_Temp
   "Lounge Temp: [%.1f C]" (Fibaro,Temp)
   { zwave="6:1:command=sensor_multilevel,sensor_type=1,refresh_interval=600" }
</pre>
<p>The labels are a bit screwy but I&#8217;m actually moving away from defining labels in most of my items, and doing it in the sitemap instead. Speaking of sitemap, a snippet that shows some of that in action there is:</p>
<pre>Frame label="Stats" {
   Text item=FibEye1_Battery icon=energy
   Text item=FibEye1_Temp icon=temperature
   Text item=FibEye1_Lux icon=sun
}
</pre>
<p>It took a while again for info to start coming through. The first time around, I hadn&#8217;t put a refresh_interval on the items&#8230; That wasn&#8217;t helpful, but equally setting too short a refresh time had a notable impact on CPU load, so in the end I settled for 600 seconds (5 minutes) and found that a good balance.</p>
<p>It was a long journey but the things I&#8217;ve learnt just from dealing with the motion sensor have given me a much better understanding of Z-Wave and I think will make it easier when (yes when, not if) I get some more devices to add in!</p>
<p>So with all those sensors in the mix, I now have 2 fish tanks with lights going automatically, a sensor that logs (I setup mongodb for persistence) and an interface on my phone where I can see/manipulate all the bits. I&#8217;ve added in the OwnTracks stuff but not had much luck yet &#8211; I haven&#8217;t spent much time to sort it all out but the main issue is updates often not getting back from phone to MQTT which is more a network issue than anything I think. I&#8217;ve also setup Network Health and used it for presence (can it see my phone&#8217;s wifi IP on the LAN) and monitoring my internet connection is up in general. And Charts have been fun too &#8211; I have charts for the power usage from the sockets, and for the light levels and temp from the motion sensor for example. I haven&#8217;t yet done anything based on the motion sensor itself but there are plenty of ideas in my head. Next &#8220;smart&#8221; rule is probably going to be around the Hue bulbs and the light level in the lounge at the time, but I&#8217;m still sorting out some niggles with the Hue binding overall. No doubt I&#8217;ll post some on that when I&#8217;m happy with it.</p>
<p>Expect that I&#8217;ll go over this article a few times and re-word, improve some references or just generally tweak bits. Some more images when I have the time perhaps. But this is a start to get it out there at least!</p>
<p>That list of links that I found helpful in one way or another (in no particular order)<br />
<a href="https://github.com/openhab/openhab/wiki/Z-Wave-Binding">https://github.com/openhab/openhab/wiki/Z-Wave-Binding</a><br />
<a href="https://github.com/openhab/openhab/wiki/MQTT-Binding#transport-configuration">https://github.com/openhab/openhab/wiki/MQTT-Binding#transport-configuration</a><br />
<a href="https://github.com/openhab/openhab/wiki/Mqttitude-Binding">https://github.com/openhab/openhab/wiki/Mqttitude-Binding</a><br />
<a href="http://jpmens.net/2014/01/14/a-story-of-home-automation/">http://jpmens.net/2014/01/14/a-story-of-home-automation/</a><br />
<a href="http://forum.mysensors.org/topic/302/openhab-mqtt-tips-hints">http://forum.mysensors.org/topic/302/openhab-mqtt-tips-hints</a><br />
<a href="http://blog.scurb.se/homeautomation/home-automation-an-early-case-study/">http://blog.scurb.se/homeautomation/home-automation-an-early-case-study/</a><br />
<a href="https://groups.google.com/forum/#!topic/openhab/8uMM-xT_WoE">https://groups.google.com/forum/#!topic/openhab/8uMM-xT_WoE</a><br />
<a href="https://groups.google.com/forum/#!msg/openhab/bb9bB71zgsM/J2bNY6dnZvsJ">https://groups.google.com/forum/#!msg/openhab/bb9bB71zgsM/J2bNY6dnZvsJ</a><br />
<a href="https://groups.google.com/forum/#!topic/openhab/bb9bB71zgsM">https://groups.google.com/forum/#!topic/openhab/bb9bB71zgsM</a></p>
<p>Aaand a random selection of screenshots from the OpenHAB app on my phone at the moment&#8230;</p>
<p><a href="https://randominsanity.net.nz/wp-content/uploads/IMG_2598.png"><img loading="lazy" class="alignnone size-thumbnail wp-image-1690" src="https://randominsanity.net.nz/wp-content/uploads/IMG_2598-84x150.png" alt="OpenHab - The Lounge" width="84" height="150" srcset="https://randominsanity.net.nz/wp-content/uploads/IMG_2598-84x150.png 84w, https://randominsanity.net.nz/wp-content/uploads/IMG_2598-169x300.png 169w, https://randominsanity.net.nz/wp-content/uploads/IMG_2598-576x1024.png 576w, https://randominsanity.net.nz/wp-content/uploads/IMG_2598.png 640w" sizes="(max-width: 84px) 100vw, 84px" /></a> <a href="https://randominsanity.net.nz/wp-content/uploads/IMG_2601.png"><img loading="lazy" class="alignnone size-thumbnail wp-image-1691" src="https://randominsanity.net.nz/wp-content/uploads/IMG_2601-84x150.png" alt="OpenHAB - Network Health" width="84" height="150" srcset="https://randominsanity.net.nz/wp-content/uploads/IMG_2601-84x150.png 84w, https://randominsanity.net.nz/wp-content/uploads/IMG_2601-169x300.png 169w, https://randominsanity.net.nz/wp-content/uploads/IMG_2601-576x1024.png 576w, https://randominsanity.net.nz/wp-content/uploads/IMG_2601.png 640w" sizes="(max-width: 84px) 100vw, 84px" /></a> <a href="https://randominsanity.net.nz/wp-content/uploads/IMG_2599.png"><img loading="lazy" class="alignnone size-thumbnail wp-image-1692" src="https://randominsanity.net.nz/wp-content/uploads/IMG_2599-150x84.png" alt="OpenHAB - Power Consumption" width="150" height="84" srcset="https://randominsanity.net.nz/wp-content/uploads/IMG_2599-150x84.png 150w, https://randominsanity.net.nz/wp-content/uploads/IMG_2599-300x169.png 300w, https://randominsanity.net.nz/wp-content/uploads/IMG_2599-1024x576.png 1024w, https://randominsanity.net.nz/wp-content/uploads/IMG_2599-700x393.png 700w, https://randominsanity.net.nz/wp-content/uploads/IMG_2599.png 1136w" sizes="(max-width: 150px) 100vw, 150px" /></a> <a href="https://randominsanity.net.nz/wp-content/uploads/IMG_2600.png"><img loading="lazy" class="alignnone size-thumbnail wp-image-1693" src="https://randominsanity.net.nz/wp-content/uploads/IMG_2600-84x150.png" alt="OpenHAB - Temperature" width="84" height="150" srcset="https://randominsanity.net.nz/wp-content/uploads/IMG_2600-84x150.png 84w, https://randominsanity.net.nz/wp-content/uploads/IMG_2600-169x300.png 169w, https://randominsanity.net.nz/wp-content/uploads/IMG_2600-576x1024.png 576w, https://randominsanity.net.nz/wp-content/uploads/IMG_2600.png 640w" sizes="(max-width: 84px) 100vw, 84px" /></a> <a href="https://randominsanity.net.nz/wp-content/uploads/IMG_2597.png"><img loading="lazy" class="alignnone size-thumbnail wp-image-1694" src="https://randominsanity.net.nz/wp-content/uploads/IMG_2597-84x150.png" alt="OpenHAB - Home Screen" width="84" height="150" srcset="https://randominsanity.net.nz/wp-content/uploads/IMG_2597-84x150.png 84w, https://randominsanity.net.nz/wp-content/uploads/IMG_2597-169x300.png 169w, https://randominsanity.net.nz/wp-content/uploads/IMG_2597-576x1024.png 576w, https://randominsanity.net.nz/wp-content/uploads/IMG_2597.png 640w" sizes="(max-width: 84px) 100vw, 84px" /></a></p>
<p><a name="#ref1"></a>[1] These were the older style NinjaBlocks; since then they have come up with NinjaSphere that I haven&#8217;t looked into much so anything comments I make may no longer be current.<br />
<a name="#ref2"></a>[2] http://jpmens.net/2014/01/14/a-story-of-home-automation/</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2014%2F10%2Fhome-automation-openhab-z-wave%2F&amp;linkname=Home%20Automation%2C%20OpenHAB%2C%20Z-Wave" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2014%2F10%2Fhome-automation-openhab-z-wave%2F&amp;linkname=Home%20Automation%2C%20OpenHAB%2C%20Z-Wave" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2014%2F10%2Fhome-automation-openhab-z-wave%2F&amp;linkname=Home%20Automation%2C%20OpenHAB%2C%20Z-Wave" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2014%2F10%2Fhome-automation-openhab-z-wave%2F&amp;linkname=Home%20Automation%2C%20OpenHAB%2C%20Z-Wave" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2014%2F10%2Fhome-automation-openhab-z-wave%2F&#038;title=Home%20Automation%2C%20OpenHAB%2C%20Z-Wave" data-a2a-url="https://randominsanity.net.nz/2014/10/home-automation-openhab-z-wave/" data-a2a-title="Home Automation, OpenHAB, Z-Wave"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2014/10/home-automation-openhab-z-wave/">Home Automation, OpenHAB, Z-Wave</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2014/10/home-automation-openhab-z-wave/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Raring Ringtail (Ubuntu 13.04)</title>
		<link>https://randominsanity.net.nz/2013/07/raring-ringtail-ubuntu-13-04/</link>
					<comments>https://randominsanity.net.nz/2013/07/raring-ringtail-ubuntu-13-04/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Thu, 04 Jul 2013 11:50:57 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1655</guid>

					<description><![CDATA[<p>Everyone needs a project, and for a few reasons I recently decided my project was to get Ubuntu running on my desktop PC. I wanted something to distract me from working at home too much, and I needed a distraction from my head being in overdrive. And so the mission began...</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2013/07/raring-ringtail-ubuntu-13-04/">Raring Ringtail (Ubuntu 13.04)</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div id="attachment_1656" style="width: 306px" class="wp-caption alignright"><a href="https://randominsanity.net.nz/wp-content/uploads/raring-ringtail-logo.png"><img aria-describedby="caption-attachment-1656" loading="lazy" class="size-medium wp-image-1656 " title="Raring Ringtail" alt="raring-ringtail-logo" src="https://randominsanity.net.nz/wp-content/uploads/raring-ringtail-logo-300x168.png" width="300" height="168" srcset="https://randominsanity.net.nz/wp-content/uploads/raring-ringtail-logo-300x168.png 300w, https://randominsanity.net.nz/wp-content/uploads/raring-ringtail-logo-150x84.png 150w, https://randominsanity.net.nz/wp-content/uploads/raring-ringtail-logo.png 570w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-1656" class="wp-caption-text">Ubuntu 13.04 (Codename Raring Ringtail)</p></div>
<p>So a wee while ago I decided I wanted to get a decent *nix operating system running at home again, because (let&#8217;s face it) running Windows all the time is enough to drive anyone crazy.</p>
<p>Don&#8217;t get me wrong, I&#8217;m not ditching Windows all together. I still need to keep it around for some apps, wether I like it or not.</p>
<p>After a bit of googling and with no small part played by reviews from <a title="NixiePixel's site" href="http://www.nixiepixel.com" target="_blank">Nixie Pixel</a> (she&#8217;s got some great stuff on Twitter, Facebook and YouTube!) I settled on Ubuntu. It is similar to Debian in its terminal commands and it has a pretty good reputation as a nice stable desktop OS. Raring Ringtail (the codename for the latest version 13.04) was hot off the press too, so after a quick download and burning the ISO to disk I made space on one of my drives and booted ready to install.</p>
<p>It wasn&#8217;t without hiccups. My computer is self-built and Linux compatibility wasn&#8217;t a consideration at the time I got all the parts. The first issue I ran into was installing GRUB to the wrong drive&#8230; after several revisions of harddrive config in the machine, I managed to lose track of where the current boot loader was living. That fixed though, I got the install completed and booted Ubuntu!</p>
<p>Or at least tried to. For some unknown reason it just booted to black screens. No small amount of time buried in Google came up with various similar reports and a myriad of proposed fixes. I came to the assumption that it was all due to the graphics cards I was running (dual Nvidia GT250s), but after playing with config options in GRUB I managed to get limited access, and while snooping around I found an entry in fstab for the floppy drive.</p>
<p>Now I have no idea if this was actually related or not but I removed the entry as I have no floppy drive in my machine, and things suddenly started to play ball. This got me a clean boot with one screen working. I have four screens on my machine so this was the obvious next battle.</p>
<p>I thought this one should be simpler, given the Nvidia config app, but several aborted attempts to configure them this way got me two screens at best!</p>
<p>I resorted to writing the config file (xorg.conf) manually. I&#8217;ve never really played with any GUI on Linux before so this was new ground for me. Another dive into Google got me a bunch of samples and after more reboots than I can count I managed to get all four screens to show, and actually in the right arrangement as they sat on the desk!</p>
<p>But (there&#8217;s always a but) there was no menu bar, no dock or control options to be seen. And that&#8217;s where I&#8217;m currently at. Experimenting with finer changes to the xorg.conf file, trying Gnome, more Google madness, etc. It&#8217;s quite frustrating to have four screens working but unusable, or one (or two) screens working perfectly.</p>
<p>I don&#8217;t know if it&#8217;s a display manger issue, a config issue, a driver issue, or the little gremlin in the computer having a laugh, but I&#8217;m still working on it and determined to figure it out. When I do, I&#8217;ll post more&#8230;</p>
<p>In the mean time, have any of you had a similar battle? Any hints/tips/pointers for a guy who&#8217;s usually ssh&#8217;d into 5 different servers but basically a newbie when it comes to using nix as a desktop OS?</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fraring-ringtail-ubuntu-13-04%2F&amp;linkname=Raring%20Ringtail%20%28Ubuntu%2013.04%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fraring-ringtail-ubuntu-13-04%2F&amp;linkname=Raring%20Ringtail%20%28Ubuntu%2013.04%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fraring-ringtail-ubuntu-13-04%2F&amp;linkname=Raring%20Ringtail%20%28Ubuntu%2013.04%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fraring-ringtail-ubuntu-13-04%2F&amp;linkname=Raring%20Ringtail%20%28Ubuntu%2013.04%29" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fraring-ringtail-ubuntu-13-04%2F&#038;title=Raring%20Ringtail%20%28Ubuntu%2013.04%29" data-a2a-url="https://randominsanity.net.nz/2013/07/raring-ringtail-ubuntu-13-04/" data-a2a-title="Raring Ringtail (Ubuntu 13.04)"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2013/07/raring-ringtail-ubuntu-13-04/">Raring Ringtail (Ubuntu 13.04)</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2013/07/raring-ringtail-ubuntu-13-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Bits and Bobs (or Bits and Bytes)</title>
		<link>https://randominsanity.net.nz/2013/07/bits-and-bobs-or-bits-and-bytes/</link>
					<comments>https://randominsanity.net.nz/2013/07/bits-and-bobs-or-bits-and-bytes/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Wed, 03 Jul 2013 11:40:58 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Geek]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1628</guid>

					<description><![CDATA[<p>So after my last article, I got asked a few questions about data and speed. Speed is one I'd like to write about but I think it's a bigger topic than I have time for at the moment but I figured a little info on data should be easier (easier, not necessarily easy) to tackle.</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2013/07/bits-and-bobs-or-bits-and-bytes/">Bits and Bobs (or Bits and Bytes)</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>So after my <a title="Netflix and other US restricted content in NZ" href="https://randominsanity.net.nz/?p=1571">last article</a>, I got asked a few questions about data and speed. Speed is one I&#8217;d like to write about but I think it&#8217;s a bigger topic than I have time for at the moment but I figured a little info on data should be easier (easier, not necessarily easy) to tackle.<span id="more-1628"></span></p>
<h3>Bits</h3>
<p>In the digital world, everything breaks down to binary. Binary is just &#8220;base 2&#8221;, or 0&#8217;s and 1&#8217;s.</p>
<p>When it comes to measuring data, a binary 0 or 1 is a &#8220;bit&#8221; (short for binary digit). So think of bits as the building blocks of what we&#8217;re talking about.</p>
<p>You probably see more about bits than you think. Speeds for data transfer (how fast your download is going, or how fast your connection plan is) are typically represented in bits. But just like we deal with grams and kilograms to represent varying scales of weight (where a kilogram is just an easy term for 1000 grams) we do the same for bits.</p>
<p>Now there&#8217;s two ways that this can be done. In dealing with weight, we do things in tens, hundreds, thousands etc. (decimal) and we can do that for bit&#8217;s too.</p>
<table>
<tbody>
<tr>
<td><strong>Common term</strong></td>
<td><strong>Unit</strong></td>
<td><strong>Bits</strong></td>
</tr>
<tr>
<td>Bits</td>
<td>bit</td>
<td>1</td>
</tr>
<tr>
<td>Kilobits</td>
<td>Kbit</td>
<td>1000</td>
</tr>
<tr>
<td>Megabit</td>
<td>Mbit</td>
<td>1000<sup>2</sup></td>
</tr>
<tr>
<td>Gigabit</td>
<td>Gbit</td>
<td>1000<sup>3</sup></td>
</tr>
<tr>
<td>Terabit</td>
<td>Tbit</td>
<td>1000<sup>4</sup></td>
</tr>
</tbody>
</table>
<p>So the same way kilo is a prefix for kilogram to represent 1000 grams, we use the kilo prefix to bit&#8217;s to represent 1000 bits. There&#8217;s another prefix for each increasing power of 1000. In the above table you see mega, giga and tera; it keeps going too with the next few being peta, exa, zetta and yotta tops out as 1000<sup>8</sup> or 1,000,000,000,000,000,000,000,000 bits, or 1000 zettabits! Confused yet?</p>
<p>Well if you haven&#8217;t fallen asleep yet, let’s now look at the binary power version. This is the more pure version in my opinion but some people find the maths of 10&#8217;s easier.</p>
<table>
<tbody>
<tr>
<td><strong>Common term</strong></td>
<td><strong>Unit</strong></td>
<td><strong>Bits</strong></td>
</tr>
<tr>
<td>Bits</td>
<td>bit</td>
<td>1</td>
</tr>
<tr>
<td>Kibibits</td>
<td>Kibit</td>
<td>1024</td>
</tr>
<tr>
<td>Mebibit</td>
<td>Mibit</td>
<td>1024<sup>2</sup></td>
</tr>
<tr>
<td>Gibibit</td>
<td>Gibit</td>
<td>1024<sup>3</sup></td>
</tr>
<tr>
<td>Tebibit</td>
<td>Tibit</td>
<td>1024<sup>4</sup></td>
</tr>
</tbody>
</table>
<p>These go higher too but you get the idea. The really confusing part is that the terms for the decimal versions used to be commonly used (and sometimes still are) when the decimal version is actually meant (even I usually mean 1024<sup>3</sup> when I say Gigabit) so it&#8217;s often hard to know which is really intended. The units can also often be shortened too, so you&#8217;ll see Mb instead of Mbit (or Mibit), and the main thing to note is the lower case &#8220;b&#8221; which points to bit&#8217;s.</p>
<p>If you&#8217;re on a lovely 100/50 &#8220;UltraFast Broadband&#8221; fibre connection, the 100/50 really means you have a rated download speed of 100Mbit&#8217;s per second down, and 50Mbit&#8217;s per second up. A point that illustrates also that speed measurements represented by bits are also given against a unit of time (usually seconds). The speed you practically see on your connection varies significantly and certainly don&#8217;t expect to see every download or speedtest you see to show 100Mbit/s &#8211; as I said above there&#8217;s a bunch of info for another topic.</p>
<h3>Bytes</h3>
<p>A byte is a collection of 8 bit&#8217;s. Simple as that. The way those 8 bits are arranged defines what the byte represents. There are lots of different standards as to how that byte is interpreted but that&#8217;s another topic all together.</p>
<p>We do the grouping stuff here too, so we get Kilobyte, Megabyte, Gigabyte etc. We get the abbreviated units too, so KB, MB, GB (note the uppercase &#8220;B&#8221; here points to Byte&#8217;s instead of Bit&#8217;s). Technically the binary versions here get the abbreviations KiB, MiB, GiB etc., but again the terms get mixed up regardless of intention.</p>
<p>Bytes are usually not used to represent speed, but more commonly storage. So your harddrive in your computer will usually be measured in GB or more commonly now TB. For example I have several 2TB drives in my computer. If your internet connection has a data cap it too will usually be represented in byte&#8217;s instead of bits.</p>
<h3>Some math</h3>
<p>If you&#8217;re still with me, let&#8217;s do a little exercise to put what we&#8217;ve learnt to use.</p>
<p>Let’s work out if your downloads actually go at 20Mibit/s, how long will it take you to download a 4GiB file (for clarity, I&#8217;m going to use the binary version of both here).</p>
<p>First I&#8217;ll do some work on the speed to get it to a more useable number.</p>
<p>Times 20 by 60 to go from Mibit/s to Mibit/minute. 20 * 60 = 1200Mbit/minute.<br />
Now, since there&#8217;s 8 bit&#8217;s in a byte and we measure our file in byte&#8217;s we can divide the Mibit&#8217;s/minute by 8 to get MiB/minute. 1200 / 8 = 150MiB/minute.</p>
<p>Now let&#8217;s get the file size from Gigabytes to Megabytes.<br />
1 GiB = 1024 MiB so we times our 4GiB by 1024. 4 * 1024 = 4096MiB.</p>
<p>So, now we have a 4096MiB file, and we can download at 150MiB per minute.<br />
4096 / 150 = 27.3 (minutes).</p>
<p>So all things going well (which they rarely do) you could download your file in a little under half an hour.</p>
<p>Another application of this sort of maths is working out how much data you will use while streaming video or music from the internet. I won&#8217;t put as much explanation around this one, but we&#8217;ll work out how much data I&#8217;ll use if I steam an hours’ worth of Netflix at high-definition which Netflix rate as about 5Mibit/s.</p>
<p>1 hour * 5Mibit/s = ???<br />
60 minutes * 5Mibit/s = ???<br />
60 minutes * (5 * 60)Mibit/minute = ???<br />
60 minutes * 300Mibit/minute = ???<br />
60 minutes * 300Mibit/minute = 18000Mibit&#8217;s<br />
60 minutes * 300Mibit/minute = (18000 / 8)MiB&#8217;s<br />
60 minutes * 300Mibit/minute = 2250MiB&#8217;s<br />
60 minutes * 300Mibit/minute = (2250 / 1024)GiB&#8217;s<br />
60 minutes * 300Mibit/minute = 2.2GiB&#8217;s</p>
<p>So for every hour you watched you&#8217;d use over 2 gigs of data. If your plan has a 100GB (or GiB depending on what they mean) quota that&#8217;s not too bad. If you have a 3GB quota&#8230; you&#8217;re going to run out of data pretty quick.</p>
<p>More reading? Wikipedia as usual has a tonne (another of those units of measurement) of information. You can start with their article on the <a title="Wikipedia - Bit" href="http://en.wikipedia.org/wiki/Bit" target="_blank">Bit</a> and go from there.</p>
<p>That&#8217;s enough for now. As usual, feel free to ask any questions below and I&#8217;ll try to help where I can. Any corrections are welcome also (Hey, I never claimed to be perfect!).</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fbits-and-bobs-or-bits-and-bytes%2F&amp;linkname=Bits%20and%20Bobs%20%28or%20Bits%20and%20Bytes%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fbits-and-bobs-or-bits-and-bytes%2F&amp;linkname=Bits%20and%20Bobs%20%28or%20Bits%20and%20Bytes%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fbits-and-bobs-or-bits-and-bytes%2F&amp;linkname=Bits%20and%20Bobs%20%28or%20Bits%20and%20Bytes%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fbits-and-bobs-or-bits-and-bytes%2F&amp;linkname=Bits%20and%20Bobs%20%28or%20Bits%20and%20Bytes%29" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fbits-and-bobs-or-bits-and-bytes%2F&#038;title=Bits%20and%20Bobs%20%28or%20Bits%20and%20Bytes%29" data-a2a-url="https://randominsanity.net.nz/2013/07/bits-and-bobs-or-bits-and-bytes/" data-a2a-title="Bits and Bobs (or Bits and Bytes)"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2013/07/bits-and-bobs-or-bits-and-bytes/">Bits and Bobs (or Bits and Bytes)</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2013/07/bits-and-bobs-or-bits-and-bytes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Netflix and other US restricted content in NZ</title>
		<link>https://randominsanity.net.nz/2013/07/netflix-and-other-us-restricted-content-in-nz/</link>
					<comments>https://randominsanity.net.nz/2013/07/netflix-and-other-us-restricted-content-in-nz/#comments</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Tue, 02 Jul 2013 03:32:14 +0000</pubDate>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Anti-competitive]]></category>
		<category><![CDATA[Apple TV]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Netflix]]></category>
		<guid isPermaLink="false">https://randominsanity.net.nz/?p=1571</guid>

					<description><![CDATA[<p>So life in NZ is pretty good. We may be a little out of the way as far as the bulk of internet content is but that's slowly changing with more content being cached onshore.</p>
<p>Lets take a look at the content that they make it harder to get if you're not in the States! We'll start with Netflix and how to get it playing to your Apple TV in little old NZ.</p>
<p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2013/07/netflix-and-other-us-restricted-content-in-nz/">Netflix and other US restricted content in NZ</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>So life in NZ is pretty good. We may be a little out of the way as far as the bulk of internet content is but that&#8217;s slowly changing with more content being cached onshore.</p>
<p>But&#8230; there&#8217;s still a lot of stuff that the states are keeping to themselves. Sites like Netflix, Hulu Plus and HBO GO (among others) that offer movie or TV streaming services in the US and UK for example, are not available in NZ. Netflix is one that&#8217;s received a lot of attention lately &#8211; for those of you who aren&#8217;t familiar with it, Netflix allows you to stream a large selection of movies on demand for a simple subscription fee, not a pay-per-movie. There&#8217;s streaming TV also, the options are vast.</p>
<p>Now, there&#8217;s been a lot of people posting details on ways to get around this geographic restriction, and even more speculating why it exits in the first place, but be it political, commercial or whatever other reason, get around it we shall. I decided it&#8217;s time to help piece together some of the bits around the net and hopefully give enough info for novice and advanced user alike.</p>
<p><span id="more-1571"></span></p>
<p>I&#8217;m going to show you a few different scenarios to get yourself connected to all that content, but before we start there&#8217;s a few things to be aware of:</p>
<ul>
<li>Legality: The general consensus is that there&#8217;s no laws being broken here. Various Internet providers in NZ and further afield have even setup a service to do this for you. BUT I&#8217;m no lawyer. If it&#8217;s something you&#8217;re REALLY worried about, you should have a look around make your own mind up.</li>
<li>The content is coming from the US. That&#8217;s a fair way away even in internet terms, which imposes some limitations. The main one you&#8217;ll notice with Netflix is that you might not get their full HD movies (See <a title="Internet Connection Speed Recommendations " href="https://support.netflix.com/en/node/306" target="_blank">here</a> for more info on connection requirements and remember it&#8217;s not your plan speed but your speed to their server in the states!). You can still stream those movies, they will just be delivered to you at standard definition which is still usually plenty for most people.</li>
<li>Streaming movies uses your bandwidth. This is the same no matter where it comes from (as a general rule) but keep an eye on your data usage and take note of your internet plan!</li>
<li>This works now, and has done so for quite some time. But as it&#8217;s not standard usage, providers like Netflix may make changes in the future that stop this from working. They haven&#8217;t made any noises about it, but it&#8217;s a possibility either directly or indirectly.</li>
<li>Some will tell you this is what you do to replace Sky. If you&#8217;re a Sky subscriber (as I am) you need to have a look and see if just one or the other is the best option, or if you want to keep both for the things you want to watch. You might for example keep the basic Sky package for the channels it offers but biff your Sky Movies in favour of putting those funds towards Netflix. Basically, make your own mind up based on content and budget.</li>
</ul>
<p>Lets start with probably the easiest scenario. Do you have an Apple TV? Yes? Excellent, you can get up and running pretty fast.</p>
<div id="attachment_1575" style="width: 298px" class="wp-caption alignright"><img aria-describedby="caption-attachment-1575" loading="lazy" class=" wp-image-1575    " alt="Netflix on Apple TV" src="https://randominsanity.net.nz/wp-content/uploads/netflix_screen.jpg" width="292" height="164" srcset="https://randominsanity.net.nz/wp-content/uploads/netflix_screen.jpg 744w, https://randominsanity.net.nz/wp-content/uploads/netflix_screen-150x84.jpg 150w, https://randominsanity.net.nz/wp-content/uploads/netflix_screen-300x168.jpg 300w" sizes="(max-width: 292px) 100vw, 292px" /><p id="caption-attachment-1575" class="wp-caption-text">Netflix on Apple TV</p></div>
<h2>Netflix on Apple TV</h2>
<p style="clear: left;"><strong>Difficulty:</strong> Low<br />
<strong>Time required:</strong> 10 to 30 minutes for most users<br />
<strong>Costs (at the moment anyway):</strong> $4.99/month (USD) for remote DNS, and $7.99/month (USD) for Netflix itself</p>
<p>This setup on the Apple TV will allow you to watch Netflix through it using what&#8217;s called a remote DNS, without messing with any of your other devices (e.g. Your desktop computer still won&#8217;t be able to access Netflix). This is good for someone who&#8217;s not that tech-savvy as there are sometimes unintended consequences of having all your devices use the remote DNS service.</p>
<p>What you should know before you start: Part of this setup requires you to basically tell your Apple TV that you live in the US. This works fine for our purpose but does have a side effect that you can&#8217;t use your NZ iTunes account from the Apple TV. Not a big issue for most, but if you watch movies purchased through Apple iTunes you need to decide if Netflix is a suitable replacement.</p>
<p>Still keen? Sweet! First head on over to <a title="Unblock Us" href="http://www.unblock-us.com" target="_blank">Unblock us</a>. It&#8217;s a service that helps you get access to the right information (it&#8217;s the remote DNS service I just mentioned). If you want to know more there&#8217;s info on the site, but in my opinion it&#8217;s one of the best ways to do it, so just do it. You can register for a free week trial, or $4.99/month (USD). They have instructions for lots of devices, but the version of it for Apple TV is <a title="Unblock-us - Apple TV instructions" href="http://support.unblock-us.com/customer/portal/articles/291549" target="_blank">here</a>.</p>
<p>Note that you have to change both DNS and location settings to make it act like it&#8217;s in the US. Once that&#8217;s setup, you should see and be able to use the Netflix application on your Apple TV to connect.</p>
<p>Assuming you don&#8217;t have a Netflix account already (from time overseas or by registering an account at someone else&#8217;s place that has this going already), the Apple TV Netflix account should let you set one up. Just follow your nose, it should be self explanatory (I did mine over a computer but I&#8217;ll review the app method more if people are getting stuck). If you have to enter a postcode for your *cough* US Address *cough*, just use the good old 90210.</p>
<p>For those who aren&#8217;t just satisfied with getting it up and running but want to find out what else might be possible, Apple have a little marketing blurb that gives you an idea of what else might be out there which you can read <a title="What's on Apple TV" href="http://www.apple.com/appletv/whats-on/" target="_blank">here</a>!</p>
<p>That&#8217;s it for now. Next on the list&#8230; well we&#8217;ll see. If there&#8217;s a particular device you&#8217;d like to get up and running or if you&#8217;re still having trouble, leave a comment down below and I&#8217;ll see what I can do to help.</p>
<p>Ciao!</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fnetflix-and-other-us-restricted-content-in-nz%2F&amp;linkname=Netflix%20and%20other%20US%20restricted%20content%20in%20NZ" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fnetflix-and-other-us-restricted-content-in-nz%2F&amp;linkname=Netflix%20and%20other%20US%20restricted%20content%20in%20NZ" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fnetflix-and-other-us-restricted-content-in-nz%2F&amp;linkname=Netflix%20and%20other%20US%20restricted%20content%20in%20NZ" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fnetflix-and-other-us-restricted-content-in-nz%2F&amp;linkname=Netflix%20and%20other%20US%20restricted%20content%20in%20NZ" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Frandominsanity.net.nz%2F2013%2F07%2Fnetflix-and-other-us-restricted-content-in-nz%2F&#038;title=Netflix%20and%20other%20US%20restricted%20content%20in%20NZ" data-a2a-url="https://randominsanity.net.nz/2013/07/netflix-and-other-us-restricted-content-in-nz/" data-a2a-title="Netflix and other US restricted content in NZ"></a></p><p>The post <a rel="nofollow" href="https://randominsanity.net.nz/2013/07/netflix-and-other-us-restricted-content-in-nz/">Netflix and other US restricted content in NZ</a> appeared first on <a rel="nofollow" href="https://randominsanity.net.nz">Random Insanity</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://randominsanity.net.nz/2013/07/netflix-and-other-us-restricted-content-in-nz/feed/</wfw:commentRss>
			<slash:comments>42</slash:comments>
		
		
			</item>
	</channel>
</rss>
