dchesterton / amcrest2mqtt

Expose all events from an Amcrest device to an MQTT broker
https://hub.docker.com/r/dchesterton/amcrest2mqtt
MIT License
150 stars 35 forks source link

AD110 Front Door Motion Does Not Publish - "ProfileAlarmTransmit" is not used #83

Open DayRunner131 opened 2 years ago

DayRunner131 commented 2 years ago

It appears that under FW V1.000.00AC008.1.R (2021-07-12) for the AD110, "AlarmLocal" is now used for motion alerts. It appears "ProfileAlarmTransmit" is not used. No MQTT payloads have been pushed for motion alerts to HomeAssistant due to this nomenclature change.

05/08/2022 22:21:58 [INFO] {'Code': 'VideoMotion', 'action': 'Start', 'index': '0'} 05/08/2022 22:22:11 [INFO] {'Code': 'VideoMotion', 'action': 'Stop', 'index': '0'} 05/08/2022 22:24:25 [INFO] {'Code': 'VideoMotion', 'action': 'Start', 'index': '0'} 05/08/2022 22:24:26 [INFO] {'Code': 'AlarmLocal', 'action': 'Start', 'index': '6'} 05/08/2022 22:24:29 [INFO] {'Code': 'DoTalkAction', 'action': 'Pulse', 'index': '0', 'data': {'Action': 'Invite', 'CallID': '20220805182427@360330@192.168.1.203', 'CallSrcMask': 4}} 05/08/2022 22:24:29 [INFO] {'Code': 'CallNoAnswered', 'action': 'Start', 'index': '0', 'data': {'CallID': '4'}} 05/08/2022 22:24:30 [INFO] {'Code': 'UpdateFile', 'action': 'Pulse', 'index': '0'} 05/08/2022 22:24:30 [INFO] {'Code': 'NewFile', 'action': 'Pulse', 'index': '55975043', 'data': {'File': '/mnt/sd/SnapShot/2022-08-05/18/18-24-27[0].jpg', 'Size': 276424}} 05/08/2022 22:24:39 [INFO] {'Code': 'AlarmLocal', 'action': 'Stop', 'index': '6'} 05/08/2022 22:24:39 [INFO] {'Code': 'CallNoAnswered', 'action': 'Stop', 'index': '0', 'data': {'CallID': '4'}} 05/08/2022 22:24:39 [INFO] {'Code': 'DoTalkAction', 'action': 'Pulse', 'index': '0', 'data': {'Action': 'Hangup', 'CallID': '20220805182427@360330@192.168.1.203', 'CallSrcMask': 4, 'HangupReason': 'HangupByPhone'}} 05/08/2022 22:24:41 [INFO] {'Code': 'UpdateFile', 'action': 'Pulse', 'index': '0'} 05/08/2022 22:24:41 [INFO] {'Code': 'NewFile', 'action': 'Pulse', 'index': '31', 'data': {'File': '/mnt/sd/Record/2022-08-05/18/18.24.18-18.24.38[R][0@0][0].dav', 'Size': 2094136}} 05/08/2022 22:24:41 [INFO] {'Code': 'VideoMotion', 'action': 'Stop', 'index': '0'} 05/08/2022 22:26:12 [INFO] {'Code': 'TimeChange', 'action': 'Pulse', 'index': '0', 'data': {'BeforeModifyTime': '2022-08-05 18:26:12', 'ModifiedTime': '2022-08-05 18:26:11'}} 05/08/2022 22:26:12 [INFO] {'Code': 'NTPAdjustTime', 'action': 'Pulse', 'index': '0', 'data': {'Address': '200.160.0.8', 'Before': '2022-08-05 18:26:04', 'result': True}} 05/08/2022 22:26:33 [INFO] {'Code': 'VideoMotion', 'action': 'Start', 'index': '0'} 05/08/2022 22:26:45 [INFO] {'Code': 'VideoMotion', 'action': 'Stop', 'index': '0'}

This would need to be adjusted within amcrest2mqtt.py on line 423

Current: if (is_ad110 and code == "ProfileAlarmTransmit") or (code == "VideoMotion" and not is_ad110):

Proposed: if (is_ad110 and code == "AlarmLocal") or (code == "VideoMotion" and not is_ad110):

I am not sure at what FW version this changed.

MYeager1967 commented 1 month ago

Looking at this. If needed, it will be incorporated.