Skip to main content
loading
How to set static IP for OpenHAB

Do you need a fixed address for OpenHAB outside the range of DHCP addresses that the router assigns? This is sometimes useful, especially if you have, for example, identical RPi as a backup, if there is a problem, simply switch to a backup RPi and you will have the same IP.


The alternative is to set a fixed address for RPi on your router, but you must then do this for both RPi, or adjust it manually. In PiHome, it is important to not change the address of the MQTT Broker, which is currently running on RPi, so static IP is good way.


General settings that work on Debian including openhabian, Raspbian etc. Open to edit the dhcpcd.conf file with the command below:

sudo nano /etc/dhcpcd.conf

 

and add this part at the end. Change your IP address to the desired ranges as needed

 

# Static IP address:
interface eth0

# OpenHAB static IP
static ip_address=10.1.1.200/24

#Your router IP
static routers=10.1.1.100 
static domain_name_servers=10.1.1.100 8.8.8.8


 

Press the shortcut right CTRL+O to save, confirm with Enter key, and press the right CTRL+X to exit nano editor.

Restart the operating system with the command:

sudo reboot

and your RPi should now have a static IP address:

Tip: In openhabian, the OpenHAB3 version runs also the Network Manager and therefore it may happen that the above setting will cause the RPi to have both a static address and a DHCP address. An alternative, specifically for openhabian, is to set the static address via the network-manager nmcli with the commands below. In this case you can skip setting dhcpcd.conf

Display the name of the connection in the terminal with command:

nmcli connection show

NAME                UUID                                  TYPE      DEVICE  
Wired connection 1  3f5ce7eb-238b-3bea-b16a-5edhsjakakf9  ethernet  eth0   
 

 

use these commands to apply static IP address:

sudo nmcli con mod Wired\ connection\ 1 ipv4.addresses "10.1.1.200/24"
sudo nmcli con mod Wired\ connection\ 1 ipv4.gateway "10.1.1.100"
sudo nmcli con mod Wired\ connection\ 1 ipv4.dns "10.1.1.100 8.8.8.8"
sudo nmcli con mod Wired\ connection\ 1 ipv4.method manual
sudo nmcli con mod Wired\ connection\ 1 connection.autoconnect yes
sudo reboot

Tags

Comments

Submitted by RobertZep (not verified) on

Permalink

Вывод из запоя в Казани на дому и в клинике: врач-нарколог, капельница, лечение алкоголизма, детоксикация, кодирование, стационар и реабилитация
Узнать больше - <a href=https://vyvod-iz-zapoya-kazan24.ru/>нарколог на дом вывод из запоя казань</a>

Submitted by goldbet (not verified) on

Permalink

<a href=https://goldbets.blog/>GoldBet</a&gt; : operatore di gioco online con licenza ADM, orientato al gioco regolamentato in Italia. La piattaforma è collegato a una rete di più di 1.700 punti vendita.

Prodotti di gioco : sport betting, slot, tavoli live, giochi virtuali, poker e bingo. Il catalogo casino mette a disposizione centinaia di giochi online, tra slot, tavoli classici, game show e live dealer.

Casino Live : circa 150+ tavoli live, con dealer dal vivo, pensati per giochi da tavolo classici e show game.

Area sport : oltre 600 eventi quotidiani, con palinsesto live e prematch. Propone campionati principali, tornei secondari e discipline di nicchia.

Bonus e promozioni : bonus di benvenuto, iniziative periodiche e jackpot. I dettagli vanno sempre letti nella pagina ufficiale.

Apertura conto : richiede dati personali reali e verifica dell’identità. L’utilizzo è vietato ai minori.

Gestione saldo : tramite metodi indicati nell’area conto. Prima di giocare è utile controllare limiti, tempi di accredito e regole di prelievo.

Punti di forza : bookmaker + casino online, giochi live, virtuali, poker e bingo in un unico account.

Aspetti da verificare : promozioni non sempre uguali per tutti gli utenti; quote, RTP, limiti e disponibilità dei giochi possono variare.

Avvertenza : giocare solo se maggiorenni e con budget controllato. Controllare il tempo di gioco aiuta a mantenere il controllo.

Submitted by KennethTor (not verified) on

Permalink

Hello guys,
if you are looking for a reliable gaming platform,
I can suggest some cool options.

These sites have promo offers,
fast payouts, and a huge choice of games.

Have a look https://playi.bet

Wishing you wins )

Submitted by MariaBes (not verified) on

Permalink

Хочу розповісти про корисним та зручним проєктом — <a href=https://laeoloef.space/>laeoloef.space</a&gt; — стильним і простим каталогом українських сайтів.

Сайт зроблений акуратно, адаптивно і швидко працює.

Інтерфейс легкий, без зайвого сміття, з сучасним дизайном і українською мовою.

Особливо сподобалося:
• Відмінна адаптивність (чудово виглядає на телефоні)
• Чистий мінімалістичний стиль
• Швидке завантаження
• Простота використання

Кому треба швидко знайти якісні українські ресурси — рекомендую заглянути.

Submitted by PtoLese (not verified) on

Permalink

Штраф за отсутствие техосмотра и отказ в регистрации — реальные риски, если карта просрочена или не оформлена. В Санкт-Петербурге можно пройти осмотр на Московском шоссе, Парнасе, в Невском и Приморском районах. Подготовьте машину заранее — сэкономите на повторном визите. Ссылка:
<a href=https://www.spb-pto.ru/>техосмотр СПб</a>

Submitted by PtoLese (not verified) on

Permalink

Перед техосмотром пройдитесь по чек-листу: лампы, лобовое без трещин в зоне обзора, давление в шинах, уровень жидкостей. Это повышает шанс пройти с первого раза. В 2026 году правила для легковых смягчены, но не исчезли. Адреса пунктов и актуальные требования:
<a href=https://www.spb-pto.ru/tehosmotr-avtomobilya/>техосмотр автомобиля</a>

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.