2013-12-15, 15:58
2013-12-16, 08:45
I'm getting the previous error your were getting:
The path is right because it grabs the first image and puts it in "/resources/media/tmp.jpg", I can see the timestamp from BlueIris, but after the first image it dies. Any ideas? I can't wait to get this up and going so I can have Vera (My Z-Wave controller) send the Front Door camera to all the xbmc's when there is motion at the front door.
By the way, I am running XBMC 12.2 Frodo on a Windows PC.
Code:
00:38:55 T:5928 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'socket.timeout'>
Error Contents: timed out
Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\XBMC\addons\script.securitycam\default.py", line 61, in <module>
urllib.urlretrieve(url, __snapshot__)
File "C:\Program Files\XBMC\system\python\Lib\urllib.py", line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "C:\Program Files\XBMC\system\python\Lib\urllib.py", line 267, in retrieve
block = fp.read(bs)
File "C:\Program Files\XBMC\system\python\Lib\socket.py", line 377, in read
data = self._sock.recv(left)
timeout: timed out
-->End of Python script error report<--
The path is right because it grabs the first image and puts it in "/resources/media/tmp.jpg", I can see the timestamp from BlueIris, but after the first image it dies. Any ideas? I can't wait to get this up and going so I can have Vera (My Z-Wave controller) send the Front Door camera to all the xbmc's when there is motion at the front door.
By the way, I am running XBMC 12.2 Frodo on a Windows PC.
2013-12-16, 20:17
(2013-11-21, 05:21)edrikk Wrote: [ -> ]I've made a bunch of modifications to the script, which I'm posting below. Python isn't my first (or second, or third, or fourth) language, so please excuse if things aren't as tight as they could/should be. Some changes:
- Accept parameter for cameraID and cameraName. Use case: I call this from BlueIris, which results in XBMC pulling a stream from BlueIris based on the camID.
- The existing image refresh didn't work for me (Window 8, on Gotham). So I made each image pulled have a unique name
- Cleanup the contents of the temp directory after it's done
- urlretrieve didn't work on my pc for some reason. So I switched out to urlopen
- Corrected some paths for images etc.
Code:# Import the XBMC/XBMCGUI modules.
import xbmc, xbmcgui, time, urllib2, xbmcvfs, xbmcaddon, os, glob
__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
#############
#Grab (/ set default) parameters
#############
args = ['CamID','CamName']
dbvar = {'CamID': 'cam1',
'CamName': 'Camera 1'}
for item in sys.argv:
arg = item.split('=')
i = arg[0]
if arg[0] in args:
j = arg[1]
dbvar.update({arg[0]:arg[1]})
#############
# Global Vars
#############
url='http://IPADDRESS/image/'+str(dbvar['CamID'])
path = xbmc.translatePath('special://profile/addon_data/%s' % __addonid__)
imagefile_template = os.path.join(path, 'camera_'+str(dbvar['CamID'])+'_image')
imagefile_ext = '.jpg'
imagefile = imagefile_template+imagefile_ext
video_length = 14
notification_length = 13800
#############
#If path to temp files doesn't exist, create it
#############
if not xbmcvfs.exists(path):
xbmcvfs.mkdir(path)
####################################################################################
#Retrieves a file from a given URL
####################################################################################
def getFile(file_name,file_mode,base_url):
#create the url and the request
req = urllib2.Request(base_url)
# Open the url
try:
f = urllib2.urlopen(req)
# Open our local file for writing
local_file = open(file_name, "wb" + file_mode)
#Write to our local file
local_file.write(f.read())
local_file.close()
f.close()
del local_file
del f
#handle errors
except urllib2.HTTPError, e:
print "HTTP Error:",e.code , url
f.close()
del local_file
del f
except urllib2.URLError, e:
print "URL Error:",e.reason , url
f.close()
del local_file
del f
####################################################################################
#Deletes all files matching the mask that we have created in this call of the script
####################################################################################
def delFiles():
del_mask = imagefile_template+'*'+imagefile_ext
for del_filename in glob.glob(del_mask) :
os.remove( del_filename )
####################################################################################
#Main class and function
####################################################################################
class CamView(xbmcgui.WindowDialog):
def __init__(self):
#set the initial image before the window is shown
imagefile = imagefile_template+imagefile_ext
getFile(imagefile,"",url)
self.image = xbmcgui.ControlImage(870, 383, 380, 253, "")
self.addControl(self.image)
viewer = CamView()
viewer.show()
start_time = time.time()
firstimage = True
while(time.time() - start_time <= video_length):
curr_time = round(time.time() - start_time, 0)
imagefile = imagefile_template+'_'+str(curr_time)+imagefile_ext
getFile(imagefile,"",url)
viewer.image.setImage("")
viewer.image.setImage(imagefile)
if firstimage:
nowtime=time.strftime("%I:%M %p")
xoptions="Notification(\"IP Camera "+str(dbvar['CamName'])+" alert\",%s, notification_length, special://home/addons/script.doorbell/bell_icon.png)" % (nowtime)
xbmc.executebuiltin(xoptions)
viewer.image.setAnimations([('conditional', 'effect=fade start=0 end=90 time=250 delay=125 condition=true',), ('conditional', 'effect=slide start=0,400 end=0,0 time=250 condition=true',)])
firstimage = False
elif curr_time == video_length:
viewer.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',), ('conditional', 'effect=slide start=0,0 end=0,400 time=250 condition=true',)])
#print "catch"
else:
viewer.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',)])
#print curr_time
xbmc.sleep(500)
viewer.close()
delFiles()
del viewer
I'm also trying to get BlueIris to initiate this plugin. How did you call ir from BlueIris. Also do you have your version zipped up so I can try it?
I downloaded what I thought was the latest version and it's called script.securitycam. I am stuck on the following error when trying to start it by going to Addo_Ons -> Programm -> Security Cam Overlay.
2013-12-17, 06:10
OK, I have managed to narrow the problem down to the urllib.urlretrieve call. I commented out the section:
and added:
For a test and got a single image to show up.
I am using Frodo 12.2, how should I be calling this part of the script?
Code:
while((time.time() - startTime) * 1000 <= duration):
urllib.urlretrieve(url, __snapshot__)
camPreview.update(__snapshot__)
xbmc.sleep(interval)
Code:
camPreview.update(__snapshot__)
xbmc.sleep(15000)
I am using Frodo 12.2, how should I be calling this part of the script?
2013-12-17, 15:55
OK, I was finally able to get it to work with the help of some of the other contributors. Here is a working version for Frodo 12.2 pulling in one camera.
Next step is to change it to allow BlueIris to send 2 different cameras (Front Door and Baby Monitor) and to send to all XBMC's in the house, not just one. Has anyone gotten the Fade to work on Frodo, I want the transparancy around 80-90.
Code:
# Import the modules
import xbmc, xbmcgui, time, urllib2, xbmcvfs, xbmcaddon, os, urlparse
# Set plugin variables
__addon__ = xbmcaddon.Addon()
__cwd__ = __addon__.getAddonInfo('path').decode("utf-8")
__resource__ = xbmc.translatePath( os.path.join( __cwd__, 'resources' ).encode("utf-8") ).decode("utf-8")
__icon__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'media', 'icon.png' ).encode("utf-8") ).decode("utf-8")
__snapshot__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'media', 'temp.jpg' ).encode("utf-8") ).decode("utf-8")
# Get settings
url = __addon__.getSetting('url')
username = __addon__.getSetting('username')
password = __addon__.getSetting('password')
width = int(float(__addon__.getSetting('width')))
height = int(float(__addon__.getSetting('height')))
interval = int(float(__addon__.getSetting('interval')))
duration = int(float(__addon__.getSetting('duration')) * 1000)
# Inject username / password into url
if (username is None):
urlObject = urlparse(url)
urlObject.username = username
urlObject.password = password
url = urlunparse(urlObject)
# Methods
def notify():
xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%('SecurityCam', time.strftime("%I:%M %p"), duration, __icon__))
# Classes
class CamPreviewDialog(xbmcgui.WindowDialog):
def __init__(self):
COORD_GRID_WIDTH = 1280
COORD_GRID_HEIGHT = 720
scaledWidth = int(float(COORD_GRID_WIDTH) / self.getWidth() * width)
scaledHeight = int(float(COORD_GRID_HEIGHT) / self.getHeight() * height)
self.image = xbmcgui.ControlImage(COORD_GRID_WIDTH - scaledWidth, COORD_GRID_HEIGHT - scaledHeight, scaledWidth, scaledHeight, "")
self.addControl(self.image)
self.image.setAnimations([('WindowOpen', 'effect=slide start=%d time=1000 tween=cubic easing=in'%(scaledWidth),), ('WindowClose', 'effect=slide end=%d time=1000 tween=cubic easing=in'%(scaledWidth),)])
def update(self, image):
self.image.setImage("")
self.image.setImage(image)
def getFile(file_name,file_mode,base_url):
#create the url and the request
req = urllib2.Request(base_url)
# Open the url
try:
f = urllib2.urlopen(req)
# Open our local file for writing
local_file = open(file_name, "wb" + file_mode)
#Write to our local file
local_file.write(f.read())
local_file.close()
f.close()
del local_file
del f
#handle errors
except urllib2.HTTPError, e:
print "HTTP Error:",e.code , url
f.close()
del local_file
del f
except urllib2.URLError, e:
print "URL Error:",e.reason , url
f.close()
del local_file
del f
# Main execution
camPreview = CamPreviewDialog()
notify()
camPreview.show()
startTime = time.time()
while((time.time() - startTime) * 1000 <= duration):
getFile(__snapshot__,"",url)
camPreview.image.setImage("")
camPreview.image.setImage(__snapshot__)
camPreview.update(__snapshot__)
xbmc.sleep(interval)
camPreview.close()
del camPreview
os.remove(__snapshot__)
Next step is to change it to allow BlueIris to send 2 different cameras (Front Door and Baby Monitor) and to send to all XBMC's in the house, not just one. Has anyone gotten the Fade to work on Frodo, I want the transparancy around 80-90.
2013-12-17, 16:43
(2013-11-21, 05:21)edrikk Wrote: [ -> ]I've made a bunch of modifications to the script, which I'm posting below. Python isn't my first (or second, or third, or fourth) language, so please excuse if things aren't as tight as they could/should be. Some changes:
- Accept parameter for cameraID and cameraName. Use case: I call this from BlueIris, which results in XBMC pulling a stream from BlueIris based on the camID.
- The existing image refresh didn't work for me (Window 8, on Gotham). So I made each image pulled have a unique name
- Cleanup the contents of the temp directory after it's done
- urlretrieve didn't work on my pc for some reason. So I switched out to urlopen
- Corrected some paths for images etc.
Code:# Import the XBMC/XBMCGUI modules.
import xbmc, xbmcgui, time, urllib2, xbmcvfs, xbmcaddon, os, glob
__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
#############
#Grab (/ set default) parameters
#############
args = ['CamID','CamName']
dbvar = {'CamID': 'cam1',
'CamName': 'Camera 1'}
for item in sys.argv:
arg = item.split('=')
i = arg[0]
if arg[0] in args:
j = arg[1]
dbvar.update({arg[0]:arg[1]})
#############
# Global Vars
#############
url='http://IPADDRESS/image/'+str(dbvar['CamID'])
path = xbmc.translatePath('special://profile/addon_data/%s' % __addonid__)
imagefile_template = os.path.join(path, 'camera_'+str(dbvar['CamID'])+'_image')
imagefile_ext = '.jpg'
imagefile = imagefile_template+imagefile_ext
video_length = 14
notification_length = 13800
#############
#If path to temp files doesn't exist, create it
#############
if not xbmcvfs.exists(path):
xbmcvfs.mkdir(path)
####################################################################################
#Retrieves a file from a given URL
####################################################################################
def getFile(file_name,file_mode,base_url):
#create the url and the request
req = urllib2.Request(base_url)
# Open the url
try:
f = urllib2.urlopen(req)
# Open our local file for writing
local_file = open(file_name, "wb" + file_mode)
#Write to our local file
local_file.write(f.read())
local_file.close()
f.close()
del local_file
del f
#handle errors
except urllib2.HTTPError, e:
print "HTTP Error:",e.code , url
f.close()
del local_file
del f
except urllib2.URLError, e:
print "URL Error:",e.reason , url
f.close()
del local_file
del f
####################################################################################
#Deletes all files matching the mask that we have created in this call of the script
####################################################################################
def delFiles():
del_mask = imagefile_template+'*'+imagefile_ext
for del_filename in glob.glob(del_mask) :
os.remove( del_filename )
####################################################################################
#Main class and function
####################################################################################
class CamView(xbmcgui.WindowDialog):
def __init__(self):
#set the initial image before the window is shown
imagefile = imagefile_template+imagefile_ext
getFile(imagefile,"",url)
self.image = xbmcgui.ControlImage(870, 383, 380, 253, "")
self.addControl(self.image)
viewer = CamView()
viewer.show()
start_time = time.time()
firstimage = True
while(time.time() - start_time <= video_length):
curr_time = round(time.time() - start_time, 0)
imagefile = imagefile_template+'_'+str(curr_time)+imagefile_ext
getFile(imagefile,"",url)
viewer.image.setImage("")
viewer.image.setImage(imagefile)
if firstimage:
nowtime=time.strftime("%I:%M %p")
xoptions="Notification(\"IP Camera "+str(dbvar['CamName'])+" alert\",%s, notification_length, special://home/addons/script.doorbell/bell_icon.png)" % (nowtime)
xbmc.executebuiltin(xoptions)
viewer.image.setAnimations([('conditional', 'effect=fade start=0 end=90 time=250 delay=125 condition=true',), ('conditional', 'effect=slide start=0,400 end=0,0 time=250 condition=true',)])
firstimage = False
elif curr_time == video_length:
viewer.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',), ('conditional', 'effect=slide start=0,0 end=0,400 time=250 condition=true',)])
#print "catch"
else:
viewer.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',)])
#print curr_time
xbmc.sleep(500)
viewer.close()
delFiles()
del viewer
What was the URL you used to pass in the camera name as a parameter?
2013-12-17, 19:35
OK, for those of you that would like to use this for BlueIris here is what I got working on Frodo 12.2:
default.py
URL to call and pass camera id and name:
This will still use the URL in the addon settings. For this example I am using blueiris so it would be "http://BlueIrisIPAddress:Port/image/" *Dont forget the "/" at the end.
default.py
Code:
# Import the modules
import xbmc, xbmcgui, time, urllib2, xbmcvfs, xbmcaddon, os, urlparse
# Grab (and set default) parameters
args = ['CamID','CamName']
dbvar = {'CamID': 'FrontDoor',
'CamName': 'Front Door'}
for item in sys.argv:
arg = item.split('=')
i = arg[0]
if arg[0] in args:
j = arg[1]
dbvar.update({arg[0]:arg[1]})
# Set plugin variables
__addon__ = xbmcaddon.Addon()
__cwd__ = __addon__.getAddonInfo('path').decode("utf-8")
__resource__ = xbmc.translatePath( os.path.join( __cwd__, 'resources' ).encode("utf-8") ).decode("utf-8")
__icon__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'media', 'icon.png' ).encode("utf-8") ).decode("utf-8")
__snapshot__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'media', 'temp.jpg' ).encode("utf-8") ).decode("utf-8")
# Get settings
base_url = __addon__.getSetting('url')
url = base_url+str(dbvar['CamID'])
username = __addon__.getSetting('username')
password = __addon__.getSetting('password')
width = int(float(__addon__.getSetting('width')))
height = int(float(__addon__.getSetting('height')))
interval = int(float(__addon__.getSetting('interval')))
duration = int(float(__addon__.getSetting('duration')) * 1000)
# Inject username / password into url
if (username is None):
urlObject = urlparse(url)
urlObject.username = username
urlObject.password = password
url = urlunparse(urlObject)
# Methods
def notify():
xbmc.executebuiltin('Notification(%s, %s, %s, %d, %s)'%('SecurityCam', str(dbvar['CamName']), time.strftime("%I:%M %p"), duration, __icon__))
def getFile(file_name,file_mode,base_url):
#create the url and the request
req = urllib2.Request(base_url)
# Open the url
try:
f = urllib2.urlopen(req)
# Open our local file for writing
local_file = open(file_name, "wb" + file_mode)
#Write to our local file
local_file.write(f.read())
local_file.close()
f.close()
del local_file
del f
#handle errors
except urllib2.HTTPError, e:
print "HTTP Error:",e.code , url
f.close()
del local_file
del f
except urllib2.URLError, e:
print "URL Error:",e.reason , url
f.close()
del local_file
del f
# Classes
class CamPreviewDialog(xbmcgui.WindowDialog):
def __init__(self):
COORD_GRID_WIDTH = 1280
COORD_GRID_HEIGHT = 720
scaledWidth = int(float(COORD_GRID_WIDTH) / self.getWidth() * width)
scaledHeight = int(float(COORD_GRID_HEIGHT) / self.getHeight() * height)
self.image = xbmcgui.ControlImage(COORD_GRID_WIDTH - scaledWidth, COORD_GRID_HEIGHT - scaledHeight, scaledWidth, scaledHeight, "")
self.addControl(self.image)
#self.image.setAnimations([('WindowOpen', 'effect=slide start=%d time=1000 tween=cubic easing=in'%(scaledWidth),), ('WindowClose', 'effect=slide end=%d time=1000 tween=cubic easing=in'%(scaledWidth),)])
def update(self, image):
self.image.setImage("")
self.image.setImage(image)
# Main execution
camPreview = CamPreviewDialog()
notify()
camPreview.show()
firstimage = True
startTime = time.time()
while((time.time() - startTime) * 1000 <= duration):
curr_time = round(time.time() - startTime, 0)
getFile(__snapshot__,"",url)
camPreview.image.setImage("")
camPreview.image.setImage(__snapshot__)
if firstimage:
nowtime=time.strftime("%I:%M %p")
camPreview.image.setAnimations([('conditional', 'effect=fade start=0 end=90 time=250 delay=125 condition=true',), ('conditional', 'effect=slide start=0,400 end=0,0 time=250 condition=true',)])
firstimage = False
elif curr_time == duration:
camPreview.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',), ('conditional', 'effect=slide start=0,0 end=0,400 time=250 condition=true',)])
else:
camPreview.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',)])
camPreview.update(__snapshot__)
xbmc.sleep(interval)
camPreview.close()
del camPreview
os.remove(__snapshot__)
URL to call and pass camera id and name:
Code:
http://XBMCIPAddress:Port/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam","params":{"CamID":"BlueIris_Cam_Short-Name","CamName":"Camera_Name"}}}
This will still use the URL in the addon settings. For this example I am using blueiris so it would be "http://BlueIrisIPAddress:Port/image/" *Dont forget the "/" at the end.
2013-12-18, 01:55
Ok, this works great on my Windows PC and my MacBook Pro, but won't work on my AppleTV at all and on the Raspberry Pi it gets the first image and stops there. Any ideas?
Update: was able to fix the Raspberry Pi XBMC by using edrikk's code for creating new image file names and deleting them afterwards. Downside is this causes the images to blink when there is a live video behind it.
Update: was able to fix the Raspberry Pi XBMC by using edrikk's code for creating new image file names and deleting them afterwards. Downside is this causes the images to blink when there is a live video behind it.
2013-12-18, 14:34
(2013-12-15, 10:06)lokipoki Wrote: [ -> ](2013-12-04, 23:18)iolaus Wrote: [ -> ](2013-12-04, 10:30)lokipoki Wrote: [ -> ]Hi.
Thanks for your reply. My bad. Of course you have to use a forward slash. What was I thinking
I changed it and got this:
Code:19:28:01 T:4924 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.EOFError'>
Error Contents: EOF when reading a line
Traceback (most recent call last):
File "C:\Users\Loki\AppData\Roaming\XBMC\addons\script.securitycam\default.py", line 61, in <module>
urllib.urlretrieve(url, __snapshot__)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 239, in retrieve
fp = self.open(url, data)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 207, in open
return getattr(self, name)(url)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 457, in open_https
return self.http_error(url, fp, errcode, errmsg, headers)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 375, in http_error
result = method(url, fp, errcode, errmsg, headers)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 690, in http_error_401
return getattr(self,name)(url, realm)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 767, in retry_https_basic_auth
user, passwd = self.get_user_passwd(host, realm, i)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 783, in get_user_passwd
user, passwd = self.prompt_user_passwd(host, realm)
File "C:\Program Files (x86)\XBMC\system\python\Lib\urllib.py", line 792, in prompt_user_passwd
host))
EOFError: EOF when reading a line
-->End of Python script error report<--
19:28:01 T:200 DEBUG: ------ Window Deinit () ------
19:28:01 T:200 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
19:28:01 T:4924 INFO: Python script stopped
19:28:01 T:4924 DEBUG: Thread XBPyThread 4924 terminating
19:28:01 T:200 DEBUG: waiting for python thread 13 (C:\Users\Loki\AppData\Roaming\XBMC\addons\script.securitycam\default.py) to stop
19:28:01 T:200 DEBUG: python thread 13 (C:\Users\Loki\AppData\Roaming\XBMC\addons\script.securitycam\default.py) destructed
Cheers mate.
The Error Type: <type 'exceptions.EOFError'> makes me think that the code was unable to retrieve the image from the provided URL for some reason.
I just noticed the line that I haven`t posted. It goes just in front of the log I posted:
Code:19:00:41 T:5992 ERROR: Control has invalid animation type (no condition or no type)
I tried every combination:
https://10.1.1.50:90/image.jpg
https://10.1.1.50:90/image.jpg
http://10.1.1.50/image.jpg
http://10.1.1.50:90/image.jpg
I do get an image if I just type in a browser but dont get the script to run
Anyone any ideas?!
Cheers.
Ok, I found the mistake.
DCS 5020L:
Under Maintenance>Admin>DISABLE Snapshot URL Authentication.
What about audio stream?!
2013-12-18, 16:25
Quote:Ok, I found the mistake.
DCS 5020L:
Under Maintenance>Admin>DISABLE Snapshot URL Authentication.
What about audio stream?!
No audio, this just takes snapshot images from your camera and makes it look like a video by updating about 2 images a second.
2013-12-19, 10:30
(2013-12-18, 16:25)CodeSmoke Wrote: [ -> ]Quote:Ok, I found the mistake.
DCS 5020L:
Under Maintenance>Admin>DISABLE Snapshot URL Authentication.
What about audio stream?!
No audio, this just takes snapshot images from your camera and makes it look like a video by updating about 2 images a second.
I know. I thought there would be a way to stream the audio as well.
Also is there a way to start that script from Eventghost?
Cheers.
2013-12-19, 15:05
(2013-12-19, 10:30)lokipoki Wrote: [ -> ](2013-12-18, 16:25)CodeSmoke Wrote: [ -> ]Quote:Ok, I found the mistake.
DCS 5020L:
Under Maintenance>Admin>DISABLE Snapshot URL Authentication.
What about audio stream?!
No audio, this just takes snapshot images from your camera and makes it look like a video by updating about 2 images a second.
I know. I thought there would be a way to stream the audio as well.
Also is there a way to start that script from Eventghost?
Cheers.
If Eventghost can make URL calls then use this:
Code:
http://XBMCIPAddress:Port/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam","params":{"CamID":"BlueIris_Cam_Short-Name","CamName":"Camera_Name"}}}
if not then install wget on your machine and create a batch file with the above command and have Eventghost call the batch file.
2013-12-20, 09:25
(2013-12-19, 15:05)CodeSmoke Wrote: [ -> ](2013-12-19, 10:30)lokipoki Wrote: [ -> ][quote='CodeSmoke' pid='1576758' dateline='1387376724']
No audio, this just takes snapshot images from your camera and makes it look like a video by updating about 2 images a second.
I know. I thought there would be a way to stream the audio as well.
Also is there a way to start that script from Eventghost?
Cheers.
If Eventghost can make URL calls then use this:
Code:
http://XBMCIPAddress:Port/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam","params":{"CamID":"BlueIris_Cam_Short-Name","CamName":"Camera_Name"}}}
if not then install wget on your machine and create a batch file with the above command and have Eventghost call the batch file.
Sorry but I didn't get what you mean.
2013-12-24, 20:40
Here is the latest version of my script.
I added an option for whether you want the image to auto-close after a specified duration or just stay open.
I added an option for whether you want the image to auto-close after a specified duration or just stay open.
2013-12-24, 21:47
(2013-12-24, 20:40)iolaus Wrote: [ -> ]Here is the latest version of my script.
I added an option for whether you want the image to auto-close after a specified duration or just stay open.
Another new version (v0.0.3) here.
Found out the method I was trying to use for username/password authentication didn't work. Found another method but I don't have anything set up to test it easily, if someone could let me know if username/password authentication is working for them it would be much appreciated.