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.