WOL exec issues

I have WOL working nicely and brings my win 10 PC to life.
The issue is the remote shutdown, I have this working from a shell script on another server that is triggered by ALexa and ran using IFTT; now I would like OH2 to perform this same function from the sitemap.

I think I have done what is requested in the WOL wiki page and have played around with variations I always seem to see the same error returned so not sure what I am doing wrong.

In wol.items I have the following (user,password replaced)
I run OH2 on linux.

Switch WOL_Hal "HAL" (network) { wol="192.168.0.255#8C-89-A5-11-55-9B", exec=">[OFF:net rpc shutdown -C 'Shutting down at remote request' -I 192.168.0.65 -U USER%PASSWD]" }

in sitemap

		Text label="WOL" icon="settings" {
			Switch item=WOL_Hal label="Hal"		
			}

The error I receive is:

13:43:44.307 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘WOL_Hal’ received command OFF
13:43:44.319 [INFO ] [marthome.event.ItemStateChangedEvent] - WOL_Hal changed from ON to OFF
13:43:47.734 [ERROR] [hab.binding.exec.handler.ExecHandler] - An exception occurred while formatting theommand line with the current time and input values : ‘Conversion = ‘N’’

I could really do with some help.

Thanks

Paul

But which Exec binding have you installed? Legacy 1.x and native 2 versions are very different. There are many guides and old posts referring to 1.x ways of working.

Installed the one in OH2, version binding-exec - 2.0.0
I have had to temporary uninstall binding as getting that error message all the time.
Not sure why…

Its because the parameter in your Switch is intended for exec binding 1 and the binding 2 cannot digest it.

I would remove that exec parameter from your Switch Item, install Exec2 and have a go at setting it up.
It is done in a quite different way, you configure Channels in OH2 which hold the shutdown command you want to run, then you link the channel(s) to your Switch Item.
I cannot offer guidance on that, others will, there are many posts about Exec bindings (which can be tricky to get just right)

I foolow the wiki page that comes up when I click on the binding, so it would be good if they went to the correct version :slight_smile:

It sounds like I need to search for the OH2 exec wiki page. I will need to do that tomorrow, too late now.

Thanks for the pointer much appreciated.

,

No idea what you are clicking on. If you would like to help improve documentation, it would be very much appreciated. Mostly this only happens when people trip over a problem, it is not unusual. Be a do-er, not a moaner - you understand this whole project runs on freely given volunteer time and effort. Even if left to other folk to actually sort out, they need a little more information.

The documentation for all the bindings, 1.x and 2.x are located in the docs. I don’t know if the wiki is still being maintained.

http://docs.openhab.org/addons/index.html

1 Like

Thank you, I will take a look this weekend.