Skip to content

[Help] Cancel VTO call on VTO2211G-P-S2 #45

Open

Description

@M3c4tr0x

Hello,

Many commands listed on readme.md works fine, but i want cancel a VTO call to permit answer with home assistant on 2 way audio and it not work.

I use this command :

# Cancel VTO Call
service: dahua_vto.send_command
data:
  entity_id: sensor.dahua_vto
  method: console.runCmd
  params: {'command': 'hc'}
  event: false

{'error': {'code': 268959743, 'message': 'Unknown error! error code was not set in service!'}, 'result': False, 'method': 'console.runCmd', 'entity_id': 'sensor.dahua_vto'}

same problem with this other command :

# Make VTO Call
service: dahua_vto.send_command
data:
  entity_id: sensor.dahua_vto
  method: console.runCmd
  params: {'command': 'call 9901'}
  event: false

{'error': {'code': 268959743, 'message': 'Unknown error! error code was not set in service!'}, 'result': False, 'method': 'console.runCmd', 'entity_id': 'sensor.dahua_vto'}

I also tried the integration https://github.com/rroller/dahua with the call service dahua.vto_cancel_call, but that seems logical, because it also tries the hc command

Could someone help me find the solution?

Activity

  1. myhomeiot commented on Apr 16, 2025

    @myhomeiot
    Owner

    Do you have VTH connected? AFAIK this command doesn't work without VTH or another SIP endpoint.
    You can try connect any SIP client into VTO SIP server and then try to cancel call. Some details you can get from this issue

  2. M3c4tr0x commented on Apr 17, 2025

    @M3c4tr0x
    Author

    No, I don't have a VTH connected; my goal was to do without it. I thought I understood that it was only to have the information of the button pressed, but it works well for me without for the button

    Okay, I will look into setting up a SIP server and see if that solves the problem.

    Currently, I'm using my VTH via the DMSS application; it manages to stop the ringing when I answer the phone. I will see if I can sniff the HTTP frames.

  3. myhomeiot commented on Apr 17, 2025

    @myhomeiot
    Owner

    You don't need to setup the SIP server because Dahua VTO already has SIP server buildin (Dahua VTH's connects as SIP clients), you need to configure any SIP client to connect to VTO.
    If after this the Cancel Call command start working properly I will check if I can add dummy SIP client inside integration.

    PS: I have few users with same problem (hc command not working without VTH) but they don't have a time/expiriance to test if SIP client helps.

  4. M3c4tr0x commented on Apr 17, 2025

    @M3c4tr0x
    Author

    I don't know much about it, so I was off on the wrong track...

    Okay, I'll see if I can find a SIP client. Do you happen to know one for home assistants ?

  5. M3c4tr0x commented on Apr 17, 2025

    @M3c4tr0x
    Author

    I tried connecting a SIP client to my Windows PC with MicroSIP.
    The connection is successful with the VTO server, but the cancel call command is still not recognized by the VTO.

    Currently, while attempting to integrate with Home Assistant, I'm using the DMSS application, and when there's a call, I can pick up.
    I think I'll put a PC in bridge mode between my VTO and my local network to try sniffing the VTO frames when the call hangs up.

  6. myhomeiot commented on Apr 17, 2025

    @myhomeiot
    Owner

    The connection is successful with the VTO server, but the cancel call command is still not recognized by the VTO.

    Great! Can you call VTO by number? When doorbell button pressed do you receives the call to MicroSIP number?

  7. M3c4tr0x commented on Apr 17, 2025

    @M3c4tr0x
    Author

    I have made progress in my research, but I still don't have a solution, I am in discussion with a person who has worked a lot on adding a VTO in home assistant, with exactly what I want to go for :
    felipecrs/dahua-vto-on-home-assistant#14

    For information, with Dahua's DMSS mobile app, hanging up has no impact on the video intercom, which continues to ring.

    At this moment, I found a workaround: I disabled the ringtone.
    As a result, the doorbell doesn't emit any sound while it's ringing, and I can send it audio via go2rtc.

    Image

    I haven't tried to make a call through the VTO to check that it calls microSIP. For the moment I have put asterisk back in the server to be able to try other things.

  8. myhomeiot commented on May 15, 2025

    @myhomeiot
    Owner

    @M3c4tr0x Do you have any news/solution about this issue?

  9. M3c4tr0x commented on May 16, 2025

    @M3c4tr0x
    Author

    @myhomeiot,
    For now, I've simply deleted the ringtone, as I indicated in the image in my last message. This allows me to control the 2wayaudio at any time.
    It's a bit of a shame because the user doesn't really know whether they pressed it or not.
    When I have a little time, I'll look into it in more detail, but it might not be right away.

  10. jamesarbrown commented on Jun 5, 2025

    @jamesarbrown

    I am also trying to sort this. VTO2202-P-S3. Not getting very far.

    It feels like the "console.runCmd" no longer exists in the Dahua firmware or is disabled. This post suggests the same that it was a firmware change rroller/dahua#460

    Does anyone know where the Dahua API doc is for this feature / how it was achieved. I read the API and its not in there, looks almost a hack on a debug console.

    Also, the VTO generates a PCAP file you can open in wireshark.... I also can not recognise or track down the packets/request, but I can if its a routine door open as thats just a http GET.

  11. myhomeiot commented on Jun 6, 2025

    @myhomeiot
    Owner

    @jamesarbrown Thanks for sharing!

    You can try run following commands using my integration system.listService and console.listMethod maybe they just change the name of method or move it to another service.

    Do get full list of services you can issue system.listService command and when for interesting service issue <service>.listMethod command, for example console.listMethod

    service: dahua_vto.send_command
    data:
      entity_id: sensor.dahua_vto
      method: system.listService
    
    service: dahua_vto.send_command
    data:
      entity_id: sensor.dahua_vto
      method: console.listMethod

    I don't know the doc for API but for Dahua HTTP API just google for DAHUA_HTTP_API_V2.76 for ipcamtalk._com.pdf

    As example here the result of this commands for my old VTO2111D:

    system.listService
    {'params': {'service': ['system', 'AccessCardManager', 'AccessPoint', 'AgingTest', 'AirCondition', 'AlarmKeyboard', 'AlarmRegion', 'AnalogAlarm', 'AroudWifi', 'Attendance', 'BackgroundMusic', 'BlueToothDeviceManager', 'BridgeManager', 'CameraModule', 'CertManager', 'Curtain', 'DataOutputVkManager', 'DbRebuild', 'DebugSvrCtrl', 'DevBeep', 'DigitalCertificate', 'DiskDefrag', 'DiskTank', 'DockUser', 'DoorBell', 'EventRestore', 'FaceInfoManager', 'FactoryTool', 'FileCompress', 'FileFindHelper', 'FileManager', 'FileSystemRepair', 'FingerPrintManager', 'FreshAir', 'FtpTest', 'GroundHeat', 'HighAvailability', 'ICR', 'IntervideoClient', 'IntervideoManager', 'LVM', 'LaserDistMeasure', 'LensFunc', 'LensManager', 'License', 'Light', 'LinkLayerVPNClient', 'LowRateWPAN', 'MediaEncrypt', 'MediaManager', 'MediaTest', 'MobilePusher', 'MonitorTransSender', 'MultiCertManager', 'MultiVideo', 'NASDirectory', 'NASUserManager', 'Nat', 'NetStorage', 'NetworkSnifferManager', 'OSDManager', 'OrganizationManager', 'PSTN', 'PTZAutoTest', 'PasswdFind', 'PersonInfoCollect', 'PirAlarm', 'PowerSwitcher', 'PppoeCli', 'PrivacyMasking', 'PtzFunc', 'PtzIntelli', 'PtzManager', 'PtzViewRange', 'Publisher', 'RPCTest', 'RaidManager', 'RecordFinder', 'RecordUpdater', 'RemoteLowRateWPAN', 'SCADA', 'SecretQuestion', 'Security', 'SecurityImExport', 'SmartDevManager', 'SmartHomeManager', 'SmartLock', 'SmtpClient', 'StateManager', 'StorageDeviceManager', 'StorageFunc', 'StoragePreCheck', 'StreamUrlService', 'Switcher', 'ThermographyManager', 'Track', 'UPnPPortmap', 'UserLock', 'UserSecurity', 'VDPPassThrough', 'VTHMonitor', 'VTSManager', 'VideoOutput', 'VideoProcessManager', 'VideoTalkPeer', 'VideoTalkPhone', 'VolumeClone', 'WireLessLora', 'Wireless433AutoTest', 'WlanDevManager', 'ZigbeeDeviceManager', 'accessControl', 'accessControlManager', 'alarm', 'alarmSubSystem', 'alarmSubregion', 'atm', 'capsManager', 'commPort', 'configManager', 'configManagerHelp', 'console', 'cpl', 'ddnsClient', 'devAudioDetect', 'devAudioEncode', 'devAudioInput', 'devAudioOutput', 'devComm', 'devFlashLamp', 'devFlashLampManager', 'devStorage', 'devVideoDetect', 'devVideoEncode', 'devVideoInput', 'devVideoOutput', 'deviceDiscovery', 'encode', 'eventManager', 'faceBoard', 'global', 'locales', 'log', 'magicBox', 'matrix', 'media', 'mediaFile', 'mediaFileFind', 'mobile', 'netApp', 'printLog', 'ptz', 'ptzBase', 'rainBrush', 'redundantPower', 'snapManager', 'speak', 'storage', 'upgrader', 'userAuth', 'userManager', 'webFunCollect', 'workDirectory', 'workGroup']}, 'result': True, 'method': 'system.listService', 'entity_id': 'sensor.dahua_vto'}

    console.listMethod
    {'params': {'method': ['console.factory.instance', 'console.destroy', 'console.attach', 'console.detach', 'console.runCmd', 'console.listMethod']}, 'result': True, 'method': 'console.listMethod', 'entity_id': 'sensor.dahua_vto'}

  12. jamesarbrown commented on Jun 7, 2025

    @jamesarbrown
    2025-06-07 19:30:15.338 DEBUG (MainThread) [custom_components.dahua_vto.sensor] >>> {"method":"system.listService","id":8,"session":560560206}
    2025-06-07 19:30:15.343 DEBUG (MainThread) [custom_components.dahua_vto.sensor] <<< {"id":8,"params":{"service":["system","AC","ACPlatform","ASGManager","AccessAlarmRecordManager","AccessAntiPassBack","AccessAreaInfo","AccessAttendance","AccessAuthorizeFailRecord","AccessAuthorizeRecord","AccessBTCard","AccessBluetoothCloud","AccessBluetoothCloudFailedRecord","AccessBluetoothCloudRecord","AccessCallLiftControl","AccessCard","AccessCardManager","AccessCollectHelper","AccessDataIncrementImport","AccessDepartment","AccessDeviceDoorHandle","AccessDoorPermission","AccessFace","AccessFingerprint","AccessHandPrint","AccessHolidaySchedule","AccessHolidayTemplate","AccessIris","AccessMultiPeople","AccessMultiPeopleUserInfo","AccessOpenDoorRecManager","AccessPageManager","AccessPasswordComm","AccessPermissionGroup","AccessPersonBluetoothCardCloud","AccessPersonCard","AccessPersonCollection","AccessPersonFace","AccessPersonFingerprint","AccessPersonInfo","AccessPoint","AccessRole","AccessTag","AccessTimeSchedule","AccessTimeTemplate","AccessUser","AccessUserPermission","AgingTest","AirCondition","AlarmKeyboard","AlarmLinkDoor","AlarmRegion","AlarmUserManager","AnalogAlarm","AnalogBusControl","AroudWifi","AsyncDeviceManager","Attendance","Authentication2th","BackgroundMusic","BackupServerManager","BitrateStatistics","BlueToothDeviceManager","BluetoothUpgrader","BridgeManager","CalibrateGPS","CallGroup","CameraModule","CentraMultiDoorCtrl","CertManager","ChannelManager","CloudUpgrader","CommonDataFinder","Curtain","DM","DNSManager","DataNodeManager","DataOutputVkManager","DbRebuild","DebugInfo","DebugSvrCtrl","DevBeep","DevPinmuxManager","DeviceAccessControl","DeviceAccessTimeSection","DeviceAccessUserInfo","DeviceConfigManager","DeviceGroupManager","DeviceRecordFinder","DeviceRecordUpdater","Diagnosis","DigitalCertificate","DigitalSpeaker","DiskArrange","DiskDefrag","DiskTank","DockUser","DoorBell","DynamicPasswordLockManager","ElevatorFloorCounter","EventRestore","FaceInfoManager","FactoryTool","FaultCheck","FileCompress","FileFindHelper","FileManager","FileSystemRepair","FingerPrintManager","FingerPrintTest","FireControlManager","FirstEnterInfo","FirstEnterUserInfo","FreshAir","FtpTest","GateControlRecord","GeneralVideoGroupManager","GroundHeat","HighAvailability","HttpClientManager","HumanInput","ICR","IPSecVPNManager","IPTableRulesManager","IVSEventFind","IntelliDiagnose","IntervideoClient","IntervideoManager","IntrusionDetect","IotboxComm","KMS","LLDPClient","LVM","LaserDistMeasure","LensFunc","LensManager","License","LifeInfo","Light","LinkLayerVPNClient","LocalSmdDetect","LogOnlineBackup","LogicDeviceManager","LorexMotionDetect","LowRateWPAN","ManagerGroup","MediaAssistant","MediaEncrypt","MediaManager","MediaTest","MediaTokenManager","MobilePusher","MonitorTransSender","MultiCertManager","MultiVideo","NASDirectory","NASUserManager","Nat","NetAlarmLinkage","NetDevManager","NetStorage","NetworkSnifferManager","OSDManager","ObjectFavoritesLibrary","OrganizationManager","OuterNetAgentMgr","PSTN","PTZAutoTest","PasswdFind","PeripheralPT","PersonInfoCollect","PirAlarm","PluginManager","PowerSwitcher","PppoeCli","PrivacyMasking","ProductWebcaps","PtzFunc","PtzIntelli","PtzManager","PtzViewRange","Publisher","RPCTest","RaidManager","RecallInfo","ReceiptEventHandler","RechargeBusiness","RecordFinder","RecordUpdater","RelationGroup","RemoteAccessControl","RemoteAccessControlManager","RemoteAccessPersonCollection","RemoteDeviceACInfo","RemoteDeviceManager","RemoteDoorBell","RemoteLowRateWPAN","RemotePasswdFind","RemoteUpgrader","RemoteUserManager","RemoteVideoTalkManager","RepeaterManager","RobotFactoryTester","SCADA","SDEncrypt","SIA","ScanerBarCodeManager","ScreenTest","SecAlgoSelfTest","SecretQuestion","Security","SecurityApp","SecurityImExport","SecurityScan","SipServerDevManager","SmartDevManager","SmartHomeManager","SmartLock","Smoke","SmtpClient","StateManager","StorageAssistant","StorageDeviceManager","StorageFunc","StoragePreCheck","StreamUrlService","Switcher","ThermographyManager","Things","Track","UPnPPortmap","UnlockManager","UserLock","UserSecurity","UvcManager","VDPPassThrough","VTHMonitor","VTSManager","VideoInputManager","VideoLink","VideoOutput","VideoOutputManager","VideoProcessManager","VideoTalk2Cloud","VideoTalkManager","VideoTalkPeer","VideoTalkPhone","VolumeClone","WapiManager","WebJumpManager","WiegandFormatManager","WifiTaskManager","Wire802_1X","WireLessLora","Wireless","Wireless433AutoTest","WirelessLoRaAutoTest","WlanDevManager","WlanManager","XRaySimulatorManagerTest","ZigbeeDeviceManager","accessControl","accessControlManager","alarm","alarmInfo","alarmSubSystem","alarmSubregion","atm","capsManager","commPort","configManager","configManagerHelp","console","cpl","ddnsClient","devAudioDecode","devAudioDetect","devAudioEncode","devAudioInput","devAudioOutput","devBattery","devComm","devFlashLamp","devFlashLampManager","devStorage","devVideoDetect","devVideoEncode","devVideoInput","devVideoOutput","deviceDiscovery","encode","eventControlManager","eventManager","faceBoard","fontManager","global","installDiagnosticStat","locales","log","magicBox","matrix","media","mediaFile","mediaFileFind","mobile","netApp","printLog","ptz","ptzBase","rainBrush","redundantPower","snapManager","speak","storage","storageQuota","upgrader","userAuth","userManager","webFunCollect","workDirectory","workGroup"]},"result":true,"session":560560206}
    

    2025-06-07 19:32:41.280 DEBUG (MainThread) [custom_components.dahua_vto.sensor] <<< {"id":13,"params":{"method":["console.factory.instance","console.destroy","console.attach","console.detach","console.runCmd","console.runCmdSync","console.attachAsyncResult","console.detachAsyncResult","console.listMethod"]},"result":true,"session":560560206}

    root@Ubuntu:~/DahuaConsole# ./Console.py --rhost 10.8.3.16 --rport 5000 --proto dhip --auth admin:password
    [*] [Dahua Debug Console 2019-2021 bashis <mcw noemail eu>]
    [*] logon type "default" with proto "dhip" at 10.8.3.16:5000
    [+] Opening connection to 10.8.3.16 on port 5000: Done
    [+] Dahua Debug Console: Success
    [+] Login: Success
    [+] keepAlive thread: Started
    [*] [Active Users]
        admin@10.8.3.40 since 07-06-2025 19:27:33 with "" (Id: 1) 
        admin@10.8.3.40 since 07-06-2025 20:31:28 with "Console" (Id: 36) 
    [*] Remote Model: DHI-VTO2202F-P-S3, Class: VTO, Time: 2025-06-07 20:31:28
    [Console]# call
    [-] Invalid command: 'help' for help
    [Console]# hc
    [-] Invalid command: 'help' for help
    [Console]# listmethod
    [-] Invalid command: 'help' for help
    [Console]# help
    [-] Invalid command: 'help' for help
    [Console]# config
    [*] [usage]
        config members (show config members)
        config all (dump all remote config)
        config <member> (dump config for <member>)
        config [<member>|<all>] [save <filename>] (Save JSON to <filename>)
        config  (Use 'ceconfig' in Console to set/get)
    
  13. myhomeiot commented on Jun 7, 2025

    @myhomeiot
    Owner

    @jamesarbrown Looks like in new firmware they change regular console.runCmd to console.runCmdSync. You can try to use it for cancel VTO call:

    # Cancel VTO Call
    service: dahua_vto.send_command
    data:
      entity_id: sensor.dahua_vto
      method: console.runCmdSync
      params: {'command': 'hc'}
      event: false
  14. jamesarbrown commented on Jun 8, 2025

    @jamesarbrown

    Hi the device shows both runCmd and runCmdSync as methods, but I tried runCmdSync, error was different but still did not work

    2025-06-08 18:06:18.037 DEBUG (MainThread) [custom_components.dahua_vto.sensor] >>> {"method":"console.runCmdSync","params":{"command":"call 9901"},"id":554,"session":1211540103}
    2025-06-08 18:06:18.039 DEBUG (MainThread) [custom_components.dahua_vto.sensor] <<< {"error":{"code":268632080,"message":""},"id":554,"params":{"info":null},"result":false,"session":1211540103}
    
  15. M3c4tr0x commented on Jun 17, 2025

    @M3c4tr0x
    Author

    Same result here
    Image

  16. felipecrs commented on Jul 4, 2025

    @felipecrs

    Maybe someone can try reaching out to Dahua? Maybe this is a firmware bug.

  17. myhomeiot commented on Aug 24, 2025

    @myhomeiot
    Owner

    FYI: Same issue here rroller/dahua#493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions