Welcome to jpdw.org...

Some quick links:
  Some home automation - http://www.jpdw.org/smarthome
  Updates on our wonderful twin daughters - updates & pictures
  Items about our garden, this years' planting, home & DIY

Ubiquity Unifi controller on FreeBSD

A year or so ago, I got fed up with my TP-LINK router/AP. It had been running for 3+ years, solely as an AP. But it would stop allowing wireless client associations after a while and needed a cold reboot to solve it. So I replaced it with an Ubiquity AP. Or the TP-LINK gave me an excuse to replace it!

Reconfig old Pi B+

After a destroyed SD card I need to rebuild the Pi onto a new card - Time to start again and do it properly unlike the previous build!

- Raspbian (not from NOOBS) installed on the SD card
- Into the Pi and boot
- Modifications:
o Use raspi-config to Set ssh on and enable SPI
o Make /boot readonly
o Create /var/log as 2M tfmps (into /etc/fstab)
- Update distro: apt-get update; apt-get upgrade
- SPI/nRF24L01 related parts (see: https://tmrh20.github.io/RF24/RPi.html)
o git client required - sudo apt-get install git
o cmake required - sudo apt-get install cmake

Displaying to a 0.96" OLED over I2C

I'm adding a small display similar to this. It's the typical 'cheap' OLED display thats around 1" high / wide.

Uno R2 vs Uno R3 (updated)

I've recently started been using a number of 3[.3]v peripherals with my Arduino/ATmega328 boards. With a very limited number of level convertors (initially none!) I decided to use these solely with microcontrollers running at 3.3v natively so that I didn't need to bother with shifting voltage between 3.3v and 5v. This meant I could only connect these items to 'breadboard' setups as my Arduino is a standard R2 running at 5v.

So I ordered a "cheap" Arduino Uno on ebay with the intention to modify the board to be native 3[.3]v.

AVR/Adruino dev with a MAC OSX

Earlier this year I replaced my trusty old Samsung laptop with a (wonderful) MacBook Air. The Samsung had all the tools on it that I had been using for AVR/Arduino (etc) development, but with it being spring & then summer, my focus was elsewhere and I had not ventured into installing the development tools on the Mac yet.

So, I've now been trying to get the same Eclipse/AVR-gcc development stack running running on my new MacBook Air.

Drupal Weather module - getting it local & working

Having just taken on a primary role for running a local group's drupal website I have been looking to add a local weather forecast. After checking available modules it looked like the imaginatively named 'Weather' module (https://www.drupal.org/project/weather) looked like the best balance of features & being actively maintained.

Very easily installed, its quick to get going but a little more involved to get it as I wanted:

My requirement is simple - to have a forecast available on the front page for a specific location, West Ealing, where the local group is based.

New Windows PC

a mac
Now I know what people mean when they says its the best Windows PC they've ever used!

So far have only got a few things installed, but Parallels with Windows 7, Office, Outlook and Zarafa connector covers the "corporate-type email" that I might be missing.

Just a quick hotkey between OSX and Windows... Awesome. And very neat integration.

.

A generic datastore for home monitoring/automation

For a year or more I've been storing temperature readings from 3 probes several times a minute.

The probes themselves are all hooked up to a Nanode that's still in "dev mode" (i.e. a mess on my desk), albeit that one of the probes is actually dangling outside and so providing useful temperature readings (which are input into Cortex - that runs our heating - but more on that another time). The data is sent by the nanode to a server where some php code deciphers it and puts it into a mysql database. More php supports graphing it and a bit more php formats data into xAP packets and sends it to Cortex.

I found that I was changing the database schema when I wanted to add something and because I was using the database as an integration point, with multiple pieces/apps reading from it I would then have to make matching changes to each part at the same time (ironically I realise this is a pain I've been on the receiving end of in my day job for the past couple of years too).

This got me wondering if using a full relational database was really necessary, whether it was use using it as an integration point and maybe some of the "new-fangled nosqls" would be better - given I'm mostly just storing "a few" key/values in a relatively flat structure.

CurrentCost Envi

Way back in 2008 I bought a CurrentCost monitor. Ever since, it's sat and told us how much lecky was being consumed. At the time I said it was behaviour modifying and it certainly was... things didn't get used (or used less) or turned off more (instead of standby) ever since. But sometime around the end of August it seemed to just. Stop. The display was fine but there was no signal from the sensor and it definately wasn't because we were not using any electricity.

Too much to do, too little time. 2013 edition...

Got a Sonos (it's great)... now I need to re-rip all my MP3s at a decent (lossless) quality. I could do all 200+ CDs manually or build a workflow -- so when I want to tweak-the-tags or change-the-bit-rate I dont have to rinse-and-repeat => Add a media asset manager/workflow to my "to do list"

New dsl box

Is a Technicolour tg582n

Good command line guide here : http://npr.me.uk/

A busy bank holiday weekend...

3 days, did so many things: got the bread, got a new bathroom light; fitted the new bathroom light; cleared out 3 bags of junk from the spare bedroom (aka junk room); tidied the front garden; tidied the back garden; 3 loads of garden rubbish to the tip; new bulbs for the landing light; made soup; lunch meal out; watched 3 films; added xAP Heartbeat to the tempcaster software; Sorted out backing-up my SVN; and probably a few more things....

Smart meter - Dumb implementation

Our electricity supplier (currently British Gas) have just done a meter exchange fitting us with a "Smart Meter" instead of the really old analogue wheel variety. The new meter has a mobile modem & sends daily readings back to them so no more estimated bills, ever.

Connecting things up

A long term projects has been to build some smaller temperature sensors that can be dotted around the house. These would store data back centrally but mainly be used to feed additional room data into the Idratek Cortex system that controls the house heating.

This has ended up being a project made up of part development and part integration but as of today I've got the initial integration of the various components working - albeit to a limited extent.

It all starts with a little Nanode board. Wedged above it is a small digital temperature sensor.

The green cable is to the network. Every few seconds the Nanode makes a pretty rudimentary web call to a predefined web address (which happens to be a VM on my server, but where & what isn't that important). The call includes an identity of the Nanode (there will be several eventually) and a set of temperature readings from each of the (currently one) sensors.

The server (running some basic php) stores the data into a database.

To help me test the interaction this far, the server also hosts a very basic web page that lists the last few readings received, displays a big red "Temperature now" reading and has a graph of the last 100 readings. As I'm lazy, it auto refreshes and the same frequency as the Nanode transmits. Here's an image of it on the iPad:

Display on iPadDisplay on iPad

The next step is to get this temperature data pushed into Cortex and recognised there as data for one of the objects defined in Cortex. To make this leap, I'm using the xAP automation protocol which is support by Cortex for both inbound & outbound transfer.

Another module of rudimentary code is on the same server that receives/stores the data. This takes the last two readings and if they differ (the assumption here is a temperature change) then the code builds an xAP packet and squirts it at the Cortex server. xAP is apparently normally a broadcast protocol but as the two servers involved here are on different networks the xAP packet is sent unicast so it'll get routed to the destination (in reality the 2 VMs are both on the same physical server but are on different networks for reason that once made more sense than now). For speed and convenience this module is currently triggered by the refresh of the web page so wont actually work unless that page is being viewed somewhere, but now it's working I'll move the trigger to a cron or something similar.

Finally, Cortex receives the packet, pulls the data out and applies it to the DTS Temperature Sensor module defined in the guest bedroom.