Hello everybody,
I sucessfully integrated a switch item to turn on and off my Windows Home Server v1 in my configuration.
The following setup works as expected using the wol and exec bindings:
Item configuration:
Switch Server "Server" ["Lighting"] {wol="AAA.BBB.CCC.255#AA-BB-CC-DD-EE-FF"}
Rule configuration:
rule "Switch the Server off via Exec"
when
Item Server received update OFF
then {
logInfo("RULE", "Server is switched off")
val String FeedbackScript = executeCommandLine('sudo net rpc shutdown -I AAA.BBB.CCC.DDD -U user%password -f', 10000)
logInfo("RULE", FeedbackScript)
}
end
However, although this implementation works, it bothers me, that my password is explicitly stored in the openHAB configuration.
With a Linux server it would be possible to use a keypair instead of storing a password. Is there something comparable for a Windows server?
Cheers
HG