2016-01-15, 20:38
Hello Leopold!
I'm trying to use your addon with a Foscam C1 camera...
Launching the addon, I can't get any image.
Activating the debug log I see some interesting thing...
Even if I correctly set the username and password in the addon settings, it tries to open the camera with the default USERNAME and PASSWORD:
Also, in the camera settings, the RTSP port is set to 554, not 88 - which is the HTTP port.
The link rtsp://admin:******@192.168.200.198:554/videoMain opens without a glitch in VLC and I have image...
Here is the relevant part from kodi.log - I just edited the password to *****
LATER EDIT:
I figured it out!
It looks like the USERNAME and PASSWORD are still used, but not logged in clear text. Although, some other camera urls present the username and password...
I got it working by editing the script.foscam/resources/lib/foscam.py and removed the port by changing the line
to
I'm trying to use your addon with a Foscam C1 camera...
Launching the addon, I can't get any image.
Activating the debug log I see some interesting thing...
Even if I correctly set the username and password in the addon settings, it tries to open the camera with the default USERNAME and PASSWORD:
Code:
20:17:30 T:140204781397952 NOTICE: DVDPlayer: Opening: rtsp://USERNAME:[email protected]:88/videoMain
20:17:30 T:140204781397952 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:17:30 T:140201885955840 NOTICE: Thread DVDPlayer start, auto delete: false
20:17:30 T:140201885955840 NOTICE: Creating InputStream
20:17:30 T:140201885955840 NOTICE: Creating Demuxer
20:17:30 T:140201885955840 ERROR: OpenDemuxStream - Error creating demuxer
Also, in the camera settings, the RTSP port is set to 554, not 88 - which is the HTTP port.
The link rtsp://admin:******@192.168.200.198:554/videoMain opens without a glitch in VLC and I have image...
Here is the relevant part from kodi.log - I just edited the password to *****
Code:
20:17:30 T:140202152552192 NOTICE: Previous line repeats 1 times.
20:17:30 T:140202152552192 NOTICE: Thread LanguageInvoker start, auto delete: false
20:17:30 T:140202152552192 NOTICE: -->Python Interpreter Initialized<--
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: http://192.168.200.198:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=admin&pwd=******
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: <Response [200]>
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: <CGI_Result>
<result>0</result>
<IOAlarm>0</IOAlarm>
<motionDetectAlarm>1</motionDetectAlarm>
<soundAlarm>1</soundAlarm>
<record>0</record>
<sdState>0</sdState>
<sdFreeSpace>0k</sdFreeSpace>
<sdTotalSpace>0k</sdTotalSpace>
<ntpState>1</ntpState>
<ddnsState>0</ddnsState>
<url>http%3A%2F%2Fjj4052.myfoscam.org%3A88</url>
<upnpState>0</upnpState>
<isWifiConnected>1</isWifiConnected>
<wifiConnectedAP>MTZ</wifiConnectedAP>
<infraLedState>1</infraLedState>
</CGI_Result>
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: Starting main view
20:17:30 T:140201885955840 NOTICE: Thread GUIDialogCache start, auto delete: true
20:17:30 T:140204781397952 NOTICE: DVDPlayer: Opening: rtsp://USERNAME:[email protected]:88/videoMain
20:17:30 T:140204781397952 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:17:30 T:140201885955840 NOTICE: Thread DVDPlayer start, auto delete: false
20:17:30 T:140201885955840 NOTICE: Creating InputStream
20:17:30 T:140201885955840 NOTICE: Creating Demuxer
20:17:30 T:140201885955840 ERROR: OpenDemuxStream - Error creating demuxer
20:17:30 T:140201885955840 NOTICE: CDVDPlayer::OnExit()
20:17:30 T:140204781397952 NOTICE: CDVDPlayer::CloseFile()
20:17:30 T:140204781397952 NOTICE: DVDPlayer: waiting for threads to exit
20:17:30 T:140204781397952 NOTICE: DVDPlayer: finished waiting
20:17:30 T:140204781397952 NOTICE: CDVDPlayer::CloseFile()
20:17:30 T:140204781397952 NOTICE: DVDPlayer: waiting for threads to exit
20:17:30 T:140204781397952 NOTICE: DVDPlayer: finished waiting
20:17:31 T:140202152552192 NOTICE: script.foscam v0.0.21: http://192.168.200.198:88/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=admin&pwd=******
20:17:31 T:140202152552192 NOTICE: script.foscam v0.0.21: <Response [200]>
20:17:31 T:140202152552192 NOTICE: script.foscam v0.0.21: <CGI_Result>
<result>0</result>
<isMirror>0</isMirror>
<isFlip>0</isFlip>
</CGI_Result>
20:17:36 T:140202152552192 NOTICE: script.foscam v0.0.21: Closing main view
admin@NAS ~> cp /share/CACHEDEV1_DATA/.qpkg/KODI/root/.kodi/temp/kodi.log /share/Public
admin@NAS ~> cp /share/CACHEDEV1_DATA/.qpkg/KODI/root/.kodi/temp/kodi.log /share/Public
admin@NAS ~> cat /share/CACHEDEV1_DATA/.qpkg/KODI/root/.kodi/temp/kodi.log
20:17:30 T:140202152552192 NOTICE: Previous line repeats 1 times.
20:17:30 T:140202152552192 NOTICE: Thread LanguageInvoker start, auto delete: false
20:17:30 T:140202152552192 NOTICE: -->Python Interpreter Initialized<--
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: http://192.168.200.198:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=admin&pwd=******
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: <Response [200]>
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: <CGI_Result>
<result>0</result>
<IOAlarm>0</IOAlarm>
<motionDetectAlarm>1</motionDetectAlarm>
<soundAlarm>1</soundAlarm>
<record>0</record>
<sdState>0</sdState>
<sdFreeSpace>0k</sdFreeSpace>
<sdTotalSpace>0k</sdTotalSpace>
<ntpState>1</ntpState>
<ddnsState>0</ddnsState>
<url>http%3A%2F%2Fjj4052.myfoscam.org%3A88</url>
<upnpState>0</upnpState>
<isWifiConnected>1</isWifiConnected>
<wifiConnectedAP>MTZ</wifiConnectedAP>
<infraLedState>1</infraLedState>
</CGI_Result>
20:17:30 T:140202152552192 NOTICE: script.foscam v0.0.21: Starting main view
20:17:30 T:140201885955840 NOTICE: Thread GUIDialogCache start, auto delete: true
20:17:30 T:140204781397952 NOTICE: DVDPlayer: Opening: rtsp://USERNAME:[email protected]:88/videoMain
20:17:30 T:140204781397952 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:17:30 T:140201885955840 NOTICE: Thread DVDPlayer start, auto delete: false
20:17:30 T:140201885955840 NOTICE: Creating InputStream
20:17:30 T:140201885955840 NOTICE: Creating Demuxer
20:17:30 T:140201885955840 ERROR: OpenDemuxStream - Error creating demuxer
20:17:30 T:140201885955840 NOTICE: CDVDPlayer::OnExit()
20:17:30 T:140204781397952 NOTICE: CDVDPlayer::CloseFile()
20:17:30 T:140204781397952 NOTICE: DVDPlayer: waiting for threads to exit
20:17:30 T:140204781397952 NOTICE: DVDPlayer: finished waiting
20:17:30 T:140204781397952 NOTICE: CDVDPlayer::CloseFile()
20:17:30 T:140204781397952 NOTICE: DVDPlayer: waiting for threads to exit
20:17:30 T:140204781397952 NOTICE: DVDPlayer: finished waiting
20:17:31 T:140202152552192 NOTICE: script.foscam v0.0.21: http://192.168.200.198:88/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=admin&pwd=******
20:17:31 T:140202152552192 NOTICE: script.foscam v0.0.21: <Response [200]>
20:17:31 T:140202152552192 NOTICE: script.foscam v0.0.21: <CGI_Result>
<result>0</result>
<isMirror>0</isMirror>
<isFlip>0</isFlip>
</CGI_Result>
20:17:36 T:140202152552192 NOTICE: script.foscam v0.0.21: Closing main view
LATER EDIT:
I figured it out!
It looks like the USERNAME and PASSWORD are still used, but not logged in clear text. Although, some other camera urls present the username and password...
I got it working by editing the script.foscam/resources/lib/foscam.py and removed the port by changing the line
Code:
self._video_url = "rtsp://{0}:{1}@{2}:{3}/videoMain".format(user, password, host, port)
Code:
self._video_url = "rtsp://{0}:{1}@{2}/videoMain".format(user, password, host, port)