Kodi Community Forum

Full Version: Foscam HD - Video feed with camera controls, and motion/sound detection preview
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Both of those addresses return "No data received ERR_EMPTY_RESPONSE" on chrome. They fail in VLC also. Here is a verbose log if it's helpful. It seems to be trying to access rtsp on port 88. For the C1 at least, i think the rtsp post is 554. I'll take a look in github and see if I can find the version using snapPicture2. Thanks


Code:
16:46:58 T:140467262002944  NOTICE: script.foscam v0.0.21: Closing main view
16:47:11 T:140467576502016  NOTICE: Previous line repeats 1 times.
16:47:11 T:140467576502016  NOTICE: script.foscam v0.0.21: Applying settings
16:47:11 T:140467576502016  NOTICE: script.foscam v0.0.21: http://XXXXXX:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXX&pwd=XXX
16:47:11 T:140467425498880  NOTICE: Thread JobWorker start, auto delete: true
16:47:11 T:140467559716608  NOTICE: Thread BackgroundLoader start, auto delete: false
16:47:11 T:140467576502016  NOTICE: script.foscam v0.0.21: <Response [200]>
16:47:11 T:140467576502016  NOTICE: script.foscam v0.0.21: <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>httpXXXXXXXX.myfoscam.org%XXXX</url>
                                                <upnpState>0</upnpState>
                                                <isWifiConnected>1</isWifiConnected>
                                                <wifiConnectedAP>XXX</wifiConnectedAP>
                                                <infraLedState>1</infraLedState>
                                            </CGI_Result>
16:47:13 T:140467559716608  NOTICE: Thread LanguageInvoker start, auto delete: false
16:47:13 T:140467559716608  NOTICE: -->Python Interpreter Initialized<--
16:47:14 T:140467576502016  NOTICE: script.foscam v0.0.21: Sleeping for 5 seconds
16:47:14 T:140467559716608  NOTICE: script.foscam v0.0.21: http://XXXXXXXXXX:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXXXX&pwd=XXXXXXX
16:47:15 T:140467559716608  NOTICE: script.foscam v0.0.21: <Response [200]>
16:47:15 T:140467559716608  NOTICE: script.foscam v0.0.21: <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%XXXXXXXXX.myfoscam.org%XXXX</url>
                                                <upnpState>0</upnpState>
                                                <isWifiConnected>1</isWifiConnected>
                                                <wifiConnectedAP>XXXXX</wifiConnectedAP>
                                                <infraLedState>1</infraLedState>
                                            </CGI_Result>
16:47:15 T:140467559716608  NOTICE: script.foscam v0.0.21: Starting main view
16:47:15 T:140467127719680  NOTICE: Thread GUIDialogCache start, auto delete: true
16:47:15 T:140469159479232  NOTICE: DVDPlayer: Opening: rtsp://USERNAME:[email protected]:88/videoMain
16:47:15 T:140469159479232 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
16:47:15 T:140467127719680  NOTICE: Thread DVDPlayer start, auto delete: false
16:47:15 T:140467127719680  NOTICE: Creating InputStream
16:47:15 T:140467127719680  NOTICE: Creating Demuxer
16:47:15 T:140467127719680   ERROR: OpenDemuxStream - Error creating demuxer
16:47:15 T:140467127719680  NOTICE: CDVDPlayer::OnExit()
16:47:15 T:140469159479232  NOTICE: CDVDPlayer::CloseFile()
16:47:15 T:140469159479232  NOTICE: DVDPlayer: waiting for threads to exit
16:47:15 T:140469159479232  NOTICE: DVDPlayer: finished waiting
16:47:15 T:140469159479232  NOTICE: CDVDPlayer::CloseFile()
16:47:15 T:140469159479232  NOTICE: DVDPlayer: waiting for threads to exit
16:47:15 T:140469159479232  NOTICE: DVDPlayer: finished waiting
16:47:15 T:140468104980224  NOTICE: EMBY Player -> onPlayBackStopped
16:47:15 T:140467559716608  NOTICE: script.foscam v0.0.21: http://XXXXXXXXXXXXXX:88/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=XXXXXXXXXX&pwd=XXXXX
16:47:15 T:140467559716608  NOTICE: script.foscam v0.0.21: <Response [200]>
16:47:15 T:140467559716608  NOTICE: script.foscam v0.0.21: <CGI_Result>
                                                <result>0</result>
                                                <isMirror>1</isMirror>
                                                <isFlip>0</isFlip>
                                            </CGI_Result>
16:47:19 T:140467576502016  NOTICE: script.foscam v0.0.21: Sleeping for 5 seconds

(2015-08-26, 15:53)maikito26 Wrote: [ -> ]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!!)
UPDATE: I haven't been using this for a while so I've not had much motivation to work on it but once I get a camera set up again I'll start looking through the various issues.

If anyone has working fixes github pull requests would be appreciated.
(2015-08-27, 00:45)Leopold Wrote: [ -> ]If anyone has working fixes github pull requests would be appreciated.

Oh man! I'm just learning GitHub... if that's how it works I'll figure out how to do it.

Though after checking out the multicam thread and playing with those other add-ons I think I've got some work to do here. 2 kids - 2 rooms - 2 cameras so it'd be nice to not have to clone the addon to get both working... or even more in the future
(2015-08-27, 00:16)joeshmoe Wrote: [ -> ]Both of those addresses return "No data received ERR_EMPTY_RESPONSE" on chrome. They fail in VLC also. Here is a verbose log if it's helpful. It seems to be trying to access rtsp on port 88. For the C1 at least, i think the rtsp post is 554. I'll take a look in github and see if I can find the version using snapPicture2. Thanks

My belief is it doesn't support MJPEG streaming then. If it does, the URL is much different than the other cameras.

I was checking thru GitHub and it seems this fork still uses the snapPicture2 cmd. I'd try this out first and see if it improves.

https://github.com/kozmo2k4/script.foscam
I got it working by changing the rtsp port to 554 in foscam.py. Not the most elegant solution. After doing a bit more research, it looks like on some cameras http and rtsp are both available on port 88. The C1 has separate ports and it wouldn't let me set them both to 88. Next I'm going to give the low volume fix a try. Thanks for the help and the excellent addon.

(2015-08-27, 00:16)joeshmoe Wrote: [ -> ]Both of those addresses return "No data received ERR_EMPTY_RESPONSE" on chrome. They fail in VLC also. Here is a verbose log if it's helpful. It seems to be trying to access rtsp on port 88. For the C1 at least, i think the rtsp post is 554. I'll take a look in github and see if I can find the version using snapPicture2. Thanks



(2015-08-26, 15:53)maikito26 Wrote: [ -> ]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!!)
Great news! Let me know how the low volume fix. I didn't realize there was an issue with this yet. I might give it a try too.
Good news to see there is development for the Foscam C1-B.
I have just purchased such a camera.

@joeshmoe, when I edit the rtsp port to 554 in foscam.py (located in the addon.zip file?) then i should get a videostream on my Isengard?

I will be following this thread Smile
(2015-08-28, 11:05)Bazzz66 Wrote: [ -> ]Good news to see there is development for the Foscam C1-B.
I have just purchased such a camera.

@joeshmoe, when I edit the rtsp port to 554 in foscam.py (located in the addon.zip file?) then i should get a videostream on my Isengard?

I will be following this thread Smile

Yup. Edit

Code:
self._video_url = "rtsp://{0}:{1}@{2}:{3}/videoMain".format(user, password, host, port)

to

Code:
self._video_url = "rtsp://{0}:{1}@{2}:554/videoMain".format(user, password, host, port)

On linux/openelec the file is in /home/yourusername/.kodi/addons/script.foscamXXX/resources/lib/ once the adon is installed.

This is not the ideal way to fix the problem since I think it would break the addon for other cameras but it's the best I can do. There may also be other issues I haven't noticed but I do get video.
Tnx Joeshmoe,

I have the stream on my tv now Smile,
Works nice, however there is a lag of about 3 sec between movement and the screen.

Any solutions for that?
(2015-08-31, 13:54)Bazzz66 Wrote: [ -> ]Tnx Joeshmoe,

I have the stream on my tv now Smile,
Works nice, however there is a lag of about 3 sec between movement and the screen.

Any solutions for that?

I've got the same lag. There's some discussion about it a few pages back, but the change suggested didn't make any difference for me. I think it's a Kodi problem since I have the same lag when I open the stream directly. Folks also suggested fast forwarding, but that ends the video when I do it.
Okay. If anyone wants to give it a shot, I've made a 4 camera version which basically consists of the following:

- Previews for up to 4 cameras
- Flickering is mostly solved by a work around
- Can view 4 cameras simultaneously (without controls)

I still want to integrate the missing features. Here's my KIL for now...
- Does not update automatically when settings change. The preview requires a Kodi restart
- Ability to choose the same preview location and it is unpredictable how it looks if multiple alarms are detected and cameras are showing
- Previews will display while running the main window
- No ability to select single camera and use controls


Direct Git Link: https://github.com/maikito26/script.foscam4hd

Looking for bugs and feedback!
Works great but when I open this addon from as example Youtube or Netflix and then close it it doenst close correct you Will still see the x jn the right up per corner
How are you opening it? Manually for the preview?

I'm working on a newer version that's more powerful and more reliable. Need a few more days to finish up and release it. This should resolve any GUI issue you might be encountering!
(2015-09-23, 00:51)maikito26 Wrote: [ -> ]How are you opening it? Manually for the preview?

I'm working on a newer version that's more powerful and more reliable. Need a few more days to finish up and release it. This should resolve any GUI issue you might be encountering!

If i open it manually from a custom catagory it works fine, but i also made a shortcut to my harmony remote. When im at a submenu lets say a smart playlist en i press the button it opens fine but after closing de X cross is still there as an invisible layer. have to reboot to get it the system working again
Can this be made into a PIP (Picture in Picture) mod where we can watch whatever we are watching on TV/Kodi but have the Foscam footage (or some other webcam footage) show up on the side of the screen with a keypress (certain key on keyboard, or combination of keys)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15