Skip to content
skrtk98 edited this page Oct 24, 2026 · 1 revision

ONVIF(2020 番)

入口と認証

  • 入口は http://<カメラ>:2020/onvif/service。
  • 認証は WS-Security の UsernameToken(PasswordDigest)だけ。HTTP Digest には対応しない(HttpDigest="false")。
  • 認証なしで要求すると、ter:NotAuthorized("Authority failure")が返る。
  • PasswordDigest の Created がカメラの時計と大きくずれると認証に失敗するので、GetSystemDateAndTime でずれを測ってから送る。

機器の情報

  • GetDeviceInformation:Manufacturer tp-link、Model Tapo C220、FirmwareVersion 1.3.1 Build 260515 Rel.2411n、HardwareId 2.0。シリアル番号もそのまま返る(公開しないこと)。
  • GetSystemDateAndTime:DateTimeType NTP、TZ GMT-09:00、DaylightSavings true。日本には夏時間が無いのに true を返す。 Tapo 側の getDSTRule も enabled "1"、has_rule "0" だった。

サービスと能力

サービスは device・media(ver10)・events・analytics・imaging・ptz・deviceIO。版はどれも 2.20。

GetServices(IncludeCapability)が返す主な能力:

サービス 能力
Security UsernameToken=true、HttpDigest=false、TLS1.0〜1.2 はどれも false
Network NTP=1、IPv6=false、Dot11Configuration=true
System FirmwareUpgrade・SystemLogging・SystemBackup・RemoteDiscovery はどれも false
Media SnapshotUri=false、OSD=false、Rotation=false、VideoSourceMode=true、MaximumNumberOfProfiles=10、RTP_RTSP_TCP=true、RTPMulticast=false
Events WSPullPointSupport=true、MaxPullPoints=10、MaxNotificationProducers=10、PersistentNotificationStorage=false、WSPausableSubscriptionManagerInterfaceSupport=false
Analytics CellBasedSceneDescriptionSupported・RuleSupport・AnalyticsModuleSupport はどれも true
PTZ Reverse=true、EFlip=true
Imaging 空

食い違い:

  • GetCapabilities では DeviceIO の VideoSources が 0、GetServices では 1。
  • SupportedVersions が Major 20・Minor 6 という不自然な値を返す。
  • deviceIO の能力は AudioOutputs="1" と答えるが、GetAudioOutputs と GetAudioDecoderConfigurations は空。使える音声出力は無い。
  • Events は PullPoint に対応すると答えるが、実際には使えない(検知イベント)。

プロファイル

profile_1(stream1)、profile_2(stream2)、profile_3(stream8)の3つ。どれにも PTZ の設定が付く。

profile_1 の VideoEncoderConfiguration:

項目 値
Encoding H264、2560×1440
Quality 3
FrameRateLimit / EncodingInterval 30 / 1
BitrateLimit 2560
GovLength 25
H264Profile Main
SessionTimeout PT0H1M5S

実際の流れは High プロファイルで、キーフレームは 2 秒(60 フレーム)ごとに来る(RTSP)。GovLength とも H264Profile とも合わない。

  • AudioEncoderConfiguration:G711、Bitrate 65536、SampleRate 16000(実際は 8kHz)。
  • VideoSourceConfiguration:Bounds 2560×1440、UseCount 3。
  • profile_2・profile_3 の encoder の詳細は記録が残っていない。
  • GetStreamUri は rtsp://<カメラ>:554/streamN を返す(認証情報は含まない)。Timeout は PT0H0M2S。

映像解析の設定

VideoAnalyticsConfiguration:

  • CellMotionEngine:Sensitivity medium、Enabled off、CellLayout は 22 列 × 18 行。
  • 規則 MyMotionDetectorRule:ActiveCells 0P8A8A==、MinCount 5、AlarmOnDelay 1000、AlarmOffDelay 1000。
  • TamperEngine:Sensitivity medium。

検知のオン・オフと感度は、ONVIF ではなく Tapo の API で書いている(制御 API と設定)。

対応しない操作

操作 応答
GetSnapshotUri ter:ActionNotSupported(静止画は RTSP から切り出す)
GotoHomePosition ter:ActionNotSupported(HomeSupported=false)
範囲外の AbsoluteMove SOAP-ENV:Sender / ter:InvalidArgVal / ter:InvalidPosition、"Destination out of bounds"
ContinuousMove の Timeout に小数の秒 壊れた HTTP 応答(PTZ)

録画の検索・再生のサービス(Profile G)は無い。

Clone this wiki locally