RPi boot force delayed start of Openhabian (how to?)

I have two RPi’s. RPi1 (ver2) and RPi2 (ver3)
Both are powered by the same power supply so start at the same time.
RPi1 functions as the network DHCP and MQTT server and uses the Pi Jessie image.
RPi2 has openhabian running OH2. (Static ip assigned)

I think the odds are that RPi2 and OH will be up and running prior to the MQTT service being up and running on RPi1.
So therefore encountering errors when trying to connect.

How can I delay the start of OH during the power up. Say by 30 seconds.
If i sshed to the device and wanted to manually stop and start the OH service, I would not want the delay.

@thomdietrich I’m not sure if this question would be better placed ìn the general openhabian thread.


Hello Neil

Google is your friend :wink:
As Openhabian is a linux based installation, you can add a boot delay in /boot/config.txt (Link)

1 Like

Hey @NW27,

I need to ask:

  • What does “same power supply so start at the same time” mean exactly? Are you powering the RPis off and on regularly?
  • Why not move the MQTT server to the RPi with openHAB?
  • If you have a DHCP server, why assign static IPs?

Maybe you can find a solution for the problem by simplification of your base?

Hi Thom (@thomdietrich)
The two Pi’s are mounted onto a common motherboard BitScope Blade Duo Pi.
We have frequent power outages here and ultimately I will be installing a UPS to drive them but at this stage, they will power up together.

I have a lot of remote sensors, I/O etc that communicate via MQTT and some do not like having the MQTT server dropping in and out. When I have finished setting up my DHCP server, it will be an extreme case where Pi1 (DHCP-MQTT server goes down). However, I expect that Pi2 (OH2 server) fill be frequently updated, rebooted etc as I had new functionality and/or upgrade the system.

When I have completed the config of Pi1, I will be adding reserved IP assignments based on the MAC address of the devices. I currently do this in my router (Billion) but I’m not quite there yet in implementing this in my Pi. For some reason I cannot get Samba to work correctly on the Raspian Jessie build (works fine on the OpenHABian build :slight_smile: ). I am not fussed about the Linux editors for changing the config files and prefer to do this from my windows platform.

I have had two separate Billion routers and both need rebooting every week due to progressively getting slower and slower. From OpenHab, I could setup a relay to cycle the power on the router say 3AM on a Monday morning and keep the overall network performance. This is why I want to move the DHCP from the Billion to a stable (hopefully) Pi.

Kind Regards,