Thank y'all!

I decided to go for the script triggered by crontab solution:


Code:
--------------------
    #!/bin/bash
  server=127.0.0.1
  port=9090
  
  playerID="MACOFMYPLAYERATTACHEDTOAMP"
  power=$(printf "$playerID power ?\nexit\n" | nc $server $port | cut -d ' ' -f 
3  )
  
  echo $power
  case $power in
  0) /usr/local/sbin/pilight-send -S IP-OF_RASPI_WITH_433Mhz_THINGY -p 
intertechno_switch -i <code>   -u 0 -f;;
  1) /usr/local/sbin/pilight-send -S IP-OF_RASPI_WITH_433Mhz_THINGY -p 
intertechno_switch -i <code>   -u 0 -t;;
  esac
  
--------------------


Works fine!! Max delay is 60 seconds and I can live with that...


------------------------------------------------------------------------
beejayf's Profile: http://forums.slimdevices.com/member.php?userid=61635
View this thread: http://forums.slimdevices.com/showthread.php?t=99977

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to