Friday, January 18, 2008

Network events from the BBSB controller!


Great news on the BBSB Online controller front -How to get controller events on your local Lan - something that has been a bit of a mystery to us.

Reader Marcus J has posted a comment on my earlier BBSB Online Review about how he set about writing his own software to control the BBSB controller device locally on his LAN. - While we'd already discovered how to 'control devices' by talking direct to the controller, he's cracked the event notification side which is even more useful , as the subscription BBSB online software which is currently able to send e-mails and Texts on events, but nothing that is extensible for those of us who want the events to go to our own apps and scripts.

Here's how:

Using a network packet analyser he discovered that whenever the device detects a RF signal it broadcasts a UDP packet to the broadcast IP of 255.255.255.255 with destination port of 53003 and the packet data is in format of "devicecommand:1e01:" for example where e1 has been turned on.

All you do is write a script or application to listen for udp broadcast packets on port 53003. :)

Marcus tells me this has enabled him to write his own macros to trigger other devices /emails/alerts etc whenever an event occurs.

He has also written a script plus php web front end to allow control of devices using a schedule all thanks to our earlier discovery on the URL format.

The script simply opens port 80 on the device and sends the necessary http header and url when a scheduled event occurs.
If this was facebook, I'd have bought you a virtual Pint Marcus! - well done.
If anyone else has any clever ways of making use of this little controller, feel free to let us all know using the comments link below.
Update
Yup, it's true - works like a charm - here's an updated SleepTool.exe, that can hear BBSB events from the controller on the network. It also has a simple way of mapping BBSB devices (switches, motion detectors - etc ) to executing stuff on your host PC so you can run an app when a detector is triggered etc - link to the code and binary. - Enjoy. (standard horrid-vb coding disclaimer applies 8-) ) - you can use this on multiple PC's to put them to sleep when you turn off the power, the app still supports all the functions of the previous version.
Also, when the controller is instructed by the BBSB website to turn on/off a device, Marcus's observation also applies - so a local packet with 'devicecommand:0A01:' is seen when the website turns off Device A1 for example. Finally, there looks to be some sort of heartbeat packet as well every 10-20 seconds, which contains all sorts of interesting stuff when the controller heart-beats to the BBSB mothership....

3 comments:

Nick said...

Link to sleeptoolbbsb is not working - any chance of reposting it; indeed has there been any forther progress linking the BBSB controller with Homeeasy kit, ie to pick up signals from HE PIRs etc?

Many thanks
Nick

mart said...

Oops - it got updated several months after that post - try again, I just updated the link. Thanks for pointing that out.

For updates on the BBSB controller/homeeasy, see http://www.byebyestandby.com/forum/viewtopic.php?f=6&t=508

Basically, ByeByeStandby themselves are not keen on the idea of people doing this, so have asked us to discontinue published work on this 8-(

If you want to build something yourself, then see

http://www.arduino.cc/playground/Code/HomeEasy

Several people have posted sample code on how to control HomeEasy from an Arduino - I'm sure with a little imagination you could create what you are looking for. (I did create a complete controller , but agreed not to publish the details)

Bruce (http://www.byebyestandby.com/forum/viewtopic.php?f=6&t=508) has also produced a hacked firmware for the BBSB controller that is making excellent progress.

HTH

Mart.

Derek said...

I've been working on and off for for a couple of years on an, IP connected, HA controller project. Recently added HE/BBSB simple protocol support. Info at http://www.dbzoo.com/livebox/hah