Latest Entries »

Further 433Mhz RF Hacking

Further to http://tickett.wordpress.com/2012/06/27/more-433mhz-rf-hacking/

I noticed some referral traffic coming from Erlands blog: http://fedmow349.blogspot.co.uk/2013/05/hacking-433mhz-rf-link-home-automation.html

He used https://code.google.com/p/rc-switch/ on his arduino to receive/interpret the 433Mhz traffic and it works a treat for the cheapo PIR, door/window sensors, smoke alarms etc

4f77d093 1440 4530 b3c1 283ec01a57f9

Here is a sample output from one of the door sensors. It quite rightly identifies the state 0/1/F of each jumper:

Decimal: 1398131 (24Bit) Binary: 000101010101010101110011 Tri-State: 0FFFFFFFF101 PulseLength: 525 microseconds Protocol: 1
Raw data: 16344,540,1560,544,1564,544,1560,1588,508,540,1568,1584,516,540,1564,1588,512,528,1576,1580,524,536,1576,1576,524,528,1584,1580,524,528,1584,1576,528,524,1588,1576,540,1572,544,1572,544,520,1604,520,1604,1572,544,1568,552,

I'm in the process of firing up a new Raspberry Pi DomitiGa server. I will use a JeeNode connected via USB Serial to receive 433Mhz traffic alongside 868Mhz JeeNode traffic. I guess I can probably get rid of my RFXCom 433Mhz transceiver now?

I’ve booked a holiday to Thailand over Christmas and decided to buy a quadcopter so I could get some different photos & videos while i’m away. It’s great fun!

Here’s an aerial shot from a local park:

DCIM100GOPRO

And a video of the first flight with the Zenmuse Gimbal installed:

And a few shots of the local tennis club:

DCIM100GOPRO

DCIM100GOPRO

And video:

Still working on getting a decent FPV setup and learning to be gentler with the controls (I may end up adjusting in software to make them less sensitive).

Despite still having a handful of unfinished projects I decided to take the plunge and have some solar panels installed. I found a local MCS accredited installer MAH Solar Solutions and in no time had the kit up and running. My house faces east/west so I have 8 panels on each side.

Image

The panels are Canadian Solar 250W, total 16 to form a 4KW system fed into a Aurora ONE/PVI 3.6 inverter in the loft.

Image

The solar install was the perfect opportunity to finally replace my ancient fusewire consumer unit. Which got me to thinking of ways I may be able to better monitor my energy consumption. I hoped to find “a magical fuse box” but hours, days, weeks of research and the best solution I could come up with were DIN rail mount KWH meters.

Unfortunately no amount of searching could find a single image of the KWH meters in use or a diagram of how to wire them in a consumer unit. Instinct told me to have each meter mounted alongside each breaker, but this would prevent me from using the busbar. Then I thought about mounting them upside down, but this would cause similar issues and mean running the neutral far too close to the busbar! The next idea was to either mount 2 consumer units side by side, having the breakers in one and the meters in the other… Then I found some information about twin/dual rail consumer units which seemed like a winning idea.

MAH Solar Solutions were to be installing the new consumer unit and despite having never seen or used the KWH meters before they were more than happy to install them. They came up with the idea of mounting the meters at the end of each block of breakers. With a big enough consumer unit this meant the busbar could still be used. I will try and add some diagrams and more images at a later date.

Image

I’m still working the best way to read so many pulse counters simultaneously and log/process the data. Currently http://openenergymonitor.org/emon/buildingblocks/12-input-pulse-counting looks like one of the most promising, but I will need to start from scratch with a way to count, store, transmit etc. So for the time being I decided on the fluksometer which can handle 4 pulse inputs- which will do for now: mains, solar, oven & gas meter.

Image

The flukso service itself provides quite nice graphing- you can see here my mains consumption (blue), oven consumption (green), solar pv generation (red) and gas consumption (orange).

Image

Which feeds nicely to pvoutput.org.

Image

You can see the rj11 cable coming out of the gas meter (to the fluksometer). The purple cable runs from the RS485 port on the inverter in the loft. I am waiting on a USB to RS485 device so I can start pulling some detailed data using Aurora Monitor or similar.

Image

I understand the fluksometer has an onboard RFM12B configured on the 868Mhz band to understand communication from jeelabs devices- which is ideal as I meter my water using jeenodes.

Image

I just don’t know how to get them talking… yet!

Unfortunately a growing trend- this blog has been neglected (I will try and get back on top of things eventually!). But here’s the most recent reason why…

I am now the proud owner of a new photo blog http://www.photobotos.com

The site was previously run by two brothers Charlie and Tom. Each day bringing a new photo (for everyone) along with a description for those of us curious as to how the picture was captured.

The blog used WordPress, the same as this one http://tickett.wordpress.com, but unlike this one it is not hosted at WordPress.com which gives a much greater ability to customise. Fortunately my background made it quite simple to dive in and start making some of the changes I hoped would enhance the site:

Random Photos

  • Create a category called random (don’t attach any photos as they won’t be browsable)
  • Modify your theme’s archive.php

Add this above if (have_posts()):

$special_random = false;
if(is_category('random')) {
$special_random = true;
query_posts( array( 'posts_per_page' => 5, 'orderby' => 'rand' ) );
}

Then modify the next_posts_link code (clicking it on the random page would fail… you just need to refresh the page to see more random posts):

<?php 
if(!$special_random) {
next_posts_link( __( '« Older Entries', 'andrea' ) ); 
}
?>
  • Install and activate the plugin page links to
  • Create a page and select “page links to” at the bottom and point to your category page (something like http://yourblogurl/random)- this will add the random photos link to your navigation menu

Thumbnails on Search / Category / Tag pages

  • Modify your theme’s search.php
<div id="post-<?php the_ID(); ?>" <?php post_class( 'entry-content' ); ?>>
<a href="<?php the_permalink(); ?>" rel="bookmark">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail( 'photo_thumbnail', 'class=photo_thumb' );
} else {
// the current post lacks a thumbnail
}
?>
</a>
<?php the_excerpt( __( 'Read the rest of this entry &raquo;', 'andrea' ) ); ?>
</div>

Here’s a few of the latest images:

Church of the Good Shepard

The Walkers

I suggest you check it out :)

L

Canvas Order

Finally found the time to sift through my photos and send a bunch to be printed on canvas to fill my rather bare walls:

A really old shot of Brighton seafront from the pier.

A recent shot from St Louis, MO.

One of the first photos I ever took looking across from the north side of the Thames in London.

A recent photo from Miami, FL.

Another old shot taken at Tropical Wings in South Woodham Ferrers.

A recent shot from Koh Phangan.

A recent shot from Koh Tao.

A recent shot from Koh Nang Yuan.

A recent shot from the Grand Canyon, NV.

And one last shot from Vegas, NV.

I think I got a pretty good deal- from https://www.my-picture.co.uk/ all 2:1 at 40" x 20" @ £33.95 but with the current 20% discount code UKSPRING20 came in at £27.16 each. Let me know if you know anywhere cheaper!

I’ve not been following it this year (due to the schedule change), so I’m playing catch up! Here they are for anyone that missed it:

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E01.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E02.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E03.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E04.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E05.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E06.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E07.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E08.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E09.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E10.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E11.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E12.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E13.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E14.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E15.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E16.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E17.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E18.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E19.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E20.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E21.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E22.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E23.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E24.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E25.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E26.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E27.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E28.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E29.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E30.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E31.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E32.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E33.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E34.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E35.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E36.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E37.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E38.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E39.mp3

http://tickett.net/downloads/24yatte/s2/24YATTE_S2_E40.mp3

You can find season 1 here: http://tickett.wordpress.com/2011/12/09/24-years-at-the-tap-end/

Thanks Chris, keep up the good work!

I’ve still yet to pick a few favourites from Thailand, so until then, here’s a few from recent nights out/at work:

Wax @ the Sunrooms

W0rks @ Mansion

After Office Hours (AOH)

Kool Kids Klub @ the Sunrooms

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: http://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

Thailand Video

Not had a chance to pick my favourite photos, but here’s a little video montage :)

And for mobile devices: https://vimeo.com/tickett/chang

Follow

Get every new post delivered to your Inbox.

Join 2,375 other followers

%d bloggers like this: