And by kuvitteellinen, of course I mean the Finnish for imaginary.
What do you think this is:
Hint: It’s not crystal meth, washing soda, fish food or a new type of running shoe compound.
I must get 20 emails a day asking the same question: “Conor, what temperature is it, right now, outside your office window?”. Thankfully, after literally several minutes work, you have your answer.
To get something more accurate I’ll need to put the sensor away from the building, away from the ground, out of direct sunlight and with good air flow. Then I’ll auto-post the values to Open Weather Map and COSM.
I was genuinely surprised on Sunday at the level of interest in the Arduino web-server I mentioned. I think a mixture of the tiny cost and 8-bit nature of the whole thing intrigued people. It was also trivial to put together with some sample code. The only difficulty I’ve found with Arduino in general is handling floating point values easily.
Of course it doesn’t really make sense to have low-powered nodes being read by anyone. As several people pointed out on Sunday, a DDoS (heck, even a DoS) attack would be ridiculously easy. The nodes should either be reporting to central server(s) or queried on a regular basis by a small number of systems. That’s phase 2 for my little side project and it’s a bit more complex than temperature. More updates in a few weeks.
My daughter’s Eken T02 is still going strong after nearly a year but it still has the same two problems as ever. [a] the accuracy of the touch screen is awful and [b] it barely lasts 45mins on battery.
I don’t think I can do anything about the first problem but I decided last week to sort out the second one. Particularly considering Scribblenauts is now fiiiiiiinally available on Android (currently requires a US VPN, Market Enabler, Amazon App Store and a US virtual credit card. Slick ;-p )
I popped it open quite easily by removing 4 screws and a few plastic tabs. It’s surprisingly neat inside but has a really weird smell!
Obviously the batteries are garbage based on how long they last so I ordered a replacement on eBay. It’s a “3500mAh” unit with the usual proviso that Chinese mAh tend to be a bit different from the mAh the rest of the world measures in. It’s also the usual China story where they’ll arrive at some indeterminate point in the next few weeks. Should only take a minute to swap them. Fingers crossed it sorts the problem out.
I’ll let ye know how it goes.
We have a treadmill setup in our house which has always faced some sort of media centre setup. It’s the only way I don’t lose my mind with boredom when running during Irish bad weather (August to June). Originally it was an XBOX-1 with XBMC on a 14″ Philips portable CRT. Then it became a Patriot PBO connected with a HDMI-VGA adapter to an LCD monitor and now it’s a Raspberry Pi running Raspbmc connected to the same monitor.
The problem in all these setups has been audio volume. When I’m pounding my featherlight torso on the treadmill deck, I need lots and lots of volume to hear anything. I bought a 2.1 Speaker thingy from Lidl a good while back and that helped but it still wasn’t loud enough on some media.
Then I got a Fiio E3 battery-powered headphone amp and that worked well with the PBO. The big downside was that it chewed through the single AAA battery in no time at all and was unusable with rechargeables.
I came up with a really cool solution to the battery problem. I got one of these adjustable voltage regulators from DX, cut the head off an old Nokia charger and wired it in. Then I used a multimeter on the output and twisted the potentiometer until I got 1.5V out. I used crocodile clips to then connect to the Fiio.
I can’t recommend that voltage regulator highly enough. If you, like me, have tons of old power supplies from long dead electronics, it can scale down anything to the voltage you need. I’m getting another one to power the Raspberry Pi from an old Linksys 12V wall-wart as most of my phone chargers simply don’t have enough juice. At €2.90, it’s super value.
The problem with the PBO as a media player is that its UI is garbage. It feels like something from the 90s. In particular, it’s missing a simple but crucial feature we love in XBMC – a tick mark to show you’ve already finished watching something or you are mid-watch. The PBO is also terribly crashy and struggles regularly with SMB network shares.
So we finally moved to Raspbmc and it works really well. Well almost. The only big problem is the analogue audio, it has no amplification on it at all. So even with the Fiio and the Lidl speakers up full, it is very hard to hear on the treadmill.
I had a go with using a USB audio adapter but that was a disaster. Audio out of sync and the GUI mis-behaved the whole time. It was louder tho!
Then I went looking for something with more welly than the Fiio. That company has other devices but they are even more expensive than the RPi itself.
I then built this:
But after much gnashing of teeth with no output and then mono output, I realised that a loudspeaker amp is totally different to an inline headphone amp and just cannot work in that configuration. So much for 6 years of Electronics in UCD
Weirdly I could only find loudspeaker amps on DX, eBay and Amazon. A bunch more googling and reading on audio/hifi/hobbyist sites and fiiiiiinally I found a headphone amp design called the CMoy which (a) looked easy to make (b) looked cheap to make and (c) had very detailed instructions for idiots like me.
I ordered the various bits online from the usual suspects (eBay, DX, Farnell) and put it together last week on a mini-breadboard. Shockingly for me, it worked first time! The only difficulty in the instructions is that they are customised for a very specific Radioshack board and I had to translate that to my simple breadboard.
Then yesterday I sat down to build the final circuit on some stripboard I got yonks ago in Maplin. I’ll be honest, it took a while. Particularly translating the layout to a very small bit of board. But yet again, magically, it worked first time. I have it powered with another old Netgear 12V wall-wart. It’ll take anything from around 9V to around 30V which is really handy.
A bit of glue-gunning on to the unused lid of a Raspberry Pi case and I have a finished product. And boy is it loud! We’ll need to be careful we don’t blow the amp inside the Lidl speakers or damage the speakers themselves. Mrs D’Wife, who ran 10 miles on the treadmill today (10 miles!), approves of the improved volume level too.
I highly recommend the CMoy kit if you are struggling with audio volume levels on anything, not just the RPi. At some point I’ll draw out my layout to save others the hassle of figuring out the original layout. Hit me with any questions below.
UPDATE 1: I completely forgot to do a costing on this. Whilst the overall spend for me was €32.45 (incl P&P), this includes some giant packs of resistors, capacitors and LEDs that I have been using on multiple projects. If you can manage to get exactly the amount of each thing you need, then the entire amplifier only costs €6.59. That’s obviously excluding the power supply, solder, tools and the glue from the glue gun. You will find it difficult to just buy 1′s and 2′s of things. You can do it in Maplin but it’ll cost you a lot more. You can also do it on sites like Farnell but they have a minimum order of €20.
So either buy the bigger packs on the basis that you’ll be making other things or do it as part of something like a Coder Dojo where lots of you pitch in together to make lots of these.
I was very disappointed to realise that Endomondo has no API. The best they can do for pushing your activities elsewhere is built-in Facebook/Twitter and some widgets. When will companies learn that lock-in is not how you keep customers?
A bit of poking around last night led me to good old screen-scraping. Their widgets are publicly accessible so it wasn’t too hard to scrape one of them and generate an ATOM feed. I used it as an opportunity to try out Bottle. If you need to build a simple web-app fast, with minimal overhead and you use Python, I think you’ll like it. For kicks and giggles I decided to put it up on Heroku – my first time to do so properly. That’s a very nice deployment flow indeed.
So here you go. If you want the ATOM feed of your public Endomondo activities, just grab your numeric user ID from your profile page and tack it onto http://endo2atom.conoroneill.com
Code, as ever, is on GitHub.
It has only been tested on treadmill running, treadmill walking and road running. There is no error checking so it may fall over on non-distance-based activities. Let me know if it does and I’ll improve. The code is also limited to the first page of activities and doesn’t crawl backwards on the other pages. That should be easy enough to add.
Hope you find it useful.
I use a lot of TP-Link gear for home stuff. It’s as cheap as chips and the hardware is usually totally reliable. But the software, dear god the software. I cannot understand why Chinese manufacturers of cheap networking gear don’t take a leaf out of the book of Chinese manufacturers of cheap phones. The latter _all_ use Android now, so why don’t the former all use DD-WRT or OpenWRT? When free software is 10x better than anything you have built yourself, save time and effort and point all your engineers at improving DD-WRT instead of your own crappy code.
Some of the walls in my parents house are 3ft thick so Wifi is a “challenge”. My Mum finally joined the world of computers and the internet last year when she got an iPad. The problem is that the main router is in one room whilst she likes to use the iPad in the kitchen. And those walls get in the way.
We tried using a setup with TP-Link Powerline adapters and a DD-WRT-hacked FON rotuer in the kitchen but the house wiring is so old it was totally unreliable. At the start of the year, they got someone in to move the phone wiring closer to the kitchen so the router would be visible. And this just about works but the signal is very weak still.
I have previously had some success with using WDS to connect routers together over Wifi on an XBox-1 but it was a nightmare to configure and I’m trying to do all the setup for the parents remotely.
Given that they are using a TP-Link W8961ND with stock firmware as their main router, I thought it would make sense to go for an out-of-the-box solution and use a TL-WA830RE Range Extender. They are both made by the same company and I believed their claim that a simple push of the QSS button on both would “just work”, so I got one on Amazon (Note they are now selling the V2 which is different). The reviews mostly seemed positive too.
I have a W8961ND as a backup here too. So the plan was to set it up identically to the parents one, then configure the Range Extender with it and then they should be able to just plug it in when I give it to them at Easter.
But no. Zero success getting them to talk to each other. Automatic methods didn’t work and manual methods seem to involve MAC addresses so that means whilst I might get it working here, it would then fail for the parents.
Now to see if it works for the parents
Last weekend I was working away on a personal side-project of mine and I suddenly realised I follow almost no Irish projects or developers on GitHub. I then started writing this post which was going to be an attack on our lack of people who work on OSS projects outside of work.
But rather than go with gut, I decided to see if I could back it up with data. I decided GitHub relative activity could give us a strong metric of where Ireland fits in to the Open Source world. Of course there are tons of other OSS project hosting sites like Sourceforge, BitBucket, Assembla, Gitorious and even self-hosting but GitHub should do as a rough measure.
I assumed someone had done some simple analysis like this before but all I found were “unusual” visualisations. Then I discovered that GitHub posts all their public commit data to Google BigQuery. This is a big online DB that you can query in a simple SQL console. I lashed together some simple queries and the data basically proved me completely wrong.
SELECT count(*) as commits, repository_owner, actor_attributes_location FROM [githubarchive:github.timeline] where actor_attributes_location CONTAINS 'Ireland' group by actor_attributes_location, repository_owner order by commits DESC LIMIT 100000000
So in total, I can see 9381 repository committers that mention “Ireland” in their location and have done at least one commit.
That drops to 5872 if we exclude people who have only ever done one commit.
select commits, repository_owner, actor_attributes_location from (SELECT count(*) as commits, repository_owner, actor_attributes_location FROM [githubarchive:github.timeline] where actor_attributes_location CONTAINS 'Ireland' group by actor_attributes_location, repository_owner order by commits DESC) where commits > 1
And 1799 if we exclude those who have done 5 commits or fewer.
Note that these are not repository owners, just people who have done commits.
If we then filter it down by people who have committed to their own repos we get 970. So with a population of 4.6m, 970 people have setup a GitHub account with a public repository and committed at least once to it.
SELECT count(*) as commits, repository_owner, actor_attributes_location FROM [githubarchive:github.timeline] where actor_attributes_location CONTAINS 'Ireland' and actor=repository_owner group by actor_attributes_location, repository_owner order by commits DESC
At this point I was totally depressed. 970 repos. And many of these may be company ones or forks of other repos or school exercises. But then I decided to compare to some other countries.
Let’s start with the UK (Population: 63m): 7643 repos
Using UK, United Kingdom, Great Britain, England, Wales, Scotland, Northern Ireland: 9929 repos
Gives us 724 vs 970 using Ireland as the baseline
Finland (Population: 5.4m): 1332 repos
Using Suomi, Finland: 1333 repos
Gives us 1135 vs 970 using Ireland as the baseline
Australia (Population: 21.5m): 4375 repos
Using Australia, Oz: 4375 repos
Gives us 936 vs 970 using Ireland as the baseline
New Zealand (Population: 4.5m): 1048 repos
Using New Zealand, NZ: 1181 repos
Gives us: 1207 vs 970 using Ireland as the baseline
Canada (Population: 33.9m): 4526 repos
Gives us: 614 vs 970 using Ireland as the baseline
Finally, the spiritual home of OSS and the actual home of GitHub:
USA (Population: 315.5m): 6146
Using USA, US, United States: 7913
Gives us: 115 vs 970 using Ireland as the baseline
(My guess is this number is way too low and Americans just use city/state as they consider the country implied )
So I was wrong. Ireland isn’t particularly bad. Really, we’re all in or around the same ballpark except for the US. So this isn’t just an Irish thing. People working in the tech industry worldwide just don’t seem that interested in writing code in their spare time and making it freely available to others.
Thoughts? Corrections to my SQL? Anyone want to build a better query for the US?
We all know that Picasa Web Albums will be shut down in 2013. Or given a lobotomy and renamed to Google+ Photos.
But desktop Picasa is a decent enough photo management tool that you can use without any reference to Picasa Web or Google+. And Dropbox is fab. However I find the Dropbox photo import mechanism both unreliable and crude. Everything gets dumped into one folder, and that’s when it works at all.
So I now have the best of both worlds by simply setting my Picasa Import folder to a Photos folder on Dropbox. Picasa handles everything locally with the camera and Dropbox syncs everything to the cloud.
I’m having a fantastic time watching Adam and the gang on tested.com. The older kids are enjoying some of them too. The omelette episode caused 11yo Oisín to make his first ever omelette and I fully expect Adam to announce Dishbusters soon.
But this cabinet. I kept saying “no way” throughout. Just watch it.
p.s. And I am so getting a Success Kid model.
I’ve seen a few mentions today of a new “Send to Kindle” button that you can add to your site/blog. It means people can send clips of your web content to their fave e-reader.
It just struck me that Amazon is missing a serious trick with the Kindle here. An RSS-based reader which works on E-ink, Fire, Android and Cloud Reader could be something awesome. Whilst I use some web-clipping services like Pocket, I much prefer to subscribe to sites. Being able to click a Kindle button that I know is also an RSS button would make me very happy indeed.
Now that Google wants to kill RSS in favour of G+ in a classic but doomed Microsoft-style embrace/extend/extinguish, this could be a big opportunity for Amazon to both attract all the old GReader userbase and turn RSS into a mainstream Subscribe Button. Like we all thought RSS would be, back in 2006.
I’d love to have all my RSS feeds synced to my old-school Kindle. It’s ideal for medium-to-long-form content. Give it offline reading capability and I’m sold.
In contrast, I doubt I’ll be adding their current button to any of my blogs unless ShareThis adds it as a default.
Cross Dominant is Stephen Fry proof thanks to caching by WP Super Cache