DewGew / Domoticz-Google-Assistant

Google Assistant for Domoticz
https://github.com/DewGew/Domoticz-Google-Assistant/wiki
Apache License 2.0
79 stars 41 forks source link

Pin code not recognized when arm/disarm Security System #352

Closed mealgi closed 9 months ago

mealgi commented 10 months ago

Describe the bug:
When activating/disactivating the security system the pin code is not recognized correctly

Expected behavior:
When activating/disactivating the security system the pin code is to be recognized

Logs:

Paste the dzga logs here.

Desktop (please complete the following information): Context : Version: 2024.2 (build 15866) Build Hash: d7e442ae0-modified Compile Date: 2024-01-20 16:18:19 dzVents Version: 3.1.8 Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110] DZGA version 1.23.12

Smartphone (please complete the following information):

Additional context, screenshot:

Proposed solution: in trait.py line 6 insert : import hashlib

line 893: replace : seccode = challenge.get('pin')

by : seccode_raw = challenge.get('pin') seccode_md5 = hashlib.md5(seccode_raw.encode()) seccode=seccode_md5.hexdigest()