Category: Home Automation


Kicking back for a week at Center Parcs. Came fully prepared with Raspberry Pi & 2TB Portable Hard Drive fully loaded but forgot the damn remote! My HTC One has an IR remote built in, but the Microsoft MCE remote isn’t listed. Every result googled turned up was an XBMC or Media Center remote which only works over the network/LAN.

Eventually, after trying a dozen or so IR apps with no luck, we found ZappIR.

zappir

After trying a few combinations- Console/Media Manager -> Microsoft -> Media Manager MCE Media Center Code Group 2- Bingo!

Now back to kicking back! Nice little hot tub, steam room and sauna in the back garden!

11042999_10155192464790567_1824434695954957278_n

I’ve seen a number of projects posted using the Amazon Kindle as a “standalone” wireless display and decided it was time to join the party. I picked up a secondhand kindle from eBay for £20 and got cracking.

First step was rooting/jailbreaking the kindle. Pretty easy using the instructions from http://www.mobileread.com/forums/showthread.php?t=88004

I then enabled SSH over WiFi so I didn’t have to mess around booting into diagnostics mode and plugging in to USB every time I wanted to make changes.

Lees-Air:~ leetickett$ ssh root@192.168.0.229

Welcome to Kindle!

#################################################
#  N O T I C E  *  N O T I C E  *  N O T I C E  # 
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]#

The most helpful project to get me started was https://github.com/antimega/kindleframe it uses PhantomJS and pngcrush on a linux server to prepare the image. Handily I already have a Centos server I could easily use for this. I tweaked Chris’ script a little- starting with the shell script called by cron;

#!/bin/sh
cd /var/www/html
phantomjs update.js
convert morning.png -resize 80% screenshot.png
convert morning.png -rotate 90 screenshot.png
pngcrush -c 0 -nofilecheck screenshot.png screenshot_crush.png

Then update.js. I had to tackle a few issues;

  • Cycling between different pages (achieved by dividing the current minute by 5 and choosing a URL based on the remainder)
  • My SSRS report takes 15 seconds to run (using setTimeout(takeScreenShot, 20000); ensures the report has loaded before the screenshot is taken)
  • My SSRS report requires authentication (simply adding page.settings.userName = ‘x’; and page.settings.password = ‘y’;)
var page = require('webpage').create();
var d = new Date();
var n = d.getMinutes();
var url = '';
var px_top = 120;
var px_left = 10;
if (n%5==0)
{
 url = 'http://pvoutput.org/intraday.jsp?id=26603&sid=24317';
}
else if (n%5==2)
{
 url = 'http://pvoutput.org/list.jsp?id=26603&sid=24317';
}
else
{
 url = 'http://192.168.0.188/ReportServer/Pages/ReportViewer.aspx?%2fTEL+Wall+Thing%2fWallDash&rs:Command=Render';
 page.viewportSize = {
  width: 1920,
  height: 1080
 };
 page.settings.userName = 'xxx';
 page.settings.password = 'yyy';
 px_top = 45;
 px_left = 470;
}
page.open(url, function () {
	page.clipRect = { top: px_top, left: px_left, width: 1000, height: 750 }; 
	page.evaluate(function() {
    	document.body.bgColor = 'white';
	});
        var elapsed = 0;
	setTimeout(takeScreenShot, 20000);
	function takeScreenShot() {
            	page.render('screenshot.png');
            	phantom.exit();
    	}
});

Then added the script to cron to run every minute and voila.

Once SSH’ed onto the kindle you’ll need to;

mntroot rw

Then proceed to create the script to grab the image and display it (I also added a few lines to display the battery %age in the bottom corner);

#!/bin/sh
cd /var/tmp/root
rm screenshot_crush.png
eips -c
eips -c
wget http://user:pass@tickett.dyndns.com:777/html/screenshot_crush.png
eips -g screenshot_crush.png
local batt=$(cat /sys/devices/system/yoshi_battery/yoshi_battery0/battery_capacity)
batt=${batt%%\%*}
eips 1 39 "$batt"

I’ve setup port forwarding on my firewall to allow traffic through on an obscure port, added a .htpasswd and you’ll notice i’m using an external domain name in my script (i’ve substituted something fictitious)- this allows me to use the display anywhere with an internet connection (literally anywhere as I can tether to my mobile phone).

And here it is;

IMAG1435

IMAG1433

IMAG1432

Here’s how the SSRS report looks in it’s full glory (you can see the area i’ve chosen to display on the kindle);

wall_dash

I’ve chosen not to kill powerd and framework for now, so the kindle will still go to sleep. The next step- if I ever get round to it, will be trying to save power by sleeping or disabling WiFi between updates. I’ve found a little bit of information on how this might be possible (http://www.mobileread.com/forums/showthread.php?t=221497) but still some way off.

I will no doubt add some additional screens (weather forecast, router traffic, network monitoring etc), and it would be nice to have a way of scrolling between images using one of the kindle keys.

Wouldn’t it be great if you could buy something like this off the shelf? Why should we have to hack an existing device? I stumbled across an interesting kickstarter campaign doing exactly this, unfortunately it’s a tiny 2″ screen (https://www.kickstarter.com/projects/914874115/displio-wifi-display-that-tracks-whats-important-t)- maybe one day!

I’m also in the market for a bigger device (i’d love to replace the 21″ monitor which sits on my wall) but for a portable option 9″ or 10″ would probably suffice. A real shame the Kindle DX was discontinued, that would have been perfect (although could do with losing the keyboard). Also looks like a few similar devices; Asus eeeReader DR900, Onyx BOOX M96 (they seem quite expensive and I haven’t looked into whether they have been (or even need to be) rooted, or how easily something similar could be achieved on Android).

Other similar projects worth a look;

http://www.shatteredhaven.com/2012/11/1347365-kindle-weather-display.html
https://randomcoderdude.wordpress.com/2015/01/31/using-the-kindle-as-an-information-display
https://github.com/ufuchs/weather-on-kindle4nt
http://hackaday.com/2015/02/16/wi-fi-connected-e-ink-display/

I became aware of AlertMe a few months back when I was looking for a device (relay plug/socket) which I could use to monitor (energy/power consumption) and control (switch on/off) devices in my home remotely. I have been playing with the Smart Energy products and been pretty happy (though still looking to hook them up to my own home automation solution in the future: https://tickett.wordpress.com/2013/01/12/reverse-engineering-zigbee-communications/).

I then noticed a Smart Heating product appear on their site, promising:

Features

  • Wireless enabled home thermostatic controls unit connects to the AlertMe Hub gateway
  • Transforms hard to manage controls into a simple and intuitive online dashboard or Smart Phone interface
  • Enables remote control of heating/cooling online from anywhere
  • Set and forget it and even manage holiday mode online
  • Adds convenience and enhanced comfort while addressing cost and waste
  • Professional install and set-up

Unfortunately, the product wasn’t listed in their online store. After a quick phone call I was informed it’s only available through British Gas, branded Remote Heating Control. British Gas sell the pack for £199 to existing customer or £229 to new customers- this includes installation which seems reasonable if you’re not comfortable with installing yourself (but a bit of a rip off otherwise- I can’t imagine the units costing any more than £100). Then to be told I’d have to wait 45days for installation wasn’t the best news either!

Never-the-less, I waited and as promised the British Gas engineer came and installed the "hub", "wireless receiver" and "wireless thermostat":

I find it slightly odd that the indicator light on the hub is not used (the AlertMe hub light indicates whether it is online/offline etc):

The wireless thermostat is "meant" to be wall mounted (has no stand) but I can imagine many of you, like me will want to have it freestanding.

I was slightly disappointed that I couldn’t utilise the existing AlertMe hub provided with my Smart Energy pack (I did try, managed to pair the device but the AlertMe dashboard doesn’t have the functionality for me to actually use it):

Notice the lack of a radiator icon present in the British Gas dashboard:

The iPhone app seems to crashes quite a lot, but works eventually and comes in really handy (though you can only turn the heating on/off/auto and adjust the temperature until the next event- as defined in the schedule seen above):

The addition of a "boost" like function would be really hand to just override the temperature for set period of time. And there is currently no access to modify the schedule from the iPhone app at this time.

I haven’t tried to install the app on an iPad yet, although I did try to access the website. Whilst I was able to logon, the site didn’t really work- I could see the schedule but not drag any of the sliders to adjust it.

All in all, it serves it’s purpose really well- definite room for improvement but I’m sure we’ll see that as the product matures (and hopefully tinkerers will provide alternative interfaces etc).

The first project I backed on Kickstarter was delivered some time back but I’ve only recently gotten around to trying to do something with it.

I have a bunch of JeeNodes from JeeLabs and wanted to use them as a starting point so read a few articles about getting the RFM12B on the EVE talking to the Raspberry Pi. They suggest bridging CE1 to SS RFM12 and bridging G21/G27 to the third pin of the chip which appears to be FSK/DATA/nFFS (according to the data sheets I’ve seen)- oh and don’t forget to add an antenna!

I then found some code suggested to be working on the older v1 raspi with an RFM01 chip fitted rather than the RFM12B I have: http://www.susa.net/wordpress/2012/08/raspberry-pi-reading-wh1081-weather-sensors-using-an-rfm01-and-rfm12b/

Another site gave some pointers around modifying the code for the v2 raspi: http://amcc.me.uk/2013/01/eve-alpha-collects-weather-data/

The setup seems to work very well with either revision (1 or 2) of the Raspberry Pi though a couple of additional lines of code in wh1080_rf.c need to be tweaked to suit revision 2:

// RPi (Rev1) Init GPIO21 (on pin 13) as input (DATA), GPIO22 (pin 15) as output (nRES)
*(gpio.addr + 2) = (*(gpio.addr + 2) & 0xfffffe07)|(0x001 << 6);
Becomes:
// RPi (Rev2) Init GPIO27 (on pin 13) as input (DATA)
*(gpio.addr + 2) = (*(gpio.addr + 2) & 0xff1fffff)|(0x001 << 6)
And:
// RPi (Rev1) - GPIO21
status = ((*(gpio.addr + 13)) >> 21) & 1;
Becomes:
// RPi (Rev2) GPIO27
status = ((*(gpio.addr + 13)) >> 27) & 1;

I then went on to comment the RFM01 definition in rfm01.h and uncomment the RFM12B definition:

//#define RFM01
#define RFM12B

I also added the following definitions for the RFM12B as without them the code wouldn’t compile:

#define LNA_20 (3 << 4)
#define LNA_14 (1 << 4)
#define LNA_6 (2 << 4)
#define LNA_0 (0 << 4)
#define LNA_XX (3 << 4)

Remove this line from wh1080_rf.h:

#define USE_BMP085

Then onto the main wh1080_rf.c starting with updating to the correct spi port:

static const char *device = "/dev/spidev0.1";

I then used http://tools.jeelabs.org/rfm12b to get all the hex values to update the following lines:

uint16_t cmd_drate = 0xC606;
uint16_t cmd_freq = 0xA640;
uint16_t cmd_config= 0x80e7;
uint16_t cmd_power= 0x82dd;
uint16_t cmd_sync= 0xced4;
uint16_t cmd_afc= 0xc483;
uint16_t cmd_dcycle = 0xc800;
uint16_t cmd_pll= 0xcc57;
uint16_t cmd_fifo= 0xca83;
uint16_t cmd_dfilter = 0xc2ac;

Now when I:

make clean
make
sudo ./wh1080_rf

Initialising RFM12b
SPI: mode 0, 8-bit, 1000 KHz
Ctrl+C to exit
LNA_0,RSSI_73 idx 0 0.00 0.00 0.00 0.00 0.00 0.00
LNA_0,RSSI_79 idx 1 0.00 0.00 0.00 0.00 0.00 0.00
LNA_0,RSSI_85 idx 2 0.00 0.00 0.00 0.00 0.00 0.00
LNA_0,RSSI_91 idx 3 0.00 0.00 0.00 0.00 0.00 0.00
LNA_0,RSSI_97 idx 4 0.00 0.00 0.00 0.00 0.00 0.00
LNA_0,RSSI_103 idx 5 4.21 5.32 4.17 3.26 4.21 5.26
LNA_6,RSSI_73 idx 6 0.00 0.00 0.00 0.00 0.00 0.00
LNA_6,RSSI_79 idx 7 0.00 0.00 0.00 0.00 0.00 0.00
LNA_6,RSSI_85 idx 8 0.00 0.00 0.00 0.00 0.00 0.00
LNA_6,RSSI_91 idx 9 0.00 0.00 0.00 0.00 0.00 0.00
LNA_6,RSSI_97 idx 10 0.00 0.00 0.00 0.00 0.00 0.00
LNA_6,RSSI_103 idx 11 4.21 6.32 5.21 4.26 5.38 4.26
LNA_14,RSSI_73 idx 12 0.00 0.00 0.00 0.00 0.00 0.00
LNA_14,RSSI_79 idx 13 0.00 0.00 0.00 0.00 0.00 0.00
LNA_14,RSSI_85 idx 14 0.00 0.00 0.00 0.00 0.00 0.00
LNA_14,RSSI_91 idx 15 0.00 0.00 0.00 0.00 0.00 0.00
LNA_14,RSSI_97 idx 16 0.00 0.00 0.00 0.00 0.00 0.00
LNA_14,RSSI_103 idx 17 5.26 5.26 4.21 5.21 5.26 4.35
LNA_20,RSSI_73 idx 18 0.00 0.00 0.00 0.00 0.00 0.00
LNA_20,RSSI_79 idx 19 0.00 0.00 0.00 0.00 0.00 0.00
LNA_20,RSSI_85 idx 20 0.00 0.00 0.00 0.00 0.00 0.00
LNA_20,RSSI_91 idx 21 0.00 0.00 0.00 0.00 0.00 0.00
LNA_20,RSSI_97 idx 22 0.00 0.00 0.00 0.00 0.00 0.00
LNA_20,RSSI_103 idx 23 4.30 5.26 4.21 5.26 5.26 4.35
RSSI Duty 0.32

.

So the “interference” I can see suggests that something is hopefully working! I’m still playing around in an attempt to work out what I still need to tweak.

L

I think I may’ve just had that eureka moment!

As part of the almighty home automation project I have been seeking a mains plug/socket which both meters the power consumption of attached devices AND allows remote switching. I struggled to find anything that fit the bill (and was reasonably priced and/or "open") but ended up taking the plunge and buying a few AlertMe (aka IRIS) Smart Plugs (£25/each).

Knowing that the AlertMe products communicate using Zigbee, if I want them to talk to anything more than themselves I would need to do a little packet sniffing in an attempt to document the packet format.

I first found some software that looked up to the job: http://www.ubilogix.com/products/ubiqua Ubiqua by Ubilogix (although I’m just using the trial version, I doubt I can afford the hefty $999 license fee!) and then found a compatible USB dongle: http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1855261 Texas Instruments CC2531EMK Zigbee USB dongle (£46.68).

A few days later- everything’s delivered and I fire it up (I use a Mac with VirtualBox to run windows virtual machines. I couldn’t get the driver working in Windows 7, so settled for XP).

There is a ton of traffic and I have very little idea what any of it is!

My next thought was- maybe I can find figure out which device is which through the online portal / web interface (maybe the mac addresses will be listed). They weren’t directly, but clicking on "manage" and viewing the source they were there for the taking:

Ubiqua uses a short notation but you can easily find it:

So, what next? Well there is where I got a little stuck and found myself examining random packets and not really figuring anything out. Applying a filter to only see traffic from the current clamp / meter reader seemed sensible but I believe because the mesh like nature of the Zigbee protocol each message was being relayed by each device causing a lot of duplication. I removed the SmartPlugs, leaving just the hub and meter reader (the SmartPlugs have battery backup so I think it takes a while for them to stop transmitting, I held the power button which I think drained them quickly- the orange light was no longer appearing).

So now we’ve isolated some traffic we’re interested in from a lot of "noise"- but we’re still pretty clueless. Brainwave… let’s monitor a short period with normal consumption then a short period with high consumption (I put the oven on) then a short period with 0 consumption (I removed the current clamp from the mains cable). I made a note of the packet count in Ubiqua at each change so I could be sure to pick a packet from each of the phases.

The incoming packets still don’t seem consistent- so maybe there are more conversation taking place than simply "here’s my power consumption" but I found a fairly regular packet structure 116 bytes in length and decided to filter my packets to just those. I then took the ZCL payload data from one of the "normal", "high" and "zero" samples:

Normal:
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

01 DC 01 DC 01 DC 01 DD 01 DB 01 DD 01 DD 01 DD 01 DD 01 DA 01 DC 01 D4 01 D2 01 D5 01 D2

00 03 A8 FA

High Use:
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

0E EE 0E FA 0E F4 0E F9 0E F7 0E F9 0E FB 0E FC 0F 13 0E E3 0E E9 0E E7 0E EA 0E 36 0B 33

00 03 A9 27

Zero Use:
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 03 A9 AE

You can see I chopped the payload into three logical sections. Now my hex isn’t great, but I could quickly see 2 hex digits (8 bits or 1 byte) didn’t really mean anything but when paired and converted to decimal the numbers started to look very much like my estimated power consumption (repeated a number of times- at a guess there are 15 samples in each packet?). Taking the first reading from each packet you end up with:

01 DC = 476 W
0E EE = 3822 W
00 00 = 0 W

Whilst this seemed very likely I wanted to try and confirm the value… So I did another capture and checked the "power now" value on the portal- bingo, spot on!

I still have a lot of work to do to try and determine:

  • What the other packets are?
  • How to decode the consumption packets from the SmartPlugs?
  • How to decode the on/off switching instructions to the SmartPlugs?

And then potentially attempt to build a little arduino circuit / sketch to facilitate communication. Meanwhile I will no doubt be having a poke around inside the devices :)

I didn’t previously mention that the Zigbee packets are actually encrypted- I’m not quite sure where it came from but there was already a key in Ubiqua which was able to successfully decrypt the AlertMe / IRIS packets: AD:38:19:32:6F:D5:C8:F9:F2:8D:78:F0:82:66:AE:57 – I don’t know if this is unique to my devices or the same for everyone.

An update on my latest project

Further to: https://tickett.wordpress.com/2012/12/31/a-new-year-a-new-project/ I have discovered quite a few things, and it looks like I’m not going to have to start from scratch (although I may still be designing some form of hardware, it’s hard to tell at this point).

Existing projects/products set out to do something similar:

NPlug- http://www.indiegogo.com/projects/283102/x/2060579

  • Consumption measuring (believed to be more accurate than existing devices)
  • Remote switching
  • WiFi connected (requires no bridge/gateway device)
  • Zigbee 802.15.4 for connecting to other devices
  • USB option (add 3G dongle, additional RF interface etc)
  • SoC running OpenWRT Linux
  • Open source
  • Lots more…
  • £100 (estimate)

This is really meant as a single device and not to be used with every appliance in the home. The device acts like a gateway itself and aims to connect to existing consumption/switching devices such as the IRIS / AlertMe suite.
I have pledged as a sponsor for this project, and hope to get my hands on a prototype- however, the funding has been a bit slow, so please help out :)

AlertMe (IRIS)- https://www.alertme.com/shopping

  • Consumption measuring
  • Remote switching
  • Zigbee
  • Requires the SmartEnergy pack as a bridge/gateway to the internet
  • £25

Ubiquiti mFi mPower- http://www.ubnt.com/mfi#m-Power

  • Consumption measuring
  • Remote switching
  • WiFi connected (requires no bridge/gateway device)
  • Comes in 3 flavours: Single, 3 socket extension cord and 8 socket extension cord
  • Only currently available with US / EU plugs
  • No EU stock currently available (when it is, I will try one with a UK plug adapter)

Belkin WeMo Switch- http://www.belkin.com/uk/c/WSWH

  • Switching only by the look of it
  • WiFi connected (requires no bridge/gateway device)
  • £40

Meter Polug- http://www.indiegogo.com/meterplug/x/2060579

  • Consumption measuring
  • Remote switching
  • Bluetooth only- so unless you’re within range and carrying a bluetooth equipped device, it’s not much good. This being said, the project has been fully funded, so there is clearly demand for such a device.
  • I have asked whether they’ve considered building a gateway device to enable internet connectivity but yet to hear back. Fingers crossed.

Other

  • I have purchased a USB Zigbee packet sniffer in the hope that I can make sense of some of the traffic floating around my house from various “smart” gadgets.
  • Still waiting on delivery of my EVE Alpha board- http://www.kickstarter.com/projects/ciseco/eve-alpha-raspberry-pi-wireless-development-hardwa this should allow me to start doing some cool stuff with a raspberry pi using the gpio pins rather than dozens of USB sticks!
  • The guys over at flukso have confirmed that they will be continuing work on their enhanced hexabus plug once they have another project out of the way: https://www.flukso.net/content/hexabus-plug
  • I sent some details to a few companies in an attempt to understand costings for PCB design, production and assembly. Just one company has responded to date: http://www.newburyelectronics.co.uk/ – for something like the Hexabus plug they’re suggesting (rough figures): £1,000 PCB design (£500 each of the 2), £80 PCB production (£40 each of the 2), £60 parts (excluding several parts they can’t source), £130 assembly & inspection. Bringing the total in at about £270/device (forgetting PCB design)- ouch!

That’ll likely be my last update for a few weeks, as I’m off to Thailand shortly :)

L

A new year, a new project

*EDIT*: Update on this project https://tickett.wordpress.com/2013/01/10/an-update-on-my-latest-project/

So I realise I have been a little quiet on here lately, and so will make it my new year’s resolution to get back in the habit of blogging regularly.

I would like to share some details of a project I’m assessing for feasibility. It is yet to be named but in essence I’m looking at building an Automated Mains Plug / Socket, let’s call it aPlug.

What do you mean by automated?

  • Remotely switchable / “programmable”
  • Monitor / log power / energy consumption

Don’t these already exist?

  • A lot of rf controllable plugs exist but there are a number of limitations- # cannot integrate with other equipment, # cannot operate from outside of the home, # cannot operate without the supplied remote, # cannot determine current state
  • Some power / energy consumption monitoring plugs exist but again, bare limitations- # cannot integrate with other equipment, # require a gateway device to post data to the internet
  • A few devices even exist which address both requirements but- # cannot integrate with other equipment, # cannot operate from outside the home, # require a gateway device (possibly even an entire pc to post data to the internet), # are expensive, # are closed source

There is however, one possible hope! The hexabus plug: http://signup.hexabus.net/ – I am trying to make contact with the guys behind the hexabus plug to determine where the project is currently, where it’s headed etc. Regardless, the great thing about the project, it is open source- which means the schematic / parts list (BOM) have been published: https://github.com/mysmartgrid/hexabus – unfortunately the PCB layout doesn’t appear to’ve been, but again, I’m hoping it will be shortly.

This project has also sparked the interest of the guys over at flukso, and became the center of a talk at one of their meetings: https://www.flukso.net/files/presentations/flukso.20121026.hack_hexaplug.pdf – where they have suggested a minor tweak to enable interconnectivity with jee labs devices (they include a PCB layout, which suggests they likely have them- I am trying to make contact with them too!)

Even if I manage to make contact and get details of the existing device I still have a lot to tackle…

Network connectivity
I’m currently looking at options, but it makes sense to try and learn from the lessons the guys behind LIFX: http://www.kickstarter.com/projects/limemouse/lifx-the-light-bulb-reinvented
They have essentially gone down the route of creating a mesh network with “slave” devices, then using a “master” device to bridge to the local area network (LAN) and essentially the internet. This ultimate is a gateway device but “in disguise”- and unless I can miraculously find a way of driving down the cost I can’t see any other approach being feasible?

Prototyping
I am making contact with a number of companies who design, produce and assemble printed circuit boards (PCBs) as a number of the components involved in the device cannot be soldered by hand nor can the circuit(s) likely be built using a simple breadboard. I imagine this is going to be a real challenge as the cost for “one-off” or very limited production runs is likely to be extremely high.

Software / Firmware
I have coded some simple arduino / atmega programs in the past, and worked with some of the jeelabs devices but I will certainly be needing assistance to build something as complex as this if it’s going to be robust enough to put “out in the field”. My hope is that developers will show a keen enough interest and we can build something as a community. The devices will be reprogrammable so new firmware can be flashed with relative ease. The problems will come when a hardware change is required…

Certification
Regardless of whether a device is faced with mains voltages or whether a device is aimed at developers I anticipate some form of certification being required- this could be tricky (especially on an evolving device).

Funding
To gauge interest, boost funding, promote the project and hopefully attract some developers, testers and contributors I would like to run a kickstarter project- unfortunately it’s a little chicken & egg as I need at least some form of prototype before I can reach out to the community. I have however drafted a project so I am prepared if I do get that far: http://www.kickstarter.com/projects/tickett/736265394?token=98a4e52f (so far just some notes, and the reward levels are pure guesswork).

I just knocked the artwork up from a few google images:

I have asked someone to design some artwork for a t-shirt, so I will see if they can come up with a cool concept :)

Where Next?
Yes, it’s far too early to be thinking about that, but I can’t help it!

  • Multi socket extension lead type device with individual socket switching and consumption monitoring
  • aSocket, essentially a mains socket with the device inside so no “plug” is required
  • Other plug types (I am based in the UK so this is where I intend to initially focus)

At this stage I’d appreciate any feedback, or expressions of interest etc

Happy new year to all

Lee

At long last I found the time to get Gambas2 compiled and running on Raspberry Pi with Raspbian Wheezy and DomotiGa (http://domotiga.nl).

Things were made extra hard by my determination to not expand the 2GB rootfs so I had to strip some stuff out- but it does mean you can restore to any SD card 2GB or larger.

SSH is enabled but I didn’t put vncserver on this time.

I didn’t document the process- but essentially kept trying to

./configure

gambas2 and each time an error came up I used http://www.debian.org/distrib/packages to try and determine what I needed to install. Because of the lack of free space I had to wget and

dpkg –I

to install many of the packages- I couldn’t use

apt-get

. I used

df –h

to check on free space as I went and

find / -type f -size +5000k

to find and remove large files (cache/docs etc).

Shell login: pi
Shell password: raspberry
Mysql root password: raspberry

Download

http://tickett.net/downloads/raspbian_gambas_domotiga.img.7z
http://tickett.net/downloads/raspbian_gambas_domotiga.img.7z.md5

Mirror

http://speedy.sh/J3MhY/raspbian-gambas-domotiga.img.7z
http://speedy.sh/srE7C/raspbian-gambas-domotiga.img.7z.md5

Please let me know how you get on!

L

*EDIT* This image has now been succeeded by a Raspbian / Wheezy based image: My raspbian SD image is now available: https://tickett.wordpress.com/2012/08/16/raspbian-wheezy-gambas2-domotiga/

After an earlier post https://tickett.wordpress.com/2012/06/05/domotiga-running-on-raspberry-pi/ I received a few requests for the sd card image. So here it is.

The following are all the login/passwords you may need:

login: pi/raspberry
msql: root/raspberry
vnc: raspberry

This is based on the official Raspberry Pi debian squeeze image, with the following additional items installed:

ssh enabled
mysql-server
tightvncserver
subversion
gambas2.24

It just fits on a 2 GB card:

pi@raspberrypi:~/domotiga$ df -H
Filesystem Size Used Avail Use% Mounted on
tmpfs 98M 0 98M 0% /lib/init/rw
udev 11M 148k 11M 2% /dev
tmpfs 98M 0 98M 0% /dev/shm
rootfs 1.7G 1.5G 60M 97% /
/dev/mmcblk0p1 79M 29M 50M 37% /boot
pi@raspberrypi:~/domotiga$

All packages have been upgraded to their latest stable version from the squeeze repository.

If you don’t know how to get into the guy, you can either login to the console then run:

startx

Or via ssh run:

vncserver :1 –geometry 1024x728 –depth 16

Then use any vnc client to connect to the desktop. Now execute gambas2 from the run menu:

I have already opened the DomotiGa project so just click on it:

Click "Run" from the toolbar, Debug menu or press F5:

Download links:

http://tickett.net/downloads/raspi_squeeze_gambas2_domotiga.img.7z

http://tickett.net/downloads/raspi_squeeze_gambas2_domotiga.img.7z.md5sum

Mirror:

http://speedy.sh/nAMsr/raspi-squeeze-gambas2-domotiga.img.7z
http://speedy.sh/v9ETB/raspi-squeeze-gambas2-domotiga.img.7z.md5sum

Let me know how you get on!

L

Lots of wasted time today trying to get into X in Debian Wheezy- only to find out there’s a bug with the installer which ignores the fact that I have ticked the "desktop" option. Doh!

Adding the wheezy repository:

deb http://ftp.uk.debian.org/debian wheezy main contrib non-free

To:

nano /etc/apt/sources.list

Updating:

apt-get update

Then installing task-gnome-desktop:

apt-get install task-gnome-desktop

Fixes this!

As I am running in VirtualBox I then had to install virtualbox-guest-additions, but before doing so we need to know which headers to download:

uname –r

We can then install the virtualbox-guest-additions dependencies (the 3.2.0-2-amd64 is the output from the uname command above):

apt-get install make gcc linux-headers-3.2.0-2-amd64

Now you can mount the guest additions installation disk (devices, install guest additions) then:

mount –t iso9660 /dev/cdrom /media/cdrom

Now run /media/cdrom/VBoxLinuxAdditions.run and reboot :)

Getting gambas3 installed was a piece of cake- I chose to use the synaptic package manager and didn’t need to do anything special. I checked out DomotiGa and DomitiGaServer3 compiled/executed first time:

L

%d bloggers like this: