Github SmartApp/Driver Installer?

Installing custom apps/drivers in HE couldn’t be easier. Maintaining them is more of a challenge. Trying to keep up with every thread posted to see if a certain smartapp or driver has been updated is getting more difficult as the community grows.

Was wondering if @tonesto7 had any plans to bring over his awesome Community SmartApp Installer? Would be great to have something like this for the Hubitat. Being able to see at a glance if anything needs updating would be a huge plus to the system.

Thoughts?

6 Likes

There was someone who figured out a way to post updates to hubitat directly from a program, and then update github afterwards from the same program. I’ll have to do a quick search and see if I can find the thread.

Edit: Can’t seem to find it at the moment. I believe it was down the rabbit hole of a specific driver thread but that hardly narrows it down. Hopefully the author will spot this and chime in.

Just having GitHUB integration in the Driver/Apps section would be ideal. That would be a core Hubitat change to make that work though.

1 Like

Was it this github repo? I see in their src folder they have some stuff to do this. But I rather it be integrated.

That looks about right. I asked if github integration was on the to-do list and was told not at this time. With enough major features and devices functioning as intended, they may open up the option later, but for now, this is probably the next best thing.

@jason0x43 first mentioned his script in this post; continue reading from there for further explanation.

I would also love to see some way to integrate automated updates of community-provided device driver and app code. I’m only using GitHub to host the driver code I’m sharing because it’s convenient, and what I’ve been used to with ST. I’m totally open to other hosted methods.

1 Like

I did actually add a very basic, one-way GitHub integration (gh -> hubitat). An example use would be:

./hubitat install app tonesto7/homebridge-hubitat-tonesto7/smartapps/tonesto7/homebridge-hubitat.src/homebridge-hubitat.groovy

That will create a local clone of github.com/tonesto7/homebridge-hubitat-tonesto7 and install the homebridge-hubitat.groovy file as an app on hubitat. Doing a ./hubitat push later will check for updates on github and push the script to hubitat if there are updates. The script will be ignored when doing a ./hubitat pull since it’s assumed to be read-only.

@jason0x43 - Out of curiosity, what are you running your cli script on?

What do you mean?

I’m not familiar with Typescript. Is there a preferred platform to compile / run it on?

Ah. You should be able to build and run it on anything that supports Node.js (note: you’ll need to install Node.js). The hubitat helper script in the repo will handle installing dependencies, building the TS code, and actually running the resulting JS application.

The hubitat script isn’t super Windows-friendly (it’s a bash script), but the manual steps of installing dependencies, building the code, and calling the code aren’t too bad. (npm install, npm run build, and node src <arguments>.

Great, thank you for the explanation, that helps a lot!