Merge pull request 'more homeassistant controls' (#1) from htpc_fixes into main
Reviewed-on: https://gitea.bocelm.party/fred/PJ/pulls/1
This commit is contained in:
commit
4a525bb5a6
3 changed files with 24 additions and 14 deletions
|
|
@ -15,13 +15,18 @@ all(){
|
||||||
sleep .2
|
sleep .2
|
||||||
xdotool key Left
|
xdotool key Left
|
||||||
;;
|
;;
|
||||||
"split_up" | "split_down")
|
"split_up")
|
||||||
debug "no op"
|
debug "no op"
|
||||||
;;
|
;;
|
||||||
"back")
|
"split_down")
|
||||||
echo "toggling livingroom lights"
|
echo "downstairs lights off"
|
||||||
source "$ROOT/.env"
|
source "$ROOT/.env"
|
||||||
curl -X POST -d '' $LIVINGROOM_LIGHTS_ENDPOINT
|
curl -X POST -d '' $DOWNSTAIRS_LIGHTS_OFF
|
||||||
|
;;
|
||||||
|
"back")
|
||||||
|
echo "downstairs lights off"
|
||||||
|
source "$ROOT/.env"
|
||||||
|
curl -X POST -d '' $DOWNSTAIRS_LIGHTS_OFF
|
||||||
;;
|
;;
|
||||||
"forward")
|
"forward")
|
||||||
echo "toggling kitchen lights"
|
echo "toggling kitchen lights"
|
||||||
|
|
@ -29,10 +34,15 @@ all(){
|
||||||
curl -X POST -d '' $KITCHEN_LIGHTS_ENDPOINT
|
curl -X POST -d '' $KITCHEN_LIGHTS_ENDPOINT
|
||||||
;;
|
;;
|
||||||
"split_right")
|
"split_right")
|
||||||
bluetoothctl disconnect 4C:B9:9B:11:4B:31
|
echo "toggling kitchen lights"
|
||||||
|
source "$ROOT/.env"
|
||||||
|
curl -X POST -d '' $KITCHEN_LIGHTS_ENDPOINT
|
||||||
;;
|
;;
|
||||||
"split_left")
|
"split_left")
|
||||||
toggle_res
|
#toggle_res
|
||||||
|
echo "toggling livingroom lights"
|
||||||
|
source "$ROOT/.env"
|
||||||
|
curl -X POST -d '' $LIVINGROOM_LIGHTS_ENDPOINT
|
||||||
;;
|
;;
|
||||||
|
|
||||||
### top buttons
|
### top buttons
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,6 @@ firefox_youtube(){
|
||||||
sleep .2
|
sleep .2
|
||||||
xdotool key k
|
xdotool key k
|
||||||
}
|
}
|
||||||
# kiosk
|
|
||||||
split_right(){
|
|
||||||
xdotool key F11
|
|
||||||
}
|
|
||||||
# go to yt.com in shared container
|
# go to yt.com in shared container
|
||||||
desktop(){
|
desktop(){
|
||||||
helpers
|
helpers
|
||||||
|
|
@ -40,14 +36,13 @@ firefox_youtube(){
|
||||||
}
|
}
|
||||||
|
|
||||||
firefox_pbs(){
|
firefox_pbs(){
|
||||||
firefox_init
|
|
||||||
|
|
||||||
split_up(){
|
split_up(){
|
||||||
xdotool mousemove 500 300
|
xdotool mousemove 900 900
|
||||||
xdotool click 1 click 1
|
xdotool click 1 click 1
|
||||||
}
|
}
|
||||||
play(){
|
play(){
|
||||||
xdotool mousemove 500 300
|
xdotool mousemove 900 900
|
||||||
xdotool click 1
|
xdotool click 1
|
||||||
}
|
}
|
||||||
desktop(){
|
desktop(){
|
||||||
|
|
|
||||||
7
cec.sh
7
cec.sh
|
|
@ -2,14 +2,19 @@
|
||||||
|
|
||||||
tv_on() {
|
tv_on() {
|
||||||
cec-ctl --to 0 --image-view-on
|
cec-ctl --to 0 --image-view-on
|
||||||
|
#xrandr --output HDMI-A-0 --mode 1920x1080
|
||||||
|
xrandr --output HDMI-A-0 --auto; sleep 3; xrandr --output HDMI-A-0 --mode 1920x1080
|
||||||
echo "on">~/scripts/PJ/tv_state
|
echo "on">~/scripts/PJ/tv_state
|
||||||
|
curl -X POST -d '' $REPORT_TV_ON
|
||||||
}
|
}
|
||||||
|
|
||||||
tv_off() {
|
tv_off() {
|
||||||
cec-ctl --to 0 --standby
|
cec-ctl --to 0 --standby
|
||||||
echo "off">~/scripts/PJ/tv_state
|
echo "off">~/scripts/PJ/tv_state
|
||||||
|
curl -X POST -d '' $REPORT_TV_OFF
|
||||||
}
|
}
|
||||||
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "$ROOT/.env"
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
if grep -q off ~/scripts/PJ/tv_state; then
|
if grep -q off ~/scripts/PJ/tv_state; then
|
||||||
tv_on
|
tv_on
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue