Page 1 of 3

BBSB Meets Arduino - Network Repeater

PostPosted: Sun Jun 14, 2009 8:33 pm
by martgadget
Hi all,
Here's my first Arduino / BBSB controller project. - http://martgadget.blogspot.com/2009/06/bbsb-meets-arduino-part-1.html

Image

Its a Network repeater for weak signals - it's not perfect, and probably has bugs. My favorite bug is the endless echo that takes place if the arduino and BBSB controller can see each others signals - luckily that one is fixed in the code - no more flashing house lights for me 8-)

I'd love to hear of any other ideas you have for devices that talk BBSB/Domia Lite - please post suggestions, and code enhancements etc if you have any ideas, I hope to post an updated design with an RF receiver as well, which will be a true 2-way repeater - as this one is one-way (Lan->RF) only.

If you have questions please post here.

Enjoy.

Mart.

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Sun Jun 14, 2009 10:35 pm
by Homer
Hmm, neat looking hardware Mart :ugeek:

Time for a new section here for personal projects and hacks methinks 8-)

I've just set up my home heating control using BBSB equipment with both Harmony & the BBSB online system to control my heating system - details on the Harmony forum :D

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 3:54 am
by Rob Iles
Hi Mart,

Excellent first post (of the Hardware Hacking Variety).

Have just had a quick trawl through your souce code (professional curiosity)...and have a comment/bug fix for V0.2.1:

Serial.print(packetBuffer[43]); //cheat - we ignore numbers >10 no domia device dial goes over 8.


Is not accurate. In-ceiling devices support 256 addresses - A-P, 1-16.

Not a biggy, bit worth fixing sooner rather than later, else deriviatives will inherir the bug.

One final point - it's probably best to refer to all the Hardware as "ByeByeStandby", rather than "Domia" or "Domia-Lite", as all current + new kit will be produced and branded as such.

Hope this helps,

Rob

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 8:50 am
by martgadget
v0.3 posted at the link above - now contains code to support device codes above 10 (I hope - though I dont have any, so cant test.)

Dont expect this speed of turnaround in future...lol. (or maybe!)

Next Project Suggestions - would welcome any others you might have:

- 2 way radio repeater (with reciever and transmitter) to work in the same way as this
- Should act as a proper repeater, provided the echo cancellation is correct (!)
- 8 input transmitter (sends the high/low status of digital pins 1-8 on the arduino as a house code plus 1-8) with toggle/latch support.
- Would be useful for interfacing 'other stuff' to BBSB - translating other sensors into BBSB messages.
- 8 output reciever (sets pins 1-8 high or low depending on house and device id code recieved)
- Ditto for controlling stuff that isnt mains powered - kudos though to a post on here that shows hacking a socket switch to switch without mains.
- 8 Analogue input transmitter - resulting in BBSB signal when a threashold is reached/below

Mart.

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 9:43 am
by StephenN
Looks good.
I will be investigating further, but it will take some time to get "into" the Arduino etc.

I would suggest development of the 2 way repeater ( with transmitter, receiver and ethernet connectivity) would be the most popular option. This would allow (with suitable software) receipt and transmission of RF data from BBSB, Homeeasy, Oregon scientific etc - i.e. similar functionality to the RFXcom gear but at a fraction of the price. I think there would be a big demand from Homeeasy users for this.

As an aside, I came across a website (which I cannot now find!) where someone had connected one of the 433Mhz receivers up to the audio (mic?) input of his PC, and used the audio record facility to record the RF signals being received so he could actually see the data patterns. I presume you would have to drop the output of the receiver down to a suitable level using resistors, but it sounds like a simple diagnostic tool.

Thanks,
StephenN

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 11:08 am
by martgadget
@ StephenN

- thanks. Shouldnt take you too long to get 'into' the arduino- they are pre-built - you just plug into USB and load the software - very very easy. - when I discovered them (especially with ethernet connectivity), it was a similar 'hmmm...' moment to when I first wrote some code to talk over a network.

With reference to protocols etc - this is the hard part (unless you're the folks @ bbsb of course who probably have someone who speaks RF protocols (!) ) - you either need a proper hardware 'scope or something similar to decode the packets.

The decode/re-encode code in this is from a library I found on the the net, that 'just worked' with BBSB, as BBSB's protocol is the same as some sweden product (klikonklickoff or similar) - so there was no effort involved in this so I didnt need to go through the pain.

There is a 'poor mans oscilloscope' for arduino - http://accrochages.drone.ws/en/node/90 which I did look at briefly.

The issue is that you'd probably have to build your own little 'faraday cage' to decode stuff - when I ran up the osc above , with nothing in my house (knowingly) transmitting, I got all sorts of data on it - thus if you were to try to 'reverse-engineer' a products protocol (he said eying his Yale wireless alarm PIR on the wall) you'd need to shut out the 433mhz 'noise' first.

The RFXComm products are really nice, and quite mature - they have been through this pain of decoding protocols etc - I did think briefly that some PC app could be taught to 'learn' the codes without actually decoding them, but the arduio's 12k of memory (including program) is probably too small for that on it's own but could be the target for them.

HomeEasy should be possible, there are a couple of people coding for this already- http://www.arduino.cc/playground/Code/HomeEasy for example, but I'd need to sneak home with some homeeasy devices, as I dont have any...yet. (BBSB <-> HomeEasy bridge is a nice project idea - extending the BBSB services and controller to the HomeEasy devices)

As for the other stuff, so long as we can code the protocol to decode it from the 'noise' then it should be possible - it's just that 433.92mhz looks really congested on a 'scope, hence it's important to have good protocol support to make devices work.

Mart.

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 12:54 pm
by Homer
Very interesting. Looks like the overdraft is going to suffer again this month :D

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 3:05 pm
by StephenN
The Homeeasy protocol is, i believe , a longer version of the BBSB protocol. So where BBSB sends A1, Homeeasy sends ####A1, where #### is a number hard wired into the remote. I presume the code for the BBSN/Domia filters out anything whch isn't in an "a1" format. If the code were rewritten to not filter out the other stuff, then the arduino "bridge" would receive RF signals, and retransmit them onto the LAN if they were in the ####a1 format (BBSB would be seen as 0000A1). Similarly if you wanted to send an RF signal to homeasy, you would send a D:####1A01:E type command to the bridge which would convert it to serial and send it as RF. There would be no need for complicated conversion in this simplest form. However, Harmony wouldn't understand the ####a1 type codes, so wouldn't react to them unless the harmony code were modified to work with Home easy.
I could envisage a Homeeasy module for harmony which would work with one of the "dumb" bridges ( forgive me for slandering your creation!) The homeasy module would have a learn button - when pressed, the module would monitor UDP53007 for any messages for say 10 seconds. Press the Homeeasy remote within this time, the bridge sees the RF and transmitts the ####a1 type code on the LAN, the Homeasy module sees it and allows you to attach a device name to it, writing the info to the Harmony database as a new device . Homeasy can then associate the name with a particular code.
If a harmony/Homeasy module is not forthcoming, it would still presumably be possible to put a limited look up table in the bridge so that it could receive a ####a1 code as RF, but send an a1 code over the LAN, and vice-versa. so a homeeasy remote could send a BBSB code to harmony, which could send a BBSB code to be converted back into a homeeasy code etc. The look up table would have to be added into the firmware, so you would need some way to find out what codes your homeeasy was sending. Not as user friendly, but still possible

On a different issue, I note the RF receiver you suggest has a trimming capacitor. There are other similarly priced ones which don't ( and so shouldn't need any setting up) Is this likely to matter?

I'm aware of the "all sorts of data" in the background issue - thats partly why I'm interested - I'd like to be able to get at this data!

regards,

StephenN

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 4:21 pm
by martgadget
I noticed the trimming cap as well, havent touched it! - it's working fine without it.

Hmm - think I might be picking up a few homeeasy devices to experiment then - any suggestions as to which ones?

Mart.

Re: BBSB Meets Arduino - Network Repeater

PostPosted: Mon Jun 15, 2009 6:01 pm
by StephenN
Most of the stuff is simple on/off and uses the same Home easy protocol. I think there are variations on the protocol for the central heating controller and door lock (for security reasons!), and for dimmer switches ( to allow them to go to a preset level) There is a "basic" set of one remote and three sockets for about £20 which is good value - the three sockets all take 3Kw, and can be trained to respond to BBSB codes (up to six codes for each socket). If you need 3Kw sockets it is therefore cheaper to use Home easy rather than BBSB
http://www.diy.com/diy/jsp/bq/nav.jsp?action=detail&fh_secondid=9686463&fh_view_size=10&fh_start_index=40&fh_location=%2f%2fcatalog01%2fen_GB&fh_search=home+easy&fh_eds=%c3%9f&fh_refview=search&ts=1245084772967&isSearch=true

Beyond that, there are plenty of options. There is a Home easy forum http://forum.homeeasy.eu/viewtopic.php?f=1&t=666 where the desire for a controller has already been discussed! The internal PIR switch is quite neat - good for turning electric fans off after you leave the room!

Good luck with the project1

StephenN