Home Automation with Xbee and Linux PSIG talk by Bob Edwards, October 2011
Overview Basics of Home Automation XBee modules API mode Multidrop network Xbee's with no local CPU xbeed – an Xbee daemon
Basics of Home Automation want to measure analogue inputs (temps, light level, currents etc.) want to detect discrete events (switches on/off, movement detectors etc.) want to turn on/off mains devices (lights, heaters, pumps etc.) Generally very low-bandwidth requirements
Basics of Home Automation (pt 2) prefer not to have to rewire house wireless is good prefer low-power prefer mains isolation (electrical safety) need secure communications bi-directional “essential”
Home Automation standards X-10 – power line signalling C-Bus – dedicated power/signalling wiring infrastructure 433MHz wireless – various standards – uni- directional Infra-red – line of sight only IEEE ZigBee – based on Bluetooth, WiFi etc.
XBee modules originally by MaxStream (series 1), now marketed by Digi International now also have series 2.5 (supports ZigBee) uses IEEE and 2.4GHz ISM band (some models can built for 900MHz) Designed for low-power and run on 3.3VDC Originally intended to replace point-to-point wired serial links
XBee and XBeePro standard XBee outputs up to 1mW (0dBm) for a range up to about 30m indoors XBeePro outputs up to 63mW (18dBm) for a range up to about 90m indoors (1.6km outdoors) term XBee now also used to define a form-factor and pinout (20 pins) Can get form-factor/pin compatible GPS, Bluetooth and WiFi modules
API mode transparent mode is complex to use to communicate with more than one other device API mode allows much more functionality uses 0x7e as start of frame (SoF) and 0x7d as escape (Esc) code (cf. PPP, HDLC etc.) can use some XBees using API and others using transparent in same network
Multidrop network API mode allows convenient frame-by-frame addressing of remote wireless also allows determination of where a received frame came from I prefer “peer-to-peer” networking with one central (control) node Can use 16-bit or 64-bit addressing (both part of IEEE standard) 16-bit is easier to set up etc.
XBee's with no local CPU XBee modules include up to 11 pins of I/O 7 can do analogue input 2 can do PWM (output) with v1.xA0 firmware, can operate them over wireless so no need for a local CPU for many applications
xbeed – an XBee daemon central control node needs to co-ordinate communications with multiple remote nodes prefer to use Unix sockets (TCP or Unix) to allow many daemons to communicate to remote nodes