Natürlich ist der Beitrag schon etwas älter ... aber naja vielleicht kann es ja noch der ein oder andere gebrauchen ... das JointSpace Binding gefiel mir persönlich nicht so gut .... es gab auch irgendwelche Gründe, die garnicht mehr so genau weiß! Das Binding habe ich deinstalliert und selbst ein Script geschrieben
Wenn ich mir das Script anschaue, war es glaube ich senden von mehreren Befehlen.... und das set_volume
Man kann sicherlich noch viele weitere Aktionen hinzufügen ... hier sind halt nur die drin die ich brauche / brauchte
Code: Alles auswählen
#!/bin/sh
###################################
tv_ipadresse="xxx.xxx.xxx.xxx"
###################################
case $1 in
######## jointSPACE API ########
key)
#Key => Standby , VolumeUp , VolumeDown , Mute , Back , Find , RedColour , GreenColour , YellowColour , BlueColour ,
# Home , Options , Dot , Digit0-9 , Info , CursorUp , CursorDown , CursorLeft , CursorRight , Confirm , Next ,
# Previous , Adjust , WatchTV , Viewmode , Teletext , Subtitle , ChannelStepUp , ChannelStepDown , Source ,
# PlayPause , Pause , FastForward , Stop , Rewind , Record , Online
curl -H "Content-Type: application/json" -X POST -d '{"key": "'$2'"}' http://$tv_ipadresse:1925/1/input/key
;;
set_source)
#Sources => tv , sat , hdmi1 , hdmi2 , hdmi3 , hdmiside , ext1 , ypbpr , vga
curl -H "Content-Type: application/json" -X POST -d '{"id": "'$2'"}' http://$tv_ipadresse:1925/1/sources/current
;;
set_volume)
tv_max_volume="$(curl -H "Content-Type: application/json" -s GET http://$tv_ipadresse:1925/1/audio/volume | jq -r '.max')"
transform=`echo "scale=2; $tv_max_volume / 100 * $2" | bc | awk '{print int($1+0.5)}'`
curl -H "Content-Type: application/json" -s POST -d '{"current": '$transform} http://$tv_ipadresse:1925/1/audio/volume
;;
set_mute)
#true/fasle
curl -H "Content-Type: application/json" -X POST -d '{"muted": "'$2'"}' http://$tv_ipadresse:1925/1/audio/volume
;;
#
display_off)
curl -H "Content-Type: application/json" -X POST -d '{"key": "Options"}' http://$tv_ipadresse:1925/1/input/key
sleep 1
curl -H "Content-Type: application/json" -X POST -d '{"key": "CursorDown"}' http://$tv_ipadresse:1925/1/input/key
sleep 1
curl -H "Content-Type: application/json" -X POST -d '{"key": "CursorDown"}' http://$tv_ipadresse:1925/1/input/key
sleep 1
curl -H "Content-Type: application/json" -X POST -d '{"key": "Confirm"}' http://$tv_ipadresse:1925/1/input/key
sleep 1
curl -H "Content-Type: application/json" -X POST -d '{"key": "CursorDown"}' http://$tv_ipadresse:1925/1/input/key
sleep 1
curl -H "Content-Type: application/json" -X POST -d '{"key": "Confirm"}' http://$tv_ipadresse:1925/1/input/key
;;
esac