[RELEASE] Hubitat App/Device Code Update Manager

So I have been told:
It needs to mimic the header, and basically the best way is to run a Git or similar system. Does not NEED to be Github but it basically needs to be running an equivalent. Which is not useful to me. I run my own domain but I have it very simple (on purpose) and use basic html pages and such. Why it cannot import from that I have no idea and I never really saw an explanation for the why...

Either way, if an app could watch over all the drivers and apps a person has and notify them when they need to update that alone is very beneficial I think and I would do some changes (if needed) to allow such an app to check my website (if needed)... as long as it is still simple text (HTML, XML, etc...).

Iโ€™m not sure I understand. If you run your own domain, then you run you own web server and you configure it you send โ€œbetterโ€ headers for a specific sub directory, and therefore the files within.

Sweet. I'd say though that this type of thing should ideally be a part of the platform proper.

@bravenel @chuck.schwer

Feel like buying an app boys?? :stuck_out_tongue:

1 Like

I run my domain, but it is via hosted servers and I have not found a way to modify the headers enough to make it work. It is also not running IIS (it is Apache) so the things I found for that did not help.

Overall, it is annoying but not a show stopper. People can view the .groovy file and copy/paste it into the driver code. Not as convenient as Import, but not terrible.

You need to add a CORS header to the page serving up your code files. For example, in php:

header("Access-Control-Allow-Origin: *");

If you are using .groovy for the extension, make sure it's sending the proper content-type header too.

I do not want to hijack the thread anymore, so I am going to try to pull the Import conversation over to a separate thread. :grin:

Ok. With @csteele and @srwhite prompting me I took another look at my settings and was able to make Import work... so now I am looking forward to your Update App even more!

1 Like

I've released my app! You can find the details in the OP.

2 Likes

This is a fabulous initiative. But I absolutely agree with your comment. This should be part of the main platform functionality. To have to run this on another device is really not ideal (as nice as it is!). I noticed some app developers had included similar functionality directly into their apps. So I was hoping their approach would be adopted more widely. Now having a single way to check and update all apps/devices is awesome. But it should really not rely on a separate device/system IMO.

I totally agree that this should be part of the main platform. My app uses undocumented APIs and could be easily be broken by an update. I hope that the Hubitat devs can take inspiration from my app and bake this type of updater directly into the platform. I look forward to the day I no longer need a separate app for this.

7 Likes

@richardpeng Sorry but not sure how to load this. Not a dev. Thanks

It's not hard. you need an RPi, and copy paste a bunch of stuff, type some commands. It's fun and sometimes...it even works for me.

1 Like

You're not a dev and you use hubitat....which requires you to set up rules and install all kinds of code to do anything? :smiley:

Ditto for me too to be honest. I looked at the git and decided quite quickly I'd likely end up exhausting a whole stack of time getting this to work. And I have 2 hubs, have loads of rules set up, have 3 rPi's (doing real easy stuff) as a non-developer but keen amateur techi. I might try it when more people provide feedback and I can find comprehensive instructions for how to set it up.

@xamindar @Angus_M What operating systems are you guys running? I'm working on embedding my app in Electron so it can also run as a standalone native app. Perhaps you guys can help me test that.

OMG! YES! PLEASE! Such a wonderful idea!

1 Like

I haven't got around to setting this up yet (probably tonight). I have a couple PIs already running; arch linux (alarm), and another just running standard raspbian (pihole). I have an unused pi4 sitting around that I can mess with if you had a specific OS in mind.

If I use your docker, I'll probably just set it up on my local arch linux server which already has other dockers running on it.

Just standard Raspian. Happy to test whatever I can that's not too complicated (with the caveat that I usually don't know what the heck I'm doing lol)...

1 Like

A windows app would be great! Chromebook would be amazing. :wink:

There's an assumption that people wanting to use this understand NodeJS and the variances of it.

It's probable the Docker version works as is... never tried it. But for those of us just using Node...

There's instructions for Homebridge that uses NodeJS. I wrote instructions for building a NodeJS instance ready for HubConnect v2.0. Yet neither of those methods work for this product. There are other methods, but what I found worked was:

git clone GitHub - richardpeng/hubitat-update-manager: Check and update Hubitat Custom Apps and Drivers
cd hubitat-update-manager

The above SHOULD create a copy of the ENTIRE github release into a hubitat-update-manager subdirectory. From there, the GitHub instructions should work.

npm install
HUB_URL=http://myhubitat npm start

Where "myhubitat" is the IP address of your Hub.

For experimenting and keeping up to date with any pushes to the code, this is probably OK. It's a bit too 'programmerish' to me. But then again, the paint isn't even dry. :smiley:

1 Like