If the house loses wifi connection well the OpenHab still be able to communicate normally? If we are using raspberry pie then is it possible ?
Internet connection, not necessarily unless your devices communicate through an API.
WiFi yes, openhab will need a way to send and receive a signal from your local devices.
This depends mainly on which protocolls you are using.
If you use Wifi-Bulbs for example, the answer is NO
If you use zWave or ZigBEE, the answer is YES
If you use additional internet based bindings (e.g. weather) the answer is NO.
May you provide more information about your environment, so we can give you a more detailed answer.