IntelliJ development support in 2.3.9 firmware update

Starting from firmware version 2.3.9, Hubitat supports Groovy development in IntelliJ Idea. Here's how to edit the code in the IDE and upload it in a single click using IDE's plugin.

  • Download and install IntelliJ Idea Community Edition from IntelliJ's web site .
  • Download the plugin from our public storage and install it from the disk in the IDE.
  • Right click on the toolbar and select Customize Toolbar... from the menu.
  • Click (+) icon and select Add Action.
  • Enter "Hubitat" in the search bar and select Post Hubitat app or driver code to the hub.
  • Assign an icon of your choice and click Ok.
  • Double check that the icon appears on the toolbar.

The plugin looks for a set of comments with hub/app/driver information at the very beginning of the file. Copy/paste the sample code below as the first 5 lines of the app/driver groovy file and modify information as needed.

// hubitat start
// hub: 192.168.4.86  <- this is hub's IP address
// type: app          <- valid values here are "app" and "device"
// id: 2551           <- this is app or driver's id
// hubitat end

Make sure that the information is correct, then click the button created in the first step to upload the code. That's it! A confirmation will pop up to indicate either success or failure of code upload. If there's a compilation error, more information will be provided.

9 Likes

Does this support Hub Login Security?

I thought I tried it on my main hub which has security, and found that it worked without needing any credentials.

I was unable to reproduce that. It doesn't work for me, the request is rejected, and no error message is shown. Which it should, and I'll get to it once dashboards are ironed out.

1 Like

Trying to install plugin but it fails. Error is

Plugin 'HubitatIntelliJPlugin' (version '1.0-SNAPSHOT') is not compatible with the current version of the IDE, because it requires build 242.* or older but the current build is IC-243.21565.193

Would you be able to re-release it? Thanks