[RELEASE] Hubitat App/Device Code Update Manager

@xamindar @Angus_M @bptworld After much effort and headache, I've managed to compile native apps for Mac and Linux. I'm still troubleshooting the Windows compilation, but I hope to have that working soon. You can download and try out the standalone app release here: Release v2.0.0 · richardpeng/hubitat-update-manager · GitHub

4 Likes

Have it up and running on my Chromebook! Now to play around a bit.

Thanks!

1 Like

I installed the hubitat-update-manager_2.0.0_armhf.deb on one of my PIs. Works, I have a few questions.

--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...

Thanks! That clarifies things.

Any idea why I can't save import URLs on the Devices page? Is anyone else having this issue?

1 Like

I’m having this issue as well.

So I'm not sure why, but this reported my Inovelli drivers need to be updated, but I know they are current.

Wonder if there's something like white-space is making the code not match?

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.

Edit looks like I posted it to the wrong person and thread.

1 Like

Got this error.....any suggestions?

>
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)

How are you running it? What command did you type?

docker on a synology

Can you give me any more specific details on how you got the error? Not sure how to help you otherwise.

I installed and it's running on http://localhost:3000

It can load the hub details using the 'hub' link, but when I click Apps or Drivers it just sits and spins. The underlying error I see in terminal is as follows:

FetchError: invalid json response body at http://10.0.0.152/driver/ajax/code?id=index reason: Unexpected token < in JSON at position 0
at /home/pi/hubitat-update-manager/node_modules/next/dist/compiled/node-fetch/index.js:1:52179
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 0)
at async Hub.get (/home/pi/hubitat-update-manager/.next/server/pages/api/hub/details.js:270:17)
at async module.exports.lpBF.__webpack_exports__.default (/home/pi/hubitat-update-manager/.next/server/pages/api/drivers/[id].js:138:15)
at async apiResolver (/home/pi/hubitat-update-manager/node_modules/next/dist/next-server/server/api-utils.js:8:1)
at async Server.handleApiRequest (/home/pi/hubitat-update-manager/node_modules/next/dist/next-server/server/next-server.js:48:397)
at async Object.fn (/home/pi/hubitat-update-manager/node_modules/next/dist/next-server/server/next-server.js:40:176)
at async Router.execute (/home/pi/hubitat-update-manager/node_modules/next/dist/next-server/server/router.js:23:67)
at async Server.run (/home/pi/hubitat-update-manager/node_modules/next/dist/next-server/server/next-server.js:49:656) { 
type: 'invalid-json'
}

Any advice?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.