• 1
  • 26
  • 27
  • 28(current)
  • 29
  • 30
  • 31
Release Surveillance Room - Your IP Camera Companion with extra Foscam HD Support
hi, sorry for my bad first. I have to translate with google. So I'm trying this
Code:
Showing a single preview window

XBMC.RunPlugin (plugin: //plugin.video.surveillanceroom? Action = show_preview & camera_number = 1)

with curl of an openhab server to open. Only I do not know how can someone help me there?
Reply
Try this:

curl -i -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"single_camera&camera_number=1"}}}' http://10.17.5.60:8080/jsonrpc

or this

curl -i -X POST -H "Content-Type: application/json" -d ‘{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"show_preview","camera_number":"1","id":"1"}},"id":2}’ http://10.17.5.60:8080/jsonrpc

or even this

http://10.17.5.60:8080/jsonrpc?request={"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"show_preview","camera_number":"1","id":"1"}},"id":2}
Reply
(2019-02-03, 07:51)BuxtonCalvin Wrote: Try this:
  When I try the first and second ones using Curl for Windows I get this.

HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 76 Content-Type: application/json Cache-Control: private, max-age=0, no-cache Accept-Ranges: none Date: Sun, 03 Feb 2019 08:49:25 GMT {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}]HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 76
Content-Type: application/json
Cache-Control: private, max-age=0, no-cache
Accept-Ranges: none
Date: Sun, 03 Feb 2019 08:49:25 GMT

{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
Reply
and this when I try the HTTP method:

error
code-32700
message"Parse error."
idnull
jsonrpc"2.0"
Reply
@kash7777 When I try your method (I have four Dahua cameras working), I get this response from FF.

error    
code    -32700
message    "Parse error."
id    null
jsonrpc    "2.0"

Any clues?
Reply
Windows curl is notoriously flakey and I got the same message when using it.  However, the same curl command worked on both of my linux boxes. The HTTP command works in both chrome and firefox on windows.  You can try the following which will give you a much more verbose response.  It may help you track down any issues you're having.

curl -i -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"show_preview","camera_number":"1","id":"1"}},"id":"2"}'  http://10.17.5.60:8080/jsonrpc  -lrpc=trace -v

Some other things to try:  save the above command in notepad ++ and make sure the encoding is set to utf-8. Also, replace the symbols ' and " with your same keyboard symbols--could be an encoding issue.  Other than that, I'm out of suggestions.  Maybe the author can jump in and confirm the syntax of the call.  Some curl experts might be able to help with windows curl....
Reply
@BuxtonCalvin Thanks for your feedback, much appreciated. I've tried the HTTP request in Chome (and FF) and now I get the following:

error
code-32099
message"Bad client permission."
id2
jsonrpc"2.0"

A different error code. Remote access without password is enabled on port 8080.

I've redone all quotes in NP++ as you suggest and now when I run your Curl command (from Windows), I get the following:

C:\Windows\System32>curl -i -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"show_preview","camera_number":"1","id":"1"}},"id":"2"}' http://10.0.1.101:8080/jsonrpc -lrpc=trace -v
Warning: Invalid character is found in given range. A specified range MUST
Warning: have only digits in 'start'-'stop'. The server's response to this
Warning: request is uncertain.
*   Trying 10.0.1.101...
* TCP_NODELAY set
* Connected to 10.0.1.101 (10.0.1.101) port 8080 (#0)
> POST /jsonrpc HTTP/1.1
> Host: 10.0.1.101:8080
> Content-Range: bytes pc=trace/155
> User-Agent: curl/7.55.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 155
>
* upload completely sent off: 155 out of 155 bytes
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Connection: Keep-Alive
Connection: Keep-Alive
< Content-Length: 76
Content-Length: 76
< Content-Type: application/json
Content-Type: application/json
< Cache-Control: private, max-age=0, no-cache
Cache-Control: private, max-age=0, no-cache
< Accept-Ranges: none
Accept-Ranges: none
< Date: Mon, 04 Feb 2019 03:45:24 GMT
Date: Mon, 04 Feb 2019 03:45:24 GMT

<
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}* Connection #0 to host 10.0.1.101 left intact
Reply
Seems there are changes in Leia that prevent HTTP control https://forum.kodi.tv/showthread.php?tid=324598
Reply
@BuxtonCalvin Making some progress. Set a shell command in Home Assistant but Linter in Atom picked up an error and requested spaces to be removed here "Content-Type:application/json". Can now run that but I end up with a preview window top left with camera one and the standard video screen with the movie/TV show playing in the background. Any idea how to get a fullscreen image to come up? I have this action remapped to a button on my Harmony remote which brings up all four cameras full-screen; Exit to end:

XBMC.RunPlugin(plugin://plugin.video.surveillanceroom?action=all_cameras)
Reply
This working great now but sadly killing the video.
kodi_camera_popup_01: curl -i -H "Content-Type:application/json" -d '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"single_camera_no_controls","camera_number":"1","id":"1"}},"id":2}'  http://10.0.1.101:8080/jsonrpc
kodi_camera_popup_all: curl -i -H "Content-Type:application/json" -d '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"wait":false,"addonid":"plugin.video.surveillanceroom","params":{"action":"all_cameras","id":"1"}},"id":2}'  http://10.0.1.101:8080/jsonrpc
Reply
Nice job.  Should be very useful to others trying to do the same.  Yeah, I'm not sure why action methods do that, but I would imagine it has something to do with the way the Kodi engine handles such requests and is probably outside the reach of the developer to correct.  But that is just a guess as I have not looked too closely at the app code or at how Kodi handles such calls.  There is a kluge for this as explained here: https://forum.kodi.tv/showthread.php?tid...pid2780443  but you need a linux box.  There are probably similar keyboard emulation apps for other platforms if you want to go down that road.

One possible way to address the problem would be to send a motion detection alarm to the app via a json call.  This would allow the internal preview mechanisms of the app to proceed naturally and you wouldn't get a stoppage in video play.  But I imagine that would entail some app changes to allow an event(s) on generic cameras..... as well as a way to listen for, and act on such push events. 

I'm not sure if Maiko monitors this thread, but there does seem to be a widespread desire out there to integrate this awesome app with alarm events generated by HA systems.
Reply
(2019-02-05, 01:13)BuxtonCalvin Wrote: Nice job.  Should be very useful to others trying to do the same.
 Thanks. Up to someone smarter than me to polish the code to allow fullscreen video without interrupting the movie. Smile
Kodi 18 Leia LibreELEC on Odroid C2 connected to Synology RS814+ Rackstation
Reply
(2016-01-29, 21:42)waylotul Wrote: HuhI just noticed something today, when I am only using my touchscreen PC to control my Jarvis, I have the simulated mouse and could not esc the 2x2 preview grid. I would double click and click and hold and I was trapped in it with only a touchscreen mouse moving around. The esc key on the keyboard works great. Am I doing something wrong in the settings?

I am using a touchscreen as well without a keyboard. If I open the cameras in full screen mode then I get stuck because I don't have an escape key to press, is there a workaround for this?

Many thanks for the great add-on.
Reply
Hello maikito26

I tried your addon but it no work with my camera. My model are DS-2CD2T42WD-I5. I know that it isn`t Foscam but I tried used any options and still dosen`t work. Maybe have you advise to result this problem ?
Reply
Hi All,

Do Iegeek cameras work with this addon?

http://www.iegeek.com/c/home-security_0007

Thanks
Reply
  • 1
  • 26
  • 27
  • 28(current)
  • 29
  • 30
  • 31

Logout Mark Read Team Forum Stats Members Help
Surveillance Room - Your IP Camera Companion with extra Foscam HD Support7