home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.32k stars 30.63k forks source link

Reolink integration works partially since updating the latest firmware of my RLC-511 and RLC-511W cameras (3.0.0.2356_23062003) #103241

Closed richarddu07 closed 1 year ago

richarddu07 commented 1 year ago

The problem

Reolink integration works partially since updating the latest firmware of my RLC-511 and RLC-511W cameras (3.0.0.2356_23062003). Only the following functions work: Motion, Substream, Firmware, Audio Record, Restart. image image image

What version of Home Assistant Core has the issue?

core-2023.11.0

What was the last working version of Home Assistant Core?

core-2023.11.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Reolink IP NVR/camera

Link to integration documentation on our website

https://www.home-assistant.io/integrations/reolink/

Diagnostics information

Debug log ``` 2023-11-02 13:34:06.197 DEBUG (MainThread) [reolink_aio.api] Cellier/192.168.1.93:443::send() HTTP Request params = {'cmd': 'Snap', 'channel': 0, 'snapType': 'sub', 'token': 'a0365aca2676830'} 2023-11-02 13:34:06.801 DEBUG (MainThread) [reolink_aio.api] Cellier/192.168.1.93:443::send() HTTP Response status = 200, content-type = (image/jpeg). 2023-11-02 13:34:06.801 DEBUG (MainThread) [reolink_aio.api.data] Cellier/192.168.1.93:443::send() HTTP Response (snapshot/download) data scrapped because it's too large. 2023-11-02 13:34:08.912 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443: subscription got response status: 200. Payload: http://192.168.1.93:8000/onvif/PullSubManager?Idx=23563629http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse2023-11-02T12:33:43Z2023-11-02T12:47:49Z 2023-11-02 13:34:08.912 DEBUG (MainThread) [reolink_aio.api] Reolink Cellier received ONVIF pull point message without event 2023-11-02 13:34:09.625 DEBUG (MainThread) [reolink_aio.api] Garage voitures/192.168.1.90:443::send() HTTP Request params = {'token': 'f3c8ea900491061'} 2023-11-02 13:34:09.625 DEBUG (MainThread) [reolink_aio.api] Garage voitures/192.168.1.90:443::send() HTTP Request body = [{'cmd': 'GetEnc', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetIsp', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetMdState', 'action': 0, 'param': {'channel': 0}}] 2023-11-02 13:34:09.663 DEBUG (MainThread) [reolink_aio.api] Reolink Cellier requesting ONVIF pull point message 2023-11-02 13:34:09.663 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443: subscription request data: http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest http://192.168.1.93:8000/onvif/PullSubManager?Idx=23563629 admin qjzY+Sl2fjCytPzQIhQniycR3Hc= PZNgjFxHTCi+vb2bzqNIGg== 2023-11-02T12:34:09.000Z PT5M 100 2023-11-02 13:34:10.101 DEBUG (MainThread) [reolink_aio.api] Garage voitures/192.168.1.90:443::send() HTTP Response status = 200, content-type = (text/html). 2023-11-02 13:34:10.101 DEBUG (MainThread) [reolink_aio.api.data] Garage voitures/192.168.1.90:443::send() HTTP Response data: [ { "cmd" : "GetEnc", "code" : 0, "value" : { "Enc" : { "audio" : 1, "channel" : 0, "mainStream" : { "bitRate" : 6144, "frameRate" : 30, "gop" : 2, "height" : 1920, "profile" : "High", "resolution" : 54, "size" : "2560*1920", "vType" : "h264", "width" : 2560 }, "subStream" : { "bitRate" : 160, "frameRate" : 7, "gop" : 4, "height" : 480, "profile" : "High", "resolution" : 28, "size" : "640*480", "vType" : "h264", "width" : 640 } } } }, { "cmd" : "GetIsp", "code" : 0, "value" : { "Isp" : { "antiFlicker" : "Off", "backLight" : "Off", "bd_day" : { "bright" : 128, "dark" : 128, "mode" : "Auto" }, "bd_night" : { "bright" : 128, "dark" : 128, "mode" : "Auto" }, "blc" : 128, "blueGain" : 128, "channel" : 0, "dayNight" : "Auto", "dayNightThreshold" : 50, "drc" : 134, "exposure" : "Auto", "gain" : { "max" : 62, "min" : 1 }, "mirroring" : 0, "nr3d" : 1, "redGain" : 128, "rotation" : 0, "shutter" : { "max" : 125, "min" : 0 }, "whiteBalance" : "Auto" } } }, { "cmd" : "GetMdState", "code" : 0, "value" : { "state" : 0 } } ] 2023-11-02 13:34:10.101 DEBUG (MainThread) [homeassistant.components.reolink.host] Host 192.168.1.90:443 should renew push subscription in: 779 seconds 2023-11-02 13:34:10.101 DEBUG (MainThread) [homeassistant.components.reolink.host] Host 192.168.1.90:443 should renew long_poll subscription in: 780 seconds 2023-11-02 13:34:10.101 DEBUG (MainThread) [homeassistant.components.reolink] Finished fetching reolink.Garage voitures data in 0.476 seconds (success: True) 2023-11-02 13:34:12.436 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443: subscription request data: http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeRequest http://192.168.1.93:8000/onvif/PullSubManager?Idx=23563629 admin moDTtk82RxaC9FCOkmZhAIRhtsg= 1MUDBueFQy+UDCAibJ1fPg== 2023-11-02T12:34:12.000Z 2023-11-02 13:34:12.474 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443: subscription got response status: 200. Payload: http://192.168.1.93:8000/onvif/PullSubManager?Idx=23563629http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeResponse 2023-11-02 13:34:12.474 DEBUG (MainThread) [homeassistant.components.reolink.host] Unregistering webhook reolink_ec71db6cd253_ONVIF 2023-11-02 13:34:12.474 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443: subscription request data: http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeRequest http://192.168.1.93:8000/onvif/Notification?Idx=23563578 admin raOnHxnQtCF45wpxLBky9lDEhus= X0a6EJITTF2rsn2RcKuvKA== 2023-11-02T12:34:12.000Z 2023-11-02 13:34:12.490 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443: subscription got response status: 200. Payload: http://192.168.1.93:8000/onvif/Notification?Idx=23563578http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeResponse 2023-11-02 13:34:12.490 DEBUG (MainThread) [reolink_aio.api] Cellier/192.168.1.93:443::send() HTTP Request params = {'cmd': 'Logout', 'token': 'a0365aca2676830'} 2023-11-02 13:34:12.490 DEBUG (MainThread) [reolink_aio.api] Cellier/192.168.1.93:443::send() HTTP Request body = [{'cmd': 'Logout', 'action': 0, 'param': {}}] 2023-11-02 13:34:12.539 DEBUG (MainThread) [reolink_aio.api] Cellier/192.168.1.93:443::send() HTTP Response status = 200, content-type = (text/html). 2023-11-02 13:34:12.539 DEBUG (MainThread) [reolink_aio.api.data] Cellier/192.168.1.93:443::send() HTTP Response data: [ { "cmd" : "Logout", "code" : 0, "value" : { "rspCode" : 200 } } ] 2023-11-02 13:34:12.542 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.93:443, trying to login with user admin... 2023-11-02 13:34:12.542 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.93:443::send() HTTP Request params = {'cmd': 'Login', 'token': 'null'} 2023-11-02 13:34:12.542 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.93:443::send() HTTP Request body = [{'cmd': 'Login', 'action': 0, 'param': {'User': {'userName': 'admin', 'password': ''}}}] 2023-11-02 13:34:12.813 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.93:443::send() HTTP Response status = 200, content-type = (text/html). 2023-11-02 13:34:12.813 DEBUG (MainThread) [reolink_aio.api.data] Unknown/192.168.1.93:443::send() HTTP Response data: [ { "cmd" : "Login", "code" : 0, "value" : { "Token" : { "leaseTime" : 3600, "name" : "49982c56fcf48ce" } } } ] 2023-11-02 13:34:12.813 DEBUG (MainThread) [reolink_aio.api] Got login response from 192.168.1.93:443: [{'cmd': 'Login', 'code': 0, 'value': {'Token': {'leaseTime': 3600, 'name': '49982c56fcf48ce'}}}] 2023-11-02 13:34:12.813 DEBUG (MainThread) [reolink_aio.api] Logged in at host 192.168.1.93:443. Leasetime 02-11-2023 14:34, token 49982c56fcf48ce 2023-11-02 13:34:12.813 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.93:443::send() HTTP Request params = {'token': '49982c56fcf48ce'} 2023-11-02 13:34:12.813 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.93:443::send() HTTP Request body = [{'cmd': 'Getchannelstatus'}, {'cmd': 'GetDevInfo', 'action': 0, 'param': {}}, {'cmd': 'GetLocalLink', 'action': 0, 'param': {}}, {'cmd': 'GetNetPort', 'action': 0, 'param': {}}, {'cmd': 'GetHddInfo', 'action': 0, 'param': {}}, {'cmd': 'GetUser', 'action': 0, 'param': {}}, {'cmd': 'GetNtp', 'action': 0, 'param': {}}, {'cmd': 'GetTime', 'action': 0, 'param': {}}, {'cmd': 'GetAbility', 'action': 0, 'param': {'User': {'userName': 'admin'}}}] 2023-11-02 13:34:13.833 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.93:443::send() HTTP Response status = 200, content-type = (text/html). 2023-11-02 13:34:13.833 DEBUG (MainThread) [reolink_aio.api.data] Unknown/192.168.1.93:443::send() HTTP Response data: [ { "cmd" : "Unknown", "code" : 1, "error" : { "detail" : "not support", "rspCode" : -9 } }, { "cmd" : "GetDevInfo", "code" : 0, "value" : { "DevInfo" : { "B485" : 0, "IOInputNum" : 0, "IOOutputNum" : 0, "audioNum" : 1, "buildDay" : "build 23062003", "cfgVer" : "v3.0.0.0", "channelNum" : 1, "detail" : "IPC_51516M5MS10E1W01100000001", "diskNum" : 1, "firmVer" : "v3.0.0.2356_23062003", "frameworkVer" : 1, "hardVer" : "IPC_51516M5M", "model" : "RLC-511", "name" : "Cellier", "pakSuffix" : "pak,paks", "serial" : "", "type" : "IPC", "wifi" : 0 } } }, { "cmd" : "GetLocalLink", "code" : 0, "value" : { "LocalLink" : { "activeLink" : "LAN", "dns" : { "auto" : 0, "dns1" : "1.1.1.1", "dns2" : "1.0.0.1" }, "mac" : "ec:71:db:6c:d2:53", "static" : { "gateway" : "192.168.1.1", "ip" : "192.168.1.93", "mask" : "255.255.255.0" }, "type" : "Static" } } }, { "cmd" : "GetNetPort", "code" : 0, "value" : { "NetPort" : { "httpEnable" : 1, "httpPort" : 80, "httpsEnable" : 1, "httpsPort" : 443, "mediaPort" : 9000, "onvifEnable" : 1, "onvifPort" : 8000, "rtmpEnable" : 1, "rtmpPort" : 1935, "rtspEnable" : 1, "rtspPort" : 554 } } }, { "cmd" : "GetHddInfo", "code" : 0, "value" : { "HddInfo" : [ { "capacity" : 30424, "format" : 1, "mount" : 1, "number" : 0, "size" : 459, "storageType" : 2 } ] } }, { "cmd" : "GetUser", "code" : 0, "value" : { "User" : [ { "level" : "admin", "userName" : "admin" }, { "level" : "admin", "userName" : "curinierandco" } ] } }, { "cmd" : "GetNtp", "code" : 0, "value" : { "Ntp" : { "enable" : 1, "interval" : 1440, "port" : 123, "server" : "pool.ntp.org" } } }, { "cmd" : "GetTime", "code" : 0, "value" : { "Dst" : { "enable" : 1, "endHour" : 3, "endMin" : 0, "endMon" : 10, "endSec" : 0, "endWeek" : 3, "endWeekday" : 0, "offset" : 1, "startHour" : 2, "startMin" : 0, "startMon" : 3, "startSec" : 0, "startWeek" : 3, "startWeekday" : 0 }, "Time" : { "day" : 2, "hour" : 13, "hourFmt" : 0, "min" : 34, "mon" : 11, "sec" : 7, "timeFmt" : "DD/MM/YYYY", "timeZone" : -3600, "year" : 2023 } } }, { "cmd" : "GetAbility", "code" : 0, "value" : { "Ability" : { "3g" : { "permit" : 0, "ver" : 0 }, "abilityChn" : [ { "alarmAudio" : { "permit" : 0, "ver" : 0 }, "alarmIoIn" : { "permit" : 0, "ver" : 0 }, "alarmIoOut" : { "permit" : 0, "ver" : 0 }, "alarmMd" : { "permit" : 6, "ver" : 1 }, "alarmRf" : { "permit" : 0, "ver" : 0 }, "batAnalysis" : { "permit" : 0, "ver" : 0 }, "battery" : { "permit" : 0, "ver" : 0 }, "cameraMode" : { "permit" : 6, "ver" : 0 }, "disableAutoFocus" : { "permit" : 6, "ver" : 1 }, "enc" : { "permit" : 6, "ver" : 1 }, "floodLight" : { "permit" : 0, "ver" : 0 }, "ftp" : { "permit" : 6, "ver" : 6 }, "image" : { "permit" : 6, "ver" : 1 }, "indicatorLight" : { "permit" : 0, "ver" : 0 }, "isp" : { "permit" : 6, "ver" : 1 }, "isp3Dnr" : { "permit" : 6, "ver" : 0 }, "ispAntiFlick" : { "permit" : 6, "ver" : 1 }, "ispBackLight" : { "permit" : 6, "ver" : 0 }, "ispBright" : { "permit" : 6, "ver" : 1 }, "ispContrast" : { "permit" : 6, "ver" : 1 }, "ispDayNight" : { "permit" : 6, "ver" : 1 }, "ispExposureMode" : { "permit" : 6, "ver" : 0 }, "ispFlip" : { "permit" : 6, "ver" : 1 }, "ispHue" : { "permit" : 6, "ver" : 1 }, "ispMirror" : { "permit" : 6, "ver" : 1 }, "ispSatruation" : { "permit" : 6, "ver" : 1 }, "ispSharpen" : { "permit" : 6, "ver" : 1 }, "ispWhiteBalance" : { "permit" : 6, "ver" : 0 }, "ledControl" : { "permit" : 5, "ver" : 2 }, "live" : { "permit" : 4, "ver" : 1 }, "mainEncType" : { "permit" : 1, "ver" : 0 }, "mask" : { "permit" : 6, "ver" : 1 }, "mdTriggerAudio" : { "permit" : 0, "ver" : 0 }, "mdTriggerRecord" : { "permit" : 0, "ver" : 0 }, "mdWithPir" : { "permit" : 0, "ver" : 0 }, "osd" : { "permit" : 6, "ver" : 1 }, "powerLed" : { "permit" : 0, "ver" : 0 }, "ptzCtrl" : { "permit" : 7, "ver" : 2 }, "ptzDirection" : { "permit" : 1, "ver" : 0 }, "ptzPatrol" : { "permit" : 0, "ver" : 0 }, "ptzPreset" : { "permit" : 0, "ver" : 0 }, "ptzTattern" : { "permit" : 0, "ver" : 0 }, "ptzType" : { "permit" : 0, "ver" : 1 }, "recCfg" : { "permit" : 6, "ver" : 1 }, "recDownload" : { "permit" : 6, "ver" : 1 }, "recReplay" : { "permit" : 6, "ver" : 1 }, "recSchedule" : { "permit" : 6, "ver" : 2 }, "shelterCfg" : { "permit" : 6, "ver" : 1 }, "snap" : { "permit" : 6, "ver" : 1 }, "supportGop" : { "permit" : 0, "ver" : 0 }, "supportThresholdAdjust" : { "permit" : 6, "ver" : 1 }, "supportWhiteDark" : { "permit" : 6, "ver" : 1 }, "videoClip" : { "permit" : 6, "ver" : 2 }, "waterMark" : { "permit" : 6, "ver" : 1 }, "white_balance" : { "permit" : 6, "ver" : 0 } } ], "alarmAudio" : { "permit" : 0, "ver" : 0 }, "alarmDisconnet" : { "permit" : 6, "ver" : 1 }, "alarmHddErr" : { "permit" : 6, "ver" : 1 }, "alarmHddFull" : { "permit" : 6, "ver" : 1 }, "alarmIpConflict" : { "permit" : 6, "ver" : 1 }, "auth" : { "permit" : 6, "ver" : 1 }, "autoMaint" : { "permit" : 6, "ver" : 1 }, "cloudStorage" : { "permit" : 0, "ver" : 0 }, "customAudio" : { "permit" : 0, "ver" : 0 }, "dateFormat" : { "permit" : 6, "ver" : 1 }, "ddns" : { "permit" : 6, "ver" : 9 }, "ddnsCfg" : { "permit" : 6, "ver" : 1 }, "devInfo" : { "permit" : 4, "ver" : 1 }, "devName" : { "permit" : 6, "ver" : 2 }, "disableAutoFocus" : { "permit" : 6, "ver" : 1 }, "disk" : { "permit" : 0, "ver" : 0 }, "display" : { "permit" : 6, "ver" : 1 }, "email" : { "permit" : 6, "ver" : 3 }, "emailInterval" : { "permit" : 6, "ver" : 1 }, "emailSchedule" : { "permit" : 6, "ver" : 1 }, "exportCfg" : { "permit" : 4, "ver" : 0 }, "ftpAutoDir" : { "permit" : 6, "ver" : 1 }, "ftpExtStream" : { "permit" : 6, "ver" : 1 }, "ftpPic" : { "permit" : 0, "ver" : 0 }, "ftpSubStream" : { "permit" : 6, "ver" : 1 }, "ftpTest" : { "permit" : 6, "ver" : 0 }, "hourFmt" : { "permit" : 6, "ver" : 2 }, "http" : { "permit" : 6, "ver" : 3 }, "httpFlv" : { "permit" : 6, "ver" : 1 }, "https" : { "permit" : 6, "ver" : 3 }, "importCfg" : { "permit" : 1, "ver" : 0 }, "ipcManager" : { "permit" : 6, "ver" : 1 }, "ledControl" : { "permit" : 5, "ver" : 2 }, "localLink" : { "permit" : 6, "ver" : 1 }, "log" : { "permit" : 6, "ver" : 1 }, "mediaPort" : { "permit" : 6, "ver" : 1 }, "ntp" : { "permit" : 6, "ver" : 1 }, "online" : { "permit" : 6, "ver" : 1 }, "onvif" : { "permit" : 6, "ver" : 3 }, "p2p" : { "permit" : 6, "ver" : 1 }, "performance" : { "permit" : 4, "ver" : 1 }, "pppoe" : { "permit" : 6, "ver" : 0 }, "push" : { "permit" : 6, "ver" : 1 }, "pushSchedule" : { "permit" : 6, "ver" : 1 }, "reboot" : { "permit" : 1, "ver" : 1 }, "recExtensionTimeList" : { "permit" : 6, "ver" : 1 }, "recOverWrite" : { "permit" : 6, "ver" : 1 }, "recPackDuration" : { "permit" : 6, "ver" : 0 }, "recPreRecord" : { "permit" : 6, "ver" : 1 }, "restore" : { "permit" : 1, "ver" : 1 }, "rtmp" : { "permit" : 6, "ver" : 3 }, "rtsp" : { "permit" : 6, "ver" : 3 }, "scheduleVersion" : { "permit" : 6, "ver" : 0 }, "sdCard" : { "permit" : 6, "ver" : 1 }, "showQrCode" : { "permit" : 6, "ver" : 0 }, "simMoudule" : { "permit" : 6, "ver" : 0 }, "supportAudioAlarm" : { "permit" : 0, "ver" : 0 }, "supportAudioAlarmEnable" : { "permit" : 0, "ver" : 0 }, "supportAudioAlarmSchedule" : { "permit" : 0, "ver" : 0 }, "supportAudioAlarmTaskEnable" : { "permit" : 0, "ver" : 0 }, "supportBuzzer" : { "permit" : 0, "ver" : 0 }, "supportBuzzerEnable" : { "permit" : 0, "ver" : 0 }, "supportBuzzerTask" : { "permit" : 0, "ver" : 0 }, "supportBuzzerTaskEnable" : { "permit" : 0, "ver" : 0 }, "supportEmailEnable" : { "permit" : 0, "ver" : 0 }, "supportEmailTaskEnable" : { "permit" : 6, "ver" : 1 }, "supportFtpCoverPicture" : { "permit" : 6, "ver" : 1 }, "supportFtpCoverVideo" : { "permit" : 6, "ver" : 1 }, "supportFtpDirYM" : { "permit" : 6, "ver" : 1 }, "supportFtpEnable" : { "permit" : 0, "ver" : 0 }, "supportFtpPicCaptureMode" : { "permit" : 6, "ver" : 1 }, "supportFtpPicResoCustom" : { "permit" : 0, "ver" : 0 }, "supportFtpPictureSwap" : { "permit" : 6, "ver" : 1 }, "supportFtpTask" : { "permit" : 6, "ver" : 1 }, "supportFtpTaskEnable" : { "permit" : 6, "ver" : 1 }, "supportFtpVideoSwap" : { "permit" : 6, "ver" : 1 }, "supportFtpsEncrypt" : { "permit" : 6, "ver" : 1 }, "supportHttpEnable" : { "permit" : 6, "ver" : 1 }, "supportHttpsEnable" : { "permit" : 6, "ver" : 1 }, "supportOnvifEnable" : { "permit" : 6, "ver" : 1 }, "supportRecScheduleEnable" : { "permit" : 6, "ver" : 1 }, "supportRecordEnable" : { "permit" : 0, "ver" : 0 }, "supportRtmpEnable" : { "permit" : 6, "ver" : 1 }, "supportRtspEnable" : { "permit" : 6, "ver" : 1 }, "talk" : { "permit" : 4, "ver" : 0 }, "time" : { "permit" : 6, "ver" : 2 }, "tvSystem" : { "permit" : 6, "ver" : 0 }, "upgrade" : { "permit" : 1, "ver" : 1 }, "upnp" : { "permit" : 6, "ver" : 1 }, "user" : { "permit" : 6, "ver" : 1 }, "videoClip" : { "permit" : 6, "ver" : 2 }, "wifi" : { "permit" : 0, "ver" : 0 }, "wifiTest" : { "permit" : 6, "ver" : 0 } } } } ] ```

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @starkillerog, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `reolink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign reolink` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


reolink documentation reolink source (message by IssueLinks)

starkillerOG commented 1 year ago

@richarddu07 this might be related to https://github.com/home-assistant/core/issues/103226 Which is also using a firmware from June 2023, whith simular sympthoms.

Could you enable debug logging of the reolink integration, restart the reolink integration, wait 2 minutes, disable debug logging again and post the restulting log.txt file here?

The already posted debug log does not include the request and responds where I am searching for. (needed to wait a bit longer after restart to gether more debug logs).

richarddu07 commented 1 year ago

home-assistant_reolink_2023-11-02T19-28-34.784Z.log

starkillerOG commented 1 year ago

@richarddu07 Indeed I see this request:

2023-11-02 20:28:01.841 DEBUG (MainThread) [reolink_aio.api] Cellier/192.168.1.93:443::send() HTTP Request body =
[{'cmd': 'GetEnc', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetRtspUrl', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetChnTypeInfo', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetMdState', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAiState', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetEvents', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetIsp', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetWhiteLed', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetIrLights', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAudioCfg', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetOsd', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetZoomFocus', 'action': 1, 'param': {'channel': 0}}, {'cmd': 'GetEmail', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetPush', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetFtp', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetRec', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAudioAlarm', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAlarm', 'action': 0, 'param': {'Alarm': {'channel': 0, 'type': 'md'}}}]

With this response:

2023-11-02 20:28:17.839 DEBUG (MainThread) [reolink_aio.api.data] Cellier/192.168.1.93:443::send() HTTP Response data:
[
   {
      "cmd" : "Unknown",
      "code" : 1,
      "error" : {
         "detail" : "timeout",
         "rspCode" : -8
      }
   }
]

So this indeed is the same problem as reported here: https://github.com/home-assistant/core/issues/103226

Could you run the following python script (also see other issue) on your camera at IP 192.168.1.93?: https://github.com/home-assistant/core/issues/103226#issuecomment-1790521768 https://github.com/home-assistant/core/issues/103226#issuecomment-1790611211

import logging
import asyncio
from reolink_aio import api

_LOGGER = logging.getLogger(__name__)
#logging.basicConfig(level="INFO")
logging.basicConfig(level="DEBUG")

IP = '192.168.1.93'
username = 'admin'
password = 'PASSWORD'

async def asyncio_demo(loop):
    # Create a host-object (representing either a camera, or NVR with several channels)
    host = api.Host(host=IP, username=username, password=password)

    # Obtain/cache NVR or camera settings and capabilities, like model name, ports, HDD size, etc:
    await host.get_host_data()

    commands = [
        {'cmd': 'GetEnc', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetRtspUrl', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetChnTypeInfo', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetMdState', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAiState', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetEvents', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetIsp', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetWhiteLed', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetIrLights', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAudioCfg', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetOsd', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetZoomFocus', 'action': 1, 'param': {'channel': 0}},
        {'cmd': 'GetEmail', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetPush', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetFtp', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetRec', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAudioAlarm', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAlarm', 'action': 0, 'param': {'Alarm': {'channel': 0, 'type': 'md'}}},
    ]

    for cmd in commands:
        body = [cmd]
        print(await host.send(body))

    # Logout and disconnect
    await host.logout()

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    loop.run_until_complete(asyncio_demo(loop))
richarddu07 commented 1 year ago

reolink_test_debug.txt

starkillerOG commented 1 year ago

@richarddu07 Thank you very much for the log! So sending the requests one at a time works as expected for all requests, that is very good to know and already a possible solution. As a last test, I would like to know what happens If I split the big request in two parts, could you please run this modified script?

import logging
import asyncio
from reolink_aio import api

_LOGGER = logging.getLogger(__name__)
#logging.basicConfig(level="INFO")
logging.basicConfig(level="DEBUG")

IP = '192.168.1.93'
username = 'admin'
password = 'PASSWORD'

async def asyncio_demo(loop):
    # Create a host-object (representing either a camera, or NVR with several channels)
    host = api.Host(host=IP, username=username, password=password)

    # Obtain/cache NVR or camera settings and capabilities, like model name, ports, HDD size, etc:
    await host.get_host_data()

    body_1 = [
        {'cmd': 'GetEnc', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetRtspUrl', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetChnTypeInfo', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetMdState', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAiState', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetEvents', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetIsp', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetWhiteLed', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetIrLights', 'action': 0, 'param': {'channel': 0}},
    ]
    body_2 = [
        {'cmd': 'GetAudioCfg', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetOsd', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetZoomFocus', 'action': 1, 'param': {'channel': 0}},
        {'cmd': 'GetEmail', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetPush', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetFtp', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetRec', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAudioAlarm', 'action': 0, 'param': {'channel': 0}},
        {'cmd': 'GetAlarm', 'action': 0, 'param': {'Alarm': {'channel': 0, 'type': 'md'}}},
    ]

    print(await host.send(body_1))
    print(await host.send(body_2))

    # Logout and disconnect
    await host.logout()

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    loop.run_until_complete(asyncio_demo(loop))

It would be more efficient to split in 2 when receiving the timeout response than sending all requests seperately (takes longer).

richarddu07 commented 1 year ago

Bonjour, ci-joint le nouveau fichier debug. Bonne journée. reolink_test-debug2.txt

starkillerOG commented 1 year ago

Thanks, so splitting in 2 did not work for one of the requests. I now have enough info, I will start working on a fix.

starkillerOG commented 1 year ago

@richarddu07 I have released reolink-aio 0.7.14 which should fix the issue, the HomeAssistant PR to start using this version has also already been merged and will be included in HA 2023.11.2 which is expected to be released on November 10th.

Please wait for HA 2023.11.2 and once updated to that version, let me know if the issue is fixed.

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library or purchase Reolink products through this affiliate link.

starkillerOG commented 11 months ago

@richarddu07 I just noticed the fix already made it into HA 2023.11.1, anyway HA 2023.11.2 is now also released. Could you update and let me know if all the entities come back online?

richarddu07 commented 11 months ago

Merci pour le correctif, tout fonctionne parfaitement. Bonnr soirée.