So the RaspBerryPi is disconnected from the network if I get you right.
I don’t know where you from and about your setup.
I know it’s a pi3 with LAN. But are you using an SD Card or SSD?
Do other devices in your network have problems?
Are there power outages happening where you live?
Does the RaspBerryPi have a good power supply?
There are so many options what is happening it’s impossible to say from this point on.
You need to provide more information
One cannot know what state the machine is in so OH might work or not at that stage. So restarting it wouldn’t work, eventually.
Either way, the only reasonable solution is to find out what’s causing that outage.
Prime candidates are your SD card to eventually get corrupted and an insufficient power supply (in case of undervoltage, RPis will power down the USB chip first which is where Ethernet is connected).
I am using a SSD because in the past with SD-card it was a mess with corruption issues.
When I check the network, I usually have all other devices online (approx. 15 - both cabled and wireless).
It’s not caused by power outages.
@mstormi I actually not know the state of the system - that’s a good point
I am just guessing that it’s about the network.
Unfortunately I don’t have a display nor keyboard connected to restart the raspi properly (just a power cycle is an option).
Fortunately it just happens rarely.
Did not find any appearance of Under-voltage in my syslogs, but I will look for it whenever I get this issue again.
Just in case:
If this happens again and my Raspi does not get a connection to my Router, I guess this would work to check, whether the network of the raspi had issues!? executeCommandLine("sudo /etc/init.d/networking restart", 5000)
I am actually preparing the raspi for a powerbank supporting it in case of a power failure (our neigbors just had one) - so if the network is down, OH considers, that there might be a power failure (anything but the raspi due to the powerbank support).
So the first step would be a network restart after some minutes (in case the network of the raspi itself has an issue).
If this does not help and the battery comes to an end I would like to shutdown the raspi.