Startup Delay

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Startup Delay

Post by WBTech »

I use Domoticz Windows as a service. How can I extend the delay with which Domoticz starts after a Windows restart?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Startup Delay

Post by waltervl »

Use the Domoticz startup parameter -startupdelay seconds (default=0)
See wiki for instructions:
https://domoticz.com/wiki/Windows#Windo ... parameters
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Startup Delay

Post by WBTech »

Thank you for the information. I had hoped that this could be set directly in Domoticz. The wiki did not help me to find the registry entry, there is no information about the exact position. I always use the task manager to end Domoticz after a Windows restart because it doesn't work and then start it manually after a while, then Domoticz works again.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Startup Delay

Post by waltervl »

WBTech wrote: Monday 05 August 2024 23:17 Thank you for the information. I had hoped that this could be set directly in Domoticz. The wiki did not help me to find the registry entry, there is no information about the exact position.
Huh????
Wiki says
change regkey HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Domoticz\Parameters Add value AppParameters with the command line paramers eg: -log "<Path-to-logfile\domoticz.log>"
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
habahabahaba
Posts: 192
Joined: Saturday 18 March 2023 14:44
Target OS: Windows
Domoticz version: 2024.4
Contact:

Re: Startup Delay

Post by habahabahaba »

I had the same troubles when tried to use Dz as a service
So i'm using it as application - no problems (Win10 x64)
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Startup Delay

Post by WBTech »

Thanks, I will test it. I hope it also works when you are away from home and Windows restarts automatically after an update. How did you set a delay? I need this because a server and scripts have to be processed before Domoticz can start. I use Windows 11.
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Startup Delay

Post by WBTech »

to waltervl
Sorry, I was unclear: I use Windows 11, the registry settings may be different. So far it is correct: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ ---- but the Domoticz entry should appear here, but it is missing. I had never entered a start delay myself, but Domoticz starts by itself (as a service) with a delay of approx. 10 seconds. I had heard that you can simply change this value without additional command lines.
I will test Domoticz as a application as suggested before.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Startup Delay

Post by waltervl »

Domoticz is using NSSM.exe to install the service.

Go to domoticz folder and open a command prompt (shift+right click inside the folder)

Then run

Code: Select all

nssm.exe edit Domoticz
In tab details you can modify the startup type
see also https://nssm.cc/usage
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
habahabahaba
Posts: 192
Joined: Saturday 18 March 2023 14:44
Target OS: Windows
Domoticz version: 2024.4
Contact:

Re: Startup Delay

Post by habahabahaba »

Check the
Domoticz.zip
(576 Bytes) Downloaded 32 times
shortcut properties and edit for your settings
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Startup Delay

Post by WBTech »

Vielen Dank für eure Tipps. Bisher hat noch nichts funktioniert. Ich werde weiter probieren.
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Startup Delay

Post by WBTech »

Sorry now English: Many thanks for your tips. Nothing has worked so far. I will keep trying.
zicht
Posts: 251
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 2023.1+
Location: NL
Contact:

Re: Startup Delay

Post by zicht »

Hi

I do not quite understand your usercase. The above tips should work, but i never needed it (running domoticz on windows for years)

Native windows options work fine for me.
Use Ctrl-alt-del on the machine itself or via RDP --> or ctr-alt-end in special case (as Vmware, depending on the platform you use)
Go to taskmanager, tab services.
Select a service, right click and open services.
(p.s. in win10 or later you can type "services" in the search field on the taskbar)

now the services are opened.
Search domoticz and open it.
In startup type you have a couple of options

If i remember correct there are fore options,
- automatic (default)
- automatic (delayed)
- by hand
- disabled

The automatic delayed works fine for me, but you cannot specify the delay, its using the delay thats set in registry.(see link below)
The delayed feature is introduced to ensure the service will start once network connection is up. Thats enough for me.

I found with google some more detailed information for you to read to better understand :
https://superuser.com/questions/285653/ ... ws-service
https://www.coretechnologies.com/blog/w ... ice-start/
https://www.coretechnologies.com/Window ... dStartTime

hope its helps you ...
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Startup Delay

Post by WBTech »

Thanks for your help. I had set the windows standard delay. Most of the time it works now, otherwise I stop Domoticz with the task manager and restart it manually. That always works.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest