Other Apps in OpenHab opening with different IP-address

Problem:
In other apps: log viewer and grafana are opening with a different and now incorrect/old IP-addresses.
(basic UI opens with correct OpenHab IP-address)

Question:
Where can I change this IP-address, so far not found the right page with instructions (*)

Background:
Started OH3 on a RPi4 (as advised) from scratch while OH2 was still running on a RPi3, mostly concentrating to install known functionality on the new new device. In this process the RPi4 worked with a different random IP-addresses due to shutdowns and reboots.

Tried:
settings - network settings - fix primary address

(* = will continue my efforts to solve this myself because my experiences are that solutions are found mysteriously easier after composing a topic (new Murphy Law perhaps))

Platform information:

  • Release = Raspbian GNU/Linux 10 (buster)
  • Kernel = Linux 5.10.17-v7l+
  • Platform = Raspberry Pi 4 Model B Rev 1.1
  • openhabian version: 3.0.2 - Release Build

There is no such thing (that’s the OH release).
So do you use openHABian or not ?

Generally speaking, the IP address isn’t stored anywhere on an openHABian box. Links should point to hostnames not IP addresses. The mapping of these to IPs in turn are stored in your DHCP server and its clients including caches.
You need to analyse what links you get and which IP the hostname currently resolves to.

Thanks for your reaction, appreciate it.
Yes, I am using OpenHabian, but what is the best way to address this?
When I use putty the first visible reference on the start screen is:

                          _   _     _     ____   _
  ___   ___   ___   ___  | | | |   / \   | __ ) (_)  ____   ___
 / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \ | | / _  \ / _ \
| (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )| || (_) || | | |
 \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/ |_| \__|_||_| | |
      |_|                          3.0.2 - Release Build

Hence my mistake. I started fresh with IMG: openhabian-pi-raspios32-v1.6.5.img.xz

Fully agree I could/should have used the hostname, the instructions are even on the start screen.

I can open open grafane and the log viewer with either hostname or IP-address manually but using the link from “other apps” does not work and want to open an incorrect / old ip-address.

BTW BasicUI and HABpanel uses the hostname or IP address depending how I started to port 8080.

I have reverted back to fabrics settings in the ISP router/mode (Ziggo Connectbox Arris) so expect this problem is caused in the RPi4/OH. Shall try to replicate with my RPi3B (will use different hostname).

What is “other apps” in

Do you have a screenshot ?

Yes :wink:

This is a screenshot just made after:

  • a fresh start (from IMG: openhabian-pi-raspios32-v1.6.5.img.xz)
  • before I went into my browser (firefox 89.0.2 (64-bits))
  • I changed hostname (to avoid doublure with my running OH) into OH3B
  • never opened OH with the IP-address
  • opened openhabian with this hostname in the browser
  • the openhab log viewer opens with IP-address: 192.168.0.214:8001 not hostname

Problem: Because in my present Openhabian this IP-address was changed this link remains to point to the wrong/old IP-address.

Q: can I reproduce this again?

Step 2

  • Changed IP address .199 (method reserved in Router)
  • did reboot command on RPi3B
  • opened openhabian with this hostname in the browser; * because the openhab log viewer still opens with IP-address: eg 192.168.0.214:8001 this picture will look exactly as 1st picture so continued test with new IP-address
  • as you can see this link is not updated from .214 into .199

BTW This is not really big problem, hardly a bit annoying.

Have a look to the file /etc/openhab/services/runtime.cfg and /etc/openhab/services/dashboard.cfg and check if your IP is in there.

1 Like

Thanks for this solution; in my production system the dashboard.cfg did not exist yet but in the runtime.cfg I found an entry(s?) of Log Viewer and multiple entries of Grafana with all incorrect IP-addresses (see first remark).

  • A chance into .254 and remove obsolete entries did the trick.
  • second change into the hostname also worked UPDATE: HOWEVER I DID NOT GET THIS PAGE ON AN ANDROID TABLET, HENCE WE GET IP-ADDRESSES HERE?

Remark:

  • The entries with present IP-address were likely missing because my production system does not get an initial IPv4 anymore due to the following remark and too much T&E
  • DHCP-problem caused by crappy ISP-router (ZIGGO CB ARRIS)? For some reason the combination of a Pi on my ISP router is not working with an reserved IP address forever. After a while (and some reboots) the reserved IP address is not used any more and the IPv4 address becomes another (the first).
    • On my test system (OH3B) I noticed to late this happened again (while swapping to a new IP reservation .198 for further testing of this topic). the Pi was using IP .214 (=1st IP) at that moment and not reservation.199

I considerer this not an OpenHAB(ian) problem so please forget these DHCP remarks unless you experienced this yourself and found a solution (I know static will be the likely solution)

1 Like