On/Off Action script execution

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

On/Off Action script execution

Post by Lyrex »

I know that this is an famous topic, but no solution helped me.

Here is my problem:
Due to the fact that the samsungtv python plugin is not working anymore: results in a instant domoticz crash, i decided to put the samsungctl command into a little bash script.

I can wake up my TV with a wake on lan bash script which is working fine. However the samsungctl bash script is executed without any errors but it is not executing. I had this weird behavior with domoticz before and a lot of others experienced the same.
Hopefully anyone can help me. Here is the script

Code: Select all

#!/bin/bash
NOW=$(date +"%Y-%m-%d %H:%M:%S")
LOGFILE=$PWD/tv_off.log
OUTPUT=""
echo $NOW turning tv off | tee -a $LOGFILE
nohup /usr/local/bin/samsungctl --host 192.168.2.123 --port 8002 --timeout 0 --method websocket KEY_POWER >> $LOGFILE &
Permissions:

Code: Select all

-rwxr-xr-x  1 domoticz domoticz  114 Feb 12 17:02 tv_off.sh
I also tried 777. I think it has something to do with the samsungctl executable...

Off Action:

Code: Select all

script:///home/domoticz/domoticz/scripts/bash/tv_off.sh
I have 50+ bash and python scripts running without any problems (a lot of them in on/off actions. But this one is driving me crazy!
I would like to understand how domoticz is executing stuff from on/off actions
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest