[Depreciated] App Watchdog 2

Introducing 'App Watchdog 2'

All of my apps and drivers now use the Hubitat Package Manager to install and update. Thanks

App can be found on my Github:

11 Likes

To install:
Please visit my GitHub and follow the installation instructions provided. This installs just like any other parent/child/driver app.

  • AW2-parent.groovy - Install in Apps
  • AW2-Apps-child.groovy - Install in Apps
  • AW2-Drivers-child.groovy - Install in Apps
  • AW2-driver.groovy - Install in Drivers

Be sure to visit my Docs folder for more information if needed.

Usage:

Virtual Device:
Start by creating a virtual device using the 'App Watchdog 2 Driver'. Only one virtual device is needed.

Create Child App:
Developers can be selected from a drop down list within the app. You can also find a Master list of Developers below. If your favorite developer isn't listed, you could always ask them (nicely) to join in on the fun! :wink:

Once a developer is selected, a line will popup under the URL with the name of the developer.

Also, at this point the 'Select which apps you have installed' will populate with the developers apps.

The rest of the app options should be self describing.

After you have filled out all the options, hit 'Done' to exit.

Running the Report for the first time:
Now go back into the child app and hit 'App Watchdog Report'

A new report will display with all of the Apps you choose from the drop down list. Notice that every one of them says 'No Data' and that there is an update. Don't worry, this will work itself out.

The data will populate as you open each app selected and add the virtual device (created in step 1) into the app watchdog section of each app you want to track. Each app will then report its version every morning @ 3am. Again, this will only work for compatible apps.

Now from this point forward, anytime the developer posts a new version this app will notify you of the pending update!

Once you are notified that there is an update to an App. Go back and run the 'Report' again. You will now see which app it is and what needs updating (parent, child, driver). Links to the raw code will also be displayed. Follow the instructions within the report on how to update.

While this may seem like a lot to do, once you set it up once, it'll only take 2 minutes the next time. :grin:

MASTERLIST OF WORKING DEVELOPERS

App Watchdog ver 2

BPTWorld: https://raw.githubusercontent.com/bptworld/Hubitat/master/bptworldApps.json
Aaron: https://raw.githubusercontent.com/PrayerfulDrop/Hubitat/master/AaronWardAppUpdate.json

Developers:
All developers are invited to have their apps work within this system. All that is needed is a simple json file and a little code added to each app to make it compatible.

  • Simply copy my json file (link in 2nd post) to your GitHub
  • Name it whatever you like
  • Fill in the information for your apps, each file can have unlimited apps
  • Post the 'raw' link here and I'll add it to the 'Masterlist' and to the app itself. Users can simply select your name to follow your gitHub!

Your app users (and I) will thank you!

Code to add in each Parent App (also add this code to non parent/child apps)

def setVersion(){
    // *  V2.0.0 - 08/18/19 - Now App Watchdog compliant
	if(logEnable) log.debug "In setVersion - App Watchdog Parent app code"
    // Must match the exact name used in the json file. ie. YourFileNameParentVersion, YourFileNameChildVersion or YourFileNameDriverVersion
    state.appName = "AppWatchdog2ParentVersion"
	state.version = "v2.0.0"
    
    try {
        if(sendToAWSwitch && awDevice) {
            awInfo = "${state.appName}:${state.version}"
		    awDevice.sendAWinfoMap(awInfo)
            if(logEnable) log.debug "In setVersion - Info was sent to App Watchdog"
	    }
    } catch (e) { log.error "In setVersion - ${e}" }
}

This also goes into the parent app...

// ** App Watchdog Code **
            section("This app supports App Watchdog 2! Click here for more Information", hideable: true, hidden: true) {
				paragraph "<b>Information</b><br>See if any compatible app needs an update, all in one place!"
                paragraph "<b>Requirements</b><br> - Must install the app 'App Watchdog'. Please visit <a href='https://community.hubitat.com/t/release-app-watchdog/9952' target='_blank'>this page</a> for more information.<br> - When you are ready to go, turn on the switch below<br> - Then select 'App Watchdog Data' from the dropdown.<br> - That's it, you will now be notified automaticaly of updates."
                input(name: "sendToAWSwitch", type: "bool", defaultValue: "false", title: "Use App Watchdog to track this apps version info?", description: "Update App Watchdog", submitOnChange: "true")
			}
            if(sendToAWSwitch) {
                section(" App Watchdog 2") {    
                    if(sendToAWSwitch) input(name: "awDevice", type: "capability.actuator", title: "Please select 'App Watchdog Data' from the dropdown", submitOnChange: true, required: true, multiple: false)
			        if(sendToAWSwitch && awDevice) setVersion()
                }
            }
            // ** End App Watchdog Code **

Last step for Parent App is to add this to the Initialize() section...

if(awDevice) schedule("0 0 3 ? * * *", setVersion)


Add this code to the Child app...

def setVersion(){
    // *  V2.0.0 - 08/18/19 - Now App Watchdog compliant
	if(logEnable) log.debug "In setVersion - App Watchdog Child app code"
    // Must match the exact name used in the json file. ie. YourFileNameParentVersion, YourFileNameChildVersion or YourFileNameDriverVersion
    state.appName = "AppWatchdog2ChildVersion"
	state.version = "v2.0.0"
    
    try {
        if(parent.sendToAWSwitch && parent.awDevice) {
            awInfo = "${state.appName}:${state.version}"
		    parent.awDevice.sendAWinfoMap(awInfo)
            if(logEnable) log.debug "In setVersion - Info was sent to App Watchdog"
	    }
    } catch (e) { log.error "In setVersion - ${e}" }
}

And then Add this to the Initialize() section...

if(parent.awDevice) schedule("0 0 3 ? * * *", setVersion)

As always, feel free to look at any of my code to see how this is implemented.

2 Likes

This looks brilliant. Nice work once again. :smile:

1 Like

Ah, I didn't realize quite how new this was.

It is failing validation when I press Done and highlighting the GitHub URL in red .
I'm using https://raw.githubusercontent.com/bptworld/Hubitat/master/bptworldApps.json
and it does indeed have a list of apps to check, so it feels like it should be working

When 'pasting' in to any field, sometimes it won't recognize that something is in the field unless you actually type something in. Just hit the spacebar after the end of the data and then hit the 'backspace' to get rid of the space. This happens with any web based form.

still no joy ..
so before typing in the url I have
no "GitHub: BPTWorld" and the list of apps is all "null"

pasting in the url without the https .. I see
"GitHub: Not found" .. which is 100% as I would expect.

adding the https to the front and tabbing I now have
GitHub: BPTWorld
and a populated list of apps .. ofc I checked "App Watchdog".. so the list reads:
AppWarchdog, Must Keep Checked

enter a time, click done, and the github url goes red

after pasting, and "real" editing it updates the owner field "GitHub: BPTWorld"
and popu

odd, it finally "took", going to remove and add again to see exactly what I did
edit .. not sure..
clicking on the "cog" and going to app + setting the "time" until it showed in the "cog" view seems to have done the trick
edit ..
Don't know if this is really what's going on, but I think the "time" fields are dicky..
IF I hand type in an hour press enter, repeat for the minute... then it works

New version on GitHub...

V1.0.4 - 02/08/19 - Dashboard tile now works

Also, here are some screenshots of the output...
Regular screen output...


and on a Tile...

@bangali, @ogiewon, @Cobra might be nice to add your apps?

1 Like

I soon hope to release my LIFX app and set of drivers, it's not clear from your sample JSON file whether you can have multiple drivers associated with an app (in case it matters the drivers a for different types of LIFX device and they're all created as children of the main app).

Given there will be at least 8 drivers associated with the app this looks like a great solution to the updating problem, which is something that has concerned me.

I think you'll like the next update, couple more things to tweek and it'll be ready.

1 Like

New version on GitHub...

V1.0.5 - 02/10/19 - Now have two templates available: apps/driver and just drivers. Can now have up to 6 drivers in one section. If more are needed, simply make another section. Added in a new report, 'Current App Versions', shows a list of all apps with versions. DEVELOPERS, please see new GitHub json template.

1 Like

That would be a duplication of my current work.
I see it might be useful for devs that have not implemented any update code, but I created the original .json update code which I released more than 6 months ago.

All my apps will inform you if there is an update, will tell you what the update is and give you a link to updated code
It would also mean that I would have to maintain two or more sets of json files.

Andy

1 Like

And then there is www.HubitatApps.com

It's going to become a circus with no central repository for HE apps/devices

2 Likes

Oh my bad! Haven't touched my hub in months and i saw it while updating. Working good indeed!

@anon61068208 Oh never heard of it, thanks :wink:

New version on Github...

V1.0.7 - 02/24/19 - Fixed Pushover reports.
V1.0.6 - 02/17/19 - New field added to json, xxUpdateNote. A place to put any notes you want to show up in the update report.

@bptworld I am getting this in the App Current Report. The App Watchdog report is working fine

Apps Watchdog - Current App Versions

Apps - All

GitHub: BPTWorld

null

After updating the apps, did you run the 'Maintenance' section?

Yes I did