• 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 15
Release Foscam HD - Video feed with camera controls, and motion/sound detection preview
(2015-05-01, 20:03)quixers Wrote: Did you update firmware on the camera? If not update to 2.1.x.119 and try my version of the script, look at previous post on how to get/install it...

Upgradeing camera now! to 2.1.x.119 Big Grin I had 2 versions before....
After i will test in kodi...
And if it doesnt work i have to try your script?
Reply
Yes give it a go.

I've hd cam fi9831p running latest firmware 2.1.x.119 and it's working well on my pi2. The motion notifications work too. Using my version of script tho.
Reply
(2015-05-01, 20:34)quixers Wrote: Yes give it a go.

I've hd cam fi9831p running latest firmware 2.1.x.119 and it's working well on my pi2. The motion notifications work too. Using my version of script tho.

I have now the latest firmware and its working on the rp2 Big Grin
Thanks a lot....

For what reason i will use your script?
Reply
Test the motion detection a small preview should appear. If it doesn't work try my script, if it does then no need to.
Reply
(2015-05-01, 20:54)quixers Wrote: Test the motion detection a small preview should appear. If it doesn't work try my script, if it does then no need to.

I installed the script... now i have to wait till somebody is in front of my camera and on my tv a small preview will appear?
Reply
Yes make sure it's enabled ok in the settings
Reply
Hmmm i'm not sure its working... have to wait. And i have another problem, on my laptop were i see my camera.. (IPCam Client)
Doesn't stop loading Device information, already 5 min. turning and nothing helps
Reply
(2015-05-01, 21:26)dubbeloseven Wrote: Hmmm i'm not sure its working... have to wait. And i have another problem, on my laptop were i see my camera.. (IPCam Client)
Doesn't stop loading Device information, already 5 min. turning and nothing helps

This problem i solved with a reset on my foscam camera, the problem was the port 2200 that i used is not working with this firmware...
Confused
Reply
Hi,
What is the best recommended camera for use externally, I want to wall mount a camera on the outside of my house and have the images popup on kodi using this script as it looks great...
Reply
(2015-05-27, 14:27)WolvesPhil Wrote: Hi,
What is the best recommended camera for use externally, I want to wall mount a camera on the outside of my house and have the images popup on kodi using this script as it looks great...

i'm interested too Blush
Reply
I can't seem to get this to work on my C1 model foscam. I don't get any errors but there's no picture. The log shows an error opening the stream and I can't open it in VLC either. Any ideas?

Code:
17:30:06 T:140215159674624   ERROR: script.foscam v0.0.21: CGI request string format error
17:30:06 T:140215054173952  NOTICE: Thread GUIDialogCache start, auto delete: true
17:30:06 T:140216385140608   ERROR: CCurlFile::Stat - Failed: Server returned nothing (no headers, no data)(52) for http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140216385140608  NOTICE: DVDPlayer: Opening: http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140216385140608 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
17:30:06 T:140215054173952  NOTICE: Thread DVDPlayer start, auto delete: false
17:30:06 T:140215054173952  NOTICE: Creating InputStream
17:30:06 T:140215054173952   ERROR: CCurlFile::Stat - Failed: Server returned nothing (no headers, no data)(52) for http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140215054173952   ERROR: CCurlFile::FillBuffer - Failed: Server returned nothing (no headers, no data)(52)
17:30:06 T:140215054173952   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
17:30:06 T:140215054173952   ERROR: Open - failed to open source <http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream>
17:30:06 T:140215054173952   ERROR: CDVDPlayer::OpenInputStream - error opening [http://XX:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream]
17:30:06 T:140215054173952  NOTICE: CDVDPlayer::OnExit()
17:30:06 T:140216385140608  NOTICE: CDVDPlayer::CloseFile()
17:30:06 T:140216385140608  NOTICE: DVDPlayer: waiting for threads to exit
17:30:06 T:140216385140608  NOTICE: DVDPlayer: finished waiting
17:30:06 T:140216385140608  NOTICE: CDVDPlayer::CloseFile()
17:30:06 T:140216385140608  NOTICE: DVDPlayer: waiting for threads to exit
17:30:06 T:140216385140608  NOTICE: DVDPlayer: finished waiting
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: http://XXX.XXX.XXX.XXX:88/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=admin&pwd=XXXX
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: <Response [200]>
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: <CGI_Result>
                                                <result>0</result>
                                                <isMirror>0</isMirror>
                                                <isFlip>0</isFlip>
                                            </CGI_Result>
17:30:13 T:140215159674624  NOTICE: script.foscam v0.0.21: Closing main view
Reply
Still any support for this? I am getting similar errors as nickiman posted previously. Just wondering if this has been solved by anyone yet. I'm on newer firmware than mentioned previously.

F19831W / F19804P
System FW v 1.4.1.10
App FW v 2.11.1.118
Plug In v 3.1.0.9

(2015-02-23, 01:38)nickiman Wrote: Hi quixers,

I´ve tried your script following your recomendation to install it:

Quote:Download this, rename it script.foscamFix.zip

https://github.com/peteakalad/script.fos...master.zip

To install, uninstall the existing version then install my patched one..

1) Go to settings -> add-ons -> Program add-ons -> Foscam HD -> uninstall -> Yes

2) Go to settings -> add-ons -> Install from zip file -> select the downloaded file above 'script.foscamFix.zip'

After that I´ve configured again all the parameters in the addon and I´ve checked that running the addon I can see in full screen the live view of the camera.

But when an alarm preview is triggered the little square with the image from the IP camera doesn´t show anything.

I can see only the cross to close the preview in the upper right corner fo the square but, without images from the camera. I attach you a snapshot capturing that situation:

Image

Movement triggered on IP cam

I attach you the part of the log where I think could be the error:

Code:
10:40:28 T:4444  NOTICE: script.foscam v0.0.21: Showing preview
10:40:28 T:4444  NOTICE: script.foscam v0.0.21: Snapshot C:\Users\NICMA\AppData\Roaming\XBMC\userdata\addon_data\script.foscam\snapshots\snapshot.1424598028.47.jpg
10:40:28 T:3232 WARNING: JpegIO: Error 30: Bogus DHT index %d
10:40:28 T:3232   ERROR: Texture manager unable to load image from memory
10:40:28 T:4444  NOTICE: script.foscam v0.0.21: Snapshot C:\Users\NICMA\AppData\Roaming\XBMC\userdata\addon_data\script.foscam\snapshots\snapshot.1424598028.48.jpg
10:40:28 T:4444  NOTICE: script.foscam v0.0.21: Snapshot C:\Users\NICMA\AppData\Roaming\XBMC\userdata\addon_data\script.foscam\snapshots\snapshot.1424598028.5.jpg
10:40:28 T:3232 WARNING: JpegIO: Error 30: Bogus DHT index %d

But anyway I send you also the complete log file in case you need to do a deeper analysis of the situation:

https://dl.dropboxusercontent.com/u/3942...foscam.log

Keep waiting your comments.

Thanks for your help.


If not, I'll get around to opening up the source code to see what's up and see if I can't solve it in the next coming weeks. Thanks for the help!
Reply
Okay, I figured it out. At first I thought it was related to the stream.readline() code and found that my devices are sending 3 HTTP headers (instead of 2) to get the length of data required for the JPEG image. This wasn't always reliable so I kept the while loop in there until it read "Content-Length:#####" that quixers had implemented so it should work for the other models as well. I added some additional verbose logging and this is the result:

Code:
06:38:54 T:6352  NOTICE: script.foscam v0.0.2: Stream Readline: --ThisString
06:38:54 T:6352  NOTICE: script.foscam v0.0.2: Stream Readline: Content-type:image/jpeg
06:38:54 T:6352  NOTICE: script.foscam v0.0.2: Stream Readline: Content-Length:17450
06:38:54 T:6352  NOTICE: script.foscam v0.0.2: Stream JPEG Read Size: 17450
06:38:54 T:6352  NOTICE: script.foscam v0.0.2: Stream Readline:
06:38:54 T:6352  NOTICE: script.foscam v0.0.2: Snapshot C:\Users\mjordan\AppData\Roaming\Kodi\userdata\addon_data\script.foscam\snapshots\snapshot.1440585534.21.jpg

The true issue turned out how we were writing to the file. I changed the following from:

Code:
if frame:
  filename = os.path.join(self.path, "snapshot.{0}.jpg".format(time.time()))
  open(filename, 'w').write(frame)

To this and everything started working again. I don't see anymore foreign errors in the code!

Code:
if frame:
  filename = os.path.join(self.path, "snapshot.{0}.jpg".format(time.time()))
  with open(filename, 'wb') as jpeg_file:
       jpeg_file.write(frame)

Now to find the best way to get multiple cameras working. Time to tryout Leopold's branch for this next...
Reply
For others reference I haven't gotten this working yet on my C1. cmd=snapPicture2 works fine but I can't get cmd=GetMJStream working. Reports on the internet conflict about whether the camera supports it.

http://IPADDRESS:88/cgi-bin/CGIProxy.fcg...d=password returns

<CGI_Result>
<result>0</result>
<IOAlarm>0</IOAlarm>
<motionDetectAlarm>0</motionDetectAlarm>
<soundAlarm>1</soundAlarm>
<record>0</record>
<sdState>0</sdState>
<sdFreeSpace>0k</sdFreeSpace>
<sdTotalSpace>0k</sdTotalSpace>
<ntpState>1</ntpState>
<ddnsState>0</ddnsState>
<url>http XXXXXX.myfoscam.org%XXX</url>
<upnpState>0</upnpState>
<isWifiConnected>1</isWifiConnected>
<wifiConnectedAP>XXX</wifiConnectedAP>
<infraLedState>1</infraLedState>
</CGI_Result>

Tried the procedure here http://foscam.us/forum/how-to-fetch-snap...t4328.html but http://ip address:port/cgi-bin/CGIProxy.fcgi?cmd=setSubStreamFormat&format=1&usr=admin&pwd= returns

<CGI_Result>
<result>-1</result>
</CGI_Result>

instead of the expected

<CGI_Result>
<result>0</result>
</CGI_Result>

This http://IPADDRESS:88/cgi-bin/CGIProxy.fcg...&pwd=XXXXX results in:

<CGI_Result>
<result>0</result>
<streamType>0</streamType>
</CGI_Result>

I can change the stream type to 1 with cmd=setMainVideoStreamType&streamType but it doesn't seem to make any difference.

I'm not savvy enough to know exactly what this means but thought it might save someone else some time.

(2015-07-25, 00:55)joeshmoe Wrote: I can't seem to get this to work on my C1 model foscam. I don't get any errors but there's no picture. The log shows an error opening the stream and I can't open it in VLC either. Any ideas?

Code:
17:30:06 T:140215159674624   ERROR: script.foscam v0.0.21: CGI request string format error
17:30:06 T:140215054173952  NOTICE: Thread GUIDialogCache start, auto delete: true
17:30:06 T:140216385140608   ERROR: CCurlFile::Stat - Failed: Server returned nothing (no headers, no data)(52) for http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140216385140608  NOTICE: DVDPlayer: Opening: http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140216385140608 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
17:30:06 T:140215054173952  NOTICE: Thread DVDPlayer start, auto delete: false
17:30:06 T:140215054173952  NOTICE: Creating InputStream
17:30:06 T:140215054173952   ERROR: CCurlFile::Stat - Failed: Server returned nothing (no headers, no data)(52) for http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140215054173952   ERROR: CCurlFile::FillBuffer - Failed: Server returned nothing (no headers, no data)(52)
17:30:06 T:140215054173952   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
17:30:06 T:140215054173952   ERROR: Open - failed to open source <http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream>
17:30:06 T:140215054173952   ERROR: CDVDPlayer::OpenInputStream - error opening [http://XX:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream]
17:30:06 T:140215054173952  NOTICE: CDVDPlayer::OnExit()
17:30:06 T:140216385140608  NOTICE: CDVDPlayer::CloseFile()
17:30:06 T:140216385140608  NOTICE: DVDPlayer: waiting for threads to exit
17:30:06 T:140216385140608  NOTICE: DVDPlayer: finished waiting
17:30:06 T:140216385140608  NOTICE: CDVDPlayer::CloseFile()
17:30:06 T:140216385140608  NOTICE: DVDPlayer: waiting for threads to exit
17:30:06 T:140216385140608  NOTICE: DVDPlayer: finished waiting
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: http://XXX.XXX.XXX.XXX:88/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=admin&pwd=XXXX
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: <Response [200]>
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: <CGI_Result>
                                                <result>0</result>
                                                <isMirror>0</isMirror>
                                                <isFlip>0</isFlip>
                                            </CGI_Result>
17:30:13 T:140215159674624  NOTICE: script.foscam v0.0.21: Closing main view
Reply
Can you access either of these links from a browser? These are the actual streams. It should look like its downloading a file but it will be infinite so cancel it once you've confirmed its working.

Code:
http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
or
Code:
http://XXX.XXX.XXX.XXX:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=username&pwd=password&

These are the actual streams. Currently your version of the addon is using the prior, I personally use the second. If this doesn't work, then you might be interested in using an older version of the addon which uses the snapPicture2 command for the alarm preview instead of Leopold's extract JPEG from MJPEG stream (for more FPS!!)

(2015-08-26, 15:38)joeshmoe Wrote: For others reference I haven't gotten this working yet on my C1. cmd=snapPicture2 works fine but I can't get cmd=GetMJStream working. Reports on the internet conflict about whether the camera supports it.

http://IPADDRESS:88/cgi-bin/CGIProxy.fcg...d=password returns

<CGI_Result>
<result>0</result>
<IOAlarm>0</IOAlarm>
<motionDetectAlarm>0</motionDetectAlarm>
<soundAlarm>1</soundAlarm>
<record>0</record>
<sdState>0</sdState>
<sdFreeSpace>0k</sdFreeSpace>
<sdTotalSpace>0k</sdTotalSpace>
<ntpState>1</ntpState>
<ddnsState>0</ddnsState>
<url>http XXXXXX.myfoscam.org%XXX</url>
<upnpState>0</upnpState>
<isWifiConnected>1</isWifiConnected>
<wifiConnectedAP>XXX</wifiConnectedAP>
<infraLedState>1</infraLedState>
</CGI_Result>

Tried the procedure here http://foscam.us/forum/how-to-fetch-snap...t4328.html but http://ip address:port/cgi-bin/CGIProxy.fcgi?cmd=setSubStreamFormat&format=1&usr=admin&pwd= returns

<CGI_Result>
<result>-1</result>
</CGI_Result>

instead of the expected

<CGI_Result>
<result>0</result>
</CGI_Result>

I'm not savvy enough to know exactly what this means but thought it might save someone else some time.

(2015-07-25, 00:55)joeshmoe Wrote: I can't seem to get this to work on my C1 model foscam. I don't get any errors but there's no picture. The log shows an error opening the stream and I can't open it in VLC either. Any ideas?

Code:
17:30:06 T:140215159674624   ERROR: script.foscam v0.0.21: CGI request string format error
17:30:06 T:140215054173952  NOTICE: Thread GUIDialogCache start, auto delete: true
17:30:06 T:140216385140608   ERROR: CCurlFile::Stat - Failed: Server returned nothing (no headers, no data)(52) for http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140216385140608  NOTICE: DVDPlayer: Opening: http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140216385140608 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
17:30:06 T:140215054173952  NOTICE: Thread DVDPlayer start, auto delete: false
17:30:06 T:140215054173952  NOTICE: Creating InputStream
17:30:06 T:140215054173952   ERROR: CCurlFile::Stat - Failed: Server returned nothing (no headers, no data)(52) for http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream
17:30:06 T:140215054173952   ERROR: CCurlFile::FillBuffer - Failed: Server returned nothing (no headers, no data)(52)
17:30:06 T:140215054173952   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
17:30:06 T:140215054173952   ERROR: Open - failed to open source <http://USERNAME:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream>
17:30:06 T:140215054173952   ERROR: CDVDPlayer::OpenInputStream - error opening [http://XX:[email protected]:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream]
17:30:06 T:140215054173952  NOTICE: CDVDPlayer::OnExit()
17:30:06 T:140216385140608  NOTICE: CDVDPlayer::CloseFile()
17:30:06 T:140216385140608  NOTICE: DVDPlayer: waiting for threads to exit
17:30:06 T:140216385140608  NOTICE: DVDPlayer: finished waiting
17:30:06 T:140216385140608  NOTICE: CDVDPlayer::CloseFile()
17:30:06 T:140216385140608  NOTICE: DVDPlayer: waiting for threads to exit
17:30:06 T:140216385140608  NOTICE: DVDPlayer: finished waiting
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: http://XXX.XXX.XXX.XXX:88/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=admin&pwd=XXXX
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: <Response [200]>
17:30:06 T:140215159674624  NOTICE: script.foscam v0.0.21: <CGI_Result>
                                                <result>0</result>
                                                <isMirror>0</isMirror>
                                                <isFlip>0</isFlip>
                                            </CGI_Result>
17:30:13 T:140215159674624  NOTICE: script.foscam v0.0.21: Closing main view
Reply
  • 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 15

Logout Mark Read Team Forum Stats Members Help
Foscam HD - Video feed with camera controls, and motion/sound detection preview1