Controlling devices in the house when the wifi goes down?

The hub will work locally for Z wave devices with locally eligible device type handlers. But the only code which can run locally at the present time is the official smart lighting feature and a few bits of smart home monitor.

As @TheBearMay Mentioned, you will not be able to use the mobile app to control anything if the smartthings cloud is not available. And you will not be able to arm/disarm smart home monitor or change the mode unless you have the ADT/Smartthings model of the hub.

The following wiki article should be of interest (the topic title is a clickable link)