Large home alarm project..

I was thinking that devices would be connected to their selves by i2c bus - but this is not an option as wires can't go very long.. Currently the furthest point needs about 40 meters long wiring..

Was thinking about that mainboard would be usb hub + raspberry, but usb can't be longer than 5 meter also.. If I don't extend it with a powered hub once in 5 meter.. Doesn't sound good either..