Feeds

How to get a Raspberry Pi to take over your Robot House

Mouthwatering nerdy possibilities - use ANY gadget to bring darkness or light

SANS - Survey on application security programs

At last, the ability to turn stuff on and off no matter what gadget I happen to be holding at the time

That was nice, but not quite what we were after, so we delved into the JSON interface for device control. There's a cut-down version of the Z-Way client which comes with HTML and JavaScript source code and one can stick it in a browser and see how it works. The interface just asks the IP address of the Raspberry Pi concerned and kicks off a JavaScript client which one can muck about with to find the commands being sent - in our limited experience this worked better than using the manual, and established that we could turn on our light by loading the URL:

http://192.168.1.75:8083/ZWaveAPI/Run/devices[2].instances[0].commandclasses[37].Set(255)

... which returns a null but also switches on the light. Replacing the last number with zero switches it off again and we have a mains switch we can control from any app capable of opening a socket and sending a String.

A device

Less successful was the Keyfob. Including it seemed a very hit-and-miss affair, and we never managed to exclude it at all. But once included the fob worked as promised - we were able to link it up to the mains switch for remote controlled lights - however the manual proved fiddly and control over the flexible arrangement of buttons (which can be double or single tapped, and toggle or be absolute) was far from intuitive.

We did eventually get it "wired" to the switch, and it even worked when the Raspberry Pi was powered down. Z-Wave devices can be instructed to work together, but without the Pi to route the communications it did take up to six seconds for the button push to trigger the switch - not what one would want at the top of the basement stairs. When the Pi was running the same instruction took less than a second, which seems worthwhile.

The meshed nature of Z-Wave means each node is also a relay, allowing every corner of the home to be reached, and the Z-Way interface provides a live table of which devices are speaking directly to each other which is fascinating in itself.

What we really wanted, of course, was to tie the keyfob buttons into our Raspberry Pi music system. Buttons one and three would switch the amplifier on and off, while buttons two and four would start and pause payback, reducing the need to boot up a web browser every time one wants to pause the music (worktop touch-controls not withstanding). But sadly it wasn't to be.

The Z-Way application is all written in C, and while Z-Wave Europe can provide APIs there's no easy way to hitch it to a Python app like our music player. Apparently there was a Python version, but it couldn't achieve the performance necessary to maintain Z-Wave compatibility, which indicates that a second Raspberry Pi is probably in order to keep the music playback smooth.

Sadly catching keyfob actions over the JSON interface isn't possible with this version of Z-Way, so the two-Pi solution is also out for the moment at least. A new version of Z-Way is promised within a few weeks, along with better documentation and and an "automation engine" to facilitate triggered actions.

El Reg readers will likely be more interested in the JSON interface and ability to hook a controlling Pi to a home network capable of managing thermostats, heaters, motion detectors and door locks, rather than an automation engine providing drag-and-drop controls of existing devices. For that the next version of Z-Way looks very exciting, but the existing product still provides a fun introduction to Z-Wave and could make some of those Pi's sitting in cupboards and corners a little more productive. ®

SANS - Survey on application security programs

More from The Register

next story
Samsung Galaxy S5 fingerprint scanner hacked in just 4 DAYS
Sammy's newbie cooked slower than iPhone, also costs more to build
Leaked pics show EMBIGGENED iPhone 6 screen
Fat-fingered fanbois rejoice over Chinternet snaps
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
True optical zoom coming to HTC smartphone cameras
Time to ditch that heavy DSLR? Maybe in a year, year and a half
Rounded corners? Pah! Amazon's '3D phone has eye-tracking tech'
Now THAT'S what we call a proper new feature
Leaked photos may indicate slimmer next-generation iPad
Will iPad Air evolve into iPad Helium?
Feast your PUNY eyes on highest resolution phone display EVER
Too much pixel dust for your strained eyeballs to handle
Zucker punched: Google gobbles Facebook-wooed Titan Aerospace
Up, up and away in my beautiful balloon flying broadband-bot
prev story

Whitepapers

Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.