Luup reload required after server reboot
-
Thanks for reporting that. This usually depends on how, and when, your boot code runs openLuup. If the network is not available, or Vera is still down, then it will fail. I never put a retry in to attempt a later connection. Just delaying the startup may help in your case.
-
It's a timing issue. I suppose you are running the z-way-server on the same ubuntu PC as openLuup? If that's the case I think you are auto starting the two servers are services?
The way I handled mine has been to make openLuup start with a z-way-server dependency. z-way-server takes a little bit more time to start than openLuup so it is likely than openLuup is trying to poll z-way through the bridge before the bridge is up. If you need help to set the systemd dependency, let me know. I have my machine start in this order: z-way-server -> openLuup -> habridge & HomeKitbridge. -
It's a timing issue. I suppose you are running the z-way-server on the same ubuntu PC as openLuup? If that's the case I think you are auto starting the two servers are services?
The way I handled mine has been to make openLuup start with a z-way-server dependency. z-way-server takes a little bit more time to start than openLuup so it is likely than openLuup is trying to poll z-way through the bridge before the bridge is up. If you need help to set the systemd dependency, let me know. I have my machine start in this order: z-way-server -> openLuup -> habridge & HomeKitbridge. -
@ArcherS
That can be done by adding the following lines to your openluup.service file:
[Unit]
Description=openLuup and AltUI Server
Wants=network.target
After=network.target@irobot Thanks for the sugestion, I already have those lines in the systemd.
This is how it looks today:
[Unit] Description=openLuup and AltUI Server for Vera 3 Wants=network.target After=network.target [Service] Type=forking WorkingDirectory=/home/USER/cmh-ludl ExecStart=/bin/bash run_openLuup.sh ExecStop=/bin/curl http://localhost:3480/data_request?id=exit [Install] WantedBy=multi-user.target
Any ideas on adding a delay before the launch of OpenLuup or similar?
-
@irobot Thanks for the sugestion, I already have those lines in the systemd.
This is how it looks today:
[Unit] Description=openLuup and AltUI Server for Vera 3 Wants=network.target After=network.target [Service] Type=forking WorkingDirectory=/home/USER/cmh-ludl ExecStart=/bin/bash run_openLuup.sh ExecStop=/bin/curl http://localhost:3480/data_request?id=exit [Install] WantedBy=multi-user.target
Any ideas on adding a delay before the launch of OpenLuup or similar?
@archers said in Luup reload required after server reboot:
Any ideas on adding a delay before the launch of OpenLuup or similar?
Yes, this should be as easy as adding a delay at the beginning of the Startup Lua.
I am shocked to suggest this, since I always recommend that you should not use this LuaSocket primitive during the running system, but it seems the simplest way, and even appropriate in this case...
local socket = require "socket" socket.sleep (20)
..or even just:
require "socket" .sleep (20)
-
@archers said in Luup reload required after server reboot:
Any ideas on adding a delay before the launch of OpenLuup or similar?
Yes, this should be as easy as adding a delay at the beginning of the Startup Lua.
I am shocked to suggest this, since I always recommend that you should not use this LuaSocket primitive during the running system, but it seems the simplest way, and even appropriate in this case...
local socket = require "socket" socket.sleep (20)
..or even just:
require "socket" .sleep (20)
-
One way to do this is by adding a delay in your service file under [service]
ExecStartPre=/bin/sleep 15
This makes it wait 15sec
-
One way to do this is by adding a delay in your service file under [service]
ExecStartPre=/bin/sleep 15
This makes it wait 15sec
-
Hi akbooer,
what is the command/script running when I click from openluup console "Utilities -> Reload Luup Engine" ?
I notice that sometimes DY stop sending data to remote system (may be for connection lost) and the data transfer restart after the action "Utilities -> Reload Luup Engine" .
The server reboot is not the solution of the problem.
I have the delay in the openluup service file.
tnks
-
Upon receiving a reload command, the openLuup engine exits its scheduler loop and then exits the program with a success code that causes the surrounding
openLuup_reload
script to loop and re-run the engine.DataYour uses UDP to send data between its various components, so has absolutely no way of knowing whether a message is received or not.
Sounds like it's a network problem, and perhaps the LuaSocket library isn't coping well with that.
-
Hi Ak,
I did a test on a PI as after a reboot would still require a loop reload. I found this article https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ and put network-online.target in the openluup.service file:
[Unit]
Description=openLuup and AltUI Server for PI
Wants=network-online.target
After=network-online.targetI can see openLuup gets started later and it seems more reliable in my situation.
Cheers Rene