1
0
mirror of synced 2026-03-21 09:53:41 +00:00

Update amcrest2mqtt.py

JSON structure seems to have changed in latest firmware. Updated the row 426 to use right json path for human detection.
This commit is contained in:
carefulcomputer
2022-10-30 10:25:19 -07:00
committed by GitHub
parent 9917b41381
commit 013e138254

View File

@@ -423,7 +423,7 @@ async def main():
if (is_ad110 and code == "ProfileAlarmTransmit") or (code == "VideoMotion" and not is_ad110):
motion_payload = "on" if payload["action"] == "Start" else "off"
mqtt_publish(topics["motion"], motion_payload)
elif code == "CrossRegionDetection" and payload["data"]["ObjectType"] == "Human":
elif code == "CrossRegionDetection" and payload["data"]["Object"]["ObjectType"] == "Human":
human_payload = "on" if payload["action"] == "Start" else "off"
mqtt_publish(topics["human"], human_payload)
elif code == "_DoTalkAction_":