Yes, this, with the SmartHub, cable modem, etc. on a UPS that will run them for quite a while without AC power.
Posted on my blog regarding flipping a virtual switch in smartthings based on the status of the UPS connected to my Raspberry Pi. My method uses Webhooks and IFTTT as intermediaries, so your,internet will need to be “up”.
There’s certainly room for this to be customized/tailored to your environment. Let me know your thoughts.