Can an IDE connect to a running open hab container?

I’m looking into switching to open HAB. One question I can’t seem to find an answer for is can I connect my ide to my running container for development? I really need to have a running env with a usable ide.

Which ide?

If you start openhab in debug mode, you can attach a debugger at any time, but do you really need to do that in a production system? Normally when I develop an add-on I have a local OH instance running to do debugging.

This option is fine as well. Thanks for the suggestion.

I’m using VSCode. I know how to do it but the my current HA platform has no way to remote connect. I really want that.

Did you read this ?

What’s the purpose of connecting? Are you talking about actually developing the openHAB program, or are you talking about developing rules and transformations and items and such?

Assuming the second since you’re just switching over, you could have vscode do an remote ssh connection to the server openHAB is on and point at the configuration directory. Saving any config files makes openHAB do a live reload of that file.

I run a docker container on a server with a volume for the config. I do a remote ssh session in vscode to the server running the container in order to develop rules. When I save, openHAB reloads and uses the updated files immediately. There is also an openHAB extension you can use in vscode. You configure it to point at your openHAB instance and then it can give you info about all your items and stuff like that, although I don’t actually make much use of it. Is this the type of think you want?

This is exactly what I was asking! I am so tired of closed systems that I can’t debug and develop on easily. You guys rock. Thanks for being so responsive.

1 Like