Understanding what's possible

5 replies [Last post]
BodgeIT
Offline
London, United Kingdom
Joined: 10 Jun 2010

Hi,

Great looking project and congratulations on a brilliant job putting everything together.  I'm currently trying to understand all the different elements of what you've accomplished.

Most of it flies just above my head, so I'm aware this will be quite a big learning curve for me, so I hope you don't mind a couple of low level questions.

As I remember, the config of the Orange Livebox provides 3 network ports and 1 USB(maybe 2) are these devices actually available in your config? Why then is another NIC added?  Can a USB hub work with the usb port? Is this where you attach 'serial' devices?

Are there any plans to facilitate other 1-Wire devices? What sort of devices are being looked at and what could be available? IR? Motion? Smoke? RFID?

Also what exactly does the I2C bus allow?  Does this mean other PCBs that provide other functionality could be added?  Or is it more like other components/sensors/devices. 

I'm really interested in Zigbee, I know it seems to be establishing itself as a more commercial system but I'm looking to buy a tablet that will come with zigbee comms built in and would love to build my HA around it.  I'd be looking to add in various zigbee devices as they become available and "pretty" enough(most HA devices seem to be designed with no thought to appearance).  Is this something that could be added later via the I2C bus or have I misunderstood its function?

Thanks

Gary

 

 

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
What is possible

Hi Gary,

Always better to ask than assume.

The standard Livebox has 2 Ethernet ports and one USB. The HAH firmware bridges the two Ethernet ports - which is fine as the HAH only has one IP address. You use one Ethernet port to connect the HAH to your router.

The USB port is usually used to plug in a Current Cost monitor, or a Nokia 7110 phone. You can use a USB hub. Serial devices can be added using a USB to Serial adaptor (we use ones based on the Prolific chipset). The xap-bridge needs to be configured if you want to do this.

Right now, the 1-Wire only supports temperature reading. We do hope to do humidity one day, but there are other things on the go just now (RF reception for one). If you want to add your own stuff, serial attached microcontroller subsystems is firmly the way to go. Zigbee could be attached this way.

I2C supports the PCF I/O expander chip. Nothing else for now.

If you do want to attach 3rd party stuff, you will need to be able to do quite a bit of config. Read the page on xap-bridge. Scripting in Lua would also let you do very cool things, like sending other xAP messages when something of interest happens on the Zigbee unit.

Anyway, do come back if anything I've written (in haste) is unclear.

Cheers,
Derek.

 

BodgeIT
Offline
London, United Kingdom
Joined: 10 Jun 2010
Hi Derek,Thanks for the

Hi Derek,

Thanks for the speedy response.

I hoped I had managed to convey my ignorance, but this should do it:

What's a PCF I/O expander chip?  And what can it do?

Also how many devices can be accomodated using usb-serial adapters and usb hubs?

Could the 1-wire bus not be easily used to implement detectors like door open/close, IR detection, movement detection?  Is this something that is pending?

Could this device be used to connect to serial devices:

http://www.lantronix.com/device-networking/embedded-device-servers/xport...

 

Cheers

Gary

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
xAP is key to integration

Gary,

When the HAH was being designed, we were very keen to ensure that it could 'plug & play' with other HA devices. Every interface that the HAH supports is xAP enabled. xAP is a standard that is both fully documented and supported by a number of existing HA systems. Details at xapautomation.org

The PCF expander thing basically allows you to hang a number of I2C connected PCF8574 chips onto the unit. Each of these little devices allow you to read/drive upto 8 TTL level inputs/outputs. You can attach several of these chips (upto 8 in total). So, if you had a dozen relays to control, and a dozen switches to read, this would be one way to do it. Details at http://www.dbzoo.com/livebox/hah#i2c

There is no hardcoded limit to how many devices you can attach via USB to serial cables. If you want to attach more than one, it would be a good idea to have a separate power suppply for the USB hub (as the power supply in the HAH has limited capacity). The nice thing about the serial attached piece is that it's relatively easy (and inexpensive) to develop your own, microcontroller based, sensors that 'talk' serial RS232.

Once attached to the USB hub, the xAP-bridge software in the HAH allows the serial connected device to access all of the other xAP enabled devices that the HAH supports.

One example of this is something that I'm working on just now. The HAH currently has an xAP enabled RF transmitter. This allows RF mains sockets to be controlled. Lots of folks have been asking about RF reception so that things like wireless door sensors, wireless PIR units and wireless handheld transmitters can be used. I'm developing a solution for this using a microcontroller that will be external to the HAH unit. It will plug into the HAH using a serial to USB cable (these cables only cost a few quid on eBay). Once plugged in, Lua scripts can be developed on the HAH to allow an incoming RF signal to be logged, trigger a series of xAP based actions etc. It's early days, and the time to spend on this is rather limited just now, but I'll get there eventually.

This approach is more obvious than using 1-Wire to attach things like door sensors and PIRs.

The Lantronix device is more often used to ethernet enable an existing RS232 device. If you can design & build up your own PCBs, it's a neat way to turn an RS232 developed project into a project that can plug directly into an ethernet port.

Hope this helps clarify.

Cheers,
Derek.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
ethernet to serial

The lantronix device you sighted is just an ethernet to serial bridge.  The livebox with some additional software can do this too see http://www.dbzoo.com/livebox/project_terminal_server for more details.  This was an early project I started before we (Derek an I) hit on the idea of using the livebox has a home automation platform.

The termnetd daemon is not compiled into the HAH firmware due to space restrictions however it could easily be stored on a external USB pendrive.

Brett

BodgeIT
Offline
London, United Kingdom
Joined: 10 Jun 2010
Thanks to you both, that's

Thanks to you both, that's helped a lot.  As I said earlier in my post, I can see that this will be a massive learning curve for me.  I can imagine that things will become a lot clearer as I get my hands dirtier.

Just sitting back waiting to get my Livebox at the right price and then I'll be getting on board.

I'm going to start by planning out the requirements for my Home Automation and then build it around HAH.

Might be a nice idea to have a place for people to post their experience and progress on their HA using HAH, could provide inspiration for people to build on?

Hardware Info