Hello, I tried it the same way as you did
added
Switch item=MPCONOFF mappings=[1="ON",2="OFF"]
to my sitemap
added this items in my .items file
Switch mpcon "MicroPc on" { wol="192.168.1.255#D4:BE:D9:A4:38:90" }
Switch mpcoff "MicroPc off" { channel="exec:command:micropcofft:run" }
Number MPCONOFF "Micro Pc"
created a .rules file with this:
rule âMicroPc onoffâ
when Item MPCONOFF received command
then switch (receivedCommand)
{
case 1: { mpcon.sendCommand(ON) }
case 2: { mpcoff.sendCommand(OFF) }
}
end
and created an things file with this content:
Thing exec:command:micropcofft [command="net rpc shutdown -I 192.168.1.255 -U user%%pass -f", interval=0, autorun=false]
ofcourse i changed user and pass with my windows login details
Now the WOL is working fine but nothing happens when I try to use the OFF button.
Any suggestions on how I could fix this problem ?