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:
The above SHOULD create a copy of the ENTIRE github release into a hubitat-update-manager subdirectory. From there, the GitHub instructions should work.
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.
@csteele That's strange that you need to create a new Git repo to run my app. You should be able to skip the git init step and just directly clone my repo to run the app. The reason I created the Docker container was so I could throw the app on there and have it running all the time.
I'm definitely a programmer so the initial release has a pretty high setup cost for non-programmers. However, it's helpful to hear how folks are trying to run things so I know what kinds of releases are helpful. Sounds like cloning the repo is helpful for development, but not great because it's not standalone or a persistent process.
I may look into this at some point. I don't personally use authentication so I'd have to set that up in order to test this. If the hub uses Basic auth, then it should be pretty easy.
isn't needed for Clone. I think it's likely I tried Checkout first... and then just blended the steps.
I'm a programmer too, but it's still a bit of a mind reading trick to determine how each creator of an app/package uses Node.
Because this is new, cloning github is acceptable BUT my reason for writing was to help others who didn't have as much luck with the mind reading trick.
I assume, that like most, at the right time, you'll publish to NPM and then the instructions will be familiar to non-programmers, who might have already setup Homebridge.
This is the first time I've released a project with such a wide profile of user types so it would be helpful for me to understand what users are used to setting up, especially non-programmers.
Do you have any suggestions or example projects you can link me to to refine my release? Would publishing to NPM be a good first step? What details are helpful in a publish and what could be clearer in my README?
Most HE users know how to install drivers/app and should be pretty comfortable with it. However once you start talking about setting up a node server or docker a number of them will start to feel intimidated.
That being said, this project is interesting for a lot because it adds a highly wanted feature. If you know groovy you should be able to convert it over into a native app. It seems to be pretty much reading/parsing the html. I haven't dug into the actual updating code to take a look at how it works though.
I wanted to see if it was possible and created a method to grab the app list by scraping the html and was able to put this together. It creates a map of the installed app code. I use regex to parse the data, there may be better ways but this was more of an experiment. It could easily be modified to get the driver list and probably other api calls that you use to check and update the codes. But maybe somebody will find it useful and run with it.
I had considered building a native app, but I really wanted to get a proof-of-concept working first to see if I could indeed hit the hub REST APIs to do everything I wanted. I'll have to put together a proof-of-concept native app to see if such an app would work well. Things I'd want to validate are:
Make requests to GitHub to download source for comparison
Make requests asynchronously and show loading indicators for each row
Make AJAX requests on button click without reloading the page
If anyone has done either before, I'd love to know your experiences with it.
--Where does it get the import url from? All except one of my apps show "No import URL found". Since one of them is showing an update I assume either some apps have been hardcoded with the import url or it somehow "knows"? Some of my appcode has the import url listed in the code as "importUrl" but it's not getting it for those ones.
--Is there a way to get it to remember my hub? Every time I open it again I have to specify my hub url again. It is remembering the custom import urls i entered, just not the hub for some reason.
--is there a way to launch it headless?
--is it just me or is it showing updates for stuff I already have up to date?
Anyway, pretty cool. Thanks for this.
EDIT: I am manually adding the import urls. Works fine for the apps page, but the drivers page does not allow me to add them. Dialog comes up, I paste the url and hit save, and it goes right back to "No import URL found".
The import URL comes from the Hub. My app is only able to check for updates on apps/drivers that retain their import URL after you save the code. I believe that's what this separate thread was partially about. I think code has to have a certain header for Hubitat to recognize and save the import URL.
I haven't added that feature yet.
That would be running it using Docker or Node.
Edit: sorry I misunderstood. That's a good idea. I may consider creating a command line interface for it at some point.
Your code needs to be exactly the same as what's in the import URL, including whitespace. It doesn't hurt to click the update button to make the code match exactly. If you've made modifications to code, the update button will replace any modifications with the latest code from the import URL.
Your website needs to have certain code to allow the Import function to work properly if you are hosting your own groovy files.
In my case I needed to edit my .htaccess file to allow CORS (instructions for this vary by type of web server) and have it recognize .groovy files as plain/text type. My stumbling block for some time now turned out to be that I had listed "groovy" when I actually needed to have ".groovy" as the extension...
Mismatched whitespace will also make the driver say that it needs an update. You can just click update and it'll stop saying that it needs an update until the driver actually needs an update.
>
TypeError: Cannot read property 'childNodes' of null at parser (/usr/src/app/.next/server/static/AIx5MgUxJTpk0P9hcEeFn/pages/api/hub/details.js:191:127)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports.GsQR.__webpack_exports__.default (/usr/src/app/.next/server/static/AIx5MgUxJTpk0P9hcEeFn/pages/api/hub/details.js:123:15)
at async Object.apiResolver (/usr/src/app/node_modules/next/dist/next-server/server/api-utils.js:51:9)
at async Server.handleApiRequest (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:434:9)
at async Object.fn (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:355:37)
at async Router.execute (/usr/src/app/node_modules/next/dist/next-server/server/router.js:117:32)
at async Server.run (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:475:29)
at async Server.handleRequest (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:131:20)