question-325

About

Information about pembo.co.uk and my history

View details
tetwiis-header

TetWiis (Wii)

TetWiis is a Nintendo Wii homebrew clone of the falling blocks classic

View details
inf-prime-small2

Infinite Prime

App for Windows Phone 7/8 available from the windows phone store

View details
downloads

Downloads

Access the various downloads from this site all from one place

View details

2014 +

The following describes the process and setup of how I made my Lightwave RF device controller, from an arduino, a few components, and a Raspberry Pi.

This post will grow out with more information as I add it, but this in in the position now where it’s ready to be put out there.

All source code for this, including the arduino sketch and the PHP web application will be released in the coming weeks!

Components/Tools Requied:


Assembly

The following diagram shows a simplified assembly. Note the LCD Serial module is one whole module, just shown as two separate components on the diagram. The transmitter is a 433.92Mhz (called 433 or 434MHz transmitters from various places)

component layout_bb

Assembly Instructions

  1. 433.92MHz transmitter – attach the data pin to digital pin 3. Supply a +5V and ground from the breadboard
  2. LCD I2C Serial Module – has a 4 pin connection. 2 for data, and the +5V and ground. Although this is shown in the diagram as 2 components, they can be purchased as a single module. The module can be wired either with a set of jumper cables (female to male), or via a 4 pin cable and some header pins into the breadboard, and then cables from there to the Arduino. Data connections are wired into analogue pins 4 and 5
  3. Transmitted LED. Wire in ground, and Pin 13 as the power
  4. Soldered a 17.3cm coiled wire to the transmitter to extend the range

Wired into a breadboard (messily unlike the diagram above) here’s what my prototype looked like:

prototype

3 areas of interest are highlighted in the photo

  1. Left – 4 pin cable, connected into the breadboard via header pins (which fell out pretty easily!). This goes to the LCD I2C Serial display
  2. Right top – 3 pin connector to the transmitter module. Here I used a screw terminal connector, as my cable was recycled from an old computer PSU so there was only a 3 pin connector on one end.
  3. Right middle – the transmitter, connect by a 3 pin cable, note the coiled cable for the antenna. The recommended length appeared to be 17.3cm

Note – the transmitting LED was not connected here. For prototype, I just relied on the one inbuilt into the Arduino on pin 13

Prototype was tested using the serial monitor within the Arduino IDE by placinf a lightwave RF device in pariring mode, and supplied the following command over serial:

#111235190237183123100Lounge*

 

 

The format of the message is as follows

Description Length Values Example Notes
Start 1 # # Start with a #
Transmitted ID 18 [0-9](18) 111235190237183123 Has to be 18 chars
On/Off 1 [0/1] 1 1=on 0=off
Dim Level 2 [00-31] 31 31 = Max
01 = Min00 = Ignore
Description 15 [aA-zZ] Lounge Up to 15 characters – if more will wrap around
End 1 * * End with a *

 


Finished Product

Assembly instructions

  1. Wired and soldered all components into the strip board, simplified over the breadboard layout slightly
  2. Using the multi-tool, cut opening in the lid suitable for the LCD screen
  3. Drill small hole in the lid big enough to push through the LED
  4. Drill hold in right hand side for antenna cable
  5. Mount Arduino onto hexagonal spacers using screens.
  6. Align Arduino inside project box, mark and cut hole using rotary multi-tool for the USB cable.
  7. Use glue gun to glue Arduino/spacers to the project box
  8. Use glue to stick LCD display (and LED if needed) into place on the lid
  9. Use glue gun or sealant to seal the display lid and fill and gaps
  10. Glue spacers on strip board, glue to project box base.
  11. Glue spacers in project box to hold the transmitter in place

Photos

inbox01

inbox02

completebox

 


Raspberry PI Setup

Installation

  1. Install Apache/PHP and MySQL on the raspberry pi
  2. Unzip the developed web application into the webserver.
  3. Using a browser on the network, connect into the URL where you unzipped the device to. This should open the setup/installation screen.
    installation
  4. Configure the COM Port to that of the Arduino, and provide the database settings needed, then press the ‘Next >>’ button to install. If there are any errors, observe the message and correct as needed (e.g. permissions on the config.php file)

Device Setup

Once installation has been completed successfully, you’ll be taken to the setup wizard to add any Lightwave devices you may have:

 

Step through the wizard to

a) Select or create a room – devices are grouped by room in the user interface
step1

b) Add the receiver (The actual lightwave RF device). Here you add give it a description and select the type of receiver, e.g. dimmer, socket, relay, etc.
step2

c) Following addition of the receiver is to create a transmitter identifier. This uniquely allows the transmitter to be associated with a single receiver, or multiple receivers. For example, you can reuse the same transmitter for a room to turn on more than one device from the same command. You’ll notice in the following screenshot that the final transmitter covers 2 receivers. If you want the control to be unique, just pick new transmitter and enter a description.
step3

d) That’s enough configuration and your room, receiver and transmitter are all recorded and linked. The final stage is to actually pair the transmitter and receiver together. To do this, you need to put your receiver into pairing mode (e.g for a dimmer, hold both buttons. For a socket hold the single button. For relay, push in and hold the pairing button with a pen).
step4
Once the device shows it’s in pairing mode (usually by flashing the lights) you need to transmit a code for the transmitter. The wizard allows you to do this, and then once the receiver confirms a pairing, you can test this with the off/on buttons.

Once paired, finally press the finish button.

Device Control

You’ll then be presented with the device control screen where you can control your Lightwave RF devices
devicecontrol

 

From here you can select the room, and chose to power on/off the devices, and where the device is a dimmer, you can choose to adjust the dim by clicking or touching the dim ‘gradient’ bar.

If you want to change the setup or reinstall, you can use the menu in the top left corner.
menu

 

On transmission, it should looks like this!

boxon


2014 +

To carry on with the Lightwave automation work, I’ve made a few other changes.

I’ve now rewritten all the arduino sketch again, this time to remove hard coded transmitter ids, and expect an id for every call, and also to allow for the control of dimmer switches so I can set the dimmer level of a light.

Following on from this, I’ve completely rewritten the PHP, using the php-serial library to bring a bit more stability to the serial comms, and also created a mysql database and a bunch of tables to hold the transmitters, devices, types, paired transmitters, etc.  This allows me to dynamically build the page on the fly now using the database, looking something like:

ha2

As I know the types from the DB, I can offer a dimmer setting on those, and you can alter dim by touching/clicking on a region of the gradient fill bar below the on off switches.

The device is still on a breadboard and needs soldering together, but I want to create config pages next that

  • Setup/create the database
  • Allow for addition of a new transmitter
  • Modification of settings, e.g. delay timer for command, serial port location, etc.
  • Modification of rooms/etc
  • Pairing of a transmitter with receiver
  • Implement the ‘all off’ kill switch again, to power off everything in the database
  • Confirm this all works even from a hard reset!

 


2014 +
Posted by pembo
pembo

I’ve recently started down the path of home automation.  As well as my alarm which I can control from my mobile app, I’ve recently invested in some Lightwave RF switches and sockets, as well as the mood controller, and a PIR controller, however, I wanted to take this one step further.

You can buy a Lightwave RF wifi link, but this is around £70 and I consider this over priced given the technology within it and I expect this cost is related to the web portal you have to use to go with it, so I took it upon myself to build something similar at a cheaper rate using open source hardware.

I’ve got an arduino and a raspberry Pi, and decided initially that the arduino is better suited to this task.  I purchased a RF 434MHz transmitter and receiver, wired this into the arduino, and sure enough, I now have a method to broadcast the relevant RF signals to the various sockets.

This took a few hours to get working correctly but I’ve now got my arduino paired with all my sockets/switches and a serial connection into the arduino to power on/off each of these, as well as a ‘kill’ all off setting to turn everything off without question.

From there, I’ve paired this to my raspberry pi via serial, and then very quickly created a set of PHP pages and shell scripts that allow me to turn on/off the various switches/sockets!

homeautomation

My next steps are to create a mobile app version of this with more functionality, to enable the dim function on the lights and replicate the mood switches in software.

I also need to build the hardware properly – it’s currently in a breadboard now, with the antenna wire stuck in with blu-tack rather than being soldered in!

I plan to document much of this process here.  The majority of the information is scattered around the internet and freely available, but I plan to document the full process here to pull it all together!

My 434MHz receiver does’t seem to be up to the job either, so I need to invest another few quid into a better one.

To give an idea of cost, the transmitter and receiver together cost less than £3, and an arduino is around £20.  So less than a third of the cost of the wifi link, though admittedly, I’m missing the scheduler UI they have, though CRON does me just fine right now :)


2013 6

So, my blog is normally pretty focused on the various topics I post on, but I’ve been motivated enough today to write about ‘yodel’ (http://www.yodel.co.uk) who without doubt have to be the single worst courier company in existence today that I have ever had the displeasure of being on the receiving end of.

I can only suspect that their fees to companies must be really low as many large companies seem to use them, but I can hand on heart say that they have been a complete and utter disgrace, to the point where if I know a company now uses them as a courier, I’ll choose to avoid using that company and buy from somewhere else

Let me explain a little of my experience with yodel

Case 1: The first time

We ordered some shoes for my daughter from a large UK sports retailer who choose to use yodel.

The first paid for ‘next-day’ delivery date came and went, despite my wife waiting in the entire day for the delivery (7am to 6pm!).  We called the courier company, and I begrudgingly arranged a re-delivery date.

Guess what – the redelivery date came and went and still no delivery – but this time I was watching the tracking data all day from the website.  At 6pm in the evening, the status showed that it was out for delivery, then at around 6:30pm, the status changed, not to a failed delivery, but to a successful one, at around 3pm – with the comment that it was posted!

  • It was shoes in a shoe box – my letter box isn’t that big!
  • They needed a signature so they shouldn’t have posted them
  • How/Why did the status change at 6:36pm to a 3pm delivery status!

I called yodel, but they wouldn’t talk to me, said it had been delivered, and that I’d have to take up any complaints with the sending company.

So I called them, explained the situation – they said they’d investigate, and would get back in-touch – I also personally contacted yodel through twitter to complain, and they initiated a separate investigation, but ultimately got back with a ‘your parcel was delivered’ … no it wasn’t!

Eventually, guess what – they found my parcel at the service centre and sure enough it hadn’t been delivered, but by then I’d already told the supplier that I wanted a full refund and wasn’t interested in entertaining yodel do yet another delivery that might get botched and didn’t like the insinuations that I was trying to pull a fast one!  Sure enough, the supplier did refund, but only once the parcel had turned up, because as far as they were aware, they’d delivered it because Yodel had said so!

Case 2: The straw that broke the camel’s back

Order from Argos this time – I wasn’t aware they used yodel otherwise I’d have picked it up myself from the store, but as it was furniture, I figured it would be easier to get it delivered rather than try and squeeze it in the car.

Paid Argos extra for Saturday delivery, and waited in all day.  I called Argos after 6pm come and went without a delivery in sight – guess what… apparently I was ‘carded’ just before 10am.

No way!  I was in all day, and actually in the front room where you’d not only hear the delivery but also see it.  I live in a small cul-de-sac and any lorry/van is easily noticeable.  I noticed a Sainsbury’s home delivery around the time I was allegedly carded to one of my neighbours, but not the phantom yodel van.

On calling Argos, they mentioned the service depot it left from and I knew immediately that it was yodel and my heart sank.  I’ve now had to arrange re-delivery and have got to wait around another day for a delivery.

—— Update 2nd October ——

The yodel woes continue – Argos rearranged the delivery for Wednesday and provided me with the tracking ID.  You can imagine my surprise when I checked the tracking ID on Wednesday the 2nd October to find that it had been ‘successfully’ deliver on the 30th September.  Wow… that’s great news, they just weren’t delivered to me.

Another call to argos, and some more information – they were left in my ‘Summer House’ in the back garden.  Guess what – I don’t have a summer house..

So – yodel had successfully delivered the item to the wrong address – fantastic.

Argos arranged for them to recollect the items, and redeliver them.  Sure enough, this happened on the same day… finally our package arrived from a courier who was less than ecstatic to be doing so (and that is putting it politely)

But it’s not the end!  When I got home from work, I took a quick look and the boxes of the wardrobe were a complete mess, tears, crushes, polystyrene ruined, and low and behold, the wood was damaged where the box had been damaged and it was on a visible part of the wardrobe.  This was probably cause by all the ‘messing’ around!

Now yodel are coming back again on Saturday with another new wardrobe, and to take the old one away…. maybe… lets wait and see, they’ve never managed a successful Saturday delivery yet!

—— Update 05 October 2013 ——-

Guess what….. still no delivery!  It goes from extremely bad to simply unacceptable.
I’ve wasted 2 whole Saturdays waiting around for Yodel to do the seemingly impossible and deliver a package – something they’re supposed to be the experts at!

This morning I called yodel to find out the tracking ID for the redelivery and got through to a very pleasant lady who was more than happy to help.  She pulled out the tracking IDs and provided them to me and  then I proceeded to track the item throughout the day checking pretty much every hour as I didn’t have any confidence in them being able to deliver (and my lack of confidence wasn’t wrong!)

Following on from my first experience above (Case 1), I decided to take screen shots of the tracking screen as I checked this time.

Their track events aren’t real time even though they appear to be that way.

(Note – I’ve had to edit these screen shots to protect identity as the yodel website is completely un-secure around tracking of orders.  It prompts for an ID and postcode but proceeds to subsequently ignore the postcode.  Any thieves out there take note, you can cycle through the number orders, find those that are left in a ‘safe’ location, and proceed to remove them from the ‘safe’ location before the owners return! – you just need to order something to know the format in the first instance)

Take the following example from today

1-web

The screenshot of their online tracking at 14:30 – all looks ok so far.

Then came the 15:30 check (or thereabouts!)

2-web

Hold on a minute, is that a 12:06 track even that appeared some time between 14:30 and 15:34, and oh look.  It’s an address problem – guess what, yet another messed up delivery by yodel.

But wait, an address problem, this is the same address they’ve already managed to deliver the damaged item to on wednesday, and even more so, I’d even put special delivery instructions on the order so they could find the address (assuming the driver could read that is)…

So, I’m still the proud owner of one damaged wardrobe, yodel still have another wardrobe that they have allegedly sent out and now returned, and all as Argos can do is rearrange delivery yet again… who’s to say next time around, it won’t be damaged again now that it’s been loaded/unloaded and then subsequently loaded onto a van again.
This order was made on the 21st of September.

I never got the delivery from yodel… having been on the phone to argos for a while, I’ve cancelled the delivery and collected from store instead.

—— Update 07 October 2013 ——

Hahaha – guess what they turned up this morning to deliver even though they had an address problem, and even though I’d cancelled.

—— End 0f Update 07 October 2013 ——

 

I don’t know if it’s just contract staff, drivers, or the regional yodel service centre here that is terrible, or if it’s a national thing, but I suspect its more their processes (or lack of) rather than the people given the numbers of complaints on the internet and the fact that they’ve even managed to make the BBC Watchdog TV programme (http://www.bbc.co.uk/programmes/b006mg74/features/yodel)

So if there are any ‘C level’ staff of large internet companies who happen to stumble on this – if you do use Yodel and want to retain customers, please think again.  it might cost peanuts, but with peanuts you get ???????.

Alleging delivery when they haven’t, alleging ‘carding’/missed delivery when they haven’t, and to add to that now, an ‘address problem’ when they’ve already been just 3 days ago to deliver a damaged item!
A courier company has to do two things well:

  1. Courier items on  time and schedule
  2. Track the status of these items accurately.

From what I can see yodel does neither of these!

I’ve worked with some very large and some smaller courier companies in my job as an IT consultant, all of who I know can track parcels, deliveries, and the vehicles/staff throughout the entire process all of which guarantees customer satisfaction – Yodel if you’re reading this I recommend you seriously take a look at your business processes, systems and staff if you want to turnaround the woeful financials assuming the numbers I’ve seen are to be believed!

I’m confident that yodel complete large numbers of successful deliveries every day and I know that many of the staff will be dedicated and excellent – the response I got from the twitter team was courteous and efficient, but couldn’t resolve the issue ultimately.  I’ve never ever experienced such lies and poor service from a courier company – only once has one other courier company come close to being this bad in the last 10 years and they managed to redeem themselves.

Yodel you really are a disgrace. 

Shout it from the hill tops, yodel it in the mountains – you certainly give people something to shout about – your shocking service!

Disclaimer just to add that these words are solely my own personal opinion, and also that the dates / times and events from case 1 are what I can recollect from memory as I can’t pull back much information on this now given it occurred a few months back.  Case 2 is about as date/information perfect as I can get


2013 +

I’ve finally got around to updating the style of the website. It’s still based around the metro modern UI approach of Windows 8, Windows Phone and now android 4 and IOS 7 with an aim of putting content before chrome.

This theme is a heavily customised theme originally based on the wordpress ‘sensitive’ theme but bespoked to be more ‘metro’ and to retain some of the previous styling of the website.

It adds a little more ‘chrome’ than previously, but the focus is still wholly on the content. It also degrades better on mobile browsers and thus means you don’t necessarily need to switch to the mobile version of the site to view it on your phone.