thanks for the logs,
it provides more clearity, will try to reproduce it, but it will take few days, bit overloaded
Hi, congratulation for hard work,
i have an VTO2211G-WP, have installed DahuaVTO2MQTT in a LCX container on Proxmox, my config is
version: â3â
services:
dahuavto2mqtt:
image: âregistry.gitlab.com/elad.bar/dahuavto2mqtt:latestâ
container_name: âdahuavto2mqttâ
hostname: âdahuavto2mqttâ
restart: âunless-stoppedâ
ports:
- 9563:9563
environment:
- DAHUA_VTO_HOST=192.168.1.150
- DAHUA_VTO_USERNAME=XXXX
- DAHUA_VTO_PASSWORD=XXXXX
- MQTT_BROKER_HOST=192.168.1.34
- MQTT_BROKER_PORT=1883
- MQTT_BROKER_USERNAME=XXXXX
- MQTT_BROKER_PASSWORD=XXXXXX
- MQTT_BROKER_TOPIC=DahuaVTO/Events
- MQTT_BROKER_TOPIC_PREFIX=DahuaVTO
- MQTT_BROKER_CLIENT_ID=DahuaVTO2MQTT
- EXPORTER_PORT=9563
- DEBUG=True
- TZ=Europe/Rome
I have the following errors
HELP dahuavto2mqtt_dahua_failed_messages Dahua Failed Messages
TYPE dahuavto2mqtt_dahua_failed_messages gauge
In Home Assistant Dahua Mqtt is not showedâŚ
How can i fix?
Thanks
PS i attach the links with events files from my Nextcloud
And here is the log file
Thank you for sharing. I thought I was alone in experiencing this problem. I also own a Lorex 2K Doorbell and Iâm encountering the same magicBox alerts. Iâm really hoping thereâs a solution soon because I miss receiving HomeKit alerts. @bar, please let me know if you need any logs from me to assist in resolving this issue. thank you both
Not to take away from the work that @bar has and is doing, but thereâs a working repo of a fork here: baudneo/dahuavto2mqtt: DahuaVTO2MQTT Image with some improvements. (github.com). If youâve got a Lorex doorbell and desperately want working mqtt events, Iâd suggest to give it a shot until such time as this repo supports Lorexâs whacked out implementation.
releasing new version to tackle the prasing, managed to reproduce the issue, not related to non Dahua branded devices.
tested it for Dahua device, feel free to test it to non-dahua-branded device and report back.
except variable name changing and documentation, i donât get the difference in that repo,
the bug was related to the message that being received as byte array with headers, given the lack of documentation it was hard to understand how to match it to all cases, with the latest release, it is working as in the web page of the unit.
if the protocol is the same, it should work for Lorex as well,
if you find a gap and can provide sample data that I will be able to compare and apply fix for it, feel free.
thanks
Hello,
Iâve just bought a VTO2211G-WP.
Iâve set up DahuaVTO2MQTT on raspberry 4, through docker-ce, with the image of DahuaVTO2Mqtt that you released 2 days ago, with tag arm64v8.
When I start DahuaVTO2Mqtt I receive in mqtt all configuration informations.
But after that, no events at all are received. Iâve got only keepalive in the logs, even when I make a call, press button, open lock and so on.
Iâve try several settings on the VTO about security but fir instance with no success.
such like that :
2024-04-27 18:53:42,088 DEBUG clients.DahuaAPI Processing message #93, Endpoint: global.keepAlive, Message: {âidâ: 93, âparamsâ: {âtimeoutâ: 55}, âresultâ: True, âsessionâ: 1572811516}
2024-04-27 18:53:42,088 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-04-27 18:53:42,088 DEBUG clients.DahuaAPI Message #93 handled
2024-04-27 18:54:37,088 DEBUG clients.DahuaAPI Keep alive
2024-04-27 18:54:37,089 DEBUG clients.DahuaAPI Sending message, Data: {âidâ: 94, âsessionâ: 1572811516, âmagicâ: â0x1234â, âmethodâ: âglobal.keepAliveâ, âparamsâ: {âtimeoutâ: 55, âactionâ: True}}
2024-04-27 18:54:37,097 DEBUG clients.DahuaAPI Received data, Raw Data: bâ \x00\x00\x00DHIP\xfc2\xbf]^\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00{âidâ:94,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1572811516}\nâ
2024-04-27 18:54:37,098 DEBUG clients.DahuaAPI Processing message #94, Endpoint: global.keepAlive, Message: {âidâ: 94, âparamsâ: {âtimeoutâ: 55}, âresultâ: True, âsessionâ: 1572811516}
2024-04-27 18:54:37,098 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-04-27 18:54:37,098 DEBUG clients.DahuaAPI Message #94 handled
2024-04-27 18:55:32,120 DEBUG clients.DahuaAPI Keep alive
2024-04-27 18:55:32,165 DEBUG clients.DahuaAPI Sending message, Data: {âidâ: 95, âsessionâ: 1572811516, âmagicâ: â0x1234â, âmethodâ: âglobal.keepAliveâ, âparamsâ: {âtimeoutâ: 55, âactionâ: True}}
2024-04-27 18:55:32,196 DEBUG clients.DahuaAPI Received data, Raw Data: bâ \x00\x00\x00DHIP\xfc2\xbf]_\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00{âidâ:95,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1572811516}\nâ
2024-04-27 18:55:32,205 DEBUG clients.DahuaAPI Processing message #95, Endpoint: global.keepAlive, Message: {âidâ: 95, âparamsâ: {âtimeoutâ: 55}, âresultâ: True, âsessionâ: 1572811516}
2024-04-27 18:55:32,206 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-04-27 18:55:32,211 DEBUG clients.DahuaAPI Message #95 handled
2024-04-27 18:56:27,212 DEBUG clients.DahuaAPI Keep alive
2024-04-27 18:56:27,212 DEBUG clients.DahuaAPI Sending message, Data: {âidâ: 96, âsessionâ: 1572811516, âmagicâ: â0x1234â, âmethodâ: âglobal.keepAliveâ, âparamsâ: {âtimeoutâ: 55, âactionâ: True}}
2024-04-27 18:56:27,237 DEBUG clients.DahuaAPI Received data, Raw Data: bâ \x00\x00\x00DHIP\xfc2\xbf]`\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00{âidâ:96,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1572811516}\nâ
2024-04-27 18:56:27,237 DEBUG clients.DahuaAPI Processing message #96, Endpoint: global.keepAlive, Message: {âidâ: 96, âparamsâ: {âtimeoutâ: 55}, âresultâ: True, âsessionâ: 1572811516}
2024-04-27 18:56:27,237 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-04-27 18:56:27,238 DEBUG clients.DahuaAPI Message #96 handled
2024-04-27 18:57:22,238 DEBUG clients.DahuaAPI Keep alive
2024-04-27 18:57:22,238 DEBUG clients.DahuaAPI Sending message, Data: {âidâ: 97, âsessionâ: 1572811516, âmagicâ: â0x1234â, âmethodâ: âglobal.keepAliveâ, âparamsâ: {âtimeoutâ: 55, âactionâ: True}}
2024-04-27 18:57:22,256 DEBUG clients.DahuaAPI Received data, Raw Data: bâ \x00\x00\x00DHIP\xfc2\xbf]a\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00{âidâ:97,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1572811516}\nâ
2024-04-27 18:57:22,256 DEBUG clients.DahuaAPI Processing message #97, Endpoint: global.keepAlive, Message: {âidâ: 97, âparamsâ: {âtimeoutâ: 55}, âresultâ: True, âsessionâ: 1572811516}
2024-04-27 18:57:22,256 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-04-27 18:57:22,257 DEBUG clients.DahuaAPI Message #97 handled
Do I make a mistake ?
Best regards
thanks for the log, it seems that for your device messages are being sent as Unicode while in other devices messages are UTF-8,
as result of that it failed to parse the message, I hope that that finding will assist supporting more devices.
I released new version and will test it, once will have more details will share if it address issues above.
thanks
hi, sorry for the long time to identify the issue,
found the issue and fixed it locally, testing and will update once it is ready
seems that both issues of Dahua events not being triggered and parsing messages is gone with latest.
feel free to test and report back
thanks
Hello,
Iâve done the tests today, itâs work perfectly. Thank you !!!
You said âhi, sorry for the long time to identify the issueâ. I said instead that you have take it into account very very quickly ! Thank you once again.
Still not work, my event:
HELP python_gc_objects_collected_total Objects collected during gc
TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation=â0â} 2560.0
python_gc_objects_collected_total{generation=â1â} 462.0
python_gc_objects_collected_total{generation=â2â} 0.0
HELP python_gc_objects_uncollectable_total Uncollectable objects found during GC
TYPE python_gc_objects_uncollectable_total counter
python_gc_objects_uncollectable_total{generation=â0â} 0.0
python_gc_objects_uncollectable_total{generation=â1â} 0.0
python_gc_objects_uncollectable_total{generation=â2â} 0.0
HELP python_gc_collections_total Number of times this generation was collected
TYPE python_gc_collections_total counter
python_gc_collections_total{generation=â0â} 59.0
python_gc_collections_total{generation=â1â} 5.0
python_gc_collections_total{generation=â2â} 0.0
HELP python_info Python platform information
TYPE python_info gauge
python_info{implementation=âCPythonâ,major=â3â,minor=â12â,patchlevel=â3â,version=â3.12.3â} 1.0
HELP process_virtual_memory_bytes Virtual memory size in bytes.
TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 4.2336256e+07
HELP process_resident_memory_bytes Resident memory size in bytes.
TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.920448e+07
HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
TYPE process_start_time_seconds gauge
process_start_time_seconds 1.7149018788e+09
HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.38
HELP process_open_fds Number of open file descriptors.
TYPE process_open_fds gauge
process_open_fds 13.0
HELP process_max_fds Maximum number of open file descriptors.
TYPE process_max_fds gauge
process_max_fds 1024.0
HELP dahuavto2mqtt_mqtt_status MQTT Connectivity Status
TYPE dahuavto2mqtt_mqtt_status gauge
dahuavto2mqtt_mqtt_status{instance=âDahuaVTO2MQTTâ,version=â2024.04.28.59597â} 1.0
HELP dahuavto2mqtt_mqtt_incoming_messages MQTT Incoming Messages
TYPE dahuavto2mqtt_mqtt_incoming_messages gauge
HELP dahuavto2mqtt_mqtt_outgoing_messages MQTT Outgoing Messages
TYPE dahuavto2mqtt_mqtt_outgoing_messages gauge
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/magicBox.getDeviceTypeâ,version=â2024.04.28.59597â} 2.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/magicBox.getSoftwareVersionâ,version=â2024.04.28.59597â} 2.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/magicBox.getSystemInfoNewâ,version=â2024.04.28.59597â} 2.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/accessControl.factory.instanceâ,version=â2024.04.28.59597â} 2.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/magicBox.getSerialNoâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VideoWaterMarkâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VideoWidgetâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/ChannelTitleâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Webâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/RTSPâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Httpsâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/UserGlobalâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/AccessFilterâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Networkâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/UPnPâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/BuildingExternalâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Multicastâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Qosâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/WMMâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/MotionDetectâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/BlindDetectâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Generalâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/NTPâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/AutoMaintainâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/FlashLightâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Soundâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VideoTalkPhoneBasicâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Alarmâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Commâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/SSHDâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VSP_CGIâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/MobilePhoneApplicationâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/PwdResetâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/SafetyAbnormalAlarmâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/MediaEncryptâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VSP_ONVIFâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/AccessControlâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/T2UServerâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/DialRuleâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VTOBasicInfoâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Buildingâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VideoTalkPhoneGeneralâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VTOCallâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/RTMPâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/VideoStandardâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDevice/configManager.getConfig/Lightingâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âAlarmLocal/Eventâ,version=â2024.04.28.59597â} 2.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âAutoRegister/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âCallNoAnswered/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âDoorNotClosed/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âHangupPhone/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âIgnoreInvite/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âProfileAlarmTransmit/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âRtspSessionDisconnect/Eventâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âSIPRegisterResult/Eventâ,version=â2024.04.28.59597â} 8.0
dahuavto2mqtt_mqtt_outgoing_messages{instance=âDahuaVTO2MQTTâ,topic=âNTPAdjustTime/Eventâ,version=â2024.04.28.59597â} 1.0
HELP dahuavto2mqtt_mqtt_failed_outgoing_messages MQTT Failed Outgoing Messages
TYPE dahuavto2mqtt_mqtt_failed_outgoing_messages gauge
HELP dahuavto2mqtt_dahua_status Dahua Connectivity Status
TYPE dahuavto2mqtt_dahua_status gauge
dahuavto2mqtt_dahua_status{instance=âDahuaVTO2MQTTâ,version=â2024.04.28.59597â} 1.0
HELP dahuavto2mqtt_dahua_messages Dahua Messages
TYPE dahuavto2mqtt_dahua_messages gauge
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â0â,topic=âglobal.loginâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âglobal.loginâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getSerialNoâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âaccessControl.factory.instanceâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getBootParameterâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getProductDefinitionâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getProcessInfoâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getDeviceTypeâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getSoftwareVersionâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.factory.instanceâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getDeviceClassâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âmagicBox.getSystemInfoNewâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âconfigManager.getConfigâ,version=â2024.04.28.59597â} 42.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âsystem.multicallâ,version=â2024.04.28.59597â} 5.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âeventManager.attachâ,version=â2024.04.28.59597â} 1.0
dahuavto2mqtt_dahua_messages{instance=âDahuaVTO2MQTTâ,session_id=â2109691834â,topic=âglobal.keepAliveâ,version=â2024.04.28.59597â} 4.0
HELP dahuavto2mqtt_dahua_failed_messages Dahua Failed Messages
TYPE dahuavto2mqtt_dahua_failed_messages gauge
Posting metrics of prometheus doesnât provide any value for debugging, it is just metrics, only logs
Hello,
Thank you for the hard work on this. I am also trying to make this work and came across this post. I updated my container this morning, but in my logs I still see the unicode-utf8 issue described earlier.
Here the logs:
2024-05-08 04:46:52,447 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:46:51', 'Success': False, 'UTC': 1715143611.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:46:52,447 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:46:51', 'Success': False, 'UTC': 1715143611.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:47:33,455 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:47:33,455 DEBUG clients.DahuaAPI Sending message, Data: {'id': 91, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:47:33,474 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/[\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":91,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:47:33,475 DEBUG clients.DahuaAPI Processing message #91, Endpoint: global.keepAlive, Message: {'id': 91, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:47:33,475 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:47:33,475 DEBUG clients.DahuaAPI Message #91 handled
2024-05-08 04:47:50,455 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:47:49","Success":false,"UTC":1715143669.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:47:50,456 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:47:50,456 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:47:49', 'Success': False, 'UTC': 1715143669.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:47:50,456 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:47:49', 'Success': False, 'UTC': 1715143669.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:48:28,475 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:48:28,475 DEBUG clients.DahuaAPI Sending message, Data: {'id': 92, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:48:28,495 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/\\\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":92,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:48:28,495 DEBUG clients.DahuaAPI Processing message #92, Endpoint: global.keepAlive, Message: {'id': 92, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:48:28,495 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:48:28,496 DEBUG clients.DahuaAPI Message #92 handled
2024-05-08 04:48:48,459 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:48:47","Success":false,"UTC":1715143727.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:48:48,459 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:48:48,459 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:48:47', 'Success': False, 'UTC': 1715143727.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:48:48,459 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:48:47', 'Success': False, 'UTC': 1715143727.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:49:23,496 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:49:23,496 DEBUG clients.DahuaAPI Sending message, Data: {'id': 93, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:49:23,505 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/]\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":93,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:49:23,505 DEBUG clients.DahuaAPI Processing message #93, Endpoint: global.keepAlive, Message: {'id': 93, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:49:23,505 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:49:23,505 DEBUG clients.DahuaAPI Message #93 handled
2024-05-08 04:49:33,630 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\x1c\x01\x00\x00\x00\x00\x00\x00\x1c\x01\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"NTPAdjustTime","Data":{"Address":"10.23.42.1","Before":"08-05-2024 05:49:32","LocaleTime":"2024-05-08 05:49:32","UTC":1715143772.0,"result":true},"Index":0}]},"session":790894292}\n'
2024-05-08 04:49:33,630 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:49:33,631 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'NTPAdjustTime/Event', 'payload': {'Action': 'Pulse', 'Code': 'NTPAdjustTime', 'Data': {'Address': '10.23.42.1', 'Before': '08-05-2024 05:49:32', 'LocaleTime': '2024-05-08 05:49:32', 'UTC': 1715143772.0, 'result': True}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:49:33,631 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/NTPAdjustTime/Event: {'Action': 'Pulse', 'Code': 'NTPAdjustTime', 'Data': {'Address': '10.23.42.1', 'Before': '08-05-2024 05:49:32', 'LocaleTime': '2024-05-08 05:49:32', 'UTC': 1715143772.0, 'result': True}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:49:46,467 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:49:45","Success":false,"UTC":1715143785.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:49:46,467 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:49:46,467 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:49:45', 'Success': False, 'UTC': 1715143785.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:49:46,467 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:49:45', 'Success': False, 'UTC': 1715143785.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:50:18,505 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:50:18,506 DEBUG clients.DahuaAPI Sending message, Data: {'id': 94, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:50:18,515 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/^\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":94,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:50:18,515 DEBUG clients.DahuaAPI Processing message #94, Endpoint: global.keepAlive, Message: {'id': 94, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:50:18,515 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:50:18,516 DEBUG clients.DahuaAPI Message #94 handled
2024-05-08 04:50:44,456 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:50:43","Success":false,"UTC":1715143843.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:50:44,456 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:50:44,457 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:50:43', 'Success': False, 'UTC': 1715143843.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:50:44,457 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:50:43', 'Success': False, 'UTC': 1715143843.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:51:13,516 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:51:13,516 DEBUG clients.DahuaAPI Sending message, Data: {'id': 95, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:51:13,536 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/_\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":95,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:51:13,536 DEBUG clients.DahuaAPI Processing message #95, Endpoint: global.keepAlive, Message: {'id': 95, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:51:13,536 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:51:13,536 DEBUG clients.DahuaAPI Message #95 handled
2024-05-08 04:51:42,446 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:51:41","Success":false,"UTC":1715143901.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:51:42,446 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:51:42,446 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:51:41', 'Success': False, 'UTC': 1715143901.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:51:42,447 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:51:41', 'Success': False, 'UTC': 1715143901.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:52:08,536 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:52:08,537 DEBUG clients.DahuaAPI Sending message, Data: {'id': 96, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:52:08,556 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/`\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":96,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:52:08,556 DEBUG clients.DahuaAPI Processing message #96, Endpoint: global.keepAlive, Message: {'id': 96, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:52:08,557 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:52:08,557 DEBUG clients.DahuaAPI Message #96 handled
2024-05-08 04:52:40,459 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:52:39","Success":false,"UTC":1715143959.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:52:40,459 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:52:40,460 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:52:39', 'Success': False, 'UTC': 1715143959.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:52:40,460 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:52:39', 'Success': False, 'UTC': 1715143959.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:53:03,557 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:53:03,558 DEBUG clients.DahuaAPI Sending message, Data: {'id': 97, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:53:03,566 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/a\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":97,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:53:03,566 DEBUG clients.DahuaAPI Processing message #97, Endpoint: global.keepAlive, Message: {'id': 97, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:53:03,566 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:53:03,567 DEBUG clients.DahuaAPI Message #97 handled
2024-05-08 04:53:38,457 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:53:37","Success":false,"UTC":1715144017.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:53:38,457 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:53:38,457 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:53:37', 'Success': False, 'UTC': 1715144017.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:53:38,457 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:53:37', 'Success': False, 'UTC': 1715144017.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:53:58,567 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:53:58,567 DEBUG clients.DahuaAPI Sending message, Data: {'id': 98, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:53:58,576 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/b\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":98,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:53:58,576 DEBUG clients.DahuaAPI Processing message #98, Endpoint: global.keepAlive, Message: {'id': 98, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:53:58,576 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:53:58,577 DEBUG clients.DahuaAPI Message #98 handled
2024-05-08 04:54:33,627 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\x1c\x01\x00\x00\x00\x00\x00\x00\x1c\x01\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"NTPAdjustTime","Data":{"Address":"10.23.42.1","Before":"08-05-2024 05:54:32","LocaleTime":"2024-05-08 05:54:32","UTC":1715144072.0,"result":true},"Index":0}]},"session":790894292}\n'
2024-05-08 04:54:33,627 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:54:33,627 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'NTPAdjustTime/Event', 'payload': {'Action': 'Pulse', 'Code': 'NTPAdjustTime', 'Data': {'Address': '10.23.42.1', 'Before': '08-05-2024 05:54:32', 'LocaleTime': '2024-05-08 05:54:32', 'UTC': 1715144072.0, 'result': True}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:54:33,627 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/NTPAdjustTime/Event: {'Action': 'Pulse', 'Code': 'NTPAdjustTime', 'Data': {'Address': '10.23.42.1', 'Before': '08-05-2024 05:54:32', 'LocaleTime': '2024-05-08 05:54:32', 'UTC': 1715144072.0, 'result': True}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:54:36,457 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:54:35","Success":false,"UTC":1715144075.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:54:36,457 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:54:36,458 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:54:35', 'Success': False, 'UTC': 1715144075.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:54:36,458 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:54:35', 'Success': False, 'UTC': 1715144075.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
2024-05-08 04:54:53,577 DEBUG clients.DahuaAPI Keep alive
2024-05-08 04:54:53,577 DEBUG clients.DahuaAPI Sending message, Data: {'id': 99, 'session': 790894292, 'magic': '0x1234', 'method': 'global.keepAlive', 'params': {'timeout': 55, 'action': True}}
2024-05-08 04:54:53,586 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/c\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00{"id":99,"params":{"timeout":55},"result":true,"session":790894292}\n'
2024-05-08 04:54:53,586 DEBUG clients.DahuaAPI Processing message #99, Endpoint: global.keepAlive, Message: {'id': 99, 'params': {'timeout': 55}, 'result': True, 'session': 790894292}
2024-05-08 04:54:53,587 DEBUG clients.DahuaAPI Set timer for 55 seconds to trigger keep alive message
2024-05-08 04:54:53,587 DEBUG clients.DahuaAPI Message #99 handled
2024-05-08 04:55:34,447 DEBUG clients.DahuaAPI Received data, Raw Data: b' \x00\x00\x00DHIP\xd4\x16$/=\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00{"id":61,"method":"client.notifyEventStream","params":{"SID":513,"eventList":[{"Action":"Pulse","Code":"SIPRegisterResult","Data":{"LocaleTime":"2024-05-08 05:55:33","Success":false,"UTC":1715144133.0},"Index":0}]},"session":790894292}\n'
2024-05-08 04:55:34,448 DEBUG clients.DahuaAPI Message #61 handled
2024-05-08 04:55:34,450 DEBUG clients.BaseClient MQTTClient Event received, Data: {'event': 'SIPRegisterResult/Event', 'payload': {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:55:33', 'Success': False, 'UTC': 1715144133.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}}
2024-05-08 04:55:34,450 DEBUG clients.MQTTClient Publishing MQTT message DahuaVTO/SIPRegisterResult/Event: {'Action': 'Pulse', 'Code': 'SIPRegisterResult', 'Data': {'LocaleTime': '2024-05-08 05:55:33', 'Success': False, 'UTC': 1715144133.0}, 'Index': 0, 'deviceType': 'DHI-VTO2111D-P-S2', 'serialNumber': 'redacted'}
My ENV from the container:
"DAHUA_VTO_HOST=10.23.42.23",
"DAHUA_VTO_USERNAME=placeholder",
"DAHUA_VTO_PASSWORD=placeholder",
"MQTT_BROKER_HOST=mqtt5",
"MQTT_BROKER_PORT=1883",
"MQTT_BROKER_USERNAME=placeholder",
"MQTT_BROKER_PASSWORD=placeholder",
"MQTT_BROKER_TOPIC_PREFIX=DahuaVTO",
"MQTT_BROKER_CLIENT_ID=DahuaVTO2MQTT",
"EXPORTER_PORT=9563",
"DEBUG=TRUE",
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=7169506F62C751356D054A26A821E680E5FA6305",
"PYTHON_VERSION=3.12.3",
"PYTHON_PIP_VERSION=24.0",
"PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/dbf0c85f76fb6e1ab42aa672ffca6f0a675d9ee4/public/get-pip.py",
"PYTHON_GET_PIP_SHA256=dfe9fd5c28dc98b5ac17979a953ea550cec37ae1b47a5116007395bfacff2ab9"
],
Hello,
I tried to find a solution to this issue but so far no success. Are there any more information I can provide to you to help?
sorry,
my log:
2024-05-08 18:55:36,773 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-08 18:55:41,774 INFO clients.DahuaClient Connecting
2024-05-08 18:55:41,849 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-08 18:55:41,868 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-08 18:55:41,868 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-08 18:55:41,868 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-08 18:55:41,868 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-08 18:55:41,891 INFO models.DahuaDevice Hold time: 5
2024-05-10 10:31:28,804 ERROR clients.DahuaAPI Failed to handle message, Data: bâ \x00\x00\x00DHIP\xfc!#E\\n\x00\x00G\x00\x00\x00\x00\x00\x00\x00G\x00\x00\x00\x00\x00\x00\x00{âidâ:2652,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1159930364}\nâ, Error: âunicodeescapeâ codec canât decode byte 0x5c in position 12: \ at end of string, Line: 135
2024-05-10 10:34:27,283 INFO clients.DahuaAPI Server sent EOF message
2024-05-10 10:34:27,283 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-10 10:34:32,283 INFO clients.DahuaClient Connecting
2024-05-10 10:34:33,781 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-10 10:34:33,789 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-10 10:34:33,809 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-10 10:34:33,809 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-10 10:34:33,810 INFO models.DahuaDevice Hold time: 5
2024-05-10 10:34:33,810 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-10 14:45:12,855 INFO main Loading DahuaVTO2MQTT configuration, Version: 2024.04.28.59597
2024-05-10 14:45:12,856 INFO clients.BaseClient Initialize MQTTClient
2024-05-10 14:45:12,857 INFO clients.BaseClient Starting to connect MQTTClient, Should connect: True
2024-05-10 14:45:12,857 INFO clients.BaseClient Initialize DahuaClient
2024-05-10 14:45:12,857 INFO clients.BaseClient Starting to connect DahuaClient, Should connect: True
2024-05-10 14:45:13,857 INFO clients.MQTTClient MQTT Broker is trying to connectâŚ
2024-05-10 14:45:13,858 INFO clients.DahuaClient Connecting
2024-05-10 14:45:13,926 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-10 14:45:13,941 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-10 14:45:13,941 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-10 14:45:13,941 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-10 14:45:13,968 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-10 14:45:13,969 INFO models.DahuaDevice Hold time: 5
2024-05-10 14:45:16,957 ERROR clients.MQTTClient Failed to connect to broker, retry in 60 seconds, error: [Errno 113] Host is unreachable, Line: 54
2024-05-10 14:46:16,958 INFO clients.MQTTClient MQTT Broker is trying to connectâŚ
2024-05-10 14:46:20,061 ERROR clients.MQTTClient Failed to connect to broker, retry in 60 seconds, error: [Errno 113] Host is unreachable, Line: 54
2024-05-10 14:47:20,062 INFO clients.MQTTClient MQTT Broker is trying to connectâŚ
2024-05-10 14:47:20,063 INFO clients.MQTTClient MQTT Broker connected with result code 0
2024-05-12 06:21:05,788 ERROR clients.DahuaAPI Failed to handle message, Data: bâ \x00\x00\x00DHIP\x1f\x0e\xab1\\n\x00\x00F\x00\x00\x00\x00\x00\x00\x00F\x00\x00\x00\x00\x00\x00\x00{âidâ:2652,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:833293855}\nâ, Error: âunicodeescapeâ codec canât decode byte 0x5c in position 12: \ at end of string, Line: 135
2024-05-12 06:24:00,247 INFO clients.DahuaAPI Server sent EOF message
2024-05-12 06:24:00,248 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-12 06:24:05,248 INFO clients.DahuaClient Connecting
2024-05-12 06:24:05,311 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-12 06:24:05,323 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-12 06:24:05,323 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-12 06:24:05,323 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-12 06:24:05,342 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-12 06:24:05,381 INFO models.DahuaDevice Hold time: 5
2024-05-13 21:59:54,346 ERROR clients.DahuaAPI Failed to handle message, Data: bâ \x00\x00\x00DHIP\xc9\x95\x94U\\n\x00\x00G\x00\x00\x00\x00\x00\x00\x00G\x00\x00\x00\x00\x00\x00\x00{âidâ:2652,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1435801033}\nâ, Error: âunicodeescapeâ codec canât decode byte 0x5c in position 12: \ at end of string, Line: 135
2024-05-13 22:02:50,995 INFO clients.DahuaAPI Server sent EOF message
2024-05-13 22:02:50,995 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-13 22:02:55,996 INFO clients.DahuaClient Connecting
2024-05-13 22:02:56,059 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-13 22:02:56,059 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-13 22:02:56,077 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-13 22:02:56,077 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-13 22:02:56,078 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-13 22:02:56,094 INFO models.DahuaDevice Hold time: 5
2024-05-15 13:38:46,841 ERROR clients.DahuaAPI Failed to handle message, Data: bâ \x00\x00\x00DHIP\x0c\xba\xd9\r\\n\x00\x00F\x00\x00\x00\x00\x00\x00\x00F\x00\x00\x00\x00\x00\x00\x00{âidâ:2652,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:232372748}\nâ, Error: âunicodeescapeâ codec canât decode byte 0x5c in position 0: \ at end of string, Line: 135
2024-05-15 13:41:41,860 INFO clients.DahuaAPI Server sent EOF message
2024-05-15 13:41:41,861 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-15 13:41:46,861 INFO clients.DahuaClient Connecting
2024-05-15 13:41:46,921 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-15 13:41:46,933 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-15 13:41:46,933 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-15 13:41:46,934 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-15 13:41:46,934 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-15 13:41:46,943 INFO models.DahuaDevice Hold time: 5
2024-05-17 05:17:35,136 ERROR clients.DahuaAPI Failed to handle message, Data: bâ \x00\x00\x00DHIP\xe1&a\x1f\\n\x00\x00F\x00\x00\x00\x00\x00\x00\x00F\x00\x00\x00\x00\x00\x00\x00{âidâ:2652,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:526460641}\nâ, Error: âunicodeescapeâ codec canât decode byte 0x5c in position 12: \ at end of string, Line: 135
2024-05-17 05:20:33,106 INFO clients.DahuaAPI Server sent EOF message
2024-05-17 05:20:33,106 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-17 05:20:38,106 INFO clients.DahuaClient Connecting
2024-05-17 05:20:38,182 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-17 05:20:38,190 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-17 05:20:38,190 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-17 05:20:38,216 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-17 05:20:38,216 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-17 05:20:38,217 INFO models.DahuaDevice Hold time: 5
2024-05-18 20:56:25,132 ERROR clients.DahuaAPI Failed to handle message, Data: bâ \x00\x00\x00DHIPI\n|n\\n\x00\x00G\x00\x00\x00\x00\x00\x00\x00G\x00\x00\x00\x00\x00\x00\x00{âidâ:2652,âparamsâ:{âtimeoutâ:55},âresultâ:true,âsessionâ:1853622857}\nâ, Error: âunicodeescapeâ codec canât decode byte 0x5c in position 2: \ at end of string, Line: 135
2024-05-18 20:59:24,591 INFO clients.DahuaAPI Server sent EOF message
2024-05-18 20:59:24,591 INFO clients.DahuaClient Disconnected, will try to connect in 5 seconds
2024-05-18 20:59:29,591 INFO clients.DahuaClient Connecting
2024-05-18 20:59:29,655 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-18 20:59:29,671 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-18 20:59:29,671 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-18 20:59:29,671 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-18 20:59:29,672 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-18 20:59:29,734 INFO models.DahuaDevice Hold time: 5
2024-05-19 13:04:44,102 INFO main Loading DahuaVTO2MQTT configuration, Version: 2024.04.28.59597
2024-05-19 13:04:44,104 INFO clients.BaseClient Initialize MQTTClient
2024-05-19 13:04:44,104 INFO clients.BaseClient Starting to connect MQTTClient, Should connect: True
2024-05-19 13:04:44,105 INFO clients.BaseClient Initialize DahuaClient
2024-05-19 13:04:44,105 INFO clients.BaseClient Starting to connect DahuaClient, Should connect: True
2024-05-19 13:04:45,105 INFO clients.MQTTClient MQTT Broker is trying to connectâŚ
2024-05-19 13:04:45,106 INFO clients.DahuaClient Connecting
2024-05-19 13:04:45,106 INFO clients.MQTTClient MQTT Broker connected with result code 0
2024-05-19 13:04:45,154 INFO models.DahuaDevice Serial Number: 9B013E8PAJ3955A
2024-05-19 13:04:45,164 INFO models.DahuaDevice Type: DHI-VTO2211G-WP
2024-05-19 13:04:45,164 INFO models.DahuaDevice Version: 4.511.0000000.0.R
2024-05-19 13:04:45,165 INFO models.DahuaDevice Build Date: 2022-05-23
2024-05-19 13:04:45,191 INFO models.DahuaDevice Access Control Instance ID: 57453128
2024-05-19 13:04:45,226 INFO models.DahuaDevice Hold time: 5
@bar this might be of interest to you (and your users) - I did some work to extract the VTO username and password from a preconfigured VTH:
https://alastair.d-silva.org/dahua-vth-escapades
Out of the blue about a week or so ago I noticed that the version @baudneo has that was working stopped. It was throwing errors about processing messages and looked exactly like the old errors I had with @barâs version before it was fixed to parse unicode/utf-8.
Not exactly sure what triggered it to happen, and the firmware of the doorbell was reporting a version from 2022 so I donât think it updated, but in any case, I switched to the current release @bar has and it seems to be working (again)
What errors? Iâm still running the same code with a lorex 2k doorbell without issues.