First thing I needed was some programmable hardware and since I have done so many arduino based projects before, the choice was obvious. Or was it? I noticed a new arduino clone had popped onto the market called a Nanode. Acting much like an arduino but at an incredible £22 from SK Pang (a similar arduino is over £44!). Now I actually ended up getting the upgraded model (Nanode RF) which includes the following extra features:-
- A Hope RF RFM12B (supplied with 868MHz module) transceiver for 2 way communications with other boards.
- A microSD card for general datalogging storage, storing applications and webpages. microSD card not supplied.
- A realtime clock IC with alarm function which also holds a unique ID. not supplied.
- An 8 pin socket (under the H logo) to allow you to add non volatile RAM for program download. Supplied with 23K256 256kb SRAM and DIL socket.
This allows me to use it to talk to other devices, but more on that in a later blog post!
To simulate the bye bye standbye online controller I needed to know 2 things. 1 how does it talk to the sockets, and 2 how does it receive commands from app such as the brilliant remote for Bye Bye Standbye.
Well thankfully both problems have been solved, and well documented many times before!
playground for all of the HomeEasy integration code - so that was the easy bit. The only additional thing I needed was something that could "talk" over the 433 frequency. Thankfully Farnell sell one for a smidge of £4.
Once I proved I could get this working nicely (using code sample 3 from the playground) I moved on to problem 2 - how does the BBSB controller talk to other software?
Again this was (unusually) well published by bye bye standanby (hats off to you for that!). So all I had to do was get the nanode to "talk" UDP.
Well this was a tad harder! The Nanode does not use the same Ethernet chip as the Ardiuno Ethernet stuff - so you can't use the standard "Ethernet" Library. Arduino recently released a new version of their IDE (V1) this means a lot of the code samples online have changed so it's a tiny bit harder to get good samples, but with some great help from the nanode community (get involved on irc) I was able to pull apart the tftp sample and just handle the udp packets I needed.
So without further ado here is my code hosted on github (my first open source code!) https://github.com/rossdargan/Arduino-Projects/blob/master/BBSBControllerImpersonator/BBSBControllerImpersonator.ino
And here is the final solution:-
BBSB also provide a really handy application to test to see if everything works fine - you can grab that from the forums
Well the Nanode RF already includes a transmitter so it's a bit daft not to be using it - unfortunately it's the wrong frequency - but you can easily by a compatible 433 transiever from farnell.