Hello to all,
I did the setup to test and debug openhab locally with intelliJ following the steps explained in this post :
HowTo: Setup IntelliJ for binding development - Development / IDE & Build - openHAB Community
I now have the openhab-test-distro directory that I can launch directly by running the “./start.sh” script inside the directory as you can see in the image put here:
My question now is how can I get the interface of openhab (the dashboard) with this openhab-test-distro to debug it too?
I tried the url openhabian:8080 or openhab:8080 as explained in the documentation below but it does not work.
Do you know what port openhab-test-distro is using to get the dashboard? And what is the hostname that he uses?
Thanks in advance,
sudo netstat -tulpn | grep java
show ? All listening ports of you java processes should be shown.
Hostnames openhabian, openhab are only valid in case the hostname you are running the software on is either openhabian or openhab.
If you want to debug the openhab distro you have to use the
start_debug.sh version of the start script, otherwise the JVM won’t run in debug mode and you won’t be able to connect with your debugger.
I assume you ran the start script on your local machine? Then you can use your browser to connect to
http://localhost:8080, this will open the openHAB dashboard.
If you connect your debugger you have to use
If you ran the start script on a remote machine instead, you have to use the hostname/IP of that machine with port 8080 (for the dashboard).
In case of an openhabian installation the default hostname is
openhabian, thats why they state this in the openhabian tutorial.
Be sure there is no firewall etc. blocking your requests.
Be aware that the tutorial you linked is a little bit old, you’ll find the official version at HowTo: Setup IntelliJ for binding development
Its a little bit stripped down, because not all the steps in the old tutorial are necessary for everyone.
Hello, thank you for your answers,
No, it doesn’t work.
I have these listening post from my java process:
And on the terminal it shows that when I run start_debug.sh.
I tried with
localhost:5005 but it does not work.
Do you know what the problem is?
OK, some things to clarify, because I think there is some misunderstanding:
- you can start openHAB in two modes
- “normal” mode using the script
- “debug” mode using the script
- openHAB will in both modes open port 8080 so you can use your browser to connect to (e. g.
- you can see in the first screenshot that this happened (the 5th line in the output of netstat)
- openHAB will only in debug mode open port 5005 additionally so you can use your debugger (IntelliJ) to connect to localhost on port 5005 (this is the 9th step in this tutorial)
- I can see from the message in the second screenshot that you used your browser to connect to the debug port (5005)… use port 8080 instead as I mentioned above
Yes, I understood, I tried with port 5005 because my port 8080 is already used by a tomcat server.
So I try to remove my tomcat server.
You can also set the environment variable
OPENHAB_HTTP_PORT to something other than 8080 to avoid the port conflict.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.