Thursday 10 July 2014

Fedora Catchup

The couple of packages I maintain in Fedora have been sitting stable for so long that I've not really had much to do with Fedora recently (that, and getting a mac laptop for $work), but I've just discovered https://badges.fedoraproject.org/ so it's now time to claim a few extras (oh, and push an update to PyEphem while I'm at it...)

Friday 6 June 2014

Happy Cheeks vs SuSE Chameleon

Happy Cheeks imprisoned in a Cray

Kids today. Joyriders in the supercompute cell
Friday Afternoon, and Operations staff are summoned to the Pawsey Centre as the evil SuSE chameleon has been chasing Happy Cheeks (the iVEC Quokka) around the supercomputing cell.

Happy Cheeks and Chameleon explore 'Magnus' 
Happy Cheeks and Chameleon on Galaxy
Inspecting the layout for the Petascale expansion

Being Chased



Tuesday 20 May 2014

Pretty Colours via MQTT

What does a geek do when they have some spare RGB LED strip (addressable WS2812B) and some cheap nasty LED devices? LED transplant time...

So, first to go was the LED glass prism stand received as a christmas present - out went the potted pcb with three fading LEDs, and in went a single piece of RGB strip fixed in place with a hot glue gun.
wire comes out the bottom and goes to a nanode.
So far so good, but I don't just want fixed or fading colours so time to revisit an IoT idea: Cheerlights

The cheerlights API defines 10 colors that can be set, but I want the possibility of sending any RGB value, so I created @FakeCheerlights as an MQTT series of topics on the test.mosquitto.org broker

fakecheerlights/rgb
fakecheerlights/colour
fakecheerlights/raw

which contain the hex RGB value, the identified colour name and the raw tweet.

A separate script (running on the NAS) uses the twitter API via tweepy to follow the twitter stream search for 'cheerlights' and 'fakecheerlights' mentioned in a tweet. If a colour name (matched from the X11 rgb.txt) is found then it publishes the corresponding hex value to the broker

Since fakecheerlights uses a publish/subscribe model, it's *much* faster to react than the original cheerlights protocol which relies on a client polling the server API. The downside is there's no nice fade time between colours.

The nanode (I have one of the earlier batches) was designed as a low-cost ethernet enabled arduino, so uses the Microchip ENC28J60 ethernet rather than the wiznet of the arduino shield. Thanks to UIPEthernet.h and PubSubClient.h it's just possible to code in a basic subscriber which sets the strip output to match.

Since I plan to use the pub/sub model at work for monitoring the machine status and batch queues, I gutted an old ikea childs lamp and replaced the LED with another WS2812B and hooked that up to a freetronics etherten with a PoE daughterboard attached. Sadly the hardware revision I had didn't include the MCP 24AA025E48 that my old nanode did, so my sketch had to include a hard-coded MAC address.

A short youtube video demonstrates the reaction time, and all the source code is on github. (with the exception of the nanode sketch as I didn't save it before closing the arduino ide)

Monday 10 March 2014

The Internet of Meh

Yes, I know there are some very talented, hardworking people busy making "The Internet of Things" (IoT) a reality, and yes, there's even some govt money available just now. However there's still a huge hurdle to overcome before it will ever progress beyond a geek hobby.

Example 1: We have a solar PV system installed (Peak output 2500W) and happen to live in a Damn Sunny place. Great. So far it's chucked out ~2400kWh. Our daytime loads are the evaporative aircon (variable speed 1500w motor) and the pool pump (1600W, fixed speed, needs to run for ~8h day in summer). Together with 'normal' modern household appliances of Washing machine and dishwasher we *should* be able to balance our house load so we're roughly running "grid neutral" -- ie hardly importing or exporting during day. With the current tarrifs (feed in 8c/unit, consumption, 28c unit) it's just not cost effective to put a huge array up (ignoring the fact that we're restricted to 5kW max feed in anyway, and don't have unlimited roof space).

What I want is some smart magic load shedding intelligence - if we have sun, make sure pool pump has run for minimum amount of time. Look at weather forecast - no clouds predicted, take a chance on there being sun up till sunset (so we can predict insolation and expected output) and run for 4h morning, 4h afternoon. Spare capacity? sure - lets ramp up aircon and cool the house a little more comfortably. Oh wait - unexpected load? (dishwasher / WM on a daytime cycle) - back off the aircon, if its the dishwasher, we know that heating cycle will be over in X mins, so suspend the pump.

Sounds lovely right? sure it can be manually done watching the display on the PV inverter and the main electricity meter, but there's gotta be a better way. Well Tough. In Australia a standard domestic fusebox lurks outside, and has max 30 ways. Unless you're a licenced electrician, any poking in here is illegal, and so will cost you contractor rates. How many hours of sparky work (excluding any materials) will it take to make any cost savings negligible. Not Many. Boo.

So, what about appliance control at the "heavy users" directly? RJ12 connector on the bottom of pool controller -- lets ask the manufacturer - do they make an interface? No. Can I get the spec?
"All of our equipment uses an dedicated communication system designed purely for our own use.  Our comms system is not compatible with any other equipment and here is no protocol that we can release for external use."
Maybe not then. Perhaps try Breezair? Similar story.

So, everything has to be reverse engineered (needing skills and tooling) or you pay an integrator (no there aren't any) who will charge $$$$ to do this based on previous work. Current state: Ongoing as a spare time project. Mutter.


Example 2: Air Quality Egg.
Launched with a great flourish and fanfare 2 years ago. OK there were issues with producing the prototypes, but judging from the map, there's now quite a few of us with shields, eggs and more up and running.

Now what? where's the "one year on... report with a few pretty graphs. Even if its a case of "hmm variation is too high to make out anything reasonable" at least let your users know what's going on. Otherwise they'll get bored.

How can I compare my results with others around Perth? Not easily -- takes some hacking of the site to get the raw pachube^Wcosm^Wxively feed ID and then poll it and feed into gnuplot. End-User friendly? I think not.


I *like* the idea of IoT -- it does have the potential to help do clever things - but unless the glue and costs to end user are reasonable it's just not going to take off. Yet.


Feeling Pumped!

Having just had a day without power, and then going round the site to check everything came back online correctly (including services such a...