Synology DiskStation

synology
Tags: #<Tag:0x00007f0152119d60>

(Michele) #302

I installed OpenHab 2.3
How can I install:
Node-red?
Paper Log View?


(scott dee) #303

sorry, i don’t use either of those two.


(Mr. Wiseman) #304

Has anybody implemented delayed RULES logic (below) in their openhab2.service due to more than 1 startup rule firing when starting up OH2?

If so, Synology doesn’t have “systemctl” nor can I find the “openhab2.service” file.

Running OH2.3, latest build for OH.

Any help would be grateful!

Best, Jay

My prefered variant

This is the most simple alternative, but just works with linux and systemd (e.g. openhabian). Thanks to @ptweety for this variant.

Simply create the file `/etc/systemd/system/openhab2.service.d/override.conf. This overrides the standard startup script where applicable.

If you are on stretch-based openhabian, you may use sudo systemctl edit openhab2.service , otherwise you have to use sudo nano /etc/systemd/system/openhab2.service.d/override.conf

[Service]
ExecStartPre=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.rules" -exec /usr/bin/rename.ul .rules .rules_away {} \\;'
ExecStartPre=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.script" -exec /usr/bin/rename.ul .script .script_away {} \\;'
ExecStartPost=/bin/sleep 240
ExecStartPost=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.script_away" -exec /usr/bin/rename.ul .script_away .script {} \\;'
ExecStartPost=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.rules_away" -exec /usr/bin/rename.ul .rules_away .rules {} \\;'
TimeoutStartSec=360

That’s it.