[Updated] - Cobra Apps Container

Inspired by @Stephack’s brilliant ‘Virtual Container’, I have created ‘Cobra Apps’.

I have created & released quite a collection of ‘Parent/Child’ apps over the last few months and decided (after a little poll on this forum) to create a way of ‘grouping’ my apps into one container.

That way they are all together, which, I believe, makes them easier to manage.

Things to note:

  • This is just a container.. It has no other apps in it by default.
  • To install & control other apps you need to install the relevant apps code.
  • If you ever decide to remove the Cobra Apps container, you will uninstall ALL parent/child apps it controls
  • Not all my apps are available for install yet.. more to follow
  • The only real bummer… If you are currently using any of my apps included here then you will need to recreate the child apps in this new container (However you can keep the old ones running until they are recreated so you can, at least, copy the settings etc.

As of this initial release, the following apps are available to install.

Further apps now available..
(Mostly obvious what they do..)

  • Contact Controlled Lights and Switches
  • Daily Switch Event
  • Daily Window/Blind Event
  • Flasher (Flash a set of lights at a certain time - Other triggers to follow)
  • Mode Switch (Control switches/Lights when location changes to a configured mode)

More ‘Cobra Apps’ will be added as I get around to them

**You can find the code for ‘Cobra Apps’. here.. **


Ok, Install the code for Cobra Apps onto your hub in the usual way…

Select ‘Apps Code’ from the main Hubitat menu


Then, on the right-hand side, click the ‘New App’ button
Paste the code into the main window then click ‘Save’
Once the app has saved, go to your ‘Apps’ page from the main Hubitat menu

Once the code is installed, you need to ‘Load’ cobra Apps

On your Apps page click the ‘Load New App’ button
Under ‘User Apps’ you should find Cobra Apps
You should now see this page..
Hit the ‘Done’ button to install.

You should now see Cobra Apps in your app list
It’s quite possible that when you first open Cobra Apps you are presented with this again
Just click ‘Done’ once again to complete the install then reopen from your apps page

Once correctly installed/loaded you will see the following:
From ‘Select Apps to Include’ select the app you want to install
You should see a tick next to the app you have selected.

Now.. click somewhere else on the page..

By doing this, the page will be refreshed and you should see something like this..
Pretty obvious what to do next.. click the ‘Install…’ link.

This is what you might see..
Hit ‘Done’ to install the app (in this case ‘Average All’)

You should now be returned to your Apps List

This is what you might see…
As you can see from this picture, I have installed Average All and Message Central on this hub

Clicking on the ‘Cobra Apps’ link will reopen the app and you should then see something like this…
You will note that the two apps are installed and still listed in the ‘Select Apps To Include’ list

Now you can install further apps or click ‘Done’ to return to your app list.
When back in your Apps List, if you click the link to one of the apps you have installed you should see something like this…
Here is where you can add the automation child apps to run your system..

Before you can start using the apps you need to copy the code for the relevant app and install it on your hub.


You won’t need to ‘Load’ the apps as this is done from within Cobra Apps

You can find all my apps here:


One final thing…

For current users of my apps..

If you have used any of these apps and have them installed on your hub


(Child apps remain the same unless a normal update is available)

If you want to continue using & updating any of my current app WITHOUT using the Cobra Apps container..

I have made it easy for you. Just edit the latest ‘Parent’ code and look around line 50 or so.

You need to comment out (put // in front of) the following line..

parent: Cobra:Cobra Apps


I have done quite a few updates on various apps.

Check out the relevant app threads for details.

Updated 01/11/2018
Version: 1.5.0
I have added a couple more apps to Cobra Apps (see updated list above)
As some of these have not been previously released there are no 'release threads' for them but I'm pretty sure it will be obvious how to use then, should you wish.

One thing to note...
A lot of my apps are written for me.. to address MY needs for My automations.
the only reason they are included in Cobra Apps is so that I can keep my own apps list cleaner..
I don't expect some of them to be useful to anyone else :slight_smile:
Please just ignore any you don't want to use.



Well that takes care of Friday for me then :slight_smile: Many thanks @Cobra!! Awesome!!

1 Like

Yep! :slight_smile:I'm recreating 30 MC messages ... then onto the other stuff :slight_smile:

1 Like

I'm not seeing the "Check Open Contacts". Has that app been released?


Do you mean this one?

I think I originally released it as 'Check Open Windows & Doors'



Hey Andy,


Above shows the "Check Open Contacts", but it doesn't below:

So is "Open Contacts" contained in this version?

Brilliant Andy!

This really helps keep my apps page tidy. It also gives me a reason to keep tinkering...

Smart.. this lets you put common methods in the parent app an use them with the children.

Kind of wish there was some sort of "included" statement that let me do this type of code sharing.

@Cobra I went ahead and added Cobra Apps container. Unfortunately my Cobra Apps; Message Central, is still a separate app. How do I fix this? The instructions above are not working and I am at latest code version.

Did you update the Message Central ‘parent’ as well as the child?

Unfortunately, the old message central won’t automagically ‘jump’ into the cobra apps container.
It need to be installed into the container as above.
Then you will need to recreate all you MC child apps in the new version that is inside Cobra Apps.


I did update both. So in order to really get this all under a single container I need to recreate everything then? :frowning:

You caught me! :slight_smile:
That’s another plan.. later..

Perhaps link Presence Central with Message Central (via the parent)
Something like... “you missed an important water leak message while you were away”’

Not sure what you mean Gavin,
Do you want the facility to add your own apps? Or am I misunderstanding?


1 Like

Sorry, yes
You need to run through the installation inside Cobra Apps, then recreate each of the children you have in the old Message Central
Luckily, both both parent apps will work so you can take your time moving them over before deleting them in the old MC


1 Like

What would be really cool is if the container would actually download and install the code. :sunglasses:

Oh I meant in general. If hubitat had that kind of feature we could included a special type of "method app" with a bunch of methods that are shared. Nothing specific to your container.

I've been writing a lot of apps as well an reuse a lot of methods. I find if I have to update one, I then have to go through all of my apps. Now I'm up in the 30s so it is becoming a bit of a pain.

Can you reinstall the Cobra Apps app?
You should have a drop down listing the options to install


Impossible unfortunately..
I was wracking my brains on how to do this but without getting to the file system of HE (which I obviously cannot) I can’t see how to do it.

Unless @bravenel or @mike.maxwell will show me how I cannot think of a way at the moment


You could put all your methods into one parent and call them from that!
It would be a pain to try and sort out though (and would need some kind of ‘lock’ so that two child apps don’t use the same method at the same time)


You should see “Select Apps To Include”

(I’m on a wireless that blocks images so ignore that it has no ‘cobra’ logo)


I feel your pain on that one... mode method anyone?

I had to change that in just about everything I wrote