Release - Surveillance Room - Your IP Camera Companion with extra Foscam HD Support

  Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
davyike Offline
Junior Member
Posts: 4
Joined: Oct 2015
Reputation: 0
Post: #16
Great stuff, thanks Maikito - got the previews working with the new RunPlugin syntax. Might have to look into some Foscams, just have some cheap DLinks at the moment. Awesome plugin, very impressed with the speed at which you've improved it!
find quote
davyike Offline
Junior Member
Posts: 4
Joined: Oct 2015
Reputation: 0
Post: #17
One thing that could be handy - I currently have a button on the remote linked to preview of camera one. If I press the same button again it would be nice if the camera then went away again, rather than looking for the 'previous' button.
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #18
@djyoyo - I have the F189xx code started but haven't fully implemented it. I don't have one to test on so I was waiting to see if I could find one cheap or someone willing to test. Let me know if you're interested in testing.

@davyike - that shouldn't be too hard to implement. Give me a day or two to code and test it.
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #19
(2015-10-24 23:49)davyike Wrote:  One thing that could be handy - I currently have a button on the remote linked to preview of camera one. If I press the same button again it would be nice if the camera then went away again, rather than looking for the 'previous' button.

Can you give v1.0.7 a try? There is a new setting under each camera: "Calling script multiple times" which you'll need to change. It defaults to "Does Nothing". ...I'm not the greatest at naming the settings.
find quote
djyoyo Offline
Junior Member
Posts: 26
Joined: Nov 2013
Reputation: 0
Post: #20
(2015-10-25 00:37)maikito26 Wrote:  @djyoyo - I have the F189xx code started but haven't fully implemented it. I don't have one to test on so I was waiting to see if I could find one cheap or someone willing to test. Let me know if you're interested in testing.

@davyike - that shouldn't be too hard to implement. Give me a day or two to code and test it.

Absolutely, feel free to send me a PM, thanks!
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #21
(2015-10-25 04:10)djyoyo Wrote:  Absolutely, feel free to send me a PM, thanks!

I actually placed an order last night for the same model, F18910W. This will motivate me more to make the changes. I'll let you know when it arrives and when the first test build will be available. This will be far easier to get the functionality in place. BTW, i'm using the API documentation at foscam.devcenter.me as reference. I'll find out quickly if it works or not.
find quote
stuCONNERS Offline
Fan
Posts: 671
Joined: Nov 2012
Reputation: 2
Post: #22
Is there a video of this in action? This might be exactly what im looking for. Im looking at fitting a camera onto my property. Can the video be recorded to a hard-drive? Anyone tried this with Openelec?
(This post was last modified: 2015-10-25 13:50 by stuCONNERS.)
find quote
djyoyo Offline
Junior Member
Posts: 26
Joined: Nov 2013
Reputation: 0
Post: #23
(2015-10-25 12:42)maikito26 Wrote:  
(2015-10-25 04:10)djyoyo Wrote:  Absolutely, feel free to send me a PM, thanks!

I actually placed an order last night for the same model, F18910W. This will motivate me more to make the changes. I'll let you know when it arrives and when the first test build will be available. This will be far easier to get the functionality in place. BTW, i'm using the API documentation at foscam.devcenter.me as reference. I'll find out quickly if it works or not.

Ok great, thanks again for this awesome add-on!
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #24
If Canada Post is accurate I should be getting my F18910W tomorrow so I'll likely have a test build out by end of the week.

@stuCONNERS - I'll see about making a video and throwing it up on Youtube for ya in the next couple of days. This add-on doesn't control the recording though. That's handled depending on the camera and other hardware/software you implement. For instance, Foscam cameras have SD card slots you can record to directly or you can use a remote server. I personally have a Synology NAS with Surveillance Station installed which records 2 days worth of data for my outside camera only.
find quote
jer78 Offline
Junior Member
Posts: 46
Joined: Dec 2013
Reputation: 1
Post: #25
This is a great add-on!! Thanks so much! So I got my Foscam FI19821 working and can run a script to see the full video however, I can't seem to ever get the preview working. Also, I do get an error message when the add-on starts. Where do I check the logs to see what the issue is? Thanks again for your hard work on this!
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #26
Hmm. The error is likely what's stopping the preview. Could you increase the addon logging to debug from the addon settings and post the log file? We'll get it fixed up quickly for ya.

If you're running Windows you can find it under your user/appdata/roaming/kodi folder. Or just search for kodi.log Smile

Also for anyone with an SD Foscam I did receive my F18910w in the mail today so development will continue on this!
find quote
jer78 Offline
Junior Member
Posts: 46
Joined: Dec 2013
Reputation: 1
Post: #27
Here's the log. I replaced my username and password with XXXX but I think this is what you need...

15:21:17 T:4746383360 NOTICE: plugin.video.surveillanceroom v1.0.7: DEBUG : Send Foscam command: http://192.168.1.104:88/cgi-bin/CGIProxy...etDevState
15:21:17 T:4746383360 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: _ElementInterface instance has no attribute 'iter'
Traceback (most recent call last):
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/service.py", line 370, in <module>
start()
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/service.py", line 363, in start
instance.run(new_instance)
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/service.py", line 297, in run
camera_settings = settings.getBasicSettings(camera_number, monitor, useCache=False)
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/resources/lib/settings.py", line 316, in getBasicSettings
success_code, response = camera.get_dev_state()
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/resources/lib/foscam2.py", line 393, in get_dev_state
return self.execute_command('getDevState', callback=callback)
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/resources/lib/foscam2.py", line 134, in execute_command
return execute_with_callbacks(cmd, params, callback)
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/resources/lib/foscam2.py", line 123, in execute_with_callbacks
code, params = self.send_command(cmd, params)
File "/Users/mediacenter/Library/Application Support/Kodi/addons/plugin.video.surveillanceroom/resources/lib/foscam2.py", line 107, in send_command
for child in root.iter():
AttributeError: _ElementInterface instance has no attribute 'iter'
-->End of Python script error report<--
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #28
Yea that's what I need.

What happens if you navigate to this URL in a browser? Do you get an XML output or some error? If it's XML can you post the output? This URL is not giving the add-on the expected output and that's why you're receiving the error.

Code:
http://192.168.1.104:88/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXXX&cmd=getDevState

Can you also confirm the firmware version of your camera? I haven't tested on older versions which might have a slightly different API. Also, is it an admin account you're using to sign in with? Might be permissions related.

Of course if we can figure this out I can make some code improvements for better error checking.
find quote
jer78 Offline
Junior Member
Posts: 46
Joined: Dec 2013
Reputation: 1
Post: #29
Thanks for taking your time to help. Yes, it's an administrator account and my camera's firmware is:

System Firmware: 1.5.2.11
Application Firmware: 2.21.1.143
Plugin Version: 3.1.0.10

And here's the XML output from the URL:

<CGI_Result>
<result>0</result>
<IOAlarm>0</IOAlarm>
<motionDetectAlarm>1</motionDetectAlarm>
<soundAlarm>0</soundAlarm>
<record>0</record>
<sdState>0</sdState>
<sdFreeSpace>0k</sdFreeSpace>
<sdTotalSpace>0k</sdTotalSpace>
<ntpState>1</ntpState>
<ddnsState>0</ddnsState>
<url>http%3A%2F%2Fhd2493.myfoscam.org%3A88</url>
<upnpState>1</upnpState>
<isWifiConnected>1</isWifiConnected>
<wifiConnectedAP>FrogsJumpHigh</wifiConnectedAP>
<infraLedState>0</infraLedState>
</CGI_Result>
find quote
maikito26 Offline
Senior Member
Posts: 101
Joined: Jun 2014
Reputation: 3
Post: #30
@jer78 - Everything looks in order. Except the add-on isn't seeing what we see. I've posted a new file at the following link with additional logging. Could you please replace the foscam2.py file with the one in the link and reboot Kodi to try again? I would then want to see the new log lines. There should be a few lines before the error too that are prefaced with 'NEW DEBUG:' that I will need too.

Right click to save - https://github.com/maikito26/repository....foscam2.py

The file is stored here:

..\AppData\Roaming\Kodi\addons\plugin.video.surveillanceroom\resources\lib\
find quote
Post Reply