Cloud backup failure causes Z-Wave radio to go offline

There is a cloudbackup event that, while it is actually a location event, is displayed in the Hub Events tab. It will show success or failure of the cloud back up, and if it failed what areas failed.

Don’t think it is available in RM yet, but I wrote a small notification app to trap it and kick out a notification.

Edit: included the code below for those not in the Beta group. Would be an easy add to set a switch or similar activity if desired.

Cloud Backup Notification
definition (
	name: 			"Cloud Backup Subscribe", 
	namespace: 		"thebearmay", 
	author: 		"Jean P. May, Jr.",
	description: 	"Subscribe to cloud backup event",
	category: 		"Utility",
	importUrl: "https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/xxxxx.groovy",
    installOnOpen:  true,
	oauth: 			false,
    iconUrl:        "",
    iconX2Url:      ""
) 

preferences {
   page name: "mainPage"

}
mappings {

}

def installed() {
//	log.trace "installed()"
    state?.isInstalled = true
    initialize()
}

def updated(){
//	log.trace "updated()"
    if(!state?.isInstalled) { state?.isInstalled = true }
	if(debugEnable) runIn(1800,logsOff)
}

def initialize(){
}

void logsOff(){
     app.updateSetting("debugEnable",[value:"false",type:"bool"])
}

def mainPage(){
    dynamicPage (name: "mainPage", title: "", install: true, uninstall: true) {
      	if (app.getInstallationState() == 'COMPLETE') {   
	    	section("Main")
		    {
                subscribe(location, "cloudBackup", "cldBuHandler")
                input "notifyDevice", "capability.notification", title: "Notification Devices:", multiple:true
            }
        }
    }
}

def cldBuHandler(evt){
    //log.debug evt.properties
   if(evt.value != 'true'  || evt.descriptionText.toLowerCase().contains('fail')){
        notifyDevice.each { 
            it.deviceNotification("Cloud Backup Failed on ${hub.location.name}")  
        }
    }
}
2 Likes