Switch script does not executed when command come via MQTT
Posted: Tuesday 10 March 2020 23:14
Hi guys.
I would like to ask you for favour. I have a very strange problem. May be it can by strange only for me but I can not fin d a answer how to fix my problem .
In domoticz I have a virtual switch ( push Off button ). When I press this button script for shutting down my local PC is executed and PC goes to Off. This is working perfectly. When I execute this via http command same result. Works perfectly.
But my problem is when I send I command via MQTT. It means When I pres a button on Sonoff switch ( with TASMOTA software ) , sonoff switch send a mqtt comand to domoticz . In domoticz console I see log with command off. No errors but script for PC shuttdown is not executed.
TASMOTA : 8.1
Domoticz Version: 4.10717
Domoticz switch Off action : "script:///home/pi/domoticz/scripts/shutdown_PC.sh"
script shutdown_PC.sh : net rpc -S 192.168.4.2 -U NAME%PASS shutdown -t 1 -f
Log in domoticz console after sonoff switch is pressed : MQTT: Topic: domoticz/in, Message: {"idx":13,"nvalue":0,"svalue":"","Battery":100,"RSSI":10}
Any idea what can be wrong?
Thanks for help.
I would like to ask you for favour. I have a very strange problem. May be it can by strange only for me but I can not fin d a answer how to fix my problem .
In domoticz I have a virtual switch ( push Off button ). When I press this button script for shutting down my local PC is executed and PC goes to Off. This is working perfectly. When I execute this via http command same result. Works perfectly.
But my problem is when I send I command via MQTT. It means When I pres a button on Sonoff switch ( with TASMOTA software ) , sonoff switch send a mqtt comand to domoticz . In domoticz console I see log with command off. No errors but script for PC shuttdown is not executed.
TASMOTA : 8.1
Domoticz Version: 4.10717
Domoticz switch Off action : "script:///home/pi/domoticz/scripts/shutdown_PC.sh"
script shutdown_PC.sh : net rpc -S 192.168.4.2 -U NAME%PASS shutdown -t 1 -f
Log in domoticz console after sonoff switch is pressed : MQTT: Topic: domoticz/in, Message: {"idx":13,"nvalue":0,"svalue":"","Battery":100,"RSSI":10}
Any idea what can be wrong?
Thanks for help.