How to restart binding with OH 2.5.2 and Windows 10

Tags: #<Tag:0x00007f6173d35d98>

Hello!
I know, that from console I can restart binding with this command: bundle:restart org.openhab.binding.NAME
How can I do this from script in OH (or *.bat file)?

upd: OS Windows10

Looks relevant

I see this topic, but we have different OS. I need decision by Windows10.

So just to be clear, you mean that Windows 10 is the OS on which you’re running OH?

Yes, you are right.

You can use an executeCommandline in a rule with something like ssh openhab@ipaddress ‘bundle:restart {binding}’, assuming you use key-based authentication for access to the Karaf console with the passphrase and private key file stored in the SSH Agent - which you should. :wink:
Of course, the same can be put in a batch file or PowerShell script.

BTW, The OpenSSH Agent is disabled by default in Windows 10, and you must set it to Automatic in the services control panel screen.

1 Like