HoLeeShiet wrote:Nice! I was already using this to get camera into Xbmc and it worked pretty good!
http://homeawesomation.wordpress.com/20 ... mc-update/
I tried to figure out how to combine the scripts but didn't succeed. But if someone could integrate with your script it would be very nice!
That would be nice indeed.
I remember i read a post on this forum a while ago:
http://www.domoticz.com/forum/viewtopic ... 21&t=1338&
Will have a look at it later.
Edit:
Installed this addon for xbmc:
http://forum.xbmc.org/showthread.php?tid=182540
Fill in the image url in the setting of this addon
eg
Code: Select all
http://192.168.1.17:8080/camsnapshot.jpg?idx=1
^ (ipcam added to Domoticz)
Changed my
xbmc_notify.sh a little:
Code: Select all
#!/bin/sh
################################################
# Settings
snapshot=$1
title=$2
message=$3
image=$4
user="xbmc"
pw="password"
port="8080"
time=15000
#################################################
# Check IP-Cam Status
if ping -c 1 192.168.1.24 > /dev/null ; then
echo "IP-Cam Online"
else
snapshot=0
fi
#################################################
# XBMC PC
if ping -c 1 192.168.1.10 > /dev/null ; then
(wget -O /dev/null "http://$user:[email protected]:$port/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22$title%22,%22message%22:%22$message%22,%22image%22:%22$image%22,%22displaytime%22:$time},%22id%22:1}" >/dev/null 2>&1) &
fi
# IPCAM SNAPSHOT to XBMC PC
if [ $snapshot -eq 1 ] && ping -c 1 192.168.1.10 > /dev/null ; then
(wget -O /dev/null "http://$user:[email protected]:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Addons.ExecuteAddon%22,%22params%22:{%22addonid%22:%22script.securitycam%22},%22id%22:%221%22}}") &
fi
#################################################
# XBMC Projector
if ping -c 1 192.168.1.12 > /dev/null ; then
(wget -O /dev/null "http://$user:[email protected]:$port/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22$title%22,%22message%22:%22$message%22,%22image%22:%22$image%22,%22displaytime%22:$time},%22id%22:1}" >/dev/null 2>&1) &
fi
# IPCAM SNAPSHOT to XBMC Projector
if [ $snapshot -eq 1 ] && ping -c 1 192.168.1.12 > /dev/null ; then
(wget -O /dev/null "http://$user:[email protected]:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Addons.ExecuteAddon%22,%22params%22:{%22addonid%22:%22script.securitycam%22},%22id%22:%221%22}}") &
fi
#################################################
# XBMC TV
if ping -c 1 192.168.1.23 > /dev/null ; then
(wget -O /dev/null "http://$user:[email protected]:$port/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22$title%22,%22message%22:%22$message%22,%22image%22:%22$image%22,%22displaytime%22:$time},%22id%22:1}" >/dev/null 2>&1) &
fi
# IPCAM SNAPSHOT to XBMC TV
if [ $snapshot -eq 1 ] && ping -c 1 192.168.1.23 > /dev/null ; then
(wget -O /dev/null "http://$user:[email protected]:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Addons.ExecuteAddon%22,%22params%22:{%22addonid%22:%22script.securitycam%22},%22id%22:%221%22}}") &
fi
If you want to send a snapshot by this script:
Code: Select all
xbmc_notify.sh "1" " - Brievenbus - " "Er is nieuwe post bezorgd" "http://c.fsdn.com/allura/p/domoticz/icon"
Else change 1 to something different like 0
Code: Select all
xbmc_notify.sh "0" " - Brievenbus - " "Er is nieuwe post bezorgd" "http://c.fsdn.com/allura/p/domoticz/icon"