Hubitat Developer Tools VSCode Plugin Still Working?

I see the main thread was closed for dormancy. Is this plugin still working?

I'm late(r) to the party as is usual, but I installed the plugin and have not been successful with it yet.

I'm on a C8PRO and currently running FW 2.4.3.176.

To start out I tried the "Hubitat - Check Hub Connection" command after entering my Hub IP address, and login settings. That fails (always) with Error Connecting to hub at reason unknown." I disabled hub security. same failure. I can ping hub from machine I'm running VSCode on. I can connect to said hub on same machine over http, or https if I have hubitat security enabled.

I didn't see anyone mentioning the connection test in the original plugin thread.... so for kicks I just tried to publish to hubitat anyway.

For a test I just used the reference component switch driver from Hubitat... I only changed the namespace.

I get a mixed reaction from the the plugin when I try to submit (I leave the id blank since I don't have a previous version of it.)

I get both "Hubitat created new driver for 'testComponentSwitch.groovy[NAN]", and below it:
"Hubitat driver not published"

Checking on the Hub, No driver is published.

To double check, I cut and pasted the sample driver manually to drivers code in hubitat. Hubitat recognized the driver code and test namespace ok... no errors that I see.

I was digging around for any other more detailed logs but not seeing any.

2 Likes

Well, I see some recent posts that the plugin is still in use.

So I went into the plugin extension source and started adding other debug prints... and I found the issue.

The plugin works with no hub security... and the plugin works with hub security enabled.. but assumes a specific redirect from the hub (which is requiring credentials).

My connection requests were 302 redirecting right away, and the plugin is not expecting that.

This is because I have https only enabled on the hub also. (I also have a custom certificate installed, and at first I thought that was the issue, but its not).

If I disable https only, it works.

there are some issues with the plugins current detection for the redirect, since its only expecting the hubitat generated one with 'redirect' in its url. And since the base hub url starts out as 'http://"... the hub will automatically redirect to https://hub_ip.. the http response code will be 302... but there's no 'redirect' text in that initial url.

@lparks ,

I don't know if you still maintaining or care about this particular use case.. but it would probably require the https detection first..and it implies a third ip flow through the checks etc. (https only/always, which may or may not have hub security enabled)... http only (no hub security).. and http->https hub security.

if you enable https only for ui, you can see the fail... but "unknown error" .