Hab das Problem gelöst!
Der Code ist unten. Vielleicht hilft es ja noch sonst jemanden
Entweder auf diese Art:
xbmc-send -a "Notification(Information, Verbindung unterbrochen, 10000)"
oder:
#! /bin/bash
LOCAL_HOST=$(ip addr show | awk '/inet / {print $2}' | cut -d/ -f1 | awk 'NR==2{print $1}')
KODI_HOSTS=("127.0.0.1")
KODI_PORT="8080"
KODI_IMAGE="warning"
KODI_DISPLAYTIME=10000
for KODI_HOST in "${KODI_HOSTS[@]}"
do
KODI_TITLE="Information"
KODI_MESSAGE="Verbindung unterbrochen"
if [ "$KODI_HOST" == "$LOCAL_HOST" ]
[ "$KODI_HOST" == "127.0.0.1" ]
[ "$KODI_HOST" == "localhost" ]
then
KODI_TITLE="$KODI_TITLE"
else
KODI_TITLE="$KODI_TITLE on $LOCAL_HOST!"
fi
curl -fs -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"'"$KODI_TITLE"'","message":"'"$KODI_MESSAGE"'","image":"'"$KODI_IMAGE"'","displaytime":'"$KODI_DISPLAYTIME"'},"id":1}' http://$KODI_HOST:$KODI_PORT/jsonrpc
sleep $(( KODI_DISPLAYTIME / 1000 ) / 5)
done