MOLi-rocks / MOLi-DoorMonitor

1 stars 1 forks source link

Pi Onvif camera 無法透過 Onvif 連線 #2

Closed zxp86021 closed 8 years ago

zxp86021 commented 8 years ago

原本是使用 https://github.com/BreeeZe/rpos 的 release v0.1.0,但是發現 Onvif 的協定曾經改版過,並且不向下相容,所以現在改使用該 repo 的 master branch 自行編譯,然後 Onvif 就可以用惹~

zxp86021 commented 8 years ago

基本上問題出在 soap 這個東西,不向下相容,所以就爆炸了,然後 clone 最新版就好了(無誤

bluet commented 8 years ago

@zxp86021 言到: 「odm我試可以動,起因是onvif某個文件不向下相容」 「其實,我都不知道,我只是一直看到版本不符,心一橫直接 clone 然後就好了」

bluet commented 8 years ago

目前看來 rpos 有 bug 已經到 rpos github 開 issue 了。

請追蹤 https://github.com/BreeeZe/rpos/issues/16

bluet commented 8 years ago

@zxp86021 是否有其他套軟體能讓 RPi 支援 ONVIF 功能呢?

zxp86021 commented 8 years ago

@BlueT 目前看起來只有我們用的這套,而且他也還有在持續更新

bluet commented 8 years ago

目前 node-onvif 處理好了 https://github.com/agsh/onvif/issues/39

但是 rpos 不知原因的錯誤,導致 rtsp 消失

photo_2016-05-17_22-44-47

bluet@Titania  ~/w/rpos   master  vlc rtsp://163.22.32.201:8554/h264 24s  2016年05月17日 (週二) 22時41分29秒 VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28) [0x6dc128] main libvlc: 以預設介面執行 VLC。使用「cvlc」指令以無介面方式執行 VLC。 [0x7fdc54000e58] live555 demux error: Failed to connect with rtsp://163.22.32.201:8554/h264 [0x7fdc580009b8] main input error: open of `rtsp://163.22.32.201:8554/h264' failed

bluet commented 8 years ago
this.__proto__
onvifc {}
initiating: ip-163.22.32.201 port-8081 username-aa password-11 
out:  onvifc {}
{ manufacturer: 'Raspberry Pi',
  model: 'Raspberry Pi',
  firmwareVersion: '0.2.0',
  serialNumber: '00000000af81204a',
  hardwareId: '' }
cameraControl.js: getDevInfo
{ Name: 'Raspberry Pi',
  Type: undefined,
  Location: 'unknow',
  Harware: '2 B',
  Manufacturer: 'Raspberry Pi',
  Model: 'Raspberry Pi',
  Serial: '00000000af81204a',
  Version: '0.2.0',
  rtsp: [ undefined ] }
-14:38-::IC.EventManager::[SND] 407 {
    "U": "getDevInfo",
    "P": {
        "output": {
            "Name": "Raspberry Pi",
            "Location": "unknow",
            "Harware": "2 B",
            "Manufacturer": "Raspberry Pi",
            "Model": "Raspberry Pi",
            "
-14:38-::IC.Handler::[RCV] getVideoEncoderConfiguration from (::ffff:172.17.0.1:39944 sockjs)
{"E":"getVideoEncoderConfiguration","P":{"type":"onvif","host":"163.22.32.201","port":"8081","user":"aa","passwd":"11","_rid":1107}}

this.__proto__
onvifc {}
initiating: ip-163.22.32.201 port-8081 username-aa password-11 
-14:38-:: ::onDone
-14:38-::IC.DB::[EventSystem] null returned for query: {"iEventInx":1,"bSwitch":true}
-14:38-::cpu loading normal::0.19268292682926824
{ '$': { token: 'token' },
  name: 'PiCameraConfiguration',
  useCount: 0,
  encoding: 'H264',
  resolution: { width: 1280, height: 720 },
  quality: 1,
  rateControl: { frameRateLimit: 25, encodingInterval: 1, bitrateLimit: 2500 },
  H264: { govLength: 60, H264Profile: 'High' },
  multicast: 
   { address: { type: 'IPv4', IPv4Address: '0.0.0.0' },
     port: 0,
     TTL: 1,
     autoStart: false },
  sessionTimeout: 'PT1000S' }
-14:38-::IC.EventManager::[SND] 979 {
    "U": "getVideoEncoderConfiguration",
    "P": {
        "output": {
            "$": {
                "token": "token"
            },
            "name": "PiCameraConfiguration",
            "useCount": 0,
            "encoding": "H264",
zxp86021 commented 8 years ago

rpos 在 https://github.com/BreeeZe/rpos/pull/15 這次的 PR 中壞掉了,目前改用沒有 merge 的 dev branch 救急

bluet commented 8 years ago

at https://github.com/BreeeZe/rpos/tree/dev the rtsp works at https://github.com/BreeeZe/rpos/tree/master the rtsp shows undefined.

latest working commit is https://github.com/BreeeZe/rpos/commit/4769a91862a6902e941b0ea90e7c9b3c9440f3e3

The difference is the PR https://github.com/BreeeZe/rpos/pull/15 and diff here https://github.com/BreeeZe/rpos/compare/dev...master

zxp86021 commented 8 years ago

剛剛下的 PR 已經被 merge 了,現在 master branch 應該是正常的 https://github.com/BreeeZe/rpos/commit/c1de1677f9a608931762da1e93dc863e9687feae

bluet commented 8 years ago

:+1: I'll test it soon.

bluet commented 8 years ago

ref https://github.com/BreeeZe/rpos/pull/17

bluet commented 8 years ago

Confirmed fixed.